Average: 0
Rating Count: 0

Development status: Released, Release: TangoSnmp-Release_2.0
Information status: Updated
Repository: https://gitlab.esrf.fr/accelerators/System/tangosnmp

Class Description

This class is a bridge between Tango and SNMP. It allows the user to get/set snmp data to/from a snmp agent. It is built on top of the <a href="http://www.net-snmp.org" target="_top">net-snmp</a> library. You can get/set SNMP data using generic commands or you can configure this Tango class to create dynamic attributes which are the Tango part of SNMP data. See the definition of the device properties to find out how this can be achieved. To communicate with the SNMP agent, this class uses SNMP v2c.

Families: Communication

Key words:

Platform: Unix Like

Language: Cpp

License: GPL



Manufacturer: none

Bus: Not Applicable

Class interface


Name Description
MIBFileDirsSpectrum: DevString This attribute is the list of directories where the sofwtare will look for MIB files.
LoadedMIBModulesSpectrum: DevString This is the list of the MIB modules loaded in the Tango server


Name Description
StateInput: DevVoid
Output: State
Device state
This command gets the device state (stored in its device_state data member) and returns it to the caller.
StatusInput: DevVoid
Output: ConstDevString
Device status
This command gets the device status (stored in its device_status data member) and returns it to the caller.
GetSnmpDataInput: DevString
The SNMP data name
Output: DevVarDoubleStringArray
The SNMP data as string(s) or double(s) according to the SNMP data type
Get some data from the SNMP agent. The data to be retrieved is given to the command as input argument. The SNMP data are returned to the caller as string(s) or double(s). It is up to the client to convert them in the required data type.
SetSnmpDataInput: DevVarDoubleStringArray
s[0] = Snmp data name, s[1] = value to be written (for string data type) d[0] = value to be written (for number data type)
Output: DevVoid
Write a new value into a SNMP data. The snmp data name is given as the first string. Value to be written is passed to the command as the second string or as the first double.



Name Description
communityDevString The comunity string used to build the connection to the agent
timeoutDevULong Timeout (uS) for the agent communication
MIBFileArray of DevString List of MIB file to be loaded by the Tango class
AgentIpAddrDevString The host IP address where the SNMP agent is running
DynamicAttributesArray of DevString List of dynamic attributes to be instanciated by this device. Each string in the array defined one attribute with the following syntax: att_name=SNMP data name, Tango data type, READ or READ_WRITE,[label],[unit],[format] The last three are optionals but if you omit one, the comma separator has to be used for proper string parsing. If the MIB file is available to the software, the SNMP data name can be expressed using MIB OID notation. It is not necessary to add the last .0 for simple data. The attribute format will be automatically deduced from the information retrieved from SNMP. If the defnition of the Tango attribute is incoherent with the MIB OID definition, the device state switches to ALARM and the device status gives you which attribute(s) aer wrongly defined.

Please log in to comment.

10 Sep 2019, Reynald Bourtembourg
The device class has been updated.
You can see previous version here .

23 Feb 2017, Piotr Goryl
The device class has been updated.
You can see previous version here .

19 Jan 2017, Piotr Goryl
The device server has been updated.
You can see previous version here .

3 Jan 2017, Piotr Goryl
The device server has been added to catalogue.
Added by:pgoryl2 on:3 Jan 2017, 2:50 p.m.