WIENER_SNMP
1.1
A C/C++ library for MPOD crate access via SNMP
|
This library allows a simple access to iseg high voltage and WIENER low voltage modules in a WIENER MPOD crate. The WIENER MPOD is connected to the controlling computer via Ethernet. The used network protocol is SNMP (Simple Network Management Protocol). The open-source library NET-SNMP (http://www.net-snmp.org), available for Microsoft Windows and Linux is used as backend.
The textfile WIENER-CRATE-MIB.txt describes the SNMP items available in the MPOD crate and translates the textual SNMP descriptions to the SNMP Object IDs.
This library is copyright:
(c) 2006-2013 wiener Plein & Baus, Corp. (c) 2012-2013 iseg Spezialelektronik GmbH
This library was developed using:
Start -> Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (32 or 64 bit)
cd net-snmp-5.7.1 win32\build.bat
(8 - debug mode if you want to debug net-snmp) 12 - install development files
typedef u_int socklen_t;
Although this library doesn't use Qt, a configured Qt matching the MSVC toolchain is needed. Under Windows, Qt 4.8.2-MSVC2010 is used.
Although this library doesn't use Qt, it is used for the build process. So the Qt development files need to be installed along with the net-snmp development files:
sudo apt-get install build-essential libqt4-dev qtcreator sudo apt-get install libsnmp-dev snmp snmp-mibs-downloader
There are several function groups to set or get data either from a single channel, multiple channels or from the module in a specific slot. These function groups are listed below.
The functions snmpInit(), snmpOpen(), snmpClose() and snmpCleanup() handle the connection to the MPOD crate.
The functions setMainSwitch() and getMainSwitch() allows to soft-switching the crate on/off and reading back the current status. Please note that it is not possible to turn power on, if the hardware power switch is in position "0".
More information about the functions can be found in the source code documentation in WIENER_SNMP.h and in the WIENER-CRATE-MIB.TXT.
A MPOD crate consists of 10 slots for high voltage and low voltage modules. Each slot can handle a maximum of 100 low voltage or high voltage channels. So the parameter "channel" for all getOutput.../setOutput... functions is in the range of:
If the module has less than 100 channels, only the available channels are used. For example, a 24 channel module uses the following channels: