SNMP_AGENT (FB)¶
FUNCTION_BLOCK SNMP_AGENT
This function block allows to request and set registered values via SNMP GET, SNMP GET_NEXT and SNMP SET. Use the function blocks SNMP_STRING, SNMP_DINT or SNMP_OBJECT to register OIDs and the corresponding values.
SNMP V3 GET and GET_NEXT
Set an unique engine id via g_EngineId
Create an user with the functions CreateUser (read only) or CreateRWUser (read write, see SNMP SET)
SNMP SET
Conditions for SET:
Works with SNMP V3 only
eAccessType of SNMP_STRING, SNMP_DINT or SNMP_OBJECT must be AccessType.ReadWrite
The user must be created with the function CreateRWUser
- InOut:
Scope
Name
Type
Initial
Comment
Input
xExecuteBOOLStarts the agent
sOwnIPSTRING(100)Hostname or IP address of the SNMP master (the IP of the control)
uiPortUINT161
Port of SNMP agent
sCommunitySTRING‚‘
The community name for this agent (only relevant for SNMP versions other than V3). The community name of incoming requests will be checked against the value. If the community name of an incoming request is not equal to the value of sCommunity, then the request will be discarded. If the value is ‚‘ then community name of incoming requests will NOT be checked. Default: ‚‘
Output
xBusyBOOLTrue while busy
xDoneBOOLTrue if the call has finished
xErrorBOOLTrue if an error occured
eErrorError state of the last request