Previous Topic: snmpOIDParser FunctionNext Topic: snmpProtectedDiv Function


snmpOctetStringFloat Function

This function converts an SNMP octet string to a floating point value. Use this function to certify devices. An SNMP octet string is a seven-bit ASCII string.

Syntax

This function has the following format:

Object snmpOctetStringFloat(byte[] octetString)

Parameters

octetString

The SNMP octet string.

Return Values

Returns the converted string value, or returns "null" when the function cannot convert the string.

Examples

The following expression produces the following result for an octetString of {0x33, 0x33, 0x2E, 0x33, 0x33}:

Expression:

snmpOctetStringFloat (octetString) 

Result:

33.33

The same expression produces the following result for an octetString of {0x36, 0x36, 0x36}:

Result:

666.0