send_boolean
Function description
The send_boolean function should be used to send a boolean
value to the master agent.
Function parameters
$1 - The OID to send before the data.
$2 - The value to send (T for true, F for false)
Example use
Listing 1
# Function to send device health
#
# @in_param $1 - The OID to send before this data
# @in_param $2 - The index value
#
function send_device_hlth
{
local DEVFNAME VALUES
# Make the device info filename
get_device_file_basepath ${2} DEVFNAME
DEVFNAME="${DEVFNAME}_state"
# Find the entry in above file
VALUES=($(grep "result:" < ${DEVFNAME}))
[[ "${VALUES[5]}" == "PASSED" ]] && send_boolean ${1} "T" || send_boolean ${1} "F"
}