snmpPublishInteger (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All NX devices

Firmware version:

1.60.00


Publish an integer type variable.

The published variable can be read from any authenticated SNMP device on an authorized network.

Use snmpGetInteger to read the variable from an RTCU device.

 

Input:

V : DINT

The value to publish.

 

OID : STRING

The OID representing the variable to publish.

 

Subtype : USINT [0..2]

The type of integer to publish.

0:

Signed integer type

1:

Unsigned integer type COUNTER32.

2:

Unsigned integer type GAUGE32.

 

Writable : BOOL (Default false)

Give permissions to write to this variable with snmpSetInteger.

 

Output:

None.

 

 

Returns: INT

1

- Success.

0

- This function is not supported.

-10

- Invalid input OID.

-12

- General error.

-14

- OID was published with another type.

-15

- Maximum amount of published OIDs reached. See limitations on overview page.

 

Declaration

FUNCTION snmpPublishInteger : INT;
VAR_INPUT
  v        : MANDATORY DINT;
  oid      : MANDATORY STRING;
  subtype  : USINT := 0;
  writable : BOOL := FALSE;
END_VAR;

 

Example:

// Please see the example at Examples - SNMP Client.