SNMP_GET_REQUEST.Reset (METH) ¶ METHOD Reset Reset udp_peer and internal arrays.
SNMP_SET.Reset (METH) ¶ METHOD Reset Reset udp_peer and internal arrays.
SNMP_TRAP_SENDER.Reset (METH) ¶ METHOD Reset Reset udp_peer and internal arrays.
Users ¶ CreateRWUser (Function) CreateUser (Function) DeleteUser (Function)
SNMP_SET (FB) ¶ FUNCTION_BLOCK SNMP_SET Function block to send SNMP SET request to an agent. InOut: Scope Name Type Initial Comment Input xExecute BOOL Starts the request sHost STRING(100) Hostname or IP address of the SNMP agent sOwnIP STRING(100) Hostname or IP address of the SNMP master (the IP of the control) snmpVarBindings REFERENCE TO ARRAY [0..(gc_uiMaxSNMPValues - 1)] OF SNMPVarBinding Variable bindings (OID/Value) to send iNumberOfVarBindings INT Number of variable bindings. uiPeerPort UINT 161 Port of the sender (the control) uiSendPort UINT 161 Port of the agent (printer, router etc.) sCommunity STRING ‘public’ The community, default: ‘public’ xClosePeer BOOL Rising edge closes the UDP peer. uiTimeout UINT 1000 Timeout in milliseconds, default: 1000 ms bySNMPVersion SNMPVersion SNMPVersion.V1 SNMP Version, default: V1 sUserName STRING ‘’ SNMP V3 only: Name of the registered user. Use the function CreateUser to register an user. sContextName STRING ‘’ SNMP V3 only: Context name xRequestReport BOOL TRUE SNMP V3 only: TRUE: Requests a report to discover the engineId of the agent, Default: TRUE Output xBusy BOOL True while busy xDone BOOL True if the call has finished xError BOOL True if an error occured aSNMPValues ARRAY [0..gc_uiMaxSNMPValues] OF SNMPValue The result of the set request iSize INT Size of aSNMPValues eError ERROR Error state of the function block diErrorStatus DINT SNMP error status of the last request diErrorIndex DINT SNMP error index of the last request (index of the object that caused the error) diRequestId DINT SNMP request id of the last request abResponse ARRAY [0..(gc_uiMaxTelegramLength - 1)] OF BYTE msgAuthoritativeEngineID SNMPValue SNMP V3 only: The authoritative engine Id. If xRequestReport = TRUE then this is the discovered engine id of the agent. If xRequestReport = FALSE then GVL.g_pEngineId is used. Methods: Reset Structure: Reset (Method)
Trap ¶ SNMP_TRAP_RECEIVER (FunctionBlock) SNMP_TRAP_SENDER (FunctionBlock) Reset (Method)
SNMP_TRAP_RECEIVER (FB) ¶ FUNCTION_BLOCK SNMP_TRAP_RECEIVER Function block to receive TRAP and INFORM requests. InOut: Scope Name Type Initial Comment Input xExecute BOOL Starts the receiver sOwnIP STRING(100) Hostname or IP address of the SNMP master (the IP of the control) uiPort UINT 162 TRAP port (default: 162) Output xBusy BOOL True while busy xDone BOOL True if the call has finished xError BOOL True if an error occured xReceived BOOL TRUE if a TRAP was received aSNMPValues ARRAY [0..gc_uiMaxSNMPValues] OF SNMPValue The values of the received TRAP iSize INT Size of the received values aSNMPValues sSenderIP STRING(100) The IP address of the TRAP sender sEnterprise STRING((gc_iMaxValueLength - 1)) The sender enterprise OID udiTimestamp UDINT Timestamp of the last received trap eError ERROR Error state of the function block
SNMP_TRAP_SENDER (FB) ¶ FUNCTION_BLOCK SNMP_TRAP_SENDER Function block to send SNMP TRAP and INFORM requests. InOut: Scope Name Type Initial Comment Input xExecute BOOL Starts the request sHost STRING(100) Hostname or IP address of the SNMP agent sOwnIP STRING(100) Hostname or IP address of the SNMP master (the IP of the control) uiPeerPort UINT 161 Port of the sender (the control) uiSendPort UINT 161 Port of the agent (printer, router etc.) sEnterprise STRING((gc_iMaxValueLength - 1)) The OID which generated this TRAP snmpVarBindings REFERENCE TO ARRAY [0..(gc_uiMaxSNMPValues - 1)] OF SNMPVarBinding Variable bindings (OID/Value) to send iNumberOfVarBindings INT Number of variable bindings. sCommunity STRING ‘public’ The community, default: ‘public’ xClosePeer BOOL Rising edge closes the UDP peer. bGenericTrapType BYTE 6 Generic trap type, default: 6 (enterprise specific) bSpecificTrapType BYTE 0 Specific trap type, default 0 udiTimestamp UDINT 0 Timestamp, default 0 eTrapType TrapType TrapType.V1_Trap Type of the request (default V1_Trap) uiTimeout UINT 1000 Timeout in milliseconds, default: 1000 ms (only for INFORM messages) bySNMPVersion SNMPVersion SNMPVersion.V1 SNMP Version, default: V1 sUserName STRING SNMP V3 only: Name of the registered user. Use the function CreateUser to register an user. sContextName STRING ‘’ SNMP V3 only: Context name msgAuthoritativeEngineID REFERENCE TO SNMPValue SNMP V3 only: The authoritative engine Id. If not set, then GVL.g_pEngineId is used. You can discover the engine id via SNMP_GET_REQUEST (see output msgAuthoritativeEngineID) with xRequestReport = TRUE. Output xBusy BOOL True while busy xDone BOOL True if the call has finished xError BOOL True if an error occured eError Error Error status of the request. Methods: Reset Structure: Reset (Method)
Functions ¶ Converter DINT2SNMPValue (Function) LINT2SNMPValue (Function) String2SNMPValue (Function) MessageSubsystemV3 USM Users CreateRWUser (Function) CreateUser (Function) DeleteUser (Function) Utils SNMPValues2VarBindings (Function)
Converter ¶ DINT2SNMPValue (Function) LINT2SNMPValue (Function) String2SNMPValue (Function)