SNMP supports data types that do not directly correspond to Sybase CEP data types.
For example, Sybase CEP does not have unsigned data types. Sybase CEP also does not support the SNMP Sequence and Sequence-of datatypes without user assistance.
Sybase CEP maps the SNMP datatypes as follows:
ASN.1 Datatype |
Sybase CEP Datatype |
---|---|
ASN_INTEGER |
C8_INT |
ASN_OCTET_STR |
C8_CHAR_PTR |
ASN_BIT_STR |
C8_BLOB_PTR |
ASN_OPAQUE |
C8_BLOB_PTR |
ASN_OBJECT_ID |
C8_BLOB_PTR |
ASN_TIMETICKS |
C8_INTERVAL |
ASN_GAUGE |
C8_INT |
ASN_COUNTER |
C8_INT |
ASN_IPADDRESS |
C8_INT |
ASN_NULL |
C8_BLOB_PTR |
ASN_UINTEGER |
C8_INT |
ASN_COUNTER32 |
C8_LONG |
ASN_COUNTER64 |
C8_LONG |
ASN_OPAQUE_I64 |
C8_BLOB_PTR |
ASN_OPAQUE_U64 |
C8_BLOB_PTR |
ASN_OPAQUE_COUNTER64 |
C8_BLOB_PTR |
ASN_OPAQUE_FLOAT |
C8_FLOAT |
ASN_OPAQUE_DOUBLE |
C8_FLOAT |
When using SNMP, provide a fixed schema that takes the entire SNMP request and sends a single message to the Sybase CEP Engine. This single message will provide a time basis for the SNMP query.
Take the following into consideration:
Columns that hold SNMP type Counter32 should be defined as Long rather than Integer to allow proper extraction. Otherwise, overflow can result in negative values.
Sybase CEP has only signed integer and long values while ASN.1/net-snmp has both signed and unsigned values.
Sybase CEP uses a C/C++ double for C8_FLOAT while ASN.1/net-snmp has both C/C++ float and double.
ASN_TIMETICKS uses a resolution of hundredths of a second while Sybase CEP uses microseconds. This adapter multiplies the value by 10,000 to convert to microseconds. ASN_TIMETICKS is an interval, not a wall clock time, so the conversion to C8_INTERVAL is correct.
The conversions to C8_BLOB_PTR are left to developers to decode as necessary. The coded interpretation is generally OID specific.
The object IDs may be in either of two forms: symbolic or numeric. Numeric OIDs contain embedded period characters (".") as part of the OID. If more than one OID is specified, the OIDs must be separated by a blank, tab, or newline.