send_none

Function description

The send_none function should be used to indicate to the master agent that no value exists at the queried OID.

Function parameters

$1 - The (optional) OID to send before the data.

Example use

Listing 1
  1. # Function to send the index value
  2. #
  3. #   @in_param   $1 - The OID to send before this data
  4. #   @in_param   $2 - The index value
  5. #
  6. function send_index
  7. {
  8.     # If we were passed an index...
  9.     if (( $# > 1 )); then
  10.         # ...and the index is in range...
  11.         if (( ${2} <= ${#DEVICES[@]} )); then
  12.             # Send the OID and the index number.
  13.             send_integer ${1} ${2}
  14.             return
  15.         fi
  16.     fi
  17.  
  18.     # Send the OID and NONE.
  19.     send_none ${1}
  20. }
Example code demonstrating use of the send_none function