Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 150 → Rev 151

/cvi/instr/MPOD/MPOD.c
0,0 → 1,83
#include <windows.h>
#include <cvirte.h>
#include <utility.h>
#include <stdio.h>
#include <stdarg.h>
#include "WIENER_SNMP.h"
 
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow) {
 
double ret;
// double voltage;
double vSet=0;
int ch=0;
int iret;
// int i, j;
 
// oid oidStr[MAX_OID_LEN];
// size_t lengthOidStr;
 
HSNMP crate1;
if (InitCVIRTE (hInstance, 0, 0) == 0)
return -1; /* out of memory */
if(!snmpInit()) return 1; // basic init
crate1 = snmpOpen("arich-mpod1.kek.jp"); // open TCP/IP socket
if(!crate1) return 1;
 
printf("-----------------------------------------------------------------\n");
 
iret=getMainSwitch(crate1);
printf("Main Switch = %i\n", iret);
 
// strcpy(oidStr,"moduleNumber.0");
// strcpy(oidStr,"fanNominalSpeed.0");
// iret=snmpGetInt(crate1, oidStr, strlen(oidStr));
// printf("Module Number = %i\n", iret);
 
vSet = getOutputVoltage(crate1, ch);
printf("Output Voltage %i = %f.\n", ch, vSet);
//Test Channel Status
iret=getChannelSwitch(crate1, ch);
printf("Channel Status %i = %i\n", ch, iret);
 
//Test Reading the Sense Measurement
ret = getOutputSenseMeasurement(crate1, ch);
printf("Sense Voltage = %f\n", ret);
 
//Test Reading the Current
ret = getCurrentMeasurement(crate1, ch);
printf("Current Measurement = %f\n", ret);
 
printf("Turning channel %i ON\n", ch);
setChannelSwitch(crate1, ch, 1);
Delay(1);
//Test Channel Status
iret=getChannelSwitch(crate1, ch);
printf("Channel Status %i = %i\n", ch, iret);
 
//Test Reading the Sense Measurement
ret = getOutputSenseMeasurement(crate1, ch);
printf("Sense Voltage = %f\n", ret);
 
//Test Reading the Current
ret = getCurrentMeasurement(crate1, ch);
printf("Current Measurement = %f\n", ret);
 
getchar();
 
printf("Turning channel %i OFF\n", ch);
setChannelSwitch(crate1, ch, 0);
 
printf("-----------------------------------------------------------------\n");
 
snmpClose(crate1);
snmpCleanup(); // finish
 
return 0;
}
/cvi/instr/MPOD/MPOD.prj
0,0 → 1,467
[Project Header]
Version = 1302
Pathname = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.prj"
CVI Dir = "/c/program files (x86)/national instruments/cvi2013"
CVI Shared Dir = "/C/Program Files (x86)/National Instruments/Shared/CVI"
CVI Pub Local Dir = "/C/ProgramData/National Instruments/CVI2013"
CVI Pub Global Dir = "/C/ProgramData/National Instruments/CVI"
IVI Standard Root Dir = "/C/Program Files (x86)/IVI Foundation/IVI"
VXIplug&play Framework Dir = "/C/Program Files (x86)/IVI Foundation/VISA/winnt"
IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
Number of Files = 5
Target Type = "Executable"
Flags = 2064
Copied From Locked InstrDrv Directory = False
Copied from VXIPNP Directory = False
Locked InstrDrv Name = ""
Don't Display Deploy InstrDrv Dialog = False
 
[Folders]
User Interface Files Folder Not Added Yet = True
Instrument Files Folder Not Added Yet = True
Folder 0 = "Source Files"
FolderEx 0 = "Source Files"
Folder 1 = "Include Files"
FolderEx 1 = "Include Files"
Folder 2 = "Library Files"
FolderEx 2 = "Library Files"
 
[File 0001]
File Type = "CSource"
Res Id = 1
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "MPOD.c"
Path = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.c"
Exclude = False
Compile Into Object File = False
Project Flags = 0
Folder = "Source Files"
Folder Id = 0
 
[File 0002]
File Type = "CSource"
Res Id = 2
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "WIENER_SNMP.c"
Path = "/c/SAMO/Programi/NI/cvi/instr/MPOD/WIENER_SNMP.c"
Exclude = False
Compile Into Object File = False
Project Flags = 0
Folder = "Source Files"
Folder Id = 0
 
[File 0003]
File Type = "Include"
Res Id = 3
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "net-snmp-config.h"
Path = "/c/SAMO/Programi/NI/cvi/instr/MPOD/net-snmp-config.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0004]
File Type = "Include"
Res Id = 4
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "WIENER_SNMP.h"
Path = "/c/SAMO/Programi/NI/cvi/instr/MPOD/WIENER_SNMP.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0005]
File Type = "Library"
Res Id = 5
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../../../../usr/lib/netsnmp.lib"
Path = "/c/usr/lib/netsnmp.lib"
Exclude = False
Project Flags = 0
Folder = "Library Files"
Folder Id = 2
 
[Custom Build Configs]
Num Custom Build Configs = 0
 
[Default Build Config Debug]
Config Name = "Debug"
Is 64-Bit = False
Is Release = False
Default Calling Convention = "cdecl"
Optimization Level = "Optimize for speed (level 2)"
Require Prototypes = True
Show Warning IDs in Build Output = False
Selected Warning Level = "Common"
Warning List None = ""
Warning List Common = ""
Warning List Extended = ""
Warning List All = ""
Warning Mode = 0
Enable Unreferenced Identifiers Warning = True
Enable Pointer Mismatch Warning = True
Enable Unreachable Code Warning = True
Enable Assignment In Conditional Warning = True
Uninitialized Locals Compile Warning = "Aggressive"
Require Return Values = True
Enable C99 Extensions = True
Enable OpenMP Extensions = False
Stack Size = 250000
Stack Reserve = 1048576
Stack Commit = 4096
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Embed Timestamp = True
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Numeric File Version = "1,0,0,0"
Numeric Prod Version = "1,0,0,0"
Comments = ""
Comments Ex = ""
Company Name = ""
Company Name Ex = "%company"
File Description = "MPOD (Debug x86)"
File Description Ex = "%application (%rel_dbg %arch)"
File Version = "1.0"
File Version Ex = "%f1.%f2"
Internal Name = "MPOD"
Internal Name Ex = "%basename"
Legal Copyright = "Copyright © 2016"
Legal Copyright Ex = "Copyright © %company %Y"
Legal Trademarks = ""
Legal Trademarks Ex = ""
Original Filename = "MPOD.exe"
Original Filename Ex = "%filename"
Private Build = ""
Private Build Ex = ""
Product Name = " MPOD"
Product Name Ex = "%company %application"
Product Version = "1.0"
Product Version Ex = "%p1.%p2"
Special Build = ""
Special Build Ex = ""
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Default Build Config Release]
Config Name = "Release"
Is 64-Bit = False
Is Release = True
Default Calling Convention = "cdecl"
Optimization Level = "Optimize for speed (level 2)"
Require Prototypes = True
Show Warning IDs in Build Output = False
Selected Warning Level = "Common"
Warning List None = ""
Warning List Common = ""
Warning List Extended = ""
Warning List All = ""
Warning Mode = 0
Enable Unreferenced Identifiers Warning = True
Enable Pointer Mismatch Warning = True
Enable Unreachable Code Warning = True
Enable Assignment In Conditional Warning = True
Uninitialized Locals Compile Warning = "Aggressive"
Require Return Values = True
Enable C99 Extensions = True
Enable OpenMP Extensions = False
Stack Size = 250000
Stack Reserve = 1048576
Stack Commit = 4096
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Embed Timestamp = True
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Default Build Config Debug64]
Config Name = "Debug64"
Is 64-Bit = True
Is Release = False
Default Calling Convention = "cdecl"
Optimization Level = "Optimize for speed (level 2)"
Require Prototypes = True
Show Warning IDs in Build Output = False
Selected Warning Level = "Common"
Warning List None = ""
Warning List Common = ""
Warning List Extended = ""
Warning List All = ""
Warning Mode = 0
Enable Unreferenced Identifiers Warning = True
Enable Pointer Mismatch Warning = True
Enable Unreachable Code Warning = True
Enable Assignment In Conditional Warning = True
Uninitialized Locals Compile Warning = "Aggressive"
Require Return Values = True
Enable C99 Extensions = True
Enable OpenMP Extensions = False
Stack Size = 250000
Stack Reserve = 1048576
Stack Commit = 4096
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Embed Timestamp = True
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Default Build Config Release64]
Config Name = "Release64"
Is 64-Bit = True
Is Release = True
Default Calling Convention = "cdecl"
Optimization Level = "Optimize for speed (level 2)"
Require Prototypes = True
Show Warning IDs in Build Output = False
Selected Warning Level = "Common"
Warning List None = ""
Warning List Common = ""
Warning List Extended = ""
Warning List All = ""
Warning Mode = 0
Enable Unreferenced Identifiers Warning = True
Enable Pointer Mismatch Warning = True
Enable Unreachable Code Warning = True
Enable Assignment In Conditional Warning = True
Uninitialized Locals Compile Warning = "Aggressive"
Require Return Values = True
Enable C99 Extensions = True
Enable OpenMP Extensions = False
Stack Size = 250000
Stack Reserve = 1048576
Stack Commit = 4096
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Embed Timestamp = True
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Compiler Options]
Default Calling Convention = "cdecl"
Require Prototypes = True
Require Return Values = True
Enable Pointer Mismatch Warning = True
Enable Unreachable Code Warning = True
Enable Unreferenced Identifiers Warning = True
Enable Assignment In Conditional Warning = True
O Option Compatible With 5.0 = False
Enable C99 Extensions = True
Uninitialized Locals Compile Warning = "Aggressive"
Precompile Prefix Header = False
Prefix Header File = ""
 
[Run Options]
Stack Size = 250000
Stack Commit = 4096
Image Base Address = 4194304
Image Base Address x64 = 4194304
 
[Compiler Defines]
Compiler Defines = "/DWIN32_LEAN_AND_MEAN"
 
[Include Paths]
Include Path 1 Is Rel = True
Include Path 1 Rel To = "Project"
Include Path 1 Rel Path = "include"
Include Path 1 = "/c/SAMO/Programi/NI/cvi/instr/MPOD/include"
Include Path 2 Is Rel = True
Include Path 2 Rel To = "Project"
Include Path 2 Rel Path = "../../../../../../usr/include"
Include Path 2 = "/c/usr/include"
 
[Create Executable]
Executable File_Debug Is Rel = True
Executable File_Debug Rel To = "Project"
Executable File_Debug Rel Path = "MPOD.exe"
Executable File_Debug = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.exe"
Executable File_Release Is Rel = True
Executable File_Release Rel To = "Project"
Executable File_Release Rel Path = "MPOD.exe"
Executable File_Release = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.exe"
Executable File_Debug64 Is Rel = True
Executable File_Debug64 Rel To = "Project"
Executable File_Debug64 Rel Path = "MPOD.exe"
Executable File_Debug64 = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.exe"
Executable File_Release64 Is Rel = True
Executable File_Release64 Rel To = "Project"
Executable File_Release64 Rel Path = "MPOD.exe"
Executable File_Release64 = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.exe"
Icon File Is Rel = False
Icon File = ""
Application Title = ""
DLL Exports = "Include File Symbols"
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
Type Lib Guid = ""
Runtime Support = "Full Runtime Support"
Instrument Driver Support Only = False
Embed Project .UIRs = False
Generate Map File = False
 
[External Compiler Support]
UIR Callbacks File Option = 0
Using LoadExternalModule = False
Create Project Symbols File = True
UIR Callbacks Obj File Is Rel = False
UIR Callbacks Obj File = ""
Project Symbols H File Is Rel = False
Project Symbols H File = ""
Project Symbols Obj File Is Rel = False
Project Symbols Obj File = ""
 
[ActiveX Server Options]
Specification File Is Rel = False
Specification File = ""
Source File Is Rel = False
Source File = ""
Include File Is Rel = False
Include File = ""
IDL File Is Rel = False
IDL File = ""
Register ActiveX Server = False
 
[Signing Info]
Sign = False
Sign Debug Build = False
Store = ""
Certificate = ""
Timestamp URL = ""
URL = ""
 
[Manifest Info]
Embed = False
 
[tpcSection]
tpcEnabled = 0
tpcOverrideEnvironment = 0
tpcEnabled x64 = 0
tpcOverrideEnvironment x64 = 0
 
/cvi/instr/MPOD/README.txt
0,0 → 1,32
1. Install
* ActivePerl (32 bit)
* Visual Studio 2015
 
* Install net-snmp an jump to 5.
 
or
 
Download latest version of net-snmp library
https://sourceforge.net/p/net-snmp/code/ci/master/tree/
 
2. Start nmake environment
"\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
 
3. Build
C:\Users\rok\Downloads\net-snmp-latest\win32>build.bat ---> choose dynamic build
(1:dis,4:en,7:dis,8:dis,9:en,10:dis,11:en,12:en,13:dyn,14:en)
 
4. Install (ce je potrebno?)
C:\Users\rok\Downloads\net-snmp-latest\win32>nmake install_devel
 
5. Copy WIENER-CRATE-MIB.txt
C:\usr\share\snmp\mibs WIENER-CRATE-MIB.txt
6. Copy C:\usr\include\net-snmp\net-snmp-config.h to instrument dir and
comment out:
/*
enum {
netsnmp_compile_time_uintptr_t_size_check
= sizeof(struct netsnmp_compile_time_uintptr_t_size_check_s { int:-!(sizeof(uintptr_t) == sizeof(void*)); })
};
*/
/cvi/instr/MPOD/WIENER-CRATE-MIB.txt
0,0 → 1,2420
----------------------------------------------------------------------------------------------------
-- $HeadURL: http://svn.wiener-d.com/src/enet/trunk/mibs/WIENER-CRATE-MIB.txt $
-- $LastChangedDate: 2012-10-24 17:44:38 +0200 (Mi, 24. Okt 2012) $
-- $LastChangedRevision: 1988 $
-- $LastChangedBy: koester (roemer)$
-- Copyright © 2005-2007 W-IE-NE-R Plein & Baus GmbH, Burscheid, Germany
----------------------------------------------------------------------------------------------------
WIENER-CRATE-MIB DEFINITIONS ::= BEGIN
 
IMPORTS
OBJECT-TYPE, MODULE-IDENTITY, OBJECT-IDENTITY,
IpAddress, Integer32, Opaque, enterprises
FROM SNMPv2-SMI
 
TEXTUAL-CONVENTION, DisplayString
FROM SNMPv2-TC
-- Float
-- FROM NET-SNMP-TC
-- Float
-- FROM UCD-SNMP-MIB
;
 
 
 
 
wiener MODULE-IDENTITY
LAST-UPDATED "200810090000Z" -- October 9, 2008
ORGANIZATION "WIENER Plein & Baus GmbH"
CONTACT-INFO "
postal: WIENER Plein & Baus GmbH
Mullersbaum 20
D-51399 Burscheid
Germany
 
email: info@wiener-d.com
 
"
 
DESCRIPTION
"Introduction of the communication.can branch.
"
 
 
REVISION "200805060000Z" -- May 6, 2008
DESCRIPTION
"Introduction of the signal branch.
"
 
REVISION "200804150000Z" -- April 15, 2008
DESCRIPTION
"Enlargement of u0..u11 -> u0..u1999
"
 
REVISION "200804100000Z" -- April 10, 2008
DESCRIPTION
"This revision uses again Integer32 instead of Counter32.
"
 
REVISION "200804020000Z" -- April 02, 2008
DESCRIPTION
"This revision modifies the syntax of this file to be complient with smilint.
"
 
REVISION "200709100000Z"
DESCRIPTION
"This revision introduces new OIDs for debug functionality:
sysDebugMemory8, sysDebugMemory16 and sysDebugMemory32.
"
 
REVISION "200703160000Z"
DESCRIPTION
"This revision introduces new OIDs for slew control:
outputVoltageRiseRate and outputVoltageFallRate.
"
 
REVISION "200502010000Z"
DESCRIPTION
"This revision introduces new OIDs for group managment:
groupTable
"
 
REVISION "200406280000Z"
DESCRIPTION
"WIENER Crate MIB, actual Firmware: UEL6E 4.02.
Initial Version.
"
 
::= { enterprises 19947 }
 
 
-------------------------------------------------------------------------------
-- Define the Float Textual Convention
-- This definition was written by David Perkins.
--
Float ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"A single precision floating-point number. The semantics
and encoding are identical for type 'single' defined in
IEEE Standard for Binary Floating-Point,
ANSI/IEEE Std 754-1985.
The value is restricted to the BER serialization of
the following ASN.1 type:
FLOATTYPE ::= [120] IMPLICIT FloatType
(note: the value 120 is the sum of '30'h and '48'h)
The BER serialization of the length for values of
this type must use the definite length, short
encoding form.
 
For example, the BER serialization of value 123
of type FLOATTYPE is '9f780442f60000'h. (The tag
is '9f78'h; the length is '04'h; and the value is
'42f60000'h.) The BER serialization of value
'9f780442f60000'h of data type Opaque is
'44079f780442f60000'h. (The tag is '44'h; the length
is '07'h; and the value is '9f780442f60000'h."
SYNTAX Opaque (SIZE (7))
 
-------------------------------------------------------------------------------
-- crate
-------------------------------------------------------------------------------
 
crate OBJECT-IDENTITY
STATUS current
DESCRIPTION
"SNMP control for electronic crates. A crate is a complete electronic system and
consists of the mechanical rack, a power supply, a fan tray and a backplane.
All this things are necessary to provide an adequate housing for electronic
modules (e.g. VME CPU's)"
::= { wiener 1 }
 
--Crate ::= SEQUENCE {
-- system System,
-- input Input,
-- output Output,
-- sensor Sensor,
-- communication Communication,
-- powersupply Powersupply,
-- fantray Fantray,
-- rack Rack
--}
 
system OBJECT-IDENTITY
STATUS current
DESCRIPTION
"A collection of objects which affect the complete crate"
::= { crate 1 }
 
 
input OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are associated with the power input of the crate"
::= { crate 2 }
 
output OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are associated with the power output of the crate"
::= { crate 3 }
 
sensor OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are associated with temperature sensors in the crate"
::= { crate 4 }
 
communication OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which affect the remote control of the crate"
::= { crate 5 }
 
powersupply OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are specific for the power supply of the crate"
::= { crate 6 }
 
fantray OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are specific for the fan tray of the crate"
::= { crate 7 }
 
rack OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are specific for the crate (BIN) of the crate"
::= { crate 8 }
 
signal OBJECT-IDENTITY
STATUS current
DESCRIPTION
"All objects which are associated with analog/digtal input/output in the crate"
::= { crate 9 }
 
 
-------------------------------------------------------------------------------
-- system
-------------------------------------------------------------------------------
System ::= SEQUENCE {
sysMainSwitch INTEGER,
sysHardwareReset INTEGER,
sysStatus BITS,
sysVmeSysReset INTEGER,
sysConfigDoMeasurementCurrent BITS,
sysOperatingTime Integer32,
 
sysDebugMemory8 Integer32,
sysDebugMemory16 Integer32,
sysDebugMemory32 Integer32,
sysDebug OCTET STRING,
sysDebugDisplay OCTET STRING
}
 
sysMainSwitch OBJECT-TYPE
SYNTAX INTEGER { off (0), on (1) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Read: An enumerated value which shows the current state of
the crates main switch.
Write: Try to switch the complete crate ON or OFF.
Only the values ON or OFF are allowed."
::= { system 1 }
 
sysStatus OBJECT-TYPE
SYNTAX BITS {
mainOn (0) ,
mainInhibit (1) ,
localControlOnly (2) ,
inputFailure (3) ,
outputFailure (4) ,
fantrayFailure (5) ,
sensorFailure (6),
vmeSysfail (7),
plugAndPlayIncompatible (8),
busReset (9),
supplyDerating (10),
supplyFailure (11),
supplyDerating2 (12),
supplyFailure2 (13)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A bit string which shows the status (health) of the complete crate.
If a bit is set (1), the explanation is satisfied
mainOn (0), system is switched on, individual outputs may be controlled by their specific ON/INHIBIT
mainInhibit(1), external (hardware-)inhibit of the complete system
localControlOnly (2), local control only (CANBUS write access denied)
inputFailure (3), any input failure (e.g. power fail)
outputFailure (4), any output failure, details in outputTable
fantrayFailure (5), fantray failure
sensorFailure (6), temperature of the external sensors too high
vmeSysfail(7), VME SYSFAIL signal is active
plugAndPlayIncompatible (8) wrong power supply and rack connected
busReset (9) The sytem bus (e.g. VME or CPCI) reset signal is active.
supplyDerating (10) The (first) system power supply has the DEG signal active.
supplyFailure (11) The (first) system power supply has the FAL signal active.
supplyDerating2 (12) The second system power supply has the DEG signal active.
supplyFailure2 (13) The second system power supply has the FAL signal active.
"
::= { system 2 }
 
 
-- ERROR_BIN_CHECKSUM(?),
 
 
 
 
 
sysVmeSysReset OBJECT-TYPE
SYNTAX INTEGER { trigger (1) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Read: Always 0.
Write: Trigger the generation of the VME SYSRESET or CPIC RESET signal.
This signal will be active for a time of 200 ms"
::= { system 3 }
 
sysHardwareReset OBJECT-TYPE
SYNTAX INTEGER --{ off (0), on (1) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Triggered a Reset via Watchdog or ResetLine."
::= { system 4 }
 
 
sysConfigDoMeasurementCurrent OBJECT-TYPE
SYNTAX BITS {
ch0 (0) ,
ch1 (1) ,
ch2 (2) ,
ch3 (3) ,
ch4 (4) ,
ch5 (5) ,
ch6 (6) ,
ch7 (7)
}
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"CSet the analog inputs to measure voltage or current."
::= { system 10 }
 
sysOperatingTime OBJECT-TYPE
SYNTAX Integer32
UNITS "s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The time in seconds for how long the controller was in action."
::= { system 11 }
 
sysDebugMemory8 OBJECT-TYPE
SYNTAX Integer32 (0..255)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Debug 16-bit memory access."
::= { system 1024 }
 
sysDebugMemory16 OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Debug 16-bit memory access."
::= { system 1025 }
 
sysDebugMemory32 OBJECT-TYPE
SYNTAX Integer32 (-2147483648..2147483647)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Debug 32-bit memory access."
::= { system 1026 }
 
sysDebug OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (520))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Debug communication with the MPOD.
This is a direct map to the ancient functions which are accessible
via USB (without SLIP/SNMP).
"
::= { system 1027 }
sysDebugDisplay OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Debug communication with the MPOD display."
::= { system 1028 }
-------------------------------------------------------------------------------
-- input
-------------------------------------------------------------------------------
-- reserved, possible entries:
-- inputSetPfcVoltage
-- inputMesPowerFail
-- inputMesVoltage
-- inputMesCurrent
-- inputMesPower
-- inputMesTemperature
-------------------------------------------------------------------------------
-- output
-------------------------------------------------------------------------------
--Output ::= SEQUENCE {
-- outputNumber Integer32,
-- outputTable OutputTable,
-- groupsNumber Integer32,
-- groupsTable GroupsTable,
-- moduleNumber Integer32,
-- moduleTable moduleTable
-- ??TotalPower
--}
 
outputNumber OBJECT-TYPE
SYNTAX Integer32 (0..1999)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of output channels of the crate."
::= { output 1 }
 
outputTable OBJECT-TYPE
SYNTAX SEQUENCE OF OutputEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of output entries."
::= { output 2 }
 
groupsNumber OBJECT-TYPE
SYNTAX Integer32 (1..1999)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of output groups of the crate."
::= { output 3 }
 
groupsTable OBJECT-TYPE
SYNTAX SEQUENCE OF GroupsEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of output groups entries."
::= { output 4 }
 
-------------------------------------------------------------------------------
-- outputModuleTable
-------------------------------------------------------------------------------
moduleNumber OBJECT-TYPE
SYNTAX Integer32 (1..10)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of HV/LV modules of the crate."
::= { output 5 }
moduleTable OBJECT-TYPE
SYNTAX SEQUENCE OF moduleEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of output module entries."
::= { output 6 }
 
-------------------------------------------------------------------------------
-- outputTable
-------------------------------------------------------------------------------
 
outputEntry OBJECT-TYPE
SYNTAX OutputEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table row"
INDEX { outputIndex }
::= { outputTable 1 }
 
OutputEntry ::= SEQUENCE {
outputIndex INTEGER,
outputName DisplayString,
outputGroup INTEGER,
outputStatus BITS,
outputMeasurementSenseVoltage Float,
outputMeasurementTerminalVoltage Float,
outputMeasurementCurrent Float,
outputMeasurementTemperature INTEGER,
outputSwitch INTEGER,
outputVoltage Float,
outputAdjustVoltage Integer32,
outputCurrent Float,
 
outputVoltageRiseRate Float,
outputVoltageFallRate Float,
 
outputSupervisionBehavior Integer32,
outputSupervisionMinSenseVoltage Float,
outputSupervisionMaxSenseVoltage Float,
outputSupervisionMaxTerminalVoltage Float,
outputSupervisionMaxCurrent Float,
outputSupervisionMaxTemperature Integer32,
 
outputConfigMaxSenseVoltage Float,
outputConfigMaxTerminalVoltage Float,
outputConfigMaxCurrent Float,
outputSupervisionMaxPower Float,
outputConfigGainSenseVoltage Float,
outputConfigOffsetSenseVoltage Float,
outputConfigGainTerminalVoltage Float,
outputConfigOffsetTerminalVoltage Float,
outputConfigGainCurrent Float,
outputConfigOffsetCurrent Float,
outputCurrentRiseRate Float,
outputCurrentFallRate Float,
outputTripTimeMaxCurrent INTEGER,
 
outputHardwareLimitVoltage Float,
outputHardwareLimitCurrent Float,
outputRegulationMode INTEGER,
outputConfigMaxTemperature Integer32
}
 
 
outputIndex OBJECT-TYPE
SYNTAX INTEGER {
u0(1),u1(2),u2(3),u3(4),u4(5),u5(6),u6(7),u7(8),u8(9),u9(10),
u10(11),u11(12),u12(13),u13(14),u14(15),u15(16),u16(17),u17(18),u18(19),u19(20),
u20(21),u21(22),u22(23),u23(24),u24(25),u25(26),u26(27),u27(28),u28(29),u29(30),
u30(31),u31(32),u32(33),u33(34),u34(35),u35(36),u36(37),u37(38),u38(39),u39(40),
u40(41),u41(42),u42(43),u43(44),u44(45),u45(46),u46(47),u47(48),u48(49),u49(50),
u50(51),u51(52),u52(53),u53(54),u54(55),u55(56),u56(57),u57(58),u58(59),u59(60),
u60(61),u61(62),u62(63),u63(64),u64(65),u65(66),u66(67),u67(68),u68(69),u69(70),
u70(71),u71(72),u72(73),u73(74),u74(75),u75(76),u76(77),u77(78),u78(79),u79(80),
u80(81),u81(82),u82(83),u83(84),u84(85),u85(86),u86(87),u87(88),u88(89),u89(90),
u90(91),u91(92),u92(93),u93(94),u94(95),u95(96),u96(97),u97(98),u98(99),u99(100),
u100(101),u101(102),u102(103),u103(104),u104(105),u105(106),u106(107),u107(108),u108(109),u109(110),
u110(111),u111(112),u112(113),u113(114),u114(115),u115(116),u116(117),u117(118),u118(119),u119(120),
u120(121),u121(122),u122(123),u123(124),u124(125),u125(126),u126(127),u127(128),u128(129),u129(130),
u130(131),u131(132),u132(133),u133(134),u134(135),u135(136),u136(137),u137(138),u138(139),u139(140),
u140(141),u141(142),u142(143),u143(144),u144(145),u145(146),u146(147),u147(148),u148(149),u149(150),
u150(151),u151(152),u152(153),u153(154),u154(155),u155(156),u156(157),u157(158),u158(159),u159(160),
u160(161),u161(162),u162(163),u163(164),u164(165),u165(166),u166(167),u167(168),u168(169),u169(170),
u170(171),u171(172),u172(173),u173(174),u174(175),u175(176),u176(177),u177(178),u178(179),u179(180),
u180(181),u181(182),u182(183),u183(184),u184(185),u185(186),u186(187),u187(188),u188(189),u189(190),
u190(191),u191(192),u192(193),u193(194),u194(195),u195(196),u196(197),u197(198),u198(199),u199(200),
u200(201),u201(202),u202(203),u203(204),u204(205),u205(206),u206(207),u207(208),u208(209),u209(210),
u210(211),u211(212),u212(213),u213(214),u214(215),u215(216),u216(217),u217(218),u218(219),u219(220),
u220(221),u221(222),u222(223),u223(224),u224(225),u225(226),u226(227),u227(228),u228(229),u229(230),
u230(231),u231(232),u232(233),u233(234),u234(235),u235(236),u236(237),u237(238),u238(239),u239(240),
u240(241),u241(242),u242(243),u243(244),u244(245),u245(246),u246(247),u247(248),u248(249),u249(250),
u250(251),u251(252),u252(253),u253(254),u254(255),u255(256),u256(257),u257(258),u258(259),u259(260),
u260(261),u261(262),u262(263),u263(264),u264(265),u265(266),u266(267),u267(268),u268(269),u269(270),
u270(271),u271(272),u272(273),u273(274),u274(275),u275(276),u276(277),u277(278),u278(279),u279(280),
u280(281),u281(282),u282(283),u283(284),u284(285),u285(286),u286(287),u287(288),u288(289),u289(290),
u290(291),u291(292),u292(293),u293(294),u294(295),u295(296),u296(297),u297(298),u298(299),u299(300),
u300(301),u301(302),u302(303),u303(304),u304(305),u305(306),u306(307),u307(308),u308(309),u309(310),
u310(311),u311(312),u312(313),u313(314),u314(315),u315(316),u316(317),u317(318),u318(319),u319(320),
u320(321),u321(322),u322(323),u323(324),u324(325),u325(326),u326(327),u327(328),u328(329),u329(330),
u330(331),u331(332),u332(333),u333(334),u334(335),u335(336),u336(337),u337(338),u338(339),u339(340),
u340(341),u341(342),u342(343),u343(344),u344(345),u345(346),u346(347),u347(348),u348(349),u349(350),
u350(351),u351(352),u352(353),u353(354),u354(355),u355(356),u356(357),u357(358),u358(359),u359(360),
u360(361),u361(362),u362(363),u363(364),u364(365),u365(366),u366(367),u367(368),u368(369),u369(370),
u370(371),u371(372),u372(373),u373(374),u374(375),u375(376),u376(377),u377(378),u378(379),u379(380),
u380(381),u381(382),u382(383),u383(384),u384(385),u385(386),u386(387),u387(388),u388(389),u389(390),
u390(391),u391(392),u392(393),u393(394),u394(395),u395(396),u396(397),u397(398),u398(399),u399(400),
u400(401),u401(402),u402(403),u403(404),u404(405),u405(406),u406(407),u407(408),u408(409),u409(410),
u410(411),u411(412),u412(413),u413(414),u414(415),u415(416),u416(417),u417(418),u418(419),u419(420),
u420(421),u421(422),u422(423),u423(424),u424(425),u425(426),u426(427),u427(428),u428(429),u429(430),
u430(431),u431(432),u432(433),u433(434),u434(435),u435(436),u436(437),u437(438),u438(439),u439(440),
u440(441),u441(442),u442(443),u443(444),u444(445),u445(446),u446(447),u447(448),u448(449),u449(450),
u450(451),u451(452),u452(453),u453(454),u454(455),u455(456),u456(457),u457(458),u458(459),u459(460),
u460(461),u461(462),u462(463),u463(464),u464(465),u465(466),u466(467),u467(468),u468(469),u469(470),
u470(471),u471(472),u472(473),u473(474),u474(475),u475(476),u476(477),u477(478),u478(479),u479(480),
u480(481),u481(482),u482(483),u483(484),u484(485),u485(486),u486(487),u487(488),u488(489),u489(490),
u490(491),u491(492),u492(493),u493(494),u494(495),u495(496),u496(497),u497(498),u498(499),u499(500),
u500(501),u501(502),u502(503),u503(504),u504(505),u505(506),u506(507),u507(508),u508(509),u509(510),
u510(511),u511(512),u512(513),u513(514),u514(515),u515(516),u516(517),u517(518),u518(519),u519(520),
u520(521),u521(522),u522(523),u523(524),u524(525),u525(526),u526(527),u527(528),u528(529),u529(530),
u530(531),u531(532),u532(533),u533(534),u534(535),u535(536),u536(537),u537(538),u538(539),u539(540),
u540(541),u541(542),u542(543),u543(544),u544(545),u545(546),u546(547),u547(548),u548(549),u549(550),
u550(551),u551(552),u552(553),u553(554),u554(555),u555(556),u556(557),u557(558),u558(559),u559(560),
u560(561),u561(562),u562(563),u563(564),u564(565),u565(566),u566(567),u567(568),u568(569),u569(570),
u570(571),u571(572),u572(573),u573(574),u574(575),u575(576),u576(577),u577(578),u578(579),u579(580),
u580(581),u581(582),u582(583),u583(584),u584(585),u585(586),u586(587),u587(588),u588(589),u589(590),
u590(591),u591(592),u592(593),u593(594),u594(595),u595(596),u596(597),u597(598),u598(599),u599(600),
u600(601),u601(602),u602(603),u603(604),u604(605),u605(606),u606(607),u607(608),u608(609),u609(610),
u610(611),u611(612),u612(613),u613(614),u614(615),u615(616),u616(617),u617(618),u618(619),u619(620),
u620(621),u621(622),u622(623),u623(624),u624(625),u625(626),u626(627),u627(628),u628(629),u629(630),
u630(631),u631(632),u632(633),u633(634),u634(635),u635(636),u636(637),u637(638),u638(639),u639(640),
u640(641),u641(642),u642(643),u643(644),u644(645),u645(646),u646(647),u647(648),u648(649),u649(650),
u650(651),u651(652),u652(653),u653(654),u654(655),u655(656),u656(657),u657(658),u658(659),u659(660),
u660(661),u661(662),u662(663),u663(664),u664(665),u665(666),u666(667),u667(668),u668(669),u669(670),
u670(671),u671(672),u672(673),u673(674),u674(675),u675(676),u676(677),u677(678),u678(679),u679(680),
u680(681),u681(682),u682(683),u683(684),u684(685),u685(686),u686(687),u687(688),u688(689),u689(690),
u690(691),u691(692),u692(693),u693(694),u694(695),u695(696),u696(697),u697(698),u698(699),u699(700),
u700(701),u701(702),u702(703),u703(704),u704(705),u705(706),u706(707),u707(708),u708(709),u709(710),
u710(711),u711(712),u712(713),u713(714),u714(715),u715(716),u716(717),u717(718),u718(719),u719(720),
u720(721),u721(722),u722(723),u723(724),u724(725),u725(726),u726(727),u727(728),u728(729),u729(730),
u730(731),u731(732),u732(733),u733(734),u734(735),u735(736),u736(737),u737(738),u738(739),u739(740),
u740(741),u741(742),u742(743),u743(744),u744(745),u745(746),u746(747),u747(748),u748(749),u749(750),
u750(751),u751(752),u752(753),u753(754),u754(755),u755(756),u756(757),u757(758),u758(759),u759(760),
u760(761),u761(762),u762(763),u763(764),u764(765),u765(766),u766(767),u767(768),u768(769),u769(770),
u770(771),u771(772),u772(773),u773(774),u774(775),u775(776),u776(777),u777(778),u778(779),u779(780),
u780(781),u781(782),u782(783),u783(784),u784(785),u785(786),u786(787),u787(788),u788(789),u789(790),
u790(791),u791(792),u792(793),u793(794),u794(795),u795(796),u796(797),u797(798),u798(799),u799(800),
u800(801),u801(802),u802(803),u803(804),u804(805),u805(806),u806(807),u807(808),u808(809),u809(810),
u810(811),u811(812),u812(813),u813(814),u814(815),u815(816),u816(817),u817(818),u818(819),u819(820),
u820(821),u821(822),u822(823),u823(824),u824(825),u825(826),u826(827),u827(828),u828(829),u829(830),
u830(831),u831(832),u832(833),u833(834),u834(835),u835(836),u836(837),u837(838),u838(839),u839(840),
u840(841),u841(842),u842(843),u843(844),u844(845),u845(846),u846(847),u847(848),u848(849),u849(850),
u850(851),u851(852),u852(853),u853(854),u854(855),u855(856),u856(857),u857(858),u858(859),u859(860),
u860(861),u861(862),u862(863),u863(864),u864(865),u865(866),u866(867),u867(868),u868(869),u869(870),
u870(871),u871(872),u872(873),u873(874),u874(875),u875(876),u876(877),u877(878),u878(879),u879(880),
u880(881),u881(882),u882(883),u883(884),u884(885),u885(886),u886(887),u887(888),u888(889),u889(890),
u890(891),u891(892),u892(893),u893(894),u894(895),u895(896),u896(897),u897(898),u898(899),u899(900),
u900(901),u901(902),u902(903),u903(904),u904(905),u905(906),u906(907),u907(908),u908(909),u909(910),
u910(911),u911(912),u912(913),u913(914),u914(915),u915(916),u916(917),u917(918),u918(919),u919(920),
u920(921),u921(922),u922(923),u923(924),u924(925),u925(926),u926(927),u927(928),u928(929),u929(930),
u930(931),u931(932),u932(933),u933(934),u934(935),u935(936),u936(937),u937(938),u938(939),u939(940),
u940(941),u941(942),u942(943),u943(944),u944(945),u945(946),u946(947),u947(948),u948(949),u949(950),
u950(951),u951(952),u952(953),u953(954),u954(955),u955(956),u956(957),u957(958),u958(959),u959(960),
u960(961),u961(962),u962(963),u963(964),u964(965),u965(966),u966(967),u967(968),u968(969),u969(970),
u970(971),u971(972),u972(973),u973(974),u974(975),u975(976),u976(977),u977(978),u978(979),u979(980),
u980(981),u981(982),u982(983),u983(984),u984(985),u985(986),u986(987),u987(988),u988(989),u989(990),
u990(991),u991(992),u992(993),u993(994),u994(995),u995(996),u996(997),u997(998),u998(999),u999(1000),
u1000(1001),u1001(1002),u1002(1003),u1003(1004),u1004(1005),u1005(1006),u1006(1007),u1007(1008),u1008(1009),u1009(1010),
u1010(1011),u1011(1012),u1012(1013),u1013(1014),u1014(1015),u1015(1016),u1016(1017),u1017(1018),u1018(1019),u1019(1020),
u1020(1021),u1021(1022),u1022(1023),u1023(1024),u1024(1025),u1025(1026),u1026(1027),u1027(1028),u1028(1029),u1029(1030),
u1030(1031),u1031(1032),u1032(1033),u1033(1034),u1034(1035),u1035(1036),u1036(1037),u1037(1038),u1038(1039),u1039(1040),
u1040(1041),u1041(1042),u1042(1043),u1043(1044),u1044(1045),u1045(1046),u1046(1047),u1047(1048),u1048(1049),u1049(1050),
u1050(1051),u1051(1052),u1052(1053),u1053(1054),u1054(1055),u1055(1056),u1056(1057),u1057(1058),u1058(1059),u1059(1060),
u1060(1061),u1061(1062),u1062(1063),u1063(1064),u1064(1065),u1065(1066),u1066(1067),u1067(1068),u1068(1069),u1069(1070),
u1070(1071),u1071(1072),u1072(1073),u1073(1074),u1074(1075),u1075(1076),u1076(1077),u1077(1078),u1078(1079),u1079(1080),
u1080(1081),u1081(1082),u1082(1083),u1083(1084),u1084(1085),u1085(1086),u1086(1087),u1087(1088),u1088(1089),u1089(1090),
u1090(1091),u1091(1092),u1092(1093),u1093(1094),u1094(1095),u1095(1096),u1096(1097),u1097(1098),u1098(1099),u1099(1100),
u1100(1101),u1101(1102),u1102(1103),u1103(1104),u1104(1105),u1105(1106),u1106(1107),u1107(1108),u1108(1109),u1109(1110),
u1110(1111),u1111(1112),u1112(1113),u1113(1114),u1114(1115),u1115(1116),u1116(1117),u1117(1118),u1118(1119),u1119(1120),
u1120(1121),u1121(1122),u1122(1123),u1123(1124),u1124(1125),u1125(1126),u1126(1127),u1127(1128),u1128(1129),u1129(1130),
u1130(1131),u1131(1132),u1132(1133),u1133(1134),u1134(1135),u1135(1136),u1136(1137),u1137(1138),u1138(1139),u1139(1140),
u1140(1141),u1141(1142),u1142(1143),u1143(1144),u1144(1145),u1145(1146),u1146(1147),u1147(1148),u1148(1149),u1149(1150),
u1150(1151),u1151(1152),u1152(1153),u1153(1154),u1154(1155),u1155(1156),u1156(1157),u1157(1158),u1158(1159),u1159(1160),
u1160(1161),u1161(1162),u1162(1163),u1163(1164),u1164(1165),u1165(1166),u1166(1167),u1167(1168),u1168(1169),u1169(1170),
u1170(1171),u1171(1172),u1172(1173),u1173(1174),u1174(1175),u1175(1176),u1176(1177),u1177(1178),u1178(1179),u1179(1180),
u1180(1181),u1181(1182),u1182(1183),u1183(1184),u1184(1185),u1185(1186),u1186(1187),u1187(1188),u1188(1189),u1189(1190),
u1190(1191),u1191(1192),u1192(1193),u1193(1194),u1194(1195),u1195(1196),u1196(1197),u1197(1198),u1198(1199),u1199(1200),
u1200(1201),u1201(1202),u1202(1203),u1203(1204),u1204(1205),u1205(1206),u1206(1207),u1207(1208),u1208(1209),u1209(1210),
u1210(1211),u1211(1212),u1212(1213),u1213(1214),u1214(1215),u1215(1216),u1216(1217),u1217(1218),u1218(1219),u1219(1220),
u1220(1221),u1221(1222),u1222(1223),u1223(1224),u1224(1225),u1225(1226),u1226(1227),u1227(1228),u1228(1229),u1229(1230),
u1230(1231),u1231(1232),u1232(1233),u1233(1234),u1234(1235),u1235(1236),u1236(1237),u1237(1238),u1238(1239),u1239(1240),
u1240(1241),u1241(1242),u1242(1243),u1243(1244),u1244(1245),u1245(1246),u1246(1247),u1247(1248),u1248(1249),u1249(1250),
u1250(1251),u1251(1252),u1252(1253),u1253(1254),u1254(1255),u1255(1256),u1256(1257),u1257(1258),u1258(1259),u1259(1260),
u1260(1261),u1261(1262),u1262(1263),u1263(1264),u1264(1265),u1265(1266),u1266(1267),u1267(1268),u1268(1269),u1269(1270),
u1270(1271),u1271(1272),u1272(1273),u1273(1274),u1274(1275),u1275(1276),u1276(1277),u1277(1278),u1278(1279),u1279(1280),
u1280(1281),u1281(1282),u1282(1283),u1283(1284),u1284(1285),u1285(1286),u1286(1287),u1287(1288),u1288(1289),u1289(1290),
u1290(1291),u1291(1292),u1292(1293),u1293(1294),u1294(1295),u1295(1296),u1296(1297),u1297(1298),u1298(1299),u1299(1300),
u1300(1301),u1301(1302),u1302(1303),u1303(1304),u1304(1305),u1305(1306),u1306(1307),u1307(1308),u1308(1309),u1309(1310),
u1310(1311),u1311(1312),u1312(1313),u1313(1314),u1314(1315),u1315(1316),u1316(1317),u1317(1318),u1318(1319),u1319(1320),
u1320(1321),u1321(1322),u1322(1323),u1323(1324),u1324(1325),u1325(1326),u1326(1327),u1327(1328),u1328(1329),u1329(1330),
u1330(1331),u1331(1332),u1332(1333),u1333(1334),u1334(1335),u1335(1336),u1336(1337),u1337(1338),u1338(1339),u1339(1340),
u1340(1341),u1341(1342),u1342(1343),u1343(1344),u1344(1345),u1345(1346),u1346(1347),u1347(1348),u1348(1349),u1349(1350),
u1350(1351),u1351(1352),u1352(1353),u1353(1354),u1354(1355),u1355(1356),u1356(1357),u1357(1358),u1358(1359),u1359(1360),
u1360(1361),u1361(1362),u1362(1363),u1363(1364),u1364(1365),u1365(1366),u1366(1367),u1367(1368),u1368(1369),u1369(1370),
u1370(1371),u1371(1372),u1372(1373),u1373(1374),u1374(1375),u1375(1376),u1376(1377),u1377(1378),u1378(1379),u1379(1380),
u1380(1381),u1381(1382),u1382(1383),u1383(1384),u1384(1385),u1385(1386),u1386(1387),u1387(1388),u1388(1389),u1389(1390),
u1390(1391),u1391(1392),u1392(1393),u1393(1394),u1394(1395),u1395(1396),u1396(1397),u1397(1398),u1398(1399),u1399(1400),
u1400(1401),u1401(1402),u1402(1403),u1403(1404),u1404(1405),u1405(1406),u1406(1407),u1407(1408),u1408(1409),u1409(1410),
u1410(1411),u1411(1412),u1412(1413),u1413(1414),u1414(1415),u1415(1416),u1416(1417),u1417(1418),u1418(1419),u1419(1420),
u1420(1421),u1421(1422),u1422(1423),u1423(1424),u1424(1425),u1425(1426),u1426(1427),u1427(1428),u1428(1429),u1429(1430),
u1430(1431),u1431(1432),u1432(1433),u1433(1434),u1434(1435),u1435(1436),u1436(1437),u1437(1438),u1438(1439),u1439(1440),
u1440(1441),u1441(1442),u1442(1443),u1443(1444),u1444(1445),u1445(1446),u1446(1447),u1447(1448),u1448(1449),u1449(1450),
u1450(1451),u1451(1452),u1452(1453),u1453(1454),u1454(1455),u1455(1456),u1456(1457),u1457(1458),u1458(1459),u1459(1460),
u1460(1461),u1461(1462),u1462(1463),u1463(1464),u1464(1465),u1465(1466),u1466(1467),u1467(1468),u1468(1469),u1469(1470),
u1470(1471),u1471(1472),u1472(1473),u1473(1474),u1474(1475),u1475(1476),u1476(1477),u1477(1478),u1478(1479),u1479(1480),
u1480(1481),u1481(1482),u1482(1483),u1483(1484),u1484(1485),u1485(1486),u1486(1487),u1487(1488),u1488(1489),u1489(1490),
u1490(1491),u1491(1492),u1492(1493),u1493(1494),u1494(1495),u1495(1496),u1496(1497),u1497(1498),u1498(1499),u1499(1500),
u1500(1501),u1501(1502),u1502(1503),u1503(1504),u1504(1505),u1505(1506),u1506(1507),u1507(1508),u1508(1509),u1509(1510),
u1510(1511),u1511(1512),u1512(1513),u1513(1514),u1514(1515),u1515(1516),u1516(1517),u1517(1518),u1518(1519),u1519(1520),
u1520(1521),u1521(1522),u1522(1523),u1523(1524),u1524(1525),u1525(1526),u1526(1527),u1527(1528),u1528(1529),u1529(1530),
u1530(1531),u1531(1532),u1532(1533),u1533(1534),u1534(1535),u1535(1536),u1536(1537),u1537(1538),u1538(1539),u1539(1540),
u1540(1541),u1541(1542),u1542(1543),u1543(1544),u1544(1545),u1545(1546),u1546(1547),u1547(1548),u1548(1549),u1549(1550),
u1550(1551),u1551(1552),u1552(1553),u1553(1554),u1554(1555),u1555(1556),u1556(1557),u1557(1558),u1558(1559),u1559(1560),
u1560(1561),u1561(1562),u1562(1563),u1563(1564),u1564(1565),u1565(1566),u1566(1567),u1567(1568),u1568(1569),u1569(1570),
u1570(1571),u1571(1572),u1572(1573),u1573(1574),u1574(1575),u1575(1576),u1576(1577),u1577(1578),u1578(1579),u1579(1580),
u1580(1581),u1581(1582),u1582(1583),u1583(1584),u1584(1585),u1585(1586),u1586(1587),u1587(1588),u1588(1589),u1589(1590),
u1590(1591),u1591(1592),u1592(1593),u1593(1594),u1594(1595),u1595(1596),u1596(1597),u1597(1598),u1598(1599),u1599(1600),
u1600(1601),u1601(1602),u1602(1603),u1603(1604),u1604(1605),u1605(1606),u1606(1607),u1607(1608),u1608(1609),u1609(1610),
u1610(1611),u1611(1612),u1612(1613),u1613(1614),u1614(1615),u1615(1616),u1616(1617),u1617(1618),u1618(1619),u1619(1620),
u1620(1621),u1621(1622),u1622(1623),u1623(1624),u1624(1625),u1625(1626),u1626(1627),u1627(1628),u1628(1629),u1629(1630),
u1630(1631),u1631(1632),u1632(1633),u1633(1634),u1634(1635),u1635(1636),u1636(1637),u1637(1638),u1638(1639),u1639(1640),
u1640(1641),u1641(1642),u1642(1643),u1643(1644),u1644(1645),u1645(1646),u1646(1647),u1647(1648),u1648(1649),u1649(1650),
u1650(1651),u1651(1652),u1652(1653),u1653(1654),u1654(1655),u1655(1656),u1656(1657),u1657(1658),u1658(1659),u1659(1660),
u1660(1661),u1661(1662),u1662(1663),u1663(1664),u1664(1665),u1665(1666),u1666(1667),u1667(1668),u1668(1669),u1669(1670),
u1670(1671),u1671(1672),u1672(1673),u1673(1674),u1674(1675),u1675(1676),u1676(1677),u1677(1678),u1678(1679),u1679(1680),
u1680(1681),u1681(1682),u1682(1683),u1683(1684),u1684(1685),u1685(1686),u1686(1687),u1687(1688),u1688(1689),u1689(1690),
u1690(1691),u1691(1692),u1692(1693),u1693(1694),u1694(1695),u1695(1696),u1696(1697),u1697(1698),u1698(1699),u1699(1700),
u1700(1701),u1701(1702),u1702(1703),u1703(1704),u1704(1705),u1705(1706),u1706(1707),u1707(1708),u1708(1709),u1709(1710),
u1710(1711),u1711(1712),u1712(1713),u1713(1714),u1714(1715),u1715(1716),u1716(1717),u1717(1718),u1718(1719),u1719(1720),
u1720(1721),u1721(1722),u1722(1723),u1723(1724),u1724(1725),u1725(1726),u1726(1727),u1727(1728),u1728(1729),u1729(1730),
u1730(1731),u1731(1732),u1732(1733),u1733(1734),u1734(1735),u1735(1736),u1736(1737),u1737(1738),u1738(1739),u1739(1740),
u1740(1741),u1741(1742),u1742(1743),u1743(1744),u1744(1745),u1745(1746),u1746(1747),u1747(1748),u1748(1749),u1749(1750),
u1750(1751),u1751(1752),u1752(1753),u1753(1754),u1754(1755),u1755(1756),u1756(1757),u1757(1758),u1758(1759),u1759(1760),
u1760(1761),u1761(1762),u1762(1763),u1763(1764),u1764(1765),u1765(1766),u1766(1767),u1767(1768),u1768(1769),u1769(1770),
u1770(1771),u1771(1772),u1772(1773),u1773(1774),u1774(1775),u1775(1776),u1776(1777),u1777(1778),u1778(1779),u1779(1780),
u1780(1781),u1781(1782),u1782(1783),u1783(1784),u1784(1785),u1785(1786),u1786(1787),u1787(1788),u1788(1789),u1789(1790),
u1790(1791),u1791(1792),u1792(1793),u1793(1794),u1794(1795),u1795(1796),u1796(1797),u1797(1798),u1798(1799),u1799(1800),
u1800(1801),u1801(1802),u1802(1803),u1803(1804),u1804(1805),u1805(1806),u1806(1807),u1807(1808),u1808(1809),u1809(1810),
u1810(1811),u1811(1812),u1812(1813),u1813(1814),u1814(1815),u1815(1816),u1816(1817),u1817(1818),u1818(1819),u1819(1820),
u1820(1821),u1821(1822),u1822(1823),u1823(1824),u1824(1825),u1825(1826),u1826(1827),u1827(1828),u1828(1829),u1829(1830),
u1830(1831),u1831(1832),u1832(1833),u1833(1834),u1834(1835),u1835(1836),u1836(1837),u1837(1838),u1838(1839),u1839(1840),
u1840(1841),u1841(1842),u1842(1843),u1843(1844),u1844(1845),u1845(1846),u1846(1847),u1847(1848),u1848(1849),u1849(1850),
u1850(1851),u1851(1852),u1852(1853),u1853(1854),u1854(1855),u1855(1856),u1856(1857),u1857(1858),u1858(1859),u1859(1860),
u1860(1861),u1861(1862),u1862(1863),u1863(1864),u1864(1865),u1865(1866),u1866(1867),u1867(1868),u1868(1869),u1869(1870),
u1870(1871),u1871(1872),u1872(1873),u1873(1874),u1874(1875),u1875(1876),u1876(1877),u1877(1878),u1878(1879),u1879(1880),
u1880(1881),u1881(1882),u1882(1883),u1883(1884),u1884(1885),u1885(1886),u1886(1887),u1887(1888),u1888(1889),u1889(1890),
u1890(1891),u1891(1892),u1892(1893),u1893(1894),u1894(1895),u1895(1896),u1896(1897),u1897(1898),u1898(1899),u1899(1900),
u1900(1901),u1901(1902),u1902(1903),u1903(1904),u1904(1905),u1905(1906),u1906(1907),u1907(1908),u1908(1909),u1909(1910),
u1910(1911),u1911(1912),u1912(1913),u1913(1914),u1914(1915),u1915(1916),u1916(1917),u1917(1918),u1918(1919),u1919(1920),
u1920(1921),u1921(1922),u1922(1923),u1923(1924),u1924(1925),u1925(1926),u1926(1927),u1927(1928),u1928(1929),u1929(1930),
u1930(1931),u1931(1932),u1932(1933),u1933(1934),u1934(1935),u1935(1936),u1936(1937),u1937(1938),u1938(1939),u1939(1940),
u1940(1941),u1941(1942),u1942(1943),u1943(1944),u1944(1945),u1945(1946),u1946(1947),u1947(1948),u1948(1949),u1949(1950),
u1950(1951),u1951(1952),u1952(1953),u1953(1954),u1954(1955),u1955(1956),u1956(1957),u1957(1958),u1958(1959),u1959(1960),
u1960(1961),u1961(1962),u1962(1963),u1963(1964),u1964(1965),u1965(1966),u1966(1967),u1967(1968),u1968(1969),u1969(1970),
u1970(1971),u1971(1972),u1972(1973),u1973(1974),u1974(1975),u1975(1976),u1976(1977),u1977(1978),u1978(1979),u1979(1980),
u1980(1981),u1981(1982),u1982(1983),u1983(1984),u1984(1985),u1985(1986),u1986(1987),u1987(1988),u1988(1989),u1989(1990),
u1990(1991),u1991(1992),u1992(1993),u1993(1994),u1994(1995),u1995(1996),u1996(1997),u1997(1998),u1998(1999),u1999(2000)}
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each power output channel. Its value
ranges between 1 and total number of output channels.
This value is equivalent to the output channel number at
the type label of the crate or power supply, but because the SMI
index starts at 1, index 1 corresponds to U0."
::= { outputEntry 1 }
 
outputName OBJECT-TYPE
SYNTAX DisplayString (SIZE (1..4))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A textual string containing a short name of the
output. If the crate is equipped with an alphanumeric
display, this string is shown to identify a output channel."
::= { outputEntry 2 }
 
outputGroup OBJECT-TYPE
SYNTAX Integer32 (1..63)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The group number (1...63) assigned to each channel.
If commands shall be sent to all channels with a specific group number (e.g.
with the groupsSwitch command defined below), additional bits can be added to
the group number:
 
HLgggggg
g: Group number (1...63)
L: Mask bit: 1: high voltage channels only, no low voltage channels
H: Mask bit: 1: low voltage channels only, no high voltage channels
 
Special groups: 0: all (LV+HV) channels
0x40: all, but no LV channels
0x80: all, but no HV channels
"
::= { outputEntry 3 }
 
 
outputStatus OBJECT-TYPE
SYNTAX BITS {
outputOn (0) ,
outputInhibit (1) ,
outputFailureMinSenseVoltage (2),
outputFailureMaxSenseVoltage (3),
outputFailureMaxTerminalVoltage (4),
outputFailureMaxCurrent (5),
outputFailureMaxTemperature (6),
outputFailureMaxPower (7),
-- reserved
outputFailureTimeout (9),
outputCurrentLimited (10),
outputRampUp (11),
outputRampDown (12),
outputEnableKill(13),
outputEmergencyOff (14),
outputAdjusting (15),
outputConstantVoltage (16),
outputLowCurrentRange (17),
outputCurrentBoundsExceeded (18),
outputFailureCurrentLimit (19)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A bit string which shows the status (health and operating conditions) of one output channel.
If a bit is set (1), the explanation is satisfied:
outputOn (0), output channel is on
outputInhibit(1), external (hardware-)inhibit of the output channel
outputFailureMinSenseVoltage (2) Supervision limit hurt: Sense voltage is too low
outputFailureMaxSenseVoltage (3), Supervision limit hurt: Sense voltage is too high
outputFailureMaxTerminalVoltage (4), Supervision limit hurt: Terminal voltage is too high
outputFailureMaxCurrent (5), Supervision limit hurt: Current is too high
outputFailureMaxTemperature (6), Supervision limit hurt: Heat sink temperature is too high
outputFailureMaxPower (7), Supervision limit hurt: Output power is too high
outputFailureTimeout (9), Communication timeout between output channel and main control
outputCurrentLimited (10), Current limiting is active (constant current mode)
outputRampUp (11), Output voltage is increasing (e.g. after switch on)
outputRampDown (12), Output voltage is decreasing (e.g. after switch off)
outputEnableKill (13), EnableKill is active
outputEmergencyOff (14), EmergencyOff event is active
outputAdjusting (15), Fine adjustment is working
outputConstantVoltage (16), Voltage control (constant voltage mode)
outputVoltageBoundsExceeded (17), output Voltage out of bounds
outputCurrentBoundsExceeded (18), output Current out of bounds
outputFailureCurrentLimit (19) Hardware current limit (EHS) / trip (EDS, EBS) was exceeded
"
 
::= { outputEntry 4 }
 
 
 
 
outputMeasurementSenseVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured voltage at the sense input lines."
::= { outputEntry 5 }
 
outputMeasurementTerminalVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured voltage at the output terminals."
::= { outputEntry 6 }
 
outputMeasurementCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured output current."
::= { outputEntry 7 }
 
outputMeasurementTemperature OBJECT-TYPE
SYNTAX INTEGER { ok (-128), failure(127) }
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured temperature of the power module."
::= { outputEntry 8 }
 
 
outputSwitch OBJECT-TYPE
SYNTAX INTEGER { off (0), on (1), resetEmergencyOff (2), setEmergencyOff (3), clearEvents (10), setVoltageRippleMeasurementOff(20), setVoltageMeasurementOn(21), setRippleMeasurementOn(22), setVoltageRippleMeasurementOn(23) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Read: An enumerated value which shows the current state of
the output channel.
Write: Change the state of the channel.
If the channel is On, and the write value is Off, then the channel
will switch Off.
If the channel is Off, and the write value is On, and if no other
signals (mainInhibit, outputInhibit, outputEmergencyOff or outputFailureMaxCurrent)
are active, then the channel will switch on.
If the write value is resetEmergencyOff, then the channel will
leave the state EmergencyOff. A write of clearEvents is necessary
before the voltage can ramp up again.
If the write value is setEmergencyOff, then the channel will have
the state EmergencyOff, which means that the High Voltage will
switch off without a ramp and reset of the outputVoltage to null volt.
If the write value is clearEvents, then all failure messages
of the outputStatus will be reset (all channel events, all module events
and the state emergencyOff)."
::= { outputEntry 9 }
outputVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The nominal output voltage of the channel."
::= { outputEntry 10 }
 
outputAdjustVoltage OBJECT-TYPE
SYNTAX Integer32 (-128..127)
MAX-ACCESS read-write
STATUS obsolete
DESCRIPTION
"A posibillity to make small changes of the output voltage."
::= { outputEntry 11 }
 
outputCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The current limit of the channel."
::= { outputEntry 12 }
 
outputVoltageRiseRate OBJECT-TYPE
SYNTAX Float
UNITS "V/s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Voltage Fall Slew Rate [V/s].
The slew rate of the output voltage if it increases (after switch on or if the Voltage has been
changed).
"
::= { outputEntry 13 }
 
outputVoltageFallRate OBJECT-TYPE
SYNTAX Float
UNITS "V/s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Voltage Rise Slew Rate [V/s].
The slew rate of the output voltage if it decreases (after switch off or if the Voltage has been
changed).
"
::= { outputEntry 14 }
 
outputSupervisionBehavior OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A bit field packed into an integer which define the behavior of the output channel / power supply
after failures.
For each supervision value, a two-bit field exists.
The enumeration of this value (..L+..H*2) is:
WIENER LV devices
0 ignore the failure
1 switch off this channel
2 switch off all channels with the same group number
3 switch off the complete crate.
iseg HV devices
0 ignore the failure
1 switch off this channel by ramp down the voltage
2 switch off this channel by a emergencyOff
3 switch off the whole board of the HV module by emergencyOff.
The position of the bit fields in the integer value are:
Bit 0, 1: outputFailureMinSenseVoltage
Bit 2, 3: outputFailureMaxSenseVoltage
Bit 4, 5: outputFailureMaxTerminalVoltage
Bit 6, 7: outputFailureMaxCurrent
Bit 8, 9: outputFailureMaxTemperature
Bit 10, 11: outputFailureMaxPower
Bit 12, 13: outputFailureInhibit
Bit 14, 15: outputFailureTimeout
"
 
::= { outputEntry 15 }
 
outputSupervisionMinSenseVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured sense voltage is below this value, the power supply
performs the function defined by SupervisionAction."
::= { outputEntry 16 }
 
outputSupervisionMaxSenseVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured sense voltage is above this value, the power supply
performs the function defined by SupervisionAction."
::= { outputEntry 17 }
 
outputSupervisionMaxTerminalVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured voltage at the power supply output
terminals is above this value, the power supply
performs the function defined by SupervisionAction."
::= { outputEntry 18 }
 
outputSupervisionMaxCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured current is above this value, the power supply
performs the function defined by SupervisionAction."
::= { outputEntry 19 }
 
outputSupervisionMaxTemperature OBJECT-TYPE
-- SYNTAX Integer32 (-128..127)
SYNTAX Integer32
UNITS "deg C"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured module temperature is above this value, the power supply
performs the function defined by SupervisionAction."
::= { outputEntry 20 }
 
outputConfigMaxSenseVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The maximum possible value of the sense voltage"
::= { outputEntry 21 }
 
outputConfigMaxTerminalVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The maximum possible value of the terminal voltage"
::= { outputEntry 22 }
 
outputConfigMaxCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The maximum possible value of the output current"
::= { outputEntry 23 }
 
outputSupervisionMaxPower OBJECT-TYPE
SYNTAX Float
UNITS "W"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured power (measured current * measured terminal voltage)
is above this value, the power supply performs the function defined
by SupervisionAction."
::= { outputEntry 24 }
 
outputCurrentRiseRate OBJECT-TYPE
SYNTAX Float
UNITS "A/s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Current Fall Slew Rate [A/s].
The slew rate of the output current if it increases (after
switch on or if the Current has been changed).
"
::= { outputEntry 25 }
 
outputCurrentFallRate OBJECT-TYPE
SYNTAX Float
UNITS "A/s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Current Rise Slew Rate [A/s].
The slew rate of the output current if it decreases (after
switch off or if the Current has been changed).
"
::= { outputEntry 26 }
outputTripTimeMaxCurrent OBJECT-TYPE
SYNTAX INTEGER (0..4000)
UNITS "ms"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Current trip time out [ms].
The outputTripTimeMaxCurrent defines a span for the time out function.
The activity is depending from the bit field outputFailureMaxCurrent
of the outputSupervisionBehavior."
::= { outputEntry 27 }
 
outputHardwareLimitVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Hardware Voltage Limit [V].
Potentiometer to adjust the global hardware voltage limit (for all
channels of a module).
"
::= { outputEntry 28 }
outputHardwareLimitCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Hardware Current Limit [A].
Potentiometer to adjust the global hardware current limit (for all
channels of a module).
"
::= { outputEntry 29 }
 
outputConfigGainSenseVoltage OBJECT-TYPE
SYNTAX Float
UNITS ""
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The gain value of the sense voltage"
::= { outputEntry 30 }
outputConfigOffsetSenseVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The offset value of the sense voltage"
::= { outputEntry 31 }
outputConfigGainTerminalVoltage OBJECT-TYPE
SYNTAX Float
UNITS ""
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The gain value of the sense voltage"
::= { outputEntry 32 }
outputConfigOffsetTerminalVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The offset value of the sense voltage"
::= { outputEntry 33 }
outputConfigGainCurrent OBJECT-TYPE
SYNTAX Float
UNITS ""
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The gain value of the sense voltage"
::= { outputEntry 34 }
outputConfigOffsetCurrent OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The offset value of the sense voltage"
::= { outputEntry 35 }
 
outputUserConfig OBJECT-TYPE
SYNTAX Integer32 (0..15)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Definition of user-changeable items.
A bit field packed into an integer which define the behavior of the output channel.
Usable for WIENER LV devices only.
The position of the bit fields in the integer value are:
Bit 0: Voltage ramping at switch off:
0: Ramp down at switch off.
1: No ramp at switch off (immediate off)
Bit 1, 2: Set different regulation modes, dependent on the
cable inductance:
0: fast: short cables, up to 1 meter.
1: moderate: cables from 1 to 30 meter.
2: slow: cables longer than 30 meter.
3: slow (identical to 2, should not be used)
Bit 3: Internal sense line connection to the output (MPOD only):
0: The sense input at the sense connector is used
for regulation.
1: The output voltage is used for regulation.
Any signals at the sense connector are ignored.
Bit 4: External Inhibit input.
0: The external inhibit input is ignored.
1: The external inhibit input must be connected to
a voltage source to allow switch on.
Community required for write access: guru.
"
::= { outputEntry 37 }
outputRegulationMode OBJECT-TYPE
SYNTAX INTEGER { fast (0), moderate (1), slow (2) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Definition of the regulation mode.
It is possible to set different regulation modes, dependent on the
cable inductance.
fast: short cables, up to 1 meter.
moderate: cables from 1 to 30 meter.
slow: cables longer than 30 meter.
outputUserConfig in the future.
Community required for write access: guru.
"
::= { outputEntry 38 }
outputConfigMaxTemperature OBJECT-TYPE
SYNTAX Integer32
-- SYNTAX Integer32 (-128..127)
UNITS "deg C"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The maximum possible value of outputSupervisionMaxTemperature."
::= { outputEntry 39 }
-------------------------------------------------------------------------------
-- output->groups
-------------------------------------------------------------------------------
 
groupsEntry OBJECT-TYPE
SYNTAX GroupsEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table row"
INDEX { groupsIndex }
::= { groupsTable 1 }
 
GroupsEntry ::=
SEQUENCE {
groupsIndex
INTEGER,
-- outputGroupsName
-- DisplayString,
-- outputGroupsGroup
-- INTEGER,
 
-- outputGroupsStatus
-- BITS,
-- outputGroupsMeasurementSenseVoltage
-- Float,
-- outputMeasurementTerminalVoltage
-- Float,
-- outputMeasurementCurrent
-- Float,
-- outputMeasurementTemperature
-- INTEGER,
 
 
groupsSwitch
INTEGER
-- outputVoltage
-- Float,
-- outputAdjustVoltage
-- INTEGER,
-- outputCurrent
-- Float,
 
-- outputRampUp
-- Float,
-- outputRampDown
-- Float,
 
-- outputSupervisionBehavior
-- INTEGER,
-- outputSupervisionMinSenseVoltage
-- Float,
-- outputSupervisionMaxSenseVoltage
-- Float,
-- outputSupervisionMaxTerminalVoltage
-- Float,
-- outputSupervisionMaxCurrent
-- Float,
-- outputSupervisionMaxTemperature
-- INTEGER,
 
-- outputConfigMaxSenseVoltage
-- Float,
-- outputConfigMaxTerminalVoltage
-- Float,
-- outputConfigMaxCurrent
-- Float,
-- outputSupervisionMaxPower
-- Float,
}
 
groupsIndex OBJECT-TYPE
SYNTAX Integer32 (0..1999)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each power output group. Its value
ranges between 1 and 1999.
The special group 0 is predefined and gives access to all channels.
"
::= { groupsEntry 1 }
 
groupsSwitch OBJECT-TYPE
SYNTAX INTEGER { undefined (-1), off (0), on (1), resetEmergencyOff (2), setEmergencyOff(3), disableKill (4), enableKill (5), disableAdjust(6), enableAdjust(7), clearEvents(10) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Read: This function is not defined with groups of output channels.
Write: Switch the state of all channels of a group.
If any channel is On, and the write value is Off, then all channels
will switch off.
If any channel is Off, and the write value is On, and if no other
signals (mainInhibit, outputInhibit, outputEmergencyOff or outputFailureMaxCurrent)
are active, then all channels will switch on.
If the write value is resetEmergencyOff, then all channels will
leave the state EmergencyOff. A write of clearEvents is necessary
before the voltage can ramp up again.
If the write value is setEmergencyOff, then all channels will have
the state EmergencyOff, which means that the High Voltage will
switch off without a ramp and reset of the outputVoltage to null volt.
If the write value is disableKILL, then all channels will switch
to disableKill (outputStatus outputDisableKill).
If the write value is enableKILL, then all channels will switch
to enableKill (outputStatus outputEnableKill).
If the write value is clearEvents, then all failure messages
of the outputStatus will be cleared (all channel events,
all module events and the state outputEmergencyOff will be reset).
 
For a detailed description of the different group numbers available
look at the outputGroup OID above.
"
::= { groupsEntry 9 }
 
--groupsName OBJECT-TYPE
-- SYNTAX DisplayString (SIZE (1..4))
-- MAX-ACCESS read-only
-- STATUS current
-- DESCRIPTION
-- "A textual string containing a short name of the
-- output. If the crate is equipped with an alphanumeric
-- display, this string is shown to identify a output channel."
-- ::= { groupsEntry 2 }
 
-------------------------------------------------------------------------------
-- output->module
-------------------------------------------------------------------------------
-- device related parsing of the HV data items
--
-- advantage:
-- Parsing this branch the user directly recognises the structure
-- of HV/LV devices and the hierarchie of data items,
-- module and channel functions and their interaction.
-- This branch gives an image of the module seen from outsite.
-- The inner structure will be transformed into a simple and reduced namspace
-- which has implemented the common module items and the items for the single
-- channels.
-- Module characteristics will image the propeties to a moduleTable which
-- gives an access to the collected properties of the module items whitout
-- a splitting for board 1 and board 2.
-- The channels sequence will collect all the channels also these
-- from a second board if it is integrated.
-------------------------------------------------------------------------------
 
moduleEntry OBJECT-TYPE
SYNTAX HvdevEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A row in the table of HV/LV modules"
INDEX { moduleIndex }
::= { moduleTable 1 }
 
moduleEntry ::= SEQUENCE {
moduleIndex INTEGER,
moduleDescription OCTET STRING,
moduleChannelNumber INTEGER32,
-- moduleAuxiliaryNumber INTEGER32,
moduleAuxiliaryTableSupplyVoltages ModuleAuxiliaryTableSupplyVoltages,
moduleHardwareLimitVoltage Float,
moduleHardwareLimitCurrent Float,
moduleRampSpeedVoltage Float,
moduleRampSpeedCurrent Float,
moduleStatus BITS,
moduleEventStatus BITS,
moduleEventChannelStatus INTEGER,
moduleDoClear INTEGER,
-- moduleAuxiliaryTemperatureSensorNumber INTEGER32,
moduleAuxiliaryTableTemperature moduleAuxiliaryTableTemperature
}
 
 
moduleIndex OBJECT-TYPE
SYNTAX INTEGER {
ma0(1),ma1(2),ma2(3),ma3(4),ma4(5),ma5(6),ma6(7),ma7(8),ma8(9),ma9(10)}
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each HV/LV module. Its value
ranges between 1 and the total number of HV/LV modules.
Note, index 1 corresponds to ma0."
::= { moduleEntry 1 }
 
 
moduleDescription OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..39))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Vendor, FirmwareName, ChannelNumber, SerialNumber, FirmwareRelease
Vendor WIENER or iseg
FirmwareName:
'E16D0' EDS 16 channels per PCB, distributor module, range of Vmax from VO max to (VO max - 1kV)
'E16D1' EDS 16 channels per PCB, distributor module
'E08C0' EHS 8 channels per PCB, common GND module
'E08F0' EHS 8 channels per PCB, floating GND module
'E08F2' EHS 8 channels per PCB, floating GND module, 2 current measurement ranges
'E08C2' EHS 8 channels per PCB, common floating GND module, 2 current measurement ranges
'E08B0' EBS 8 bipolars channel per PCB, distributor module
'H101C0' HPS 1 channel HV high power supply
ChannelNumber 1 to 64
SerialNumber 71xxxx
FirmwareRelease x.xx"
::= { moduleEntry 2 }
 
-------------------------------------------------------------------------------
 
moduleAuxiliaryMeasurementVoltage OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The measured module auxiliary voltages."
::= { moduleEntry 3 }
 
moduleAuxiliaryMeasurementVoltage0 OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured module auxiliary voltage."
::= { moduleAuxiliaryMeasurementVoltage 1 }
 
moduleAuxiliaryMeasurementVoltage1 OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured module auxiliary voltage."
::= { moduleAuxiliaryMeasurementVoltage 2 }
 
-------------------------------------------------------------------------------
 
 
moduleHardwareLimitVoltage OBJECT-TYPE
SYNTAX Float
UNITS "%"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The module hardware voltage limit."
::= { moduleEntry 4 }
 
moduleHardwareLimitCurrent OBJECT-TYPE
SYNTAX Float
UNITS "%"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The module hardware current limit."
::= { moduleEntry 5 }
 
moduleRampSpeedVoltage OBJECT-TYPE
SYNTAX Float
UNITS "%"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The module voltage ramp speed
(iseg HV modules have the same ramp speed value for all channels).
"
::= { moduleEntry 6 }
 
moduleRampSpeedCurrent OBJECT-TYPE
SYNTAX Float
UNITS "%"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The module current ramp speed
(iseg HV modules have the same ramp speed value for all channels).
"
::= { moduleEntry 7 }
 
moduleStatus OBJECT-TYPE
SYNTAX BITS {
moduleIsFineAdjustment (0),
-- reserved
moduleIsLiveInsertion (2),
-- reserved
moduleNeedService (4),
moduleHardwareLimitVoltageIsGood (5),
moduleIsInputError (6),
-- reserved
moduleIsNoSumError (8),
moduleIsNoRamp (9),
moduleSafetyLoopIsGood (10),
moduleIsEventActive (11),
moduleIsGood (12),
moduleSupplyIsGood (13),
moduleTemperatureIsGood (14),
moduleIsKillEnable (15),
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A bit string which shows the current module status.
If a bit is set (1), the explanation is satisfied:
moduleIsFineAdjustment (0), Module has reached state fine adjustment.
moduleIsLiveInsertion (2), Module is in state live insertion.
moduleNeedService (4), Hardware failure detected (consult iseg Spezialelektronik GmbH).
moduleIsHardwareLimitVoltageGood (5), Hardware limit voltage in proper range, using for HV distributor modules with
current mirror only.
moduleIsInputError (6), Input error in connection with a module access.
moduleIsNoSumError (8), All channels without any failure.
moduleIsNoRamp (9), All channels stable, no is ramp active.
moduleIsSafetyLoopGood (10), Safety loop is closed.
moduleIsEventActive (11), Any event is active and mask is set.
moduleIsGood (12), Module state is good.
moduleIsSupplyGood (13), Power supply is good.
moduleIsTemperatureGood (14), Module temperature is good.
moduleIsKillEnable (15), Module state of kill enable.
"
::= { moduleEntry 8 }
 
 
moduleEventStatus OBJECT-TYPE
SYNTAX BITS {
moduleEventPowerFail (0),
-- reserved
moduleEventLiveInsertion (2),
-- reserved
moduleEventService (4),
moduleHardwareLimitVoltageNotGood (5),
moduleEventInputError (6),
-- reserved
-- reserved,
-- reserved,,
moduleEventSafetyLoopNotGood (10),
-- reserved,
-- reserved,
moduleEventSupplyNotGood (13),
moduleEventTemperatureNotGood (14),
-- reserved,
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A bit string which shows the current module status.
If a bit is set (1), the explanation is satisfied:
moduleEventPowerFail (0), Event power fail generated by the MPOD controller in order to ramp down all HV's (ramp speed=1000V/s)
moduleEventLiveInsertion (2), Event live insertion to prepare a hot plug of a module
moduleEventService (4), Module event: Hardware failure detected (consult iseg Spezialelektronik GmbH).
moduleHardwareLimitVoltageNotGood (5), Module Event: Hardware voltage limit is not in proper range, using for HV distributor
modules with current mirror only.
moduleEventInputError (6), Module event: There was an input error in connection with a module access
moduleEventSafetyLoopNotGood (10), Module event: Safety loop is open.
moduleEventSupplyNotGood (13), Module event: At least one of the supplies is not good.
moduleEventTemperatureNotGood (14), Module event: Temperature was above the permitted threshold
(for EDS/EHS temperature above 55°C)
"
::= { moduleEntry 9 }
 
 
moduleEventChannelStatus OBJECT-TYPE
SYNTAX BITS
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Bit field that reserves one bit for every channel.
bit 0 HV channel 0
bit 1 HV channel 1
bit x HV channel x
"
::= { moduleEntry 10 }
 
 
moduleDoClear OBJECT-TYPE
SYNTAX INTEGER { nothing (0), doClear (1) }
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"All events of the module will be cleared."
::= { moduleEntry 11 }
 
 
-------------------------------------------------------------------------------
 
moduleAuxiliaryMeasurementTemperature OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The number of auxiliary temperature sensors in the module."
::= { moduleEntry 12 }
moduleAuxiliaryMeasurementTemperature0 OBJECT-TYPE
SYNTAX Float
UNITS "C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured module temperature of sensor 1."
::= { moduleAuxiliaryMeasurementTemperature 1 }
 
moduleAuxiliaryMeasurementTemperature1 OBJECT-TYPE
SYNTAX Float
UNITS "C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured module temperature of sensor 2."
::= { moduleAuxiliaryMeasurementTemperature 2 }
 
moduleAuxiliaryMeasurementTemperature2 OBJECT-TYPE
SYNTAX Float
UNITS "C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured module temperature of sensor 3."
::= { moduleAuxiliaryMeasurementTemperature 3 }
 
moduleAuxiliaryMeasurementTemperature3 OBJECT-TYPE
SYNTAX Float
UNITS "C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured module temperature of sensor 4."
::= { moduleAuxiliaryMeasurementTemperature 4 }
 
-------------------------------------------------------------------------------
-- sensor
-------------------------------------------------------------------------------
--Sensor ::= SEQUENCE {
-- sensorNumber Integer32,
-- sensorTable SensorTable
--}
 
sensorNumber OBJECT-TYPE
SYNTAX Integer32 (0..8)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of temperature sensors of the crate."
::= { sensor 1 }
 
sensorTable OBJECT-TYPE
SYNTAX SEQUENCE OF SensorEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A (conceptual table) of temperature sensor data."
::= { sensor 2 }
 
sensorEntry OBJECT-TYPE
SYNTAX SensorEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry (conceptual row) of the sensorTable."
INDEX { sensorIndex }
::= { sensorTable 1 }
 
SensorEntry ::= SEQUENCE {
sensorIndex INTEGER,
sensorTemperature INTEGER,
-- sensorOkThreshold INTEGER, nicht implementiert (for futur)
sensorWarningThreshold INTEGER,
sensorAlarmThreshold INTEGER,
sensorFailureThreshold INTEGER,
sensorName DisplayString,
sensorID OCTET STRING,
sensorStatus INTEGER
}
 
sensorIndex OBJECT-TYPE
SYNTAX INTEGER { temp1 (1), temp2(2), temp3(3), temp4(4), temp5(5),
temp6(6), temp7(7), temp8(8) }
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each temperature sensor in the crate"
::= { sensorEntry 1 }
 
sensorTemperature OBJECT-TYPE
-- CHECK SYNTAX INTEGER { UNUSED(-128), (-127..127) }
SYNTAX Integer32 (-128..127)
UNITS "deg C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured temperature of the sensor.
Unused temperature probes have the special value -128"
::= { sensorEntry 2 }
 
sensorWarningThreshold OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0..126), DISABLED(127) }
SYNTAX Integer32 (0..127)
UNITS "deg C"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured temperature of the sensor is higher than this
value, the fan speed of the connected fan tray is increased.
The value 127 has the special meaning: channel disabled."
::= { sensorEntry 3}
 
sensorFailureThreshold OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0..126), DISABLED(127) }
SYNTAX Integer32 (0..127)
UNITS "deg C"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured temperature of the sensor is higher than this
value, the power supply switches off.
The value 127 has the special meaning: channel disabled."
::= { sensorEntry 4}
 
--sensorOkThreshold OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0..126), DISABLED(127) }
-- SYNTAX Integer32 (0..127)
-- UNITS "deg C"
-- MAX-ACCESS read-write
-- STATUS current
-- DESCRIPTION
-- "If the measured temperature of the sensor is ok,
-- so it is possible to switch of the fans.
-- The value 127 has the special meaning: channel disabled."
-- ::= { sensorEntry 5}
sensorAlarmThreshold OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0..126), DISABLED(127) }
SYNTAX Integer32 (0..127)
UNITS "deg C"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"If the measured temperature of the sensor is much higher than this
value, the fans rotate in full speed.
The value 127 has the special meaning: channel disabled."
::= { sensorEntry 6}
sensorName OBJECT-TYPE
SYNTAX DisplayString (SIZE (1..7))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A textual string containing a short name of the
sensor. If the crate is equipped with an alphanumeric
display, this string is shown to identify a sensor channel."
::= { sensorEntry 7 }
sensorID OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (8))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Shows the 1-Wire Id of the corresponding Sensor."
::= { sensorEntry 8}
sensorStatus OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A bit field packed into an integer which define the Status of the Sensors
after failures. For each Status value, a two-bit field exists.
Bits-Value
00 Temperature is ok
01 Temperature is over WarningThreshold
10 Temperature is over AlarmThreshold
11 Temperature is over FailureThreshold
 
The position of the bit fields in the integer value are:
Bit 0, 1: Sensor1
Bit 2, 3: Sensor2
Bit 4, 5: Sensor3
Bit 6, 7: Sensor4
Bit 8, 9: Sensor5
Bit 10, 11: Sensor6
Bit 12, 13: Sensor7
Bit 14, 15: Sensor8"
::= { sensorEntry 9}
--################
-------------------------------------------------------------------------------
-- communication
-------------------------------------------------------------------------------
--Communication ::= SEQUENCE {
-- snmp Snmp,
-- tcpip Tcpip,
-- http Http,
-- telnet Telnet,
-- canbus Canbus,
-- rs232 RS232
--}
 
-------------------------------------------------------------------------------
-- communication.snmp
-------------------------------------------------------------------------------
snmp OBJECT-IDENTITY
STATUS current
DESCRIPTION
"SNMP configuration."
::= { communication 1 }
 
SnmpCommunityEntry ::= SEQUENCE {
snmpAccessRight INTEGER,
snmpCommunityName OCTET STRING,
snmpCommunityTable SnmpCommunityEntry,
snmpPort INTEGER,
ipDynamicAddress IpAddress,
--OCTET STRING,
ipStaticAddress IpAddress,
--OCTET STRING,
macAddress OCTET STRING
}
 
snmpCommunityTable OBJECT-TYPE
SYNTAX SEQUENCE OF SnmpCommunityEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The SNMP community string table for different views."
::= { snmp 1 }
 
snmpCommunityEntry OBJECT-TYPE
SYNTAX SnmpCommunityEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"One table row."
INDEX { snmpAccessRight }
::= { snmpCommunityTable 1 }
 
snmpAccessRight OBJECT-TYPE
SYNTAX INTEGER { public (1), private (2), admin (3), guru (4) }
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each access right"
::= { snmpCommunityEntry 1 }
 
snmpCommunityName OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (0..14))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The SNMP community names for different views. The rights of the different communities are:
public no write access
private can switch power on/off, generate system reset
admin can change supervision levels
guru can change output voltage & current (this may destroy hardware if done wrong!)
Setting a community name to a zero-length string completly
disables the access to this view. If there is no higher-
privileged community, the community name can only changed
by direct access to the crate (not via network)!
"
::= { snmpCommunityEntry 2}
 
snmpPort OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The UDP port number of the SNMP protocol"
::= { snmp 2}
 
firmwareUpdate OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (0..30))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Send a update String"
::= { snmp 10}
 
ipDynamicAddress OBJECT-TYPE
SYNTAX IpAddress
--OCTET STRING (SIZE (4))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Shows the Ip which is currently used"
::= { snmp 11}
 
ipStaticAddress OBJECT-TYPE
SYNTAX IpAddress
--OCTET STRING (SIZE (4))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Shows the Ip which is setted by user"
::= { snmp 12}
 
macAddress OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (6))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Shows the MAC of the corresponding device"
::= { snmp 13}
 
-------------------------------------------------------------------------------
-- communication.canTunnel
-------------------------------------------------------------------------------
can OBJECT-IDENTITY
STATUS current
DESCRIPTION
"CAN-Bus tunnel via SNMP."
::= { communication 2 }
 
canBitRate OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Control of the CAN-Bus.
The value defines the bit rate of the CAN-bus interface.
A write disconnects the CAN interface from the ISEG modules and connects
it to the SNMP communication. Both the receive and transmit fifos are
cleared and the CAN interface is initialized with the selected bit rate.
The special bit rate 0 disables the tunnel and switches back to normal operation.
"
::= { can 1 }
 
canReceive OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (14))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Control of the CAN-Bus Receive FIFO.
A read access returns the total number of CAN messages stored in the receive
fifo and the oldest message.
This message is removed from the fifo.
The OCTET STRING data is formatted according to the CANviaSNMP structure.
"
::= { can 2 }
 
canTransmit OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (14))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Control of the CAN-Bus Transmit FIFO.
A read access returns the total number of CAN messages stored in the transmit
fifo and a NULL message.
A write inserts the CAN message into the transmit fifo. This message will be
transmitted via the CAN interface later. The total number of CAN messages
stored in the transmit fifo and the recent message are returned.
The OCTET STRING data is formatted according to the CANviaSNMP structure.
"
::= { can 3 }
 
canReceiveHv OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (14))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Control of the internal HV CAN-Bus on the backplane Receive FIFO.
A read access returns the total number of CAN messages stored in the receive
fifo and the oldest message.
This message is removed from the fifo.
The OCTET STRING data is formatted according to the CANviaSNMP structure.
"
::= { can 4 }
 
canTransmitHv OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (14))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Control of the internal HV CAN-Bus on the backplane.
A write access with:
CANID=0x600 DLC=4 DATAID=0x1001 CONTROL
will switch the HV modules into a special state.
CONTROL=0x0001 - enable SNMP CAN access, stop the refresh cycle for the data points of the name space
CONTROL=0x0002 - disable SNMP CAN access, activate the refresh cycle for the data points of the name space
A write access unequal to CANID=0x600 will be transmitted to the HV CAN on the backplane.
Such a message will be transmitted immediately via the CAN interface.
The OCTET STRING data is formatted according to the CANviaSNMP structure.
"
::= { can 5 }
 
canBitRateHv OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Control of the bit rate of the CAN-Bus.
The value defines the bit rate of the CAN-bus interface
"
::= { can 6 }
 
-------------------------------------------------------------------------------
-- communication....
-------------------------------------------------------------------------------
 
-- other future entries:
-- +-tcpip
-- | |
-- | +- tcpipIpAddress
-- | +- tcpipGateway
-- | +- tcpipSubnetMask
-- | +- tcpipNegotiation
-- | +- tcpipMAC
-- |
-- +-http
-- | |
-- | +- httpPort
-- | +- httpWriteEnable
-- |
-- +-telnet
-- | |
-- | +- telnetPort
-- |
-- +-canbus
-- | |
-- | +- address
-- | +- address2
-- | +- speed
-- |
-- +-rs232
-- | |
-- | +- ?
 
 
 
-------------------------------------------------------------------------------
-- powersupply
-------------------------------------------------------------------------------
Powersupply ::= SEQUENCE {
--psFirmwareVersion DisplayString,
psSerialNumber DisplayString,
psOperatingTime Integer32,
psDirectAccess OCTET STRING
}
 
--integrated in system.sysDesc
--psFirmwareVersion OBJECT-TYPE
-- SYNTAX DisplayString
-- MAX-ACCESS read-only
-- STATUS current
-- DESCRIPTION
-- "The firmware version of the power supply main CPU."
-- ::= { powersupply 1 }
 
psSerialNumber OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The serial number of the power supply."
::= { powersupply 2 }
 
psOperatingTime OBJECT-TYPE
SYNTAX Integer32
UNITS "s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The time in seconds for how long the power supply was switched on."
::= { powersupply 3 }
 
psAuxiliaryNumber OBJECT-TYPE
SYNTAX Integer32 (0..8)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of auxiliary channels of the power supply."
::= { powersupply 4 }
 
psAuxiliaryTable OBJECT-TYPE
SYNTAX SEQUENCE OF PsAuxiliarytEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of psAuxiliary entries."
::= { powersupply 5 }
 
psDirectAccess OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (1..14))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Direct data transfer to the UEP6000 power supply.
A read access returns nothing, a write access returns the
response of the power supply.
"
::= { powersupply 1024 }
 
------------------------------------------------------------------------------
psAuxiliaryEntry OBJECT-TYPE
SYNTAX PsAuxiliaryEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table row"
INDEX { psAuxiliaryIndex }
::= { psAuxiliaryTable 1 }
 
OutputEntry ::= SEQUENCE {
psAuxiliaryIndex INTEGER,
psAuxiliaryMeasurementVoltage Float,
psAuxiliaryMeasurementCurrent Float
}
 
 
psAuxiliaryIndex OBJECT-TYPE
SYNTAX INTEGER {
u0(1),u1(2),u2(3),u3(4),u4(5),u5(6),u6(7),u7(8)}
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each power supply auxiliary channel. Its value
ranges between 1 and total number of output channels.
SMI index starts at 1, so index 1 corresponds to U0."
::= { psAuxiliaryEntry 1 }
 
psAuxiliaryMeasurementVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured power supply auxiliary output voltage."
::= { psAuxiliaryEntry 3 }
 
psAuxiliaryMeasurementCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured power supply auxiliary output current."
::= { psAuxiliaryEntry 4 }
 
-------------------------------------------------------------------------------
-- fantray
-------------------------------------------------------------------------------
Fantray ::= SEQUENCE {
-- fanFirmwareVersion DisplayString,
fanSerialNumber DisplayString,
fanOperatingTime Integer32,
fanAirTemperature INTEGER,
fanSwitchOffDelay INTEGER,
fanNominalSpeed INTEGER,
fanMaxSpeed INTEGER,
fanMinSpeed INTEGER,
fanNumberOfFans INTEGER,
fanConfigMaxSpeed Integer32,
fanConfigMinSpeed Integer32,
fanSpeedTable FanSpeedEntry
}
 
--integrated in system.sysDesc
--fanFirmwareVersion OBJECT-TYPE
-- SYNTAX DisplayString
-- MAX-ACCESS read-only
-- STATUS current
-- DESCRIPTION
-- "The firmware version of the fan tray CPU."
-- ::= { fantray 1 }
 
fanSerialNumber OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..14))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The serial number of the fan tray."
::= { fantray 2 }
 
fanOperatingTime OBJECT-TYPE
SYNTAX Integer32
UNITS "s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The time in seconds for how long the fan tray was switched on."
::= { fantray 3 }
 
fanAirTemperature OBJECT-TYPE
SYNTAX Integer32
UNITS "deg C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The temperature of the fan tray inlet air."
::= { fantray 4 }
 
fanSwitchOffDelay OBJECT-TYPE
SYNTAX Integer32 (0 .. 900)
UNITS "s"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The maximum time in seconds for which the fans will continue running
after the power supply has been switched off. This feature is used
to cool down the electronics after switching off.
"
::= { fantray 5 }
 
fanNominalSpeed OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0) , (1200..3600) }
-- SYNTAX Integer32 (0..3600)
SYNTAX Integer32
UNITS "RPM"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The nominal fan rotation speed (RPM, Revolutions Per Minute)
Value 0 does switch off the fans (only allowed if at least
one rack temperature sensor is present).
Values 1..1199 are not allowed"
::= { fantray 6 }
 
fanNumberOfFans OBJECT-TYPE
SYNTAX Integer32 ( 0..12 )
UNITS "Fans"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The number of installed fans"
::= { fantray 7 }
 
 
fanSpeedTable OBJECT-TYPE
SYNTAX SEQUENCE OF FanSpeedEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of fanSpeedEntries."
::= { fantray 8 }
 
fanSpeedEntry OBJECT-TYPE
SYNTAX FanSpeedEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table row"
INDEX { fanNumber }
::= { fanSpeedTable 1 }
 
FanSpeedEntry ::= SEQUENCE {
fanNumber
INTEGER,
fanSpeed
INTEGER
}
 
fanNumber OBJECT-TYPE
SYNTAX Integer32 ( 1..12 )
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each fan."
::= { fanSpeedEntry 1 }
 
fanSpeed OBJECT-TYPE
SYNTAX Integer32
UNITS "RPM"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured fan rotation speed (RPM, Revolutions Per Minute)"
::= { fanSpeedEntry 2 }
 
fanMaxSpeed OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0) , (1200..5000) }
-- SYNTAX Integer32 (2900..4000)
SYNTAX INTEGER
UNITS "RPM"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The highest allowed rotationspeed of fan."
::= { fantray 9 }
 
fanMinSpeed OBJECT-TYPE
-- CHECK SYNTAX INTEGER { (0) , (1000..3600) }
-- SYNTAX Integer32 (1000..1400)
SYNTAX INTEGER
UNITS "RPM"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The lowest allowed Rotationspeed of fan."
::= { fantray 10 }
fanConfigMaxSpeed OBJECT-TYPE
SYNTAX Integer32
UNITS "RPM"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Hardwarelimits. Can only set by WIENER."
::= { fantray 11 }
fanConfigMinSpeed OBJECT-TYPE
SYNTAX Integer32
UNITS "RPM"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Hardwarelimits Can only set by WIENER."
::= { fantray 12 }
-------------------------------------------------------------------------------
-- rack
-------------------------------------------------------------------------------
-- this is reserved for futer items (BIN serial number, plug&play, ...)
 
 
-- ###################
-------------------------------------------------------------------------------
-- signal
-------------------------------------------------------------------------------
Signal ::= SEQUENCE {
numberOfAnalogInputs Integer32,
analogInputTable AnalogInputEntry,
-- numberOfAnalogOutputs Integer32,
digitalInput BITS,
digitalOutput BITS
}
 
numberOfAnalogInputs OBJECT-TYPE
SYNTAX Integer32 (0..8)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of additional analog inputs of the crate."
::= { signal 1 }
 
analogInputTable OBJECT-TYPE
SYNTAX SEQUENCE OF AnalogInputEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A (conceptual table) of analog input data."
::= { signal 2 }
 
analogInputEntry OBJECT-TYPE
SYNTAX AnalogInputEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry (conceptual row) of the analogInputTable."
INDEX { analogInputIndex }
::= { analogInputTable 1 }
 
AnalogInputEntry ::= SEQUENCE {
analogInputIndex INTEGER,
analogMeasurementVoltage Float
}
 
analogInputIndex OBJECT-TYPE
SYNTAX Integer32 (1..8)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique number for each analog input of the crate"
::= { analogInputEntry 1 }
 
analogMeasurementVoltage OBJECT-TYPE
SYNTAX Float
UNITS "V"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured voltage of the analog input."
::= { analogInputEntry 2 }
 
analogMeasurementCurrent OBJECT-TYPE
SYNTAX Float
UNITS "A"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The measured current of the analog input."
::= { analogInputEntry 3 }
 
 
digitalInput OBJECT-TYPE
SYNTAX BITS {
d0 (0) ,
d1 (1) ,
d2 (2) ,
d3 (3) ,
d4 (4) ,
d5 (5) ,
d6 (6) ,
d7 (7)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of the digital inputs."
::= { signal 5 }
 
digitalOutput OBJECT-TYPE
SYNTAX BITS {
d0 (0) ,
d1 (1) ,
d2 (2) ,
d3 (3) ,
d4 (4) ,
d5 (5) ,
d6 (6) ,
d7 (7)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of the digital outputs."
::= { signal 6 }
 
 
 
-- ###################
-------------------------------------------------------------------------------
END
/cvi/instr/MPOD/WIENER_SNMP.c
0,0 → 1,2316
// WIENER SNMP basic SNMP library to Demonstrate C-Access to WIENER-Crates via SNMP
// modified for LabView import 04/23/06, Andreas Ruben
//
// The path to the Net-SNMP include files (default /usr/include) must be added to the
// include file search path!
// The following libraries must be included:
// netsnmp.lib ws2_32.lib
// The path to the Net-SNMP library must be added to the linker files.
// /usr/lib
// path for the WIENER MIB file (mibdirs) c:/usr/share/snmp/mibs
 
#include <windows.h>
#include "toolbox.h"
#include <ansi_c.h>
#include "WIENER_SNMP.h"
 
#define VER_FILEVERSION 1,1,1,0
#define VER_FILEVERSION_STR "1.1.1.0\0"
 
#ifdef _MSC_VER
#define strdup _strdup
#define vsnprintf vsprintf_s
#define strPrintf sprintf_s
#else
#define strdup StrDup
#define strPrintf snprintf
#endif
 
#ifndef UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(P) (void)(P)
#endif
 
#define false 0;
#define true 1;
 
 
static const char WienerMibFileName[] = "WIENER-CRATE-MIB";
static const char DefaultReadCommunity[] = "public"; ///< default community name for read operations
static const char DefaultWriteCommunity[] = "guru"; ///< default community name for write operation
 
static char *m_readCommunity = (char *)DefaultReadCommunity;
static char *m_writeCommunity = (char *)DefaultWriteCommunity;
 
/**
* @brief The SnmpObject class is used internally to resolve OIDs and for the SNMP calls.
*/
//class SnmpObject {
//public:
typedef struct {
oid id[MAX_OID_LEN]; ///< The resolved SNMP OID
size_t len; ///< The resolved OIDs length in byte
char desc[100]; ///< The OIDs textual representation, e.g. "sysDescr.0"
} SnmpObject;
//typedef struct snmp_object SnmpObject;
 
static SnmpObject moduleIndex[MaxSlotsPerCrate];
static SnmpObject moduleDescription[MaxSlotsPerCrate];
static SnmpObject moduleSupply[MaxModuleAuxSupplies][MaxSlotsPerCrate];
static SnmpObject moduleHardwareLimitVoltage[MaxSlotsPerCrate];
static SnmpObject moduleHardwareLimitCurrent[MaxSlotsPerCrate];
static SnmpObject moduleRampSpeedVoltage[MaxSlotsPerCrate];
static SnmpObject moduleRampSpeedCurrent[MaxSlotsPerCrate];
static SnmpObject moduleStatus[MaxSlotsPerCrate];
static SnmpObject moduleEventStatus[MaxSlotsPerCrate];
static SnmpObject moduleDoClear[MaxSlotsPerCrate];
static SnmpObject moduleAuxiliaryMeasurementTemperature[MaxModuleAuxTemperatures][MaxSlotsPerCrate];
 
static SnmpObject sysDescr;
static SnmpObject sysMainSwitch;
static SnmpObject sysStatus;
static SnmpObject sysVmeSysReset;
static SnmpObject outputNumber;
static SnmpObject groupsNumber;
static SnmpObject highVoltageGroupsSwitch;
static SnmpObject lowVoltageGroupsSwitch;
static SnmpObject ipStaticAddress;
 
static SnmpObject outputName[MaxChannelsPerCrate];
static SnmpObject outputIndex[MaxChannelsPerCrate];
static SnmpObject outputGroup[MaxChannelsPerCrate];
static SnmpObject outputStatus[MaxChannelsPerCrate];
static SnmpObject outputMeasurementSenseVoltage[MaxChannelsPerCrate];
static SnmpObject outputMeasurementTerminalVoltage[MaxChannelsPerCrate];
static SnmpObject outputMeasurementCurrent[MaxChannelsPerCrate];
static SnmpObject outputMeasurementTemperature[MaxChannelsPerCrate];
static SnmpObject outputSwitch[MaxChannelsPerCrate];
static SnmpObject outputVoltage[MaxChannelsPerCrate];
static SnmpObject outputCurrent[MaxChannelsPerCrate];
static SnmpObject outputVoltageRiseRate[MaxChannelsPerCrate];
static SnmpObject outputVoltageFallRate[MaxChannelsPerCrate];
static SnmpObject outputCurrentRiseRate[MaxChannelsPerCrate];
static SnmpObject outputCurrentFallRate[MaxChannelsPerCrate];
static SnmpObject outputSupervisionBehavior[MaxChannelsPerCrate];
static SnmpObject outputSupervisionMinSenseVoltage[MaxChannelsPerCrate];
static SnmpObject outputSupervisionMaxSenseVoltage[MaxChannelsPerCrate];
static SnmpObject outputSupervisionMaxTerminalVoltage[MaxChannelsPerCrate];
static SnmpObject outputSupervisionMaxCurrent[MaxChannelsPerCrate];
static SnmpObject outputSupervisionMaxTemperature[MaxChannelsPerCrate];
static SnmpObject outputConfigMaxSenseVoltage[MaxChannelsPerCrate];
static SnmpObject outputConfigMaxTerminalVoltage[MaxChannelsPerCrate];
static SnmpObject outputConfigMaxCurrent[MaxChannelsPerCrate];
static SnmpObject outputSupervisionMaxPower[MaxChannelsPerCrate];
static SnmpObject outputTripTimeMaxCurrent[MaxChannelsPerCrate];
 
static SnmpObject sensorNumber;
static SnmpObject sensorTemperature[MaxSensors];
static SnmpObject sensorWarningThreshold[MaxSensors];
static SnmpObject sensorFailureThreshold[MaxSensors];
 
//static SnmpObject psFirmwareVersion;
static SnmpObject psSerialNumber;
static SnmpObject psOperatingTime;
static SnmpObject psDirectAccess;
static SnmpObject fanNumberOfFans;
static SnmpObject fanOperatingTime;
//static SnmpObject fanFirmwareVersion;
static SnmpObject fanSerialNumber;
static SnmpObject fanAirTemperature;
static SnmpObject fanSwitchOffDelay;
static SnmpObject fanNominalSpeed;
static SnmpObject fanSpeed[MaxFans];
 
static SnmpObject psAuxVoltage[MaxPsAuxSupplies];
static SnmpObject psAuxCurrent[MaxPsAuxSupplies];
 
static SnmpObject snmpCommunityName[MaxCommunities];
 
//static double snmpSetDouble(HSNMP session, const SnmpObject &object, double value);
static double snmpSetDouble(HSNMP session, const SnmpObject *object, double value);
static double snmpGetDouble(HSNMP session, const SnmpObject *object);
static int snmpSetInt(HSNMP session, const SnmpObject *object, int value);
static int snmpGetInt(HSNMP session, const SnmpObject *object);
static char *snmpGetString(HSNMP session, const SnmpObject *object);
 
char snmpStringBuffer[1024];
char snmpLastErrorBuffer[1024];
 
SnmpDoubleBuffer snmpDoubleBuffer;
SnmpIntegerBuffer snmpIntegerBuffer;
 
#ifdef _MSC_VER
 
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
UNREFERENCED_PARAMETER(hModule);
UNREFERENCED_PARAMETER(ul_reason_for_call);
UNREFERENCED_PARAMETER(lpReserved);
 
return TRUE;
}
 
#endif
 
/**
* @brief Simple logging function with printf-like usage.
* @internal
* @param priority
* @param format
*/
static void sysLog(int priority, const char *format, ...)
{
UNREFERENCED_PARAMETER(priority);
 
va_list vaPrintf;
va_start(vaPrintf, format);
vprintf(format, vaPrintf);
putchar('\n');
 
// store errors in snmpLastErrorBuffer, which can be read by snmpGetLastError()
if (priority == LOG_ERR)
vsnprintf(snmpLastErrorBuffer, sizeof(snmpLastErrorBuffer), format, vaPrintf);
 
va_end(vaPrintf);
}
 
// Helper functions
 
/**
* @brief Resolves the OID from the textual SNMP description
* and stores the OID in *object.
* @internal
* @param node e.g. "sysMainSwitch"
* @param object the resolved OID
* @return true on success, false otherwise
*/
static int getNode(const char * const node, SnmpObject *object)
{
object->len = MAX_OID_LEN;
if (!get_node(node, object->id, &object->len)) {
snmp_log(LOG_ERR, "OID %s not found!\n", node);
return false;
}
 
#ifdef _MSC_VER
strcpy_s(object->desc, sizeof(object->desc), node);
#else
strncpy(object->desc, node, sizeof(object->desc));
#endif
 
return true;
}
 
/**
* @brief Resolves the OID from the textual SNMP description
* with appended index and stores the OID in *object.
* @internal
* @param nodeBase e.g. "outputSwitch"
* @param index e.g. 100
* @param object the resolved OID
* @return true on success, false otherwise
*/
static int getIndexNode(const char * const nodeBase, int index, SnmpObject *object)
{
char node[100];
 
strPrintf(node, sizeof(node), "%s.%i", nodeBase, index);
 
return getNode(node, object);
}
 
/**
* @brief Activates logging on stderr console.
* @since 1.1
* @note This is the default setting.
*/
void snmpSetStdErrLog(void)
{
snmp_enable_stderrlog();
}
 
/**
* @brief Activates logging to the file filename.
* @since 1.1
* @param fileName The full path to the file where all log
* information should go to.
* @note If the specified file already exists,
* new log information is appended.
*/
void snmpSetFileLog(const char * const fileName)
{
snmp_enable_filelog(fileName, 1);
}
 
/**
* @brief Returns the library four digit version number as unsigned int value.
*
* This allows to check for a specific version number.
* @since 1.1
* @return The version number as unsigned long value, e.g. 0x01010000
*/
unsigned int snmpGetVersion(void)
{
const uint32_t version[] = { VER_FILEVERSION };
 
return (version[0] << 24) + (version[1] << 16) + (version[2] << 8) + version[3];
}
 
/**
* @brief Returns the library four digit version number as null-terminated string.
*
* The digits are separated by dots.
* @since 1.1
* @return The version number, e.g. "1.1.0.3"
*/
char *snmpGetVersionString(void)
{
return VER_FILEVERSION_STR;
}
 
/**
* @brief Setup the default conditions for logging and SNMP passwords.
* @internal
*/
static void setDefaultSettings(void)
{
snmpSetStdErrLog();
 
m_readCommunity = (char *)DefaultReadCommunity;
m_writeCommunity = (char *)DefaultWriteCommunity;
 
memset(snmpLastErrorBuffer, 0, sizeof(snmpLastErrorBuffer));
}
 
/**
* @brief SNMP Initialization.
*
* Resolves all needed OIDs from the MIB file and prepares the SNMP communication.
* The actual connection to a MPOD crate is done with snmpOpen().
* @return true on success, false otherwise (e.g. an OID could not be resolved)
*/
int snmpInit(void)
{
setDefaultSettings();
 
snmp_log(LOG_DEBUG, "*** Initialise SNMP ***\n");
 
init_snmp("WIENER_SNMP_DLL");
init_mib(); // init MIB processing
if (!read_module(WienerMibFileName)) { // read specific mibs
snmp_log(LOG_ERR, "Unable to load SNMP MIB file \"%s\"\n", WienerMibFileName);
return false;
}
snmp_log(LOG_DEBUG, "*** Translate OIDs ***\n");
 
// Translate System OIDS
getNode("sysDescr.0", &sysDescr); // FIXME: doesn't work atm in Linux
 
if (
(!getNode("sysMainSwitch.0", &sysMainSwitch)) ||
(!getNode("sysStatus.0", &sysStatus)) ||
(!getNode("sysVmeSysReset.0", &sysVmeSysReset)) ||
(!getNode("outputNumber.0", &outputNumber)) ||
(!getNode("groupsNumber.0", &groupsNumber)) ||
(!getNode("groupsSwitch.64", &highVoltageGroupsSwitch)) ||
(!getNode("groupsSwitch.128", &lowVoltageGroupsSwitch)) ||
(!getNode("ipStaticAddress.0", &ipStaticAddress)) ||
// (!getNode("psFirmwareVersion.0", &psFirmwareVersion)) ||
(!getNode("psSerialNumber.0", &psSerialNumber)) ||
(!getNode("psOperatingTime.0", &psOperatingTime)) ||
(!getNode("psDirectAccess.0", &psDirectAccess)) ||
(!getNode("sensorNumber.0", &sensorNumber)) ||
// (!getNode("fanFirmwareVersion.0", &fanFirmwareVersion)) ||
(!getNode("fanSerialNumber.0", &fanSerialNumber)) ||
(!getNode("fanOperatingTime.0", &fanOperatingTime)) ||
(!getNode("fanAirTemperature.0", &fanAirTemperature))||
(!getNode("fanSwitchOffDelay.0", &fanSwitchOffDelay)) ||
(!getNode("fanNominalSpeed.0", &fanNominalSpeed)) ||
(!getNode("fanNumberOfFans.0", &fanNumberOfFans))
) {
return false;
}
 
// Translate module and channel information OIDs
for (int slot = 0; slot < MaxSlotsPerCrate; ++slot) {
 
if (
(!getIndexNode("moduleIndex", slot + 1, &moduleIndex[slot])) ||
(!getIndexNode("moduleDescription", slot + 1, &moduleDescription[slot])) ||
(!getIndexNode("moduleAuxiliaryMeasurementVoltage0", slot + 1, &moduleSupply[0][slot])) ||
(!getIndexNode("moduleAuxiliaryMeasurementVoltage1", slot + 1, &moduleSupply[1][slot])) ||
(!getIndexNode("moduleAuxiliaryMeasurementTemperature0", slot + 1, &moduleAuxiliaryMeasurementTemperature[0][slot])) ||
(!getIndexNode("moduleAuxiliaryMeasurementTemperature1", slot + 1, &moduleAuxiliaryMeasurementTemperature[1][slot])) ||
(!getIndexNode("moduleAuxiliaryMeasurementTemperature2", slot + 1, &moduleAuxiliaryMeasurementTemperature[2][slot])) ||
(!getIndexNode("moduleAuxiliaryMeasurementTemperature3", slot + 1, &moduleAuxiliaryMeasurementTemperature[3][slot])) ||
(!getIndexNode("moduleHardwareLimitVoltage", slot + 1, &moduleHardwareLimitVoltage[slot])) ||
(!getIndexNode("moduleHardwareLimitCurrent", slot + 1, &moduleHardwareLimitCurrent[slot])) ||
(!getIndexNode("moduleRampSpeedVoltage", slot + 1, &moduleRampSpeedVoltage[slot])) ||
(!getIndexNode("moduleRampSpeedCurrent", slot + 1, &moduleRampSpeedCurrent[slot])) ||
(!getIndexNode("moduleStatus", slot + 1, &moduleStatus[slot])) ||
(!getIndexNode("moduleEventStatus", slot + 1, &moduleEventStatus[slot])) ||
(!getIndexNode("moduleDoClear", slot + 1, &moduleDoClear[slot]))
) {
return false;
}
 
int base = MaxChannelsPerSlot * slot; // array index
 
for (int channel = base; channel < base + MaxChannelsPerSlot; ++channel) {
if (
(!getIndexNode("outputName", channel + 1, &outputName[channel])) ||
(!getIndexNode("outputIndex", channel + 1, &outputIndex[channel])) ||
(!getIndexNode("outputGroup", channel + 1, &outputGroup[channel])) ||
(!getIndexNode("outputStatus", channel + 1, &outputStatus[channel])) ||
(!getIndexNode("outputMeasurementSenseVoltage", channel + 1, &outputMeasurementSenseVoltage[channel])) ||
(!getIndexNode("outputMeasurementTerminalVoltage", channel + 1, &outputMeasurementTerminalVoltage[channel])) ||
(!getIndexNode("outputMeasurementCurrent", channel + 1, &outputMeasurementCurrent[channel])) ||
(!getIndexNode("outputMeasurementTemperature", channel + 1, &outputMeasurementTemperature[channel])) ||
(!getIndexNode("outputSwitch", channel + 1, &outputSwitch[channel])) ||
(!getIndexNode("outputVoltage", channel + 1, &outputVoltage[channel])) ||
(!getIndexNode("outputCurrent", channel + 1, &outputCurrent[channel])) ||
(!getIndexNode("outputVoltageRiseRate", channel + 1, &outputVoltageRiseRate[channel])) ||
(!getIndexNode("outputVoltageFallRate", channel + 1, &outputVoltageFallRate[channel])) ||
(!getIndexNode("outputCurrentRiseRate", channel + 1, &outputCurrentRiseRate[channel])) ||
(!getIndexNode("outputCurrentFallRate", channel + 1, &outputCurrentFallRate[channel])) ||
(!getIndexNode("outputSupervisionBehavior", channel + 1, &outputSupervisionBehavior[channel])) ||
(!getIndexNode("outputSupervisionMinSenseVoltage", channel + 1, &outputSupervisionMinSenseVoltage[channel])) ||
(!getIndexNode("outputSupervisionMaxSenseVoltage", channel + 1, &outputSupervisionMaxSenseVoltage[channel])) ||
(!getIndexNode("outputSupervisionMaxTerminalVoltage", channel + 1, &outputSupervisionMaxTerminalVoltage[channel])) ||
(!getIndexNode("outputSupervisionMaxCurrent", channel + 1, &outputSupervisionMaxCurrent[channel])) ||
// (!getIndexNode("outputSupervisionMaxTemperature", channel + 1, &outputSupervisionMaxTemperature[channel])) ||
(!getIndexNode("outputConfigMaxSenseVoltage", channel + 1, &outputConfigMaxSenseVoltage[channel])) ||
(!getIndexNode("outputConfigMaxTerminalVoltage", channel + 1, &outputConfigMaxTerminalVoltage[channel])) ||
(!getIndexNode("outputSupervisionMaxPower", channel + 1, &outputSupervisionMaxPower[channel])) ||
(!getIndexNode("outputConfigMaxCurrent", channel + 1, &outputConfigMaxCurrent[channel])) ||
(!getIndexNode("outputTripTimeMaxCurrent", channel + 1, &outputTripTimeMaxCurrent[channel]))
) {
return false;
}
}
}
 
for (int sensor = 0; sensor < MaxSensors; ++sensor)
if (
(!getIndexNode("sensorTemperature", sensor + 1, &sensorTemperature[sensor])) ||
(!getIndexNode("sensorWarningThreshold", sensor + 1, &sensorWarningThreshold[sensor])) ||
(!getIndexNode("sensorFailureThreshold", sensor + 1, &sensorFailureThreshold[sensor]))
) {
return false;
}
 
for (int name = 0; name < MaxCommunities; ++name)
if (!getIndexNode("snmpCommunityName", name + 1, &snmpCommunityName[name]))
return false;
 
for (int fan = 0; fan < MaxFans; ++fan)
if (!getIndexNode("fanSpeed", fan + 1, &fanSpeed[fan]))
return false;
 
for (int aux = 0; aux < MaxPsAuxSupplies; ++aux) {
if (
(!getIndexNode("psAuxiliaryMeasurementVoltage", aux + 1, &psAuxVoltage[aux])) ||
(!getIndexNode("psAuxiliaryMeasurementCurrent", aux + 1, &psAuxCurrent[aux]))
) {
return false;
}
}
 
snmp_log(LOG_DEBUG, "*** Initialise SNMP done ***\n");
SOCK_STARTUP; // only in main thread
 
return true;
}
 
/**
* @brief Additional cleanup. Should be called after snmpClose.
*/
void snmpCleanup(void)
{
SOCK_CLEANUP;
}
 
/**
* @brief Set a new read community name for SNMP access.
*
* The read community name has to match the configured read community name in the MPOD.
* The default read community name is "public".
* @since 1.1
* @note This function must be called before snmpOpen().
* @param readCommunityName the new read community name
*/
void snmpSetReadCommunityName(const char * const readCommunityName)
{
m_readCommunity = strdup(readCommunityName);
}
 
/**
* @brief Set a new write community name for SNMP access.
*
* The write community name has to match the configured write community name in the MPOD.
* The default write community name is "guru".
* @since 1.1
* @note This function must be called before any write access function.
* @param writeCommunityName the new write community name
*/
void snmpSetWriteCommunityName(const char * const writeCommunityName)
{
m_writeCommunity = strdup(writeCommunityName);
}
 
/**
* @brief Opens a SNMP session to the specified ipAddress.
*
* This function also sets the number of retries and the timeout value.
* @param ipAddress a zero-terminated ASCII string representation
* of an IPv4 address, e.g. "192.168.17.101"
* @return a handle to the opened SNMP session, which is a required
* parameter for any further call.
*/
HSNMP snmpOpen(const char * const ipAddress)
{
HSNMP session;
struct snmp_session snmpSession;
snmp_sess_init(&snmpSession); // structure defaults
snmpSession.version = SNMP_VERSION_2c;
snmpSession.peername = strdup(ipAddress);
snmpSession.community = (u_char *)strdup(m_readCommunity);
snmpSession.community_len = strlen(m_readCommunity);
 
snmpSession.timeout = 300000; // timeout (us)
snmpSession.retries = 2; // retries
 
if (!(session = snmp_sess_open(&snmpSession))) {
int liberr, syserr;
char *errstr;
snmp_error(&snmpSession, &liberr, &syserr, &errstr);
snmp_log(LOG_ERR, "Open SNMP session for host \"%s\": %s\n", ipAddress, errstr);
free(errstr);
return 0;
}
 
snmp_log(LOG_INFO, "SNMP session for host \"%s\" opened\n", ipAddress);
return session;
}
 
/**
* @brief Closes the previously opened session specified by session.
* @param session The handle returned by snmpOpen()
*/
void snmpClose(HSNMP session)
{
if (!session)
return;
 
if (!snmp_sess_close(session))
snmp_log(LOG_ERR, "Close SNMP session: ERROR\n");
else
snmp_log(LOG_INFO, "SNMP session closed\n");
}
 
/**
* @brief Returns a pointer to a descriptive string for the last failed SNMP operation.
* @return a pointer to a zero-terminated error string for the last failed
* SNMP operation. Note: this pointer is valid until the next string operation.
*/
char *snmpGetLastError(void)
{
return snmpLastErrorBuffer;
}
 
// System Information Functions
 
/**
* @brief Returns a pointer to the MPOD controller description string.
*
* The pointer is valid until the next call of any string function.
* @param session The handle returned by snmpOpen()
* @return the MPOD controller description string, containing the
* controller serial number and firmware releases, e.g.:
* "WIENER MPOD (4388090, MPOD 2.1.2098.1, MPODslave 1.09, MPOD-BL 1.50 )"
*/
char *getSysDescr(HSNMP session)
{
return snmpGetString(session, &sysDescr);
}
 
/**
* @brief Returns the crate power on/off status.
*
* The result is the logical "and" between the hardware main switch
* and the setMainSwitch function.
* @param session The handle returned by snmpOpen()
* @return The current on/off status of the crate:
* 0: crate is powered off
* 1: crate is powered on
*/
int getMainSwitch(HSNMP session)
{
return snmpGetInt(session, &sysMainSwitch);
}
 
/**
* @brief Sets the crate main switch to 1 = on or 0 = off.
*
* If the hardware main switch is set to "0" position, this function always returns 0.
* @param session The handle returned by snmpOpen()
* @param value 0 = set off, 1 = set on
* @return The new on/off status of the crate.
*/
int setMainSwitch(HSNMP session, int value)
{
return snmpSetInt(session, &sysMainSwitch, value);
}
 
/**
* @brief Returns a bit field with the status of the complete crate.
* @param session The handle returned by snmpOpen()
* @return The complete crate status.
*/
int getMainStatus(HSNMP session)
{
return snmpGetInt(session, &sysStatus);
}
 
/**
* @brief Returns the VME system reset status.
* @param session The handle returned by snmpOpen()
* @return
*/
int getVmeReset(HSNMP session)
{
return snmpGetInt(session, &sysVmeSysReset);
}
 
/**
* @brief Initiate a VME system reset.
* @param session The handle returned by snmpOpen()
* @return
*/
int setVmeReset(HSNMP session)
{
return snmpSetInt(session, &sysVmeSysReset, 1);
}
 
/**
* @brief Returns the static IP address as 32 bit integer.
* @param session The handle returned by snmpOpen()
* @return The static IP address.
*/
int getIpStaticAddress(HSNMP session)
{
return snmpGetInt(session, &ipStaticAddress);
}
 
/**
* @brief Sets a new static IP address.
* @param session The handle returned by snmpOpen()
* @param value The IP address as 32 bit integer
* @return
*/
int setIpStaticAddress(HSNMP session, int value)
{
return snmpSetInt(session, &ipStaticAddress, value);
}
 
/**
* @brief Returns a pointer to a string containing the MPOD controllers serial number.
*
* The pointer is valid until the next call of any string function.
* @param session The handle returned by snmpOpen()
* @return The crates serial number, e.g. "4388090".
*/
char *getPsSerialNumber(HSNMP session)
{
return snmpGetString(session, &psSerialNumber);
}
 
// System Count Functions
 
/**
* @brief Returns the total number of output channels in the crate.
* @param session The handle returned by snmpOpen()
* @return The total number of output channels
*/
int getOutputNumber(HSNMP session)
{
return snmpGetInt(session, &outputNumber);
}
 
/**
* @brief getOutputGroups
* @param session The handle returned by snmpOpen()
* @return
*/
int getOutputGroups(HSNMP session)
{
return snmpGetInt(session, &groupsNumber);
}
 
// Output Channel Information
 
/**
* @brief getOutputGroup
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
int getOutputGroup(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputGroup[channel]);
}
 
/**
* @brief Returns the channel outputStatus register.
* @note This function is deprecated. Use getOutputStatus() instead.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The channels outputStatus register
*/
int getChannelStatus(HSNMP session, int channel)
{
return getOutputStatus(session, channel);
}
 
/**
* @brief Returns the channel outputStatus register.
* @since 1.1
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The channels outputStatus register
*/
int getOutputStatus(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputStatus[channel]);
}
 
/**
* @brief Returns the measured output sense voltage for channel in Volt.
* @note This is only valid for WIENER LV modules.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputSenseMeasurement(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputMeasurementSenseVoltage[channel]);
}
 
/**
* @brief Returns the measured output terminal voltage for channel in Volt.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The measured output terminal voltage in Volt.
*/
double getOutputTerminalMeasurement(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputMeasurementTerminalVoltage[channel]);
}
 
/**
* @brief Returns the measured output current for channel in Ampere.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The measured output measurement current in Ampere.
*/
double getCurrentMeasurement(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputMeasurementCurrent[channel]);
}
 
/**
* @brief Returns the measured temperature for channel in Degree Celsius.
* @note Only WIENER Low Voltage modules have a channel-wise temperature measurement.
* For iseg HV modules, use getModuleAuxTemperature().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The measured output temperature in Degree Celsius.
*/
int getTemperatureMeasurement(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputMeasurementTemperature[channel]);
}
 
/**
* @brief Change the state of the channel.
* @note This function is deprecated. Use setOutputSwitch() instead.
* @param session The handle returned by snmpOpen()
* @param channel The channel in the range of 0...999
* @param value One of the following: off (0), on (1),
* resetEmergencyOff (2), setEmergencyOff (3), clearEvents (10).
* @return
*/
int setChannelSwitch(HSNMP session, int channel, int value)
{
return setOutputSwitch(session, channel, value);
}
 
/**
* @brief Change the state of the channel.
* @since 1.1
* @param session The handle returned by snmpOpen()
* @param channel The channel in the range of 0...999
* @param value One of the following: off (0), on (1),
* resetEmergencyOff (2), setEmergencyOff (3), clearEvents (10).
* @return
*/
int setOutputSwitch(HSNMP session, int channel, int value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetInt(session, &outputSwitch[channel], value);
}
 
/**
* @brief Returns the state of the channel.
* @note This function is deprecated. Use getOutputSwitch() instead.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return One of the following: off (0), on (1),
* resetEmergencyOff (2), setEmergencyOff (3), clearEvents (10).
*/
int getChannelSwitch(HSNMP session, int channel)
{
return getOutputSwitch(session, channel);
}
 
/**
* @brief Returns the state of the channel.
* @since 1.1
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return One of the following: off (0), on (1),
* resetEmergencyOff (2), setEmergencyOff (3), clearEvents (10).
*/
int getOutputSwitch(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputSwitch[channel]);
}
 
/**
* @brief setHighVoltageGroupsSwitch
* @param session The handle returned by snmpOpen()
* @param value
* @return
*/
int setHighVoltageGroupsSwitch(HSNMP session, int value)
{
return snmpSetInt(session, &highVoltageGroupsSwitch, value);
}
 
/**
* @brief getHighVoltageGroupsSwitch
* @param session The handle returned by snmpOpen()
* @return
*/
int getHighVoltageGroupsSwitch(HSNMP session)
{
return snmpGetInt(session, &highVoltageGroupsSwitch);
}
 
/**
* @brief setLowVoltageGroupsSwitch
* @param session The handle returned by snmpOpen()
* @param value
* @return
*/
int setLowVoltageGroupsSwitch(HSNMP session, int value)
{
return snmpSetInt(session, &lowVoltageGroupsSwitch, value);
}
 
/**
* @brief getLowVoltageGroupsSwitch
* @param session The handle returned by snmpOpen()
* @return
*/
int getLowVoltageGroupsSwitch(HSNMP session)
{
return snmpGetInt(session, &lowVoltageGroupsSwitch);
}
 
/**
* @brief Returns the demanded output voltage for channel.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The demanded output voltage in Volt.
*/
double getOutputVoltage(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputVoltage[channel]);
}
 
/**
* @brief Sets the demanded output voltage for channel.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @param value the demanded output voltage in Volt.
* @return The demanded output voltage in Volt.
*/
double setOutputVoltage(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputVoltage[channel], value);
}
 
/**
* @brief Returns the demanded maximum output current for channel.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The demanded output current in Ampere.
*/
double getOutputCurrent(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputCurrent[channel]);
}
 
/**
* @brief Sets the demanded maximum output current for channel.
* @param session The handle returned by snmpOpen()
* @param channel The channel in the range of 0...999
* @param value The demanded ouput current in Ampere
* @return The demanded maximum output current in Ampere.
*/
double setOutputCurrent(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputCurrent[channel], value);
}
 
/**
* @brief Returns the channel voltage rise rate in Volt/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use getModuleRampSpeedVoltage().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputRiseRate(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputVoltageRiseRate[channel]);
}
 
/**
* @brief Sets the channel voltage rise rate in Volt/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use setModuleRampSpeedVoltage().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @param value
* @return
*/
double setOutputRiseRate(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputVoltageRiseRate[channel], value);
}
 
/**
* @brief Returns the channel voltage fall rate in Volt/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use getModuleRampSpeedVoltage().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputFallRate(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputVoltageFallRate[channel]);
}
 
/**
* @brief Sets the channel voltage fall rate in Volt/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use setModuleRampSpeedVoltage().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @param value
* @return
*/
double setOutputFallRate(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputVoltageFallRate[channel], value);
}
 
/**
* @brief Returns the channel current rise rate in Ampere/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use getModuleRampSpeedCurrent().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputCurrentRiseRate(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputCurrentRiseRate[channel]);
}
 
/**
* @brief Sets the channel current rise rate in Ampere/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use setModuleRampSpeedCurrent().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @param value
* @return
*/
double setOutputCurrentRiseRate(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputCurrentRiseRate[channel], value);
}
 
/**
* @brief Returns the channel current fall rate in Ampere/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use getModuleRampSpeedCurrent().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputCurrentFallRate(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputCurrentFallRate[channel]);
}
 
/**
* @brief Sets the channel current fall rate in Ampere/second.
*
* @note This function is for WIENER LV only.
* For iseg HV modules, use setModuleRampSpeedCurrent().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @param value
* @return
*/
double setOutputCurrentFallRate(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputCurrentFallRate[channel], value);
}
 
/**
* @brief Returns a bit field packed into an integer
* which define the behavior of the output channel or power supply after failures.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
int getOutputSupervisionBehavior(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputSupervisionBehavior[channel]);
}
 
/**
* @brief Set the behavior of the output channel or power supply after failures.
*
* For each supervision value, a two-bit field exists.
* The enumeration of this value (..L+..H*2) is:
* WIENER LV devices
* 0 ignore the failure
* 1 switch off this channel
* 2 switch off all channels with the same group number
* 3 switch off the complete crate.
* iseg HV devices
* 0 ignore the failure
* 1 switch off this channel by ramp down the voltage
* 2 switch off this channel by a emergencyOff
* 3 switch off the whole board of the HV module by emergencyOff.
* The position of the bit fields in the integer value are:
* Bit 0, 1: outputFailureMinSenseVoltage
* Bit 2, 3: outputFailureMaxSenseVoltage
* Bit 4, 5: outputFailureMaxTerminalVoltage
* Bit 6, 7: outputFailureMaxCurrent
* Bit 8, 9: outputFailureMaxTemperature
* Bit 10, 11: outputFailureMaxPower
* Bit 12, 13: outputFailureInhibit
* Bit 14, 15: outputFailureTimeout
* @param session The handle returned by snmpOpen()
* @param channel The channel (0...999) for which the behaviour should be set
* @param value The 16 bit integer with bits set according the preceding table.
* @return
*/
int setOutputSupervisionBehavior(HSNMP session, int channel, int value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetInt(session, &outputSupervisionBehavior[channel], value );
}
 
/**
* @brief getOutputSupervisionMinSenseVoltage
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputSupervisionMinSenseVoltage(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputSupervisionMinSenseVoltage[channel]);
}
 
/**
* @brief setOutputSupervisionMinSenseVoltage
* @param session The handle returned by snmpOpen()
* @param channel
* @param value
* @return
*/
double setOutputSupervisionMinSenseVoltage(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputSupervisionMinSenseVoltage[channel], value);
}
 
/**
* @brief getOutputSupervisionMaxSenseVoltage
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputSupervisionMaxSenseVoltage(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputSupervisionMaxSenseVoltage[channel]);
}
 
/**
* @brief setOutputSupervisionMaxSenseVoltage
* @param session The handle returned by snmpOpen()
* @param channel
* @param value
* @return
*/
double setOutputSupervisionMaxSenseVoltage(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputSupervisionMaxSenseVoltage[channel], value);
}
 
/**
* @brief If the measured voltage at the power supply output terminals is above this value,
* the power supply performs the function defined by setOutputSupervisionBehavior().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The maximum terminal voltage in Volt
*/
double getOutputSupervisionMaxTerminalVoltage(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputSupervisionMaxTerminalVoltage[channel]);
}
 
/**
* @brief If the measured voltage at the power supply output terminals is above this value,
* the power supply performs the function defined by setOutputSupervisionBehavior().
* @param session The handle returned by snmpOpen()
* @param channel the channel (0...999) to set the max. terminal voltage
* @param value The maximum terminal voltage in Volt
* @return
*/
double setOutputSupervisionMaxTerminalVoltage(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputSupervisionMaxTerminalVoltage[channel], value);
}
 
/**
* @brief If the measured current is above this value, the power supply
* performs the function defined by setOutputSupervisionBehavior().
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The maximum output current in Ampere
*/
double getOutputSupervisionMaxCurrent(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputSupervisionMaxCurrent[channel]);
}
 
/**
* @brief If the measured current is above this value, the power supply
* performs the function defined by setOutputSupervisionBehavior().
* @param session The handle returned by snmpOpen()
* @param channel The channel (0...999) to set the max. current
* @param value The maximum current in Ampere
* @return
*/
double setOutputSupervisionMaxCurrent(HSNMP session, int channel, double value)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetDouble(session, &outputSupervisionMaxCurrent[channel], value );
}
 
/**
* @brief getOutputSupervisionMaxTemperature
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return The maximum temperature in degree Celsius
*/
int getOutputSupervisionMaxTemperature(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputSupervisionMaxTemperature[channel]);
}
 
/**
* @brief getOutputConfigMaxSenseVoltage
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputConfigMaxSenseVoltage(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputConfigMaxSenseVoltage[channel]);
}
 
/**
* @brief getOutputConfigMaxTerminalVoltage
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputConfigMaxTerminalVoltage(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputConfigMaxTerminalVoltage[channel]);
}
 
/**
* @brief getOutputConfigMaxCurrent
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputConfigMaxCurrent(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputConfigMaxCurrent[channel]);
}
 
/**
* @brief getOutputSupervisionMaxPower
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return
*/
double getOutputSupervisionMaxPower(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetDouble(session, &outputSupervisionMaxPower[channel]);
}
 
/**
* @brief Returns the time span for the delayed trip function.
* @param session The handle returned by snmpOpen()
* @param channel The requested channel in the range of 0...999
* @return the trip delay time (0...4000 ms)
*/
int getOutputTripTimeMaxCurrent(HSNMP session, int channel)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpGetInt(session, &outputTripTimeMaxCurrent[channel]);
}
 
/**
* @brief Defines a span for the delayed trip function.
* @param session The handle returned by snmpOpen()
* @param channel The channel (0...999) for which to set the delayed trip
* @param delay The trip delay time (0...4000 ms)
* @return
*/
int setOutputTripTimeMaxCurrent(HSNMP session, int channel, int delay)
{
if (channel < 0 || channel >= MaxChannelsPerCrate)
return 0;
 
return snmpSetInt(session, &outputTripTimeMaxCurrent[channel], delay);
}
 
// Sensor Information functions
 
int getSensorNumber(HSNMP session)
{
return snmpGetInt(session, &sensorNumber);
}
 
int getSensorTemp(HSNMP session, int sensor)
{
if (sensor < 0 || sensor > MaxSensors)
return 0;
 
return snmpGetInt(session, &sensorTemperature[sensor]);
}
 
int getSensorWarningTemperature(HSNMP session, int sensor)
{
if (sensor < 0 || sensor > MaxSensors)
return 0;
 
return snmpGetInt(session, &sensorWarningThreshold[sensor]);
}
 
int setSensorWarningTemperature(HSNMP session, int sensor, int value)
{
if (sensor < 0 || sensor > MaxSensors)
return 0;
 
return snmpSetInt(session, &sensorWarningThreshold[sensor], value);
}
 
int getSensorFailureTemperature(HSNMP session, int sensor)
{
if (sensor < 0 || sensor > MaxSensors)
return 0;
 
return snmpGetInt(session, &sensorFailureThreshold[sensor]);
}
 
int setSensorFailureTemperature(HSNMP session, int sensor, int value)
{
if (sensor < 0 || sensor > MaxSensors)
return 0;
 
return snmpSetInt(session, &sensorFailureThreshold[sensor], value);
}
 
// Power Supply specific Functions.
 
/**
* @brief Returns the crates operating time in seconds.
* @param session The handle returned by snmpOpen()
* @return
*/
int getPsOperatingTime(HSNMP session)
{
return snmpGetInt(session, &psOperatingTime);
}
 
double getPsAuxVoltage(HSNMP session, int auxIndex)
{
if ( (auxIndex < 0) || (auxIndex >= MaxPsAuxSupplies) )
return 0.0;
 
return snmpGetDouble(session, &psAuxVoltage[auxIndex]);
}
 
double getPsAuxCurrent(HSNMP session, int auxIndex)
{
if ( (auxIndex < 0) || (auxIndex >= MaxPsAuxSupplies) )
return 0.0;
 
return snmpGetDouble(session, &psAuxCurrent[auxIndex]);
}
 
// Fan Tray Functions
 
int getFanOperatingTime(HSNMP session)
{
return snmpGetInt(session, &fanOperatingTime);
}
 
int getFanAirTemperature(HSNMP session)
{
return snmpGetInt(session, &fanAirTemperature);
}
 
int getFanSwitchOffDelay(HSNMP session)
{
return snmpGetInt(session, &fanSwitchOffDelay);
}
 
int setFanSwitchOffDelay(HSNMP session, int value)
{
return snmpSetInt(session, &fanSwitchOffDelay, value);
}
 
/**
* @brief Returns the MPODs fan rotation speed in revolutions per minute.
* @param session The handle returned by snmpOpen()
* @return
*/
int getFanNominalSpeed(HSNMP session)
{
return snmpGetInt(session, &fanNominalSpeed);
}
 
/**
* @brief Sets the MPODs fan rotation speed in revolutions per minute.
* @param session The handle returned by snmpOpen()
* @param value 1200..3600. 0 turns off the crates fans.
* @return
*/
int setFanNominalSpeed(HSNMP session, int value)
{
return snmpSetInt(session, &fanNominalSpeed, value );
}
 
int getFanNumberOfFans(HSNMP session)
{
return snmpGetInt(session, &fanNumberOfFans);
}
 
int getFanSpeed(HSNMP session, int fan)
{
if (fan < 0 || fan > MaxFans)
return 0;
 
return snmpGetInt(session, &fanSpeed[fan]);
}
 
/**
* @brief Returns a pointer to the module description string.
*
* The pointer is valid until the next call of any string function.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return A string with the following contents, separated by comma and space:
* - The module vendor ("iseg" or "WIENER")
* - The module type name
* - The channel number
* - The module serial number (optional)
* - The module firmware release (optional)
*
* Example: "iseg, E24D1, 24, 715070, 5.14"
*/
char *getModuleDescription(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0;
 
return snmpGetString(session, &moduleDescription[slot]);
}
 
/**
* @brief Returns the measured value of the modules +24 Volt line.
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot the modules slot position in the crate (0...9)
* @return the measured +24 Volt line voltage in Volt.
*/
double getModuleSupply24(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpGetDouble(session, &moduleSupply[0][slot]);
}
 
/**
* @brief Returns the measured value of the modules +5 Volt line.
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot the modules slot position in the crate (0...9)
* @return the measured +5 Volt line voltage in Volt.
*/
double getModuleSupply5(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpGetDouble(session, &moduleSupply[1][slot]);
}
 
/**
* @brief Returns the measured value of one of the modules temperature sensors.
*
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @param index The temperature sensor index (0...3)
* @note Most modules only have one temperature sensor at index 0.
* @return
*/
double getModuleAuxTemperature(HSNMP session, int slot, int index)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
if (index < 0 || index >= MaxModuleAuxTemperatures)
return 0.0;
 
return snmpGetDouble(session, &moduleAuxiliaryMeasurementTemperature[index][slot]);
}
 
/**
* @brief Returns the modules hardware voltage limit in percent.
*
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return The modules hardware voltage limit in percent (2...102)
*/
double getModuleHardwareLimitVoltage(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpGetDouble(session, &moduleHardwareLimitVoltage[slot]);
}
 
/**
* @brief Returns the modules hardware current limit in percent.
*
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return The modules hardware current limit in percent (2...102)
*/
double getModuleHardwareLimitCurrent(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpGetDouble(session, &moduleHardwareLimitCurrent[slot]);
}
 
/**
* @brief Returns the modules voltage ramp speed in percent.
*
* @note This function is for iseg HV modules only.
* iseg modules have one common ramp speed for all channels.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return The modules voltage ramp speed in percent
*/
double getModuleRampSpeedVoltage(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpGetDouble(session, &moduleRampSpeedVoltage[slot]);
}
 
/**
* @brief Sets the modules voltage ramp speed in percent.
*
* @note This function is for iseg HV modules only.
*
* iseg modules have one common ramp speed for all channels.
* @param session The handle returned by snmpOpen()
* @param slot the modules slot position in the crate (0...9)
* @param value The new voltage ramp speed in percent
* @note For most modules, the range is 0.001...20 percent.
* @return The new voltage ramp speed in percent
*/
double setModuleRampSpeedVoltage(HSNMP session, int slot, double value)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpSetDouble(session, &moduleRampSpeedVoltage[slot], value);
}
 
/**
* @brief Returns the modules current ramp speed in percent.
*
* @note This function is for iseg HV modules only.
*
* iseg modules have one common ramp speed for all channels.
* This item is only valid for modules with constant current regulation.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return The modules current ramp speed in percent
*/
double getModuleRampSpeedCurrent(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpGetDouble(session, &moduleRampSpeedCurrent[slot]);
}
 
/**
* @brief Sets the modules current ramp speed in percent.
*
* @note This function is for iseg HV modules only.
*
* iseg modules have one common ramp speed for all channels.
* This item is only valid for modules with constant current regulation.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @param value The new current ramp speed in percent
* @return The new current ramp speed in percent
*/
double setModuleRampSpeedCurrent(HSNMP session, int slot, double value)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0.0;
 
return snmpSetDouble(session, &moduleRampSpeedCurrent[slot], value);
}
 
/**
* @brief Returns the value of the module status register.
*
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return The module status register
*/
int getModuleStatus(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0;
 
return snmpGetInt(session, &moduleStatus[slot]);
}
 
/**
* @brief Returns the value of the module event status register.
*
* @note This function is for iseg HV modules only.
* @param session The handle returned by snmpOpen()
* @param slot the modules slot position in the crate (0...9)
* @return The module event status register
*/
int getModuleEventStatus(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0;
 
return snmpGetInt(session, &moduleEventStatus[slot]);
}
 
/**
* @brief Clears all modules events in a specific slot.
*
* To clear all events in all iseg HV modules, use setHighVoltageGroupsSwitch()
* with the parameter clearEvents(10).
* @param session The handle returned by snmpOpen()
* @param slot The modules slot position in the crate (0...9)
* @return
*/
int setModuleDoClear(HSNMP session, int slot)
{
if (slot < 0 || slot >= MaxSlotsPerCrate)
return 0;
 
return snmpSetInt(session, &moduleDoClear[slot], 1);
}
 
// The rest of the functions are utility functions that actually do the SNMP calls
 
static void logErrors(HSNMP session, struct snmp_pdu *response,
const SnmpObject *object, int status, const char *functionName)
{
// FAILURE: print what went wrong!
if (status == STAT_SUCCESS)
snmp_log(LOG_ERR, "%s(%s): Error in packet. Reason: %s\n",
functionName, object->desc, snmp_errstring(response->errstat));
else
snmp_sess_perror("snmpget", snmp_sess_session(session));
}
 
static int getIntegerVariable(struct variable_list *vars)
{
if (vars->type == ASN_BIT_STR || vars->type == ASN_OCTET_STR) {
int value = 0;
for (size_t i = 0; i < vars->val_len && i < sizeof(int); ++i)
value |= (vars->val.bitstring[i] << (i * 8));
return value;
} if (vars->type == ASN_OPAQUE_FLOAT)
return (int)*vars->val.floatVal;
else if (vars->type == ASN_OPAQUE_DOUBLE)
return (int)*vars->val.doubleVal;
else if (vars->type == ASN_INTEGER)
return *vars->val.integer;
else if (vars->type == ASN_OCTET_STR)
return *vars->val.integer;
else if (vars->type == ASN_IPADDRESS)
return *vars->val.integer;
 
return 0;
}
 
static double getDoubleVariable(struct variable_list *vars)
{
if (vars->type == ASN_OPAQUE_FLOAT)
return *vars->val.floatVal;
else if (vars->type == ASN_OPAQUE_DOUBLE)
return *vars->val.doubleVal;
else if (vars->type == ASN_INTEGER)
return (double)*vars->val.integer;
 
return 0.0;
}
 
static struct snmp_pdu *prepareSetRequestPdu(void)
{
struct snmp_pdu *pdu = snmp_pdu_create(SNMP_MSG_SET);
pdu->community = (u_char *)strdup(m_writeCommunity);
pdu->community_len = strlen(m_writeCommunity);
 
return pdu;
}
 
static struct snmp_pdu *prepareGetRequestPdu()
{
struct snmp_pdu *pdu = snmp_pdu_create(SNMP_MSG_GET);
 
return pdu;
}
 
static int snmpGetInt(HSNMP session, const SnmpObject *object)
{
int value = 0;
 
struct snmp_pdu *pdu = prepareGetRequestPdu();
 
snmp_add_null_var(pdu, object->id, object->len); // generate request data
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
value = getIntegerVariable(response->variables);
} else {
logErrors(session, response, object, status, "snmpGetInt");
return 0;
}
 
snmp_free_pdu(response);
return value;
}
 
static int snmpSetInt(HSNMP session, const SnmpObject *object, int value)
{
struct snmp_pdu *pdu = prepareSetRequestPdu();
 
if (snmp_oid_compare(object->id, object->len, ipStaticAddress.id, ipStaticAddress.len) == 0)
snmp_pdu_add_variable(pdu, object->id, object->len, ASN_IPADDRESS, (u_char *)&value, sizeof(value));
else
snmp_pdu_add_variable(pdu, object->id, object->len, ASN_INTEGER, (u_char *)&value, sizeof(value));
 
int result = value;
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
result = getIntegerVariable(response->variables);
} else {
logErrors(session, response, object, status, "snmpSetInt");
return 0;
}
 
snmp_free_pdu(response);
return result;
}
 
static double snmpGetDouble(HSNMP session, const SnmpObject *object)
{
double value = 0.0;
 
struct snmp_pdu *pdu = prepareGetRequestPdu();
 
snmp_add_null_var(pdu, object->id, object->len); // generate request data
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
value = getDoubleVariable(response->variables);
} else {
logErrors(session, response, object, status, "snmpGetDouble");
return 0;
}
 
snmp_free_pdu(response);
return value;
}
 
static double snmpSetDouble(HSNMP session, const SnmpObject *object, double value)
{
struct snmp_pdu *pdu = prepareSetRequestPdu();
 
float v = (float)value;
snmp_pdu_add_variable(pdu, object->id, object->len, ASN_OPAQUE_FLOAT, (u_char *)&v, sizeof(v));
 
double result = v;
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
result = getDoubleVariable(response->variables);
} else {
logErrors(session, response, object, status, "snmpSetDouble");
return 0;
}
 
snmp_free_pdu(response);
return result;
}
 
static char *snmpGetString(HSNMP session, const SnmpObject *object)
{
struct snmp_pdu *pdu = prepareGetRequestPdu();
 
snmp_add_null_var(pdu, object->id, object->len); // generate request data
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
memset(snmpStringBuffer, 0, sizeof(snmpStringBuffer));
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
struct variable_list *vars = response->variables;
if (vars->type == ASN_OCTET_STR) {
size_t len = sizeof(snmpStringBuffer) - 1;
if (len > vars->val_len)
len = vars->val_len;
 
memcpy(snmpStringBuffer, vars->val.string, len);
snmpStringBuffer[len] = 0;
}
} else {
logErrors(session, response, object, status, "snmpGetString");
return 0;
}
 
snmp_free_pdu(response);
return snmpStringBuffer;
}
 
static SnmpIntegerBuffer *snmpGetMultipleInteger(HSNMP session, const SnmpObject *objects, int size)
{
struct snmp_pdu *pdu = prepareGetRequestPdu();
 
if (size > MaxChannelsPerSlot)
size = MaxChannelsPerSlot;
 
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
 
for (int i = 0; i < size; ++i)
snmp_add_null_var(pdu, objects[i].id, objects[i].len); // generate request data
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
struct variable_list *vars;
for (vars = response->variables; vars; vars = vars->next_variable)
snmpIntegerBuffer.value[snmpIntegerBuffer.size++] = getIntegerVariable(vars);
} else {
logErrors(session, response, &objects[0], status, "snmpGetMultipleInteger");
return &snmpIntegerBuffer;
}
 
snmp_free_pdu(response);
return &snmpIntegerBuffer;
}
 
static SnmpIntegerBuffer *snmpSetMultipleInteger(HSNMP session, const SnmpObject *objects, SnmpIntegerBuffer *values)
{
struct snmp_pdu *pdu = prepareSetRequestPdu();
 
int size = values->size;
if (size > MaxChannelsPerSlot)
size = MaxChannelsPerSlot;
 
for (int i = 0; i < size; ++i) {
int v = values->value[i];
snmp_pdu_add_variable(pdu, objects[i].id, objects[i].len, ASN_INTEGER, (u_char *)&v, sizeof(v));
}
 
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
struct variable_list *vars;
for (vars = response->variables; vars; vars = vars->next_variable)
snmpIntegerBuffer.value[snmpIntegerBuffer.size++] = getIntegerVariable(vars);
} else {
logErrors(session, response, &objects[0], status, "snmpSetMultipleInteger");
return &snmpIntegerBuffer;
}
 
snmp_free_pdu(response);
return &snmpIntegerBuffer;
}
 
static SnmpDoubleBuffer *snmpGetMultipleDouble(HSNMP session, const SnmpObject *objects, int size)
{
struct snmp_pdu *pdu = prepareGetRequestPdu();
 
if (size > MaxChannelsPerSlot)
size = MaxChannelsPerSlot;
 
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
 
for (int i = 0; i < size; ++i)
snmp_add_null_var(pdu, objects[i].id, objects[i].len); // generate request data
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
struct variable_list *vars;
for (vars = response->variables; vars; vars = vars->next_variable)
snmpDoubleBuffer.value[snmpDoubleBuffer.size++] = getDoubleVariable(vars);
} else {
logErrors(session, response, &objects[0], status, "snmpGetMultipleDouble");
return &snmpDoubleBuffer;
}
 
snmp_free_pdu(response);
 
return &snmpDoubleBuffer;
}
 
static SnmpDoubleBuffer *snmpSetMultipleDouble(HSNMP session, const SnmpObject *objects, SnmpDoubleBuffer *values)
{
struct snmp_pdu *pdu = prepareSetRequestPdu();
 
int size = values->size;
if (size > MaxChannelsPerSlot)
size = MaxChannelsPerSlot;
 
for (int i = 0; i < size; ++i) {
float v = (float)values->value[i];
snmp_pdu_add_variable(pdu, objects[i].id, objects[i].len, ASN_OPAQUE_FLOAT, (u_char *)&v, sizeof(v));
}
 
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
 
struct snmp_pdu *response;
int status = snmp_sess_synch_response(session, pdu, &response);
 
if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) {
struct variable_list *vars;
for (vars = response->variables; vars; vars = vars->next_variable)
snmpDoubleBuffer.value[snmpDoubleBuffer.size++] = getDoubleVariable(vars);
} else {
logErrors(session, response, &objects[0], status, "snmpSetMultipleDouble");
return &snmpDoubleBuffer;
}
 
snmp_free_pdu(response);
return &snmpDoubleBuffer;
}
 
/**
* @brief Returns an array with the outputStatus for a consecutive range of channels.
*
* @note This function is deprecated. Use getMultipleOutputStatuses() instead.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpIntegerBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpIntegerBuffer *getMultipleChannelStatuses(HSNMP session, int start, int size)
{
return getMultipleOutputStatuses(session, start, size);
}
 
/**
* @brief Returns an array with the outputStatus for a consecutive range of channels.
* @since 1.1
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpIntegerBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpIntegerBuffer *getMultipleOutputStatuses(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpGetMultipleInteger(session, &outputStatus[start], size);
}
 
/**
* @brief Returns an array with the outputSwitches for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpIntegerBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpIntegerBuffer *getMultipleOutputSwitches(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpGetMultipleInteger(session, &outputSwitch[start], size);
}
 
/**
* @brief Sets the outputSwitch for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param values A pointer to SnmpIntegerBuffer with the list of outputSwitches.
* @return
*/
SnmpIntegerBuffer *setMultipleOutputSwitches(HSNMP session, int start, SnmpIntegerBuffer *values)
{
if (start < 0 || values->size < 0 || start + values->size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpSetMultipleInteger(session, &outputSwitch[start], values);
}
 
/**
* @brief Returns the actual outputVoltage for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpDoubleBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpDoubleBuffer *getMultipleOutputVoltages(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpGetMultipleDouble(session, &outputVoltage[start], size);
}
 
/**
* @brief Sets the demanded outputVoltage for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param values A pointer to SnmpDoubleBuffer with the list of new outputVoltages
* @return
*/
SnmpDoubleBuffer *setMultipleOutputVoltages(HSNMP session, int start, SnmpDoubleBuffer *values)
{
if (start < 0 || values->size < 0 || start + values->size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpSetMultipleDouble(session, &outputVoltage[start], values);
}
 
/**
* @brief Returns the measured terminal voltages for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpDoubleBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpDoubleBuffer *getMultipleMeasurementTerminalVoltages(HSNMP session, int start, int size)
{
return getMultipleOutputMeasurementTerminalVoltages(session, start, size);
}
 
/**
* @brief Returns an array with the measured terminal voltages for a consecutive range of channels.
* @since 1.1
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpDoubleBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpDoubleBuffer *getMultipleOutputMeasurementTerminalVoltages(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpGetMultipleDouble(session, &outputMeasurementTerminalVoltage[start], size);
}
 
/**
* @brief getMultipleOutputConfigMaxTerminalVoltages
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return
*/
SnmpDoubleBuffer *getMultipleOutputConfigMaxTerminalVoltages(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpGetMultipleDouble(session, &outputConfigMaxTerminalVoltage[start], size);
}
 
/**
* @brief Returns an array the demanded output currents for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return
*/
SnmpDoubleBuffer *getMultipleOutputCurrents(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpGetMultipleDouble(session, &outputCurrent[start], size);
}
 
/**
* @brief Sets the demanded output current for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param values A pointer to SnmpDoubleBuffer with a list of new output currents
* @return
*/
SnmpDoubleBuffer *setMultipleOutputCurrents(HSNMP session, int start, SnmpDoubleBuffer *values)
{
if (start < 0 || values->size < 0 || start + values->size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpSetMultipleDouble(session, &outputCurrent[start], values);
}
 
/**
* @brief Returns an array with the measured currents for a consecutive range of channels.
*
* @note This function is deprecated. Use getMultipleOutputMeasurementCurrents() instead.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpDoubleBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpDoubleBuffer *getMultipleMeasurementCurrents(HSNMP session, int start, int size)
{
return getMultipleOutputMeasurementCurrents(session, start, size);
}
 
/**
* @brief Returns an array with the measured currents for a consecutive range of channels.
* @since 1.1
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return A pointer to SnmpDoubleBuffer with the requested information.
* @note This pointer is only valid until the next call of getMultiple...
* or setMultiple... function.
*/
SnmpDoubleBuffer *getMultipleOutputMeasurementCurrents(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpGetMultipleDouble(session, &outputMeasurementCurrent[start], size);
}
 
/**
* @brief Returns an array with the outputConfigMaxCurrent for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return
*/
SnmpDoubleBuffer *getMultipleOutputConfigMaxCurrents(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpDoubleBuffer, 0, sizeof(snmpDoubleBuffer));
return &snmpDoubleBuffer;
}
 
return snmpGetMultipleDouble(session, &outputConfigMaxCurrent[start], size);
}
 
/**
* @brief Returns an array with the outputTripTimeMaxCurrent for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return
*/
SnmpIntegerBuffer *getMultipleOutputTripTimeMaxCurrents(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpGetMultipleInteger(session, &outputTripTimeMaxCurrent[start], size);
}
 
/**
* @brief Sets the outputTripTimeMaxCurrent for a consecutive ranges of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param values
* @return
*/
SnmpIntegerBuffer *setMultipleOutputTripTimeMaxCurrents(HSNMP session, int start, SnmpIntegerBuffer *values)
{
if (start < 0 || values->size < 0 || start + values->size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpSetMultipleInteger(session, &outputTripTimeMaxCurrent[start], values);
}
 
/**
* @brief Returns an array with the outputSupervisionBehavior for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param size The number of requested channels.
* @return
*/
SnmpIntegerBuffer *getMultipleOutputSupervisionBehaviors(HSNMP session, int start, int size)
{
if (start < 0 || size < 0 || start + size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpGetMultipleInteger(session, &outputSupervisionBehavior[start], size);
}
 
/**
* @brief Sets the outputSupervisionBehavior for a consecutive range of channels.
* @param session The handle returned by snmpOpen()
* @param start The first channel (in the range of 0 to MaxArraySize).
* 0 = slot 0, channel 0; 100 = slot 1, channel 0.
* @param values The new outputSupervisionBehavior for the all channels starting with start.
* @return
*/
SnmpIntegerBuffer *setMultipleOutputSupervisionBehaviors(HSNMP session, int start, SnmpIntegerBuffer *values)
{
if (start < 0 || values->size < 0 || start + values->size > MaxChannelsPerCrate) {
memset(&snmpIntegerBuffer, 0, sizeof(snmpIntegerBuffer));
return &snmpIntegerBuffer;
}
 
return snmpSetMultipleInteger(session, &outputSupervisionBehavior[start], values);
}
/cvi/instr/MPOD/WIENER_SNMP.h
0,0 → 1,205
/** @file */
 
#ifndef WIENER_SNMP_H
#define WIENER_SNMP_H
 
//#include "netsnmplib.h"
/*
#ifdef _MSC_VER
#define EXPORT extern "C" _declspec(dllexport)
#else
#define EXPORT extern "C"
#endif
*/
#define EXPORT
 
#define WIN32_LEAN_AND_MEAN
 
//#include <net-snmp/net-snmp-config.h>
#include "net-snmp-config.h"
//#define NET_SNMP_SNMPV3_H // we don't need SNMPV3 (one include file is missing)
#include <net-snmp/net-snmp-includes.h>
 
typedef void *HSNMP; // SNMP handle (like FILE)
 
// DLL functions
EXPORT void snmpSetStdErrLog(void);
EXPORT void snmpSetFileLog(const char * const fileName);
EXPORT unsigned int snmpGetVersion(void);
EXPORT char *snmpGetVersionString(void);
 
EXPORT int snmpInit(void);
EXPORT void snmpCleanup(void);
EXPORT void snmpSetReadCommunityName(const char * const readCommunityName);
EXPORT void snmpSetWriteCommunityName(const char * const writeCommunityName);
 
EXPORT HSNMP snmpOpen(const char * const ipAddress);
EXPORT void snmpClose(HSNMP session);
EXPORT char *snmpGetLastError(void);
 
// System Functions
EXPORT char *getSysDescr(HSNMP session);
EXPORT int getMainSwitch(HSNMP session);
EXPORT int setMainSwitch(HSNMP session, int value);
EXPORT int getMainStatus(HSNMP session);
EXPORT int getVmeReset(HSNMP session);
EXPORT int setVmeReset(HSNMP session);
EXPORT int getIpStaticAddress(HSNMP session);
EXPORT int setIpStaticAddress(HSNMP session, int value);
EXPORT char *getPsSerialNumber(HSNMP session);
 
// Output Counts
EXPORT int getOutputNumber(HSNMP session);
EXPORT int getOutputGroups(HSNMP session);
 
//Output Channel Information
//std::string getOutputName(HSNMP session, int channel);
EXPORT int getOutputGroup(HSNMP session, int channel);
EXPORT int getOutputStatus(HSNMP session, int channel);
EXPORT int getChannelStatus(HSNMP m_sessmp, int channel);
EXPORT double getOutputSenseMeasurement(HSNMP session, int channel);
EXPORT double getOutputTerminalMeasurement(HSNMP session, int channel);
EXPORT double getCurrentMeasurement(HSNMP session, int channel);
EXPORT int getTemperatureMeasurement(HSNMP session, int channel);
EXPORT int setChannelSwitch(HSNMP session, int channel, int value);
EXPORT int setOutputSwitch(HSNMP session, int channel, int value);
EXPORT int getChannelSwitch(HSNMP session, int channel);
EXPORT int getOutputSwitch(HSNMP session, int channel);
EXPORT int setHighVoltageGroupsSwitch(HSNMP session, int value);
EXPORT int getHighVoltageGroupsSwitch(HSNMP session);
EXPORT int setLowVoltageGroupsSwitch(HSNMP session, int value);
EXPORT int getLowVoltageGroupsSwitch(HSNMP session);
EXPORT double getOutputVoltage(HSNMP session, int channel);
EXPORT double setOutputVoltage(HSNMP session, int channel, double value);
EXPORT double getOutputCurrent(HSNMP session, int channel);
EXPORT double setOutputCurrent(HSNMP session, int channel, double value);
EXPORT double getOutputRiseRate(HSNMP session, int channel);
EXPORT double setOutputRiseRate(HSNMP session, int channel, double value);
EXPORT double getOutputFallRate(HSNMP session, int channel);
EXPORT double setOutputFallRate(HSNMP session, int channel, double value);
EXPORT double getOutputCurrentRiseRate(HSNMP session, int channel);
EXPORT double setOutputCurrentRiseRate(HSNMP session, int channel, double value);
EXPORT double getOutputCurrentFallRate(HSNMP session, int channel);
EXPORT double setOutputCurrentFallRate(HSNMP session, int channel, double value);
EXPORT int getOutputSupervisionBehavior(HSNMP session, int channel);
EXPORT int setOutputSupervisionBehavior(HSNMP session, int channel, int value);
EXPORT double getOutputSupervisionMinSenseVoltage(HSNMP session, int channel);
EXPORT double setOutputSupervisionMinSenseVoltage(HSNMP session, int channel, double value);
EXPORT double getOutputSupervisionMaxSenseVoltage(HSNMP session, int channel);
EXPORT double setOutputSupervisionMaxSenseVoltage(HSNMP session, int channel, double value);
EXPORT double getOutputSupervisionMaxTerminalVoltage(HSNMP session, int channel);
EXPORT double setOutputSupervisionMaxTerminalVoltage(HSNMP session, int channel, double value);
EXPORT double getOutputSupervisionMaxCurrent(HSNMP session, int channel);
EXPORT double setOutputSupervisionMaxCurrent(HSNMP session, int channel, double value);
EXPORT int setOutputSupervisionMaxTemperature(HSNMP session, int channel, int value);
EXPORT double getOutputConfigMaxSenseVoltage(HSNMP session, int channel);
EXPORT double getOutputConfigMaxTerminalVoltage(HSNMP session, int channel);
EXPORT double getOutputConfigMaxCurrent(HSNMP session, int channel);
EXPORT double getOutputSupervisionMaxPower(HSNMP session, int channel);
EXPORT int getOutputTripTimeMaxCurrent(HSNMP session, int channel);
EXPORT int setOutputTripTimeMaxCurrent(HSNMP session, int channel, int delay);
 
//Sensor Information functions
EXPORT int getSensorNumber(HSNMP session);
EXPORT int getSensorTemp(HSNMP session, int sensor);
EXPORT int getSensorWarningTemperature(HSNMP session, int sensor);
EXPORT int setSensorWarningTemperature(HSNMP session, int sensor, int value);
EXPORT int getSensorFailureTemperature(HSNMP session, int sensor);
EXPORT int setSensorFailureTemperature(HSNMP session, int sensor, int value);
 
//SNMP Community Name Functions
//std::string getSnmpCommunityName(HSNMP session, int index);
//std::string setSnmpCommunityName(HSNMP session, int index , int value);
 
//Power Supply Detail Functions
//std::string getPsFirmwareVersion(HSNMP session);
//std::string getPsSerialNumber(HSNMP session);
EXPORT int getPsOperatingTime(HSNMP session);
EXPORT double getPsAuxVoltage(HSNMP session, int auxIndex);
EXPORT double getPsAuxCurrent(HSNMP session, int auxIndex);
//std::string getPsDirectAccess(HSNMP session);
//std::string setPsDirectAccess(HSNMP session);
 
//Fan Tray Functions
//std::string getFanFirmwareVersion(HSNMP session);
//std::string getFanSerialNumber(HSNMP session);
EXPORT int getFanOperatingTime(HSNMP session);
EXPORT int getFanAirTemperature(HSNMP session);
EXPORT int getFanSwitchOffDelay(HSNMP session);
EXPORT int setFanSwitchOffDelay(HSNMP session, int value);
EXPORT int getFanNominalSpeed(HSNMP session);
EXPORT int setFanNominalSpeed(HSNMP session, int value);
EXPORT int getFanNumberOfFans(HSNMP session);
EXPORT int getFanSpeed(HSNMP session, int fan);
 
// Module functions
EXPORT char *getModuleDescription(HSNMP session, int slot);
EXPORT double getModuleSupply24(HSNMP session, int slot);
EXPORT double getModuleSupply5(HSNMP session, int slot);
EXPORT double getModuleAuxTemperature(HSNMP session, int slot, int index);
EXPORT double getModuleHardwareLimitVoltage(HSNMP session, int slot);
EXPORT double getModuleHardwareLimitCurrent(HSNMP session, int slot);
EXPORT double getModuleRampSpeedVoltage(HSNMP session, int slot);
EXPORT double setModuleRampSpeedVoltage(HSNMP session, int slot, double value);
EXPORT double getModuleRampSpeedCurrent(HSNMP session, int slot);
EXPORT double setModuleRampSpeedCurrent(HSNMP session, int slot, double value);
EXPORT int getModuleStatus(HSNMP session, int slot);
EXPORT int getModuleEventStatus(HSNMP session, int slot);
EXPORT int setModuleDoClear(HSNMP session, int slot);
 
/**
* @enum MaximumCrateValues
*/
typedef enum MaximumCrateValues {
MaxModuleAuxSupplies = 2, ///< The maximum number of module auxiliary supply measurements
MaxModuleAuxTemperatures = 4, ///< The maximum number of module temperature sensors (iseg HV only)
MaxCommunities = 4, ///< The maximum number of SNMP community names
MaxFans = 6,
MaxPsAuxSupplies = 8,
MaxSlotsPerCrate = 10, ///< The number of slots per crate
MaxSensors = 12, ///< The maximum
MaxChannelsPerSlot = 100, ///< The maximum number of channels per slot
MaxChannelsPerCrate = 1000 ///< The maximum number of channels per crate
} MaximumCrateValues;
 
/**
* @struct SnmpDoubleBuffer
* This struct is used to pass double parameters to setMultiple... functions
* and for the result value of getMultiple.../setMultiple... functions.
*/
typedef struct SnmpDoubleBuffer {
int size; ///< The number of values used in value[]
double value[MaxChannelsPerSlot]; ///< An array of max. 100 double values
} SnmpDoubleBuffer;
 
/**
* @struct SnmpIntegerBuffer
* This struct is used to pass integer parameters to setMultiple... functions
* and for the result value of getMultiple.../setMultiple... functions.
*/
typedef struct SnmpIntegerBuffer {
int size; ///< The number of values used in value[]
int value[MaxChannelsPerSlot]; ///< An array of max. 100 int values
} SnmpIntegerBuffer;
 
// Functions for multiple data transfer in one SNMP packet
EXPORT SnmpIntegerBuffer *getMultipleChannelStatuses(HSNMP session, int start, int size);
EXPORT SnmpIntegerBuffer *getMultipleOutputStatuses(HSNMP session, int start, int size);
EXPORT SnmpIntegerBuffer *getMultipleOutputSwitches(HSNMP session, int start, int size);
EXPORT SnmpIntegerBuffer *setMultipleOutputSwitches(HSNMP session, int start, SnmpIntegerBuffer *values);
EXPORT SnmpDoubleBuffer *getMultipleOutputVoltages(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *setMultipleOutputVoltages(HSNMP session, int start, SnmpDoubleBuffer *values);
EXPORT SnmpDoubleBuffer *getMultipleMeasurementTerminalVoltages(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *getMultipleOutputMeasurementTerminalVoltages(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *getMultipleOutputConfigMaxTerminalVoltages(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *getMultipleOutputCurrents(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *setMultipleOutputCurrents(HSNMP session, int start, SnmpDoubleBuffer *values);
EXPORT SnmpDoubleBuffer *getMultipleMeasurementCurrents(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *getMultipleOutputMeasurementCurrents(HSNMP session, int start, int size);
EXPORT SnmpDoubleBuffer *getMultipleOutputConfigMaxCurrents(HSNMP session, int start, int size);
EXPORT SnmpIntegerBuffer *getMultipleOutputTripTimeMaxCurrents(HSNMP session, int start, int size);
EXPORT SnmpIntegerBuffer *setMultipleOutputTripTimeMaxCurrents(HSNMP session, int start, SnmpIntegerBuffer *values);
EXPORT SnmpIntegerBuffer *getMultipleOutputSupervisionBehaviors(HSNMP session, int start, int size);
EXPORT SnmpIntegerBuffer *setMultipleOutputSupervisionBehaviors(HSNMP session, int start, SnmpIntegerBuffer *values);
 
#endif
/cvi/instr/MPOD/include/sys/types.h
0,0 → 1,97
/***
*sys/types.h - types returned by system level calls for file and time info
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines types used in defining values returned by system
* level calls for file status and time information.
* [System V]
*
* [Public]
*
****/
 
#pragma once
 
#ifndef _INC_TYPES
#define _INC_TYPES
 
#if !defined(_WIN32)
#error ERROR: Only Win32 target supported!
#endif
 
 
#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86))
#define _W64 __w64
#else
#define _W64
#endif
#endif
 
#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#include <crtwrn.h>
#endif
#endif
 
#ifndef _TIME32_T_DEFINED
typedef _W64 long __time32_t; /* 32-bit time value */
#define _TIME32_T_DEFINED
#endif
 
#ifndef _TIME64_T_DEFINED
typedef __int64 __time64_t; /* 64-bit time value */
#define _TIME64_T_DEFINED
#endif
 
#ifndef _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t; /* time value */
#else
typedef __time64_t time_t; /* time value */
#endif
#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
#endif
 
 
#ifndef _INO_T_DEFINED
 
typedef unsigned short _ino_t; /* i-node number (not used on DOS) */
 
#if !__STDC__
/* Non-ANSI name for compatibility */
typedef unsigned short ino_t;
#endif
 
#define _INO_T_DEFINED
#endif
 
 
#ifndef _DEV_T_DEFINED
 
typedef unsigned int _dev_t; /* device code */
 
#if !__STDC__
/* Non-ANSI name for compatibility */
typedef unsigned int dev_t;
#endif
 
#define _DEV_T_DEFINED
#endif
 
 
#ifndef _OFF_T_DEFINED
 
typedef long _off_t; /* file offset value */
 
#if !__STDC__
/* Non-ANSI name for compatibility */
typedef long off_t;
#endif
 
#define _OFF_T_DEFINED
#endif
 
#endif /* _INC_TYPES */
/cvi/instr/MPOD/net-snmp-config.h
0,0 → 1,1829
/* include/net-snmp/net-snmp-config.h.in. Generated from configure.in by autoheader. */
/* modified by hand with care. */
 
#ifndef NET_SNMP_CONFIG_H
#define NET_SNMP_CONFIG_H
 
/* _MSC_VER values
1800 = MSVC++ 12.0 (Visual Studio 2013)
1700 = MSVC++ 11.0 (Visual Studio 2012)
1600 = MSVC++ 10.0 (Visual Studio 2010)
1500 = MSVC++ 9.0 (Visual Studio 2008)
1400 = MSVC++ 8.0 (Visual Studio 2005)
1310 = MSVC++ 7.1 (Visual Studio 2003)
1300 = MSVC++ 7.0 (Visual Studio 2002)
1200 = MSVC++ 6.0
*/
 
#ifdef _MSC_VER
/* Disable warning 4018: signed/unsigned mismatch. */
#pragma warning (disable: 4018)
#endif
 
/* Automatically set by Windows perl Configure script.
* When compiling with the MSVC workspace, this must be set manually.
* See the PACKAGE_VERSION variable in Unix /configure script
*/
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "5.7.3"
#endif
 
/* Define HAVE_WIN32_PLATFORM_SDK if you have:
* Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK)
* Microsoft Visual Studio.Net 2002
* Microsoft Visual Studio.Net 2003
*/
#define HAVE_WIN32_PLATFORM_SDK 1
 
/* Define NETSNMP_ENABLE_IPV6 to enable IPv6. IPv6 is only available on
* Windows XP and higher. */
/* #undef NETSNMP_ENABLE_IPV6 */
 
/* Only use Windows API functions available on Windows 2000 SP4 or later.
* We need at least SP1 for some IPv6 defines in ws2ipdef.h
*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x600 /*_WIN32_WINNT_WIN6*/
#else
#if _WIN32_WINNT < 0x501
#error _WIN32_WINNT is too low - it should be set to at least 0x501.
#endif
#endif
 
#define INSTALL_BASE "c:/usr"
 
/* config.h: a general config file */
 
/* Default (SNMP) version number for the tools to use */
#define NETSNMP_DEFAULT_SNMP_VERSION 3
 
/* don't change these values! */
#define NETSNMP_SNMPV1 0xAAAA /* readable by anyone */
#define NETSNMP_SNMPV2ANY 0xA000 /* V2 Any type (includes NoAuth) */
#define NETSNMP_SNMPV2AUTH 0x8000 /* V2 Authenticated requests only */
 
/* default list of mibs to load */
 
#define NETSNMP_DEFAULT_MIBS "IP-MIB;IF-MIB;TCP-MIB;UDP-MIB;HOST-RESOURCES-MIB;SNMPv2-MIB;RFC1213-MIB;NOTIFICATION-LOG-MIB;UCD-SNMP-MIB;UCD-DEMO-MIB;SNMP-TARGET-MIB;NET-SNMP-AGENT-MIB;DISMAN-EVENT-MIB;SNMP-VIEW-BASED-ACM-MIB;SNMP-COMMUNITY-MIB;SNMP-FRAMEWORK-MIB;SNMP-MPD-MIB;SNMP-USER-BASED-SM-MIB;SNMP-NOTIFICATION-MIB;SNMPv2-TM"
 
/* default location to look for mibs to load using the above tokens
and/or those in the MIBS envrionment variable*/
#define NETSNMP_DEFAULT_MIBDIRS INSTALL_BASE ## "/share/snmp/mibs"
 
/* default mib files to load, specified by path. */
/* #undef NETSNMP_DEFAULT_MIBFILES */
 
/* should we compile to use special opaque types: float, double,
counter64, i64, ui64, union? */
#define NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 1
 
/* comment the next line if you are compiling with libsnmp.h
and are not using the UC-Davis SNMP library. */
#define UCD_SNMP_LIBRARY 1
 
/* define if you want to compile support for both authentication and
privacy support. */
#define NETSNMP_ENABLE_SCAPI_AUTHPRIV 1
 
/* define if you are using the MD5 code ...*/
#define NETSNMP_USE_INTERNAL_MD5 1
 
/* define if you are using the codeS11 library ...*/
/* #undef NETSNMP_USE_PKCS11 */
 
/* add in recent CMU library extensions (not complete) */
/* #undef CMU_COMPATIBLE */
 
/* add in recent resource lock functions (not complete) */
/* #undef NETSNMP_REENTRANT */
 
/* debugging stuff */
/* if defined, we optimize the code to exclude all debugging calls. */
/* #undef NETSNMP_NO_DEBUGGING */
/* ignore the -D flag and always print debugging information */
#define NETSNMP_ALWAYS_DEBUG 0
 
/* reverse encoding BER packets is both faster and more efficient in space. */
#define NETSNMP_USE_REVERSE_ASNENCODING 1
#define NETSNMP_DEFAULT_ASNENCODING_DIRECTION 1 /* 1 = reverse, 0 = forwards */
 
/* NETSNMP_PERSISTENT_DIRECTORY: If defined, the library is capabile of saving
persisant information to this directory in the form of configuration
lines: NETSNMP_PERSISTENT_DIRECTORY/NAME.persistent.conf */
#define NETSNMP_PERSISTENT_DIRECTORY INSTALL_BASE ## "/snmp/persist"
 
/* NETSNMP_PERSISTENT_MASK: the umask permissions to set up persistent files with */
/* #undef NETSNMP_PERSISTENT_MASK -- no win32 umask */
 
/* NETSNMP_AGENT_DIRECTORY_MODE: the mode the agents should use to create
directories with. Since the data stored here is probably sensitive, it
probably should be read-only by root/administrator. */
#define NETSNMP_AGENT_DIRECTORY_MODE 0700
 
/* NETSNMP_MAX_PERSISTENT_BACKUPS:
* The maximum number of persistent backups the library will try to
* read from the persistent cache directory. If an application fails to
* close down successfully more than this number of times, data will be lost.
*/
#define NETSNMP_MAX_PERSISTENT_BACKUPS 10
 
 
/* define if you are embedding perl in the main agent */
/* #undef NETSNMP_EMBEDDED_PERL */
 
#if notused
/* define the system type include file here */
#define NETSNMP_SYSTEM_INCLUDE_FILE <net-snmp/system/generic.h>
 
/* define the machine (cpu) type include file here */
#define NETSNMP_MACHINE_INCLUDE_FILE <net-snmp/machine/generic.h>
#endif
 
/* SNMPLIBDIR contains important files */
 
#define SNMPLIBPATH INSTALL_BASE ## "/lib"
#define SNMPSHAREPATH INSTALL_BASE ## "/share/snmp"
#define SNMPCONFPATH INSTALL_BASE ## "/etc/snmp"
#define SNMPDLMODPATH INSTALL_BASE ## "/lib/dlmod"
 
/* NETSNMP_LOGFILE: If defined it closes stdout/err/in and opens this in out/err's
place. (stdin is closed so that sh scripts won't wait for it) */
/* #undef NETSNMP_LOGFILE */
 
/* default system contact */
#define NETSNMP_SYS_CONTACT "unknown"
 
/* system location */
#define NETSNMP_SYS_LOC "unknown"
 
/* Use libwrap to handle allow/deny hosts? */
/* #undef NETSNMP_USE_LIBWRAP */
 
/* Use dmalloc to do malloc debugging? */
/* #undef HAVE_DMALLOC_H */
 
/* location of UNIX kernel */
#define KERNEL_LOC "unknown"
 
/* location of mount table list */
#define ETC_MNTTAB "unknown"
 
/* location of swap device (ok if not found) */
/* #undef DMEM_LOC */
 
/* Command to generate ps output, the final column must be the process
name withOUT arguments */
#define PSCMD "/bin/ps"
 
/* Where is the uname command */
#define UNAMEPROG "/bin/uname"
 
/* pattern for temporary file names */
#define NETSNMP_TEMP_FILE_PATTERN INSTALL_BASE ## "/temp/snmpdXXXXXX"
 
/* testing code sections. */
/* #undef NETSNMP_ENABLE_TESTING_CODE */
 
/* If you don't have root access don't exit upon kmem errors */
/* #undef NETSNMP_NO_ROOT_ACCESS */
 
/* If we don't want to use kmem. */
/* #undef NETSNMP_NO_KMEM_USAGE */
 
/* If you don't want the agent to report on variables it doesn't have data for */
#define NETSNMP_NO_DUMMY_VALUES 1
 
/* Define if statfs takes 2 args and the second argument has
type struct fs_data. [Ultrix] */
/* #undef STAT_STATFS_FS_DATA */
 
/* Define if the TCP timer constants in <netinet/tcp_timer.h>
depend on the integer variable `hz'. [FreeBSD 4.x] */
/* #undef TCPTV_NEEDS_HZ */
 
 
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
 
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
 
/* Define if DES encryption should not be supported */
/* #undef NETSNMP_DISABLE_DES */
 
/* Define if MD5 authentication should not be supported */
/* #undef NETSNMP_DISABLE_MD5 */
 
/* Define if mib loading and parsing code should not be included */
/* #undef NETSNMP_DISABLE_MIB_LOADING */
 
/* Define if SNMPv1 code should not be included */
/* #undef NETSNMP_DISABLE_SNMPV1 */
 
/* Define if SNMPv2c code should not be included */
/* #undef NETSNMP_DISABLE_SNMPV2C */
 
/* Define to 1 if you have the `AES_cfb128_encrypt' function. */
/* #undef HAVE_AES_CFB128_ENCRYPT */
 
/* Define to 1 if you have `alloca', as a function or macro. */
/* #undef HAVE_ALLOCA */
 
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
 
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
 
/* Define to 1 if you have the <asm/page.h> header file. */
/* #undef HAVE_ASM_PAGE_H */
 
/* Define to 1 if you have the `cgetnext' function. */
/* #undef HAVE_CGETNEXT */
 
/* Define to 1 if you have the <crtdbg.h> header file. */
#define HAVE_CRTDBG_H 1
 
/* Define to 1 if you have the <direct.h> header file. */
#define HAVE_DIRECT_H 1
 
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_DIRENT_H */
 
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
 
/* Define to 1 if you have the `dlopen' function. */
/* #undef HAVE_DLOPEN */
 
/* Define to 1 if you have the <err.h> header file. */
/* #undef HAVE_ERR_H */
 
/* Define to 1 if you have the `eval_pv' function. */
/* #undef HAVE_EVAL_PV */
 
/* Define to 1 if you have the `execv' function. */
/* #undef HAVE_EXECV */
 
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
 
/* Define to 1 if you have the `fork' function. */
/* #undef HAVE_FORK */
 
/* Define to 1 if you have the <fstab.h> header file. */
/* #undef HAVE_FSTAB_H */
 
/* Define to 1 if you have the `getaddrinfo' function. */
/* #undef HAVE_GETADDRINFO */
 
/* Define to 1 if you have the `getdtablesize' function. */
/* #undef HAVE_GETDTABLESIZE */
 
/* Define to 1 if you have the `getfsstat' function. */
/* #undef HAVE_GETFSSTAT */
 
/* Define to 1 if you have the `getgrnam' function. */
/* #undef HAVE_GETGRNAM */
 
/* Define to 1 if you have the `gethostname' function. */
#define HAVE_GETHOSTNAME 1
 
/* Define to 1 if you have the `getipnodebyname' function. */
/* #undef HAVE_GETIPNODEBYNAME */
 
/* Define to 1 if you have the `getloadavg' function. */
/* #undef HAVE_GETLOADAVG */
 
/* Define to 1 if you have the `getmntent' function. */
/* #undef HAVE_GETMNTENT */
 
/* Define to 1 if you have the <getopt.h> header file. */
/* #undef HAVE_GETOPT_H */
 
/* Define to 1 if you have the `getpagesize' function. */
/* #undef HAVE_GETPAGESIZE */
 
/* Define to 1 if you have the `getpid' function. */
#define HAVE_GETPID 1
 
/* Define to 1 if you have the `getpwnam' function. */
/* #undef HAVE_GETPWNAM */
 
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
 
/* Define to 1 if you have the <grp.h> header file. */
/* #undef HAVE_GRP_H */
 
/* Define to 1 if you have the `if_freenameindex' function. */
/* #undef HAVE_IF_FREENAMEINDEX */
 
/* Define to 1 if you have the `if_nameindex' function. */
/* #undef HAVE_IF_NAMEINDEX */
 
/* Define to 1 if you have the <inet/mib2.h> header file. */
/* #undef HAVE_INET_MIB2_H */
 
#ifdef HAVE_WIN32_PLATFORM_SDK
/* Define to 1 if you have the <iphlpapi.h> header file. */
#define HAVE_IPHLPAPI_H
#endif
 
/* Define to 1 if the system has the type `int32_t'. */
#define HAVE_INT32_T 1
 
/* define if you have type uint32_t */
#define HAVE_UINT32_T 1
 
/* define if you have type u_int32_t */
#undef HAVE_U_INT32_T
 
/* define if you have type int64_t */
#define HAVE_INT64_T 1
 
/* define if you have type uint64_t */
#define HAVE_UINT64_T 1
 
/* define if you have type u_int64_t */
#undef HAVE_U_INT64_T
 
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
 
/* Define to 1 if you have the <ioctls.h> header file. */
/* #undef HAVE_IOCTLS_H */
 
/* Define to 1 if you have the <io.h> header file. */
#define HAVE_IO_H 1
 
/* Define to 1 if you have the `knlist' function. */
/* #undef HAVE_KNLIST */
 
/* Define to 1 if you have the <kstat.h> header file. */
/* #undef HAVE_KSTAT_H */
 
/* Define to 1 if you have the `kvm_getprocs' function. */
/* #undef HAVE_KVM_GETPROCS */
 
/* Define to 1 if you have the <kvm.h> header file. */
/* #undef HAVE_KVM_H */
 
/* Define to 1 if you have the `kvm_openfiles' function. */
/* #undef HAVE_KVM_OPENFILES */
 
/* Define to 1 if you have the `crypto' library (-lcrypto). */
/* #undef HAVE_LIBCRYPTO */
 
/* Define to 1 if you have the `efence' library (-lefence). */
/* #undef HAVE_LIBEFENCE */
 
/* Define to 1 if you have the `elf' library (-lelf). */
/* #undef HAVE_LIBELF */
 
/* Define to 1 if you have the `kstat' library (-lkstat). */
/* #undef HAVE_LIBKSTAT */
 
/* Define to 1 if you have the `m' library (-lm). */
/* #undef HAVE_LIBM */
 
/* Define to 1 if you have the `mld' library (-lmld). */
/* #undef HAVE_LIBMLD */
 
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */
 
/* Define to 1 if you have the <libperfstat.h> header file. */
/* #undef HAVE_LIBPERFSTAT_H */
 
/* Define to 1 if you have the `pkcs11' library (-lpkcs11). */
/* #undef HAVE_LIBPKCS11 */
 
/* Define to 1 if you have the `RSAglue' library (-lRSAglue). */
/* #undef HAVE_LIBRSAGLUE */
 
/* Define to 1 if you have the `rsaref' library (-lrsaref). */
/* #undef HAVE_LIBRSAREF */
 
/* Define to 1 if you have the `sensors' library (-lsensors). */
/* #undef HAVE_LIBSENSORS */
 
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
 
/* Define to 1 if you have the <linux/hdreg.h> header file. */
/* #undef HAVE_LINUX_HDREG_H */
 
/* Define to 1 if you have the <linux/tasks.h> header file. */
/* #undef HAVE_LINUX_TASKS_H */
 
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
 
/* Define to 1 if you have the `lrand48' function. */
/* #undef HAVE_LRAND48 */
 
/* Define to 1 if you have the <machine/param.h> header file. */
/* #undef HAVE_MACHINE_PARAM_H */
 
/* Define to 1 if you have the <machine/pte.h> header file. */
/* #undef HAVE_MACHINE_PTE_H */
 
/* Define to 1 if you have the <machine/types.h> header file. */
/* #undef HAVE_MACHINE_TYPES_H */
 
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
 
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
 
/* Define to 1 if you have the `mkstemp' function. */
/* #undef HAVE_MKSTEMP */
 
/* Define to 1 if you have the `mktime' function. */
/* #undef HAVE_MKTIME */
 
/* Define to 1 if you have the <mntent.h> header file. */
/* #undef HAVE_MNTENT_H */
 
/* Define to 1 if you have the <mtab.h> header file. */
/* #undef HAVE_MTAB_H */
 
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
 
/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
 
/* Define to 1 if you have the <netinet6/in6_pcb.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_PCB_H */
 
/* Define to 1 if you have the <netinet6/in6_var.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_VAR_H */
 
/* Define to 1 if you have the <netinet6/ip6_var.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H */
 
/* Define to 1 if you have the <netinet6/nd6.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_ND6_H */
 
/* Define to 1 if you have the <netinet6/tcp6_fsm.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_FSM_H */
 
/* Define to 1 if you have the <netinet6/tcp6.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_H */
 
/* Define to 1 if you have the <netinet6/tcp6_timer.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_TIMER_H */
 
/* Define to 1 if you have the <netinet6/tcp6_var.h> header file. */
/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_VAR_H */
 
/* Define to 1 if you have the <netinet/icmp_var.h> header file. */
/* #undef HAVE_NETINET_ICMP_VAR_H */
 
/* Define to 1 if you have the <netinet/if_ether.h> header file. */
/* #undef HAVE_NETINET_IF_ETHER_H */
 
/* Define to 1 if you have the <netinet/in.h> header file. */
/* #undef HAVE_NETINET_IN_H */
 
/* Define to 1 if you have the <netinet/in_systm.h> header file. */
/* #undef HAVE_NETINET_IN_SYSTM_H */
 
/* Define to 1 if you have the <netinet/in_var.h> header file. */
/* #undef HAVE_NETINET_IN_VAR_H */
 
/* Define to 1 if you have the <netinet/ip6.h> header file. */
/* #undef HAVE_NETINET_IP6_H */
 
/* Define to 1 if you have the <netinet/ip.h> header file. */
/* #undef HAVE_NETINET_IP_H */
 
/* Define to 1 if you have the <netinet/ip_icmp.h> header file. */
/* #undef HAVE_NETINET_IP_ICMP_H */
 
/* Define to 1 if you have the <netinet/icmp6.h> header file. */
/* #undef HAVE_NETINET_ICMP6_H */
 
/* Define to 1 if you have the <netinet/ip_var.h> header file. */
/* #undef HAVE_NETINET_IP_VAR_H */
 
/* Define to 1 if you have the <netinet/tcpip.h> header file. */
/* #undef HAVE_NETINET_TCPIP_H */
 
/* Define to 1 if you have the <netinet/tcp_fsm.h> header file. */
/* #undef HAVE_NETINET_TCP_FSM_H */
 
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
 
/* Define to 1 if you have the <netinet/tcp_timer.h> header file. */
/* #undef HAVE_NETINET_TCP_TIMER_H */
 
/* Define to 1 if you have the <netinet/tcp_var.h> header file. */
/* #undef HAVE_NETINET_TCP_VAR_H */
 
/* Define to 1 if you have the <netinet/udp.h> header file. */
/* #undef HAVE_NETINET_UDP_H */
 
/* Define to 1 if you have the <netinet/udp_var.h> header file. */
/* #undef HAVE_NETINET_UDP_VAR_H */
 
/* Define to 1 if you have the <netipx/ipx.h> header file. */
/* #undef HAVE_NETIPX_IPX_H */
 
/* Define to 1 if you have the <net/if_dl.h> header file. */
/* #undef HAVE_NET_IF_DL_H */
 
/* Define to 1 if you have the <net/if.h> header file. */
/* #undef HAVE_NET_IF_H */
 
/* Define to 1 if you have the <net/if_mib.h> header file. */
/* #undef HAVE_NET_IF_MIB_H */
 
/* Define to 1 if you have the <net/if_types.h> header file. */
/* #undef HAVE_NET_IF_TYPES_H */
 
/* Define to 1 if you have the <net/if_var.h> header file. */
/* #undef HAVE_NET_IF_VAR_H */
 
/* Define to 1 if you have the <net/route.h> header file. */
/* #undef HAVE_NET_ROUTE_H */
 
/* Define to 1 if you have the `nlist' function. */
/* #undef HAVE_NLIST */
 
/* Define to 1 if you have the <nlist.h> header file. */
/* #undef HAVE_NLIST_H */
 
/* Define to 1 if you have the <openssl/aes.h> header file. */
/* #undef HAVE_OPENSSL_AES_H */
 
/* Define to 1 if you have the <openssl/des.h> header file. */
/* #undef HAVE_OPENSSL_DES_H */
 
/* Define to 1 if you have the <openssl/dh.h> header file. */
/* #undef HAVE_OPENSSL_DH_H */
 
/* Define to 1 if you have the <openssl/evp.h> header file. */
/* #undef HAVE_OPENSSL_EVP_H */
 
/* Define to 1 if you have the <openssl/hmac.h> header file. */
/* #undef HAVE_OPENSSL_HMAC_H */
 
/* Define to 1 if you have the <osreldate.h> header file. */
/* #undef HAVE_OSRELDATE_H */
 
/* Define to 1 if you have the <pkginfo.h> header file. */
/* #undef HAVE_PKGINFO_H */
 
/* Define to 1 if you have the <pkglocs.h> header file. */
/* #undef HAVE_PKGLOCS_H */
 
/* Define if you have <process.h> header file. (Win32-getpid) */
#define HAVE_PROCESS_H 1
 
/* Define to 1 if you have the <pthread.h> header file. */
/* #undef HAVE_PTHREAD_H */
 
/* Define to 1 if you have the <pwd.h> header file. */
/* #undef HAVE_PWD_H */
 
/* Define to 1 if you have the `rand' function. */
#define HAVE_RAND 1
 
/* Define to 1 if you have the `random' function. */
#define HAVE_RAND 1
 
/* Define to 1 if you have the `regcomp' function. */
/* #undef HAVE_REGCOMP */
 
/* Define to 1 if you have the <regex.h> header file. */
/* #undef HAVE_REGEX_H */
 
/* Define to 1 if you have the `rpmGetPath' function. */
/* #undef HAVE_RPMGETPATH */
 
/* Define to 1 if you have the <rpmio.h> header file. */
/* #undef HAVE_RPMIO_H */
 
/* Define to 1 if you have the <rpm/rpmio.h> header file. */
/* #undef HAVE_RPM_RPMIO_H */
 
/* Define to 1 if you have the <search.h> header file. */
#define HAVE_SEARCH_H 1
 
/* Define to 1 if you have the <security/cryptoki.h> header file. */
/* #undef HAVE_SECURITY_CRYPTOKI_H */
 
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
 
/* Define to 1 if you have the `setenv' function. */
/* #undef HAVE_SETENV */
 
/* Define to 1 if you have the `setgid' function. */
/* #undef HAVE_SETGID */
 
/* Define to 1 if you have the `setgroups' function. */
/* #undef HAVE_SETGROUPS */
 
/* Define to 1 if you have the `setitimer' function. */
/* #undef HAVE_SETITIMER */
 
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
 
/* Define to 1 if you have the `setmntent' function. */
/* #undef HAVE_SETMNTENT */
 
/* Define to 1 if you have the `setsid' function. */
/* #undef HAVE_SETSID */
 
/* Define to 1 if you have the `setuid' function. */
/* #undef HAVE_SETUID */
 
/* Define to 1 if you have the <sgtty.h> header file. */
/* #undef HAVE_SGTTY_H */
 
/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */
 
/* Define to 1 if you have the `sigalrm' function. */
/* #undef HAVE_SIGALRM */
 
/* Define to 1 if you have the `sigblock' function. */
/* #undef HAVE_SIGBLOCK */
 
/* Define to 1 if you have the `sighold' function. */
/* #undef HAVE_SIGHOLD */
 
/* Define to 1 if you have the `signal' function. */
/* #undef HAVE_SIGNAL */
 
/* Define to 1 if you have the `sigset' function. */
/* #undef HAVE_SIGSET */
 
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
 
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
 
/* Define to 1 if you have the `statfs' function. */
/* #undef HAVE_STATFS */
 
/* Define to 1 if you have the `statvfs' function. */
/* #undef HAVE_STATVFS */
 
/* Define to 1 if you have the <stdint.h> header file. */
#ifdef __MINGW32__
#define HAVE_STDINT_H 1
#endif
 
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
 
/* Define to 1 if you have the `stime' function. */
/* #undef HAVE_STIME */
 
/* Define to 1 if you have the `strcasestr' function. */
/* #undef HAVE_STRCASESTR */
 
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
 
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
 
/* Define to 1 if you have the <strings.h> header file. */
/* #undef HAVE_STRINGS_H */
 
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
 
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */
 
/* Define to 1 if you have the `strncasecmp' function. */
/* #undef HAVE_STRNCASECMP */
 
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
 
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
 
/* Define to 1 if you have the <syslog.h> header file. */
/* #undef HAVE_SYSLOG_H */
 
/* Define to 1 if you have the `system' function. */
#define HAVE_SYSTEM 1
 
/* Define to 1 if you have the <sys/cdefs.h> header file. */
/* #undef HAVE_SYS_CDEFS_H */
 
/* Define to 1 if you have the <sys/conf.h> header file. */
/* #undef HAVE_SYS_CONF_H */
 
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
 
/* Define to 1 if you have the <sys/diskio.h> header file. */
/* #undef HAVE_SYS_DISKIO_H */
 
/* Define to 1 if you have the <sys/dkio.h> header file. */
/* #undef HAVE_SYS_DKIO_H */
 
/* Define to 1 if you have the <sys/dmap.h> header file. */
/* #undef HAVE_SYS_DMAP_H */
 
/* Define to 1 if you have the <sys/file.h> header file. */
/* #undef HAVE_SYS_FILE_H */
 
/* Define to 1 if you have the <sys/filio.h> header file. */
/* #undef HAVE_SYS_FILIO_H */
 
/* Define to 1 if you have the <sys/fixpoint.h> header file. */
/* #undef HAVE_SYS_FIXPOINT_H */
 
/* Define to 1 if you have the <sys/fs.h> header file. */
/* #undef HAVE_SYS_FS_H */
 
/* Define to 1 if you have the <sys/hashing.h> header file. */
/* #undef HAVE_SYS_HASHING_H */
 
/* Define to 1 if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
 
/* Define to 1 if you have the <sys/loadavg.h> header file. */
/* #undef HAVE_SYS_LOADAVG_H */
 
/* Define to 1 if you have the <sys/mbuf.h> header file. */
/* #undef HAVE_SYS_MBUF_H */
 
/* Define to 1 if you have the <sys/mntent.h> header file. */
/* #undef HAVE_SYS_MNTENT_H */
 
/* Define to 1 if you have the <sys/mnttab.h> header file. */
/* #undef HAVE_SYS_MNTTAB_H */
 
/* Define to 1 if you have the <sys/mount.h> header file. */
/* #undef HAVE_SYS_MOUNT_H */
 
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
 
/* Define to 1 if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
 
/* Define to 1 if you have the <sys/pool.h> header file. */
/* #undef HAVE_SYS_POOL_H */
 
/* Define to 1 if you have the <sys/proc.h> header file. */
/* #undef HAVE_SYS_PROC_H */
 
/* Define to 1 if you have the <sys/protosw.h> header file. */
/* #undef HAVE_SYS_PROTOSW_H */
 
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
 
/* Define to 1 if you have the <sys/queue.h> header file. */
/* #undef HAVE_SYS_QUEUE_H */
 
/* Define to 1 if you have the <sys/select.h> header file. */
/* #undef HAVE_SYS_SELECT_H */
 
/* Define to 1 if you have the <sys/socketvar.h> header file. */
/* #undef HAVE_SYS_SOCKETVAR_H */
 
/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
 
/* Define to 1 if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
 
/* Define to 1 if you have the <sys/statfs.h> header file. */
/* #undef HAVE_SYS_STATFS_H */
 
/* Define to 1 if you have the <sys/statvfs.h> header file. */
/* #undef HAVE_SYS_STATVFS_H */
 
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
 
/* Define to 1 if you have the <sys/stream.h> header file. */
/* #undef HAVE_SYS_STREAM_H */
 
/* Define to 1 if you have the <sys/swap.h> header file. */
/* #undef HAVE_SYS_SWAP_H */
 
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */
 
/* Define to 1 if you have the <sys/sysmp.h> header file. */
/* #undef HAVE_SYS_SYSMP_H */
 
/* Define to 1 if you have the <sys/tcpipstats.h> header file. */
/* #undef HAVE_SYS_TCPIPSTATS_H */
 
/* Define to 1 if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */
 
/* Define to 1 if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1
 
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
 
/* Define to 1 if you have the <sys/un.h> header file. */
/* #undef HAVE_SYS_UN_H */
 
/* Define to 1 if you have the <sys/user.h> header file. */
/* #undef HAVE_SYS_USER_H */
 
/* Define to 1 if you have the <sys/utsname.h> header file. */
/* #undef HAVE_SYS_UTSNAME_H */
 
/* Define to 1 if you have the <sys/vfs.h> header file. */
/* #undef HAVE_SYS_VFS_H */
 
/* Define to 1 if you have the <sys/vmmac.h> header file. */
/* #undef HAVE_SYS_VMMAC_H */
 
/* Define to 1 if you have the <sys/vmmeter.h> header file. */
/* #undef HAVE_SYS_VMMETER_H */
 
/* Define to 1 if you have the <sys/vmparam.h> header file. */
/* #undef HAVE_SYS_VMPARAM_H */
 
/* Define to 1 if you have the <sys/vmsystm.h> header file. */
/* #undef HAVE_SYS_VMSYSTM_H */
 
/* Define to 1 if you have the <sys/vm.h> header file. */
/* #undef HAVE_SYS_VM_H */
 
/* Define to 1 if you have the <sys/vnode.h> header file. */
/* #undef HAVE_SYS_VNODE_H */
 
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
/* #undef HAVE_SYS_WAIT_H */
 
/* Define to 1 if you have the `tcgetattr' function. */
/* #undef HAVE_TCGETATTR */
 
/* Define to 1 if you have the <ufs/ffs/fs.h> header file. */
/* #undef HAVE_UFS_FFS_FS_H */
 
/* Define to 1 if you have the <ufs/fs.h> header file. */
/* #undef HAVE_UFS_FS_H */
 
/* Define to 1 if you have the <ufs/ufs/dinode.h> header file. */
/* #undef HAVE_UFS_UFS_DINODE_H */
 
/* Define to 1 if you have the <ufs/ufs/inode.h> header file. */
/* #undef HAVE_UFS_UFS_INODE_H */
 
/* Define to 1 if you have the <ufs/ufs/quota.h> header file. */
/* #undef HAVE_UFS_UFS_QUOTA_H */
 
/* Define to 1 if you have the `uname' function. */
/* #undef HAVE_UNAME */
 
/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
 
/* Define to 1 if you have the `usleep' function. */
/* #undef HAVE_USLEEP */
 
/* Define to 1 if you have the <utmpx.h> header file. */
/* #undef HAVE_UTMPX_H */
 
/* Define to 1 if you have the <utsname.h> header file. */
/* #undef HAVE_UTSNAME_H */
 
/* Define to 1 if you have the <uvm/uvm_extern.h> header file. */
/* #undef HAVE_UVM_UVM_EXTERN_H */
 
/* Define to 1 if you have the <uvm/uvm_param.h> header file. */
/* #undef HAVE_UVM_UVM_PARAM_H */
 
/* Define to 1 if you have the <vm/swap_pager.h> header file. */
/* #undef HAVE_VM_SWAP_PAGER_H */
 
/* Define to 1 if you have the <vm/vm_extern.h> header file. */
/* #undef HAVE_VM_VM_EXTERN_H */
 
/* Define to 1 if you have the <vm/vm.h> header file. */
/* #undef HAVE_VM_VM_H */
 
/* Define to 1 if you have the <vm/vm_param.h> header file. */
/* #undef HAVE_VM_VM_PARAM_H */
 
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
 
/* Define to 1 if you have the <winsock.h> header file. */
#define HAVE_WINSOCK_H 1
 
/* Define to 1 if you have the <winsock2.h> header file. */
#define HAVE_WINSOCK2_H 1
 
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#define HAVE_WS2TCPIP_H 1
 
/* Set if IP_PKTINFO is usable */
#define HAVE_IP_PKTINFO 1
 
/* Define to 1 if you have the <xti.h> header file. */
/* #undef HAVE_XTI_H */
 
/* Define to the address where bug reports for this package should be sent. */
/* #undef PACKAGE_BUGREPORT */
 
/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "Net-SNMP"
#endif
 
/* Define to the full name and version of this package. */
/* #undef PACKAGE_STRING */
 
/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#define PACKAGE_TARNAME "net-snmp"
#endif
 
/* Define to the version of this package. */
/* #undef PACKAGE_VERSION */
 
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
 
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
 
/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4
 
/* The size of a `intmax_t', as computed by sizeof. */
#define SIZEOF_INTMAX_T 8
 
/* The size of a `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
 
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
 
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
 
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
 
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
 
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
/* # undef _ALL_SOURCE */
#endif
 
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
 
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
#define inline __inline
 
/* Define to `long' if <sys/types.h> does not define. */
/* #undef off_t */
 
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
 
/* define if you have getdevs() */
/* #undef HAVE_GETDEVS */
 
/* define if you have devstat_getdevs() */
/* #undef HAVE_DEVSTAT_GETDEVS */
 
/* define if you have <netinet/in_pcb.h> */
/* #undef HAVE_NETINET_IN_PCB_H */
 
/* define if you have <sys/disklabel.h> */
/* #undef HAVE_SYS_DISKLABEL_H */
 
/* define if you are using linux and /proc/net/dev has the compressed
field, which exists in linux kernels 2.2 and greater. */
/* #undef PROC_NET_DEV_HAS_COMPRESSED */
 
/* define rtentry to ortentry on SYSV machines (alphas) */
#define RTENTRY rtentry;
 
/* Use BSD 4.4 routing table entries? */
/* #undef RTENTRY_4_4 */
 
/* Does struct sigaction have a sa_sigaction field? */
/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */
 
/* Does struct sockaddr have a sa_len field? */
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
 
/* Does struct sockaddr have a sa_family2 field? */
/* #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 */
 
/* Does struct in6_addr have a s6_un.sa6_ladd field? */
/* #undef HAVE_STRUCT_IN6_ADDR_S6_UN_SA6_LADDR */
 
/* msghdr.msg_control */
/* #undef HAVE_STRUCT_MSGHDR_MSG_CONTROL */
 
/* msghdr.msg_flags */
/* #undef HAVE_STRUCT_MSGHDR_MSG_FLAGS */
 
/* rtentry structure tests */
/* #undef RTENTRY_RT_NEXT */
/* #undef HAVE_STRUCT_RTENTRY_RT_DST */
/* #undef HAVE_STRUCT_RTENTRY_RT_UNIT */
/* #undef HAVE_STRUCT_RTENTRY_RT_USE */
/* #undef HAVE_STRUCT_RTENTRY_RT_REFCNT */
/* #undef HAVE_STRUCT_RTENTRY_RT_HASH */
 
/* ifnet structure tests */
/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE */
/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE */
/* #undef HAVE_STRUCT_IFNET_IF_SPEED */
/* #undef HAVE_STRUCT_IFNET_IF_TYPE */
/* #undef HAVE_STRUCT_IFNET_IF_IMCASTS */
/* #undef HAVE_STRUCT_IFNET_IF_IQDROPS */
/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC */
/* #undef HAVE_STRUCT_IFNET_IF_NOPROTO */
/* #undef HAVE_STRUCT_IFNET_IF_OMCASTS */
/* #undef HAVE_STRUCT_IFNET_IF_XNAME */
/* #undef HAVE_STRUCT_IFNET_IF_OBYTES */
/* #undef HAVE_STRUCT_IFNET_IF_IBYTES */
/* #undef HAVE_STRUCT_IFNET_IF_ADDRLIST */
 
/* tcpstat.tcps_rcvmemdrop */
/* #undef HAVE_STRUCT_TCPSTAT_TCPS_RCVMEMDROP */
 
/* udpstat.udps_discard */
/* #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD */
 
/* udpstat.udps_discard */
/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT */
 
/* udpstat.udps_discard */
/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST */
 
/* udpstat.udps_discard */
/* #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK */
 
/* arphd.at_next */
/* #undef HAVE_STRUCT_ARPHD_AT_NEXT */
 
/* ifaddr.ifa_next */
/* #undef HAVE_STRUCT_IFADDR_IFA_NEXT */
 
/* ifnet.if_mtu */
/* #undef HAVE_STRUCT_IFNET_IF_MTU */
 
/* swdevt.sw_nblksenabled */
/* #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED */
 
/* nlist.n_value */
/* #undef HAVE_STRUCT_NLIST_N_VALUE */
 
/* ipstat structure tests */
/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD */
/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG */
/* #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED */
/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED */
/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT */
/* #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT */
/* #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO */
/* #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE */
/* #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED */
/* #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS */
/* #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED */
 
/* vfsstat.f_frsize */
/* #undef HAVE_STRUCT_STATVFS_F_FRSIZE */
 
/* vfsstat.f_files */
/* #undef HAVE_STRUCT_STATVFS_F_FILES */
 
/* statfs inode structure tests*/
/* #undef HAVE_STRUCT_STATFS_F_FILES */
/* #undef HAVE_STRUCT_STATFS_F_FFREE */
/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */
 
/* des_ks_struct.weak_key */
/* #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY */
 
/* ifnet needs to have _KERNEL defined */
/* #undef IFNET_NEEDS_KERNEL */
 
/* sysctl works to get boottime, etc... */
/* #undef NETSNMP_CAN_USE_SYSCTL */
 
/* type check for in_addr_t */
/* #undef in_addr_t */
 
/* define if SIOCGIFADDR exists in sys/ioctl.h */
/* #undef SYS_IOCTL_H_HAS_SIOCGIFADDR */
 
/* Mib-2 tree Info */
/* These are the system information variables. */
 
#define NETSNMP_VERS_DESC "unknown" /* overridden at run time */
#define NETSNMP_SYS_NAME "unknown" /* overridden at run time */
 
/* comment out the second define to turn off functionality for any of
these: (See README for details) */
 
/* proc PROCESSNAME [MAX] [MIN] */
#define NETSNMP_PROCMIBNUM 2
 
/* exec/shell NAME COMMAND */
#define NETSNMP_SHELLMIBNUM 8
 
/* swap MIN */
#define NETSNMP_MEMMIBNUM 4
 
/* disk DISK MINSIZE */
#define NETSNMP_DISKMIBNUM 9
 
/* load 1 5 15 */
#define NETSNMP_LOADAVEMIBNUM 10
 
/* which version are you using? This mibloc will tell you */
#define NETSNMP_VERSIONMIBNUM 100
 
/* Reports errors the agent runs into */
/* (typically its "can't fork, no mem" problems) */
#define NETSNMP_ERRORMIBNUM 101
 
/* The sub id of EXTENSIBLEMIB returned to queries of
.iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */
#define NETSNMP_AGENTID 250
 
/* This ID is returned after the NETSNMP_AGENTID above. IE, the resulting
value returned by a query to sysObjectID is
EXTENSIBLEMIB.NETSNMP_AGENTID.???, where ??? is defined below by OSTYPE */
 
#define NETSNMP_HPUX9ID 1
#define NETSNMP_SUNOS4ID 2
#define NETSNMP_SOLARISID 3
#define NETSNMP_OSFID 4
#define NETSNMP_ULTRIXID 5
#define NETSNMP_HPUX10ID 6
#define NETSNMP_NETBSD1ID 7
#define NETSNMP_FREEBSDID 8
#define NETSNMP_IRIXID 9
#define NETSNMP_LINUXID 10
#define NETSNMP_BSDIID 11
#define NETSNMP_OPENBSDID 12
#define NETSNMP_WIN32ID 13
#define NETSNMP_HPUX11ID 14
#define NETSNMP_UNKNOWNID 255
 
#ifdef hpux9
#define OSTYPE NETSNMP_HPUX9ID
#endif
#ifdef hpux10
#define OSTYPE NETSNMP_HPUX10ID
#endif
#ifdef hpux11
#define OSTYPE NETSNMP_HPUX11ID
#endif
#ifdef sunos4
#define OSTYPE NETSNMP_SUNOS4ID
#endif
#ifdef solaris2
#define OSTYPE NETSNMP_SOLARISID
#endif
#if defined(osf3) || defined(osf4) || defined(osf5)
#define OSTYPE NETSNMP_OSFID
#endif
#ifdef ultrix4
#define OSTYPE NETSNMP_ULTRIXID
#endif
#ifdef netbsd1
#define OSTYPE NETSNMP_NETBSD1ID
#endif
#if defined(__FreeBSD__)
#define OSTYPE NETSNMP_FREEBSDID
#endif
#if defined(irix6) || defined(irix5)
#define OSTYPE NETSNMP_IRIXID
#endif
#ifdef linux
#define OSTYPE NETSNMP_LINUXID
#endif
#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4)
#define OSTYPE NETSNMP_BSDIID
#endif
#ifdef openbsd2
#define OSTYPE NETSNMP_OPENBSDID
#endif
#ifdef WIN32
#define OSTYPE NETSNMP_WIN32ID
#endif
/* unknown */
#ifndef OSTYPE
#define OSTYPE NETSNMP_UNKNOWNID
#endif
 
/* The enterprise number has been assigned by the IANA group. */
/* Optionally, this may point to the location in the tree your */
/* company/organization has been allocated. */
/* The assigned enterprise number for the NET_SNMP MIB modules. */
#define NETSNMP_ENTERPRISE_OID 8072
#define NETSNMP_ENTERPRISE_MIB 1,3,6,1,4,1,8072
#define NETSNMP_ENTERPRISE_DOT_MIB 1.3.6.1.4.1.8072
#define NETSNMP_ENTERPRISE_DOT_MIB_LENGTH 7
 
/* The assigned enterprise number for sysObjectID. */
#define NETSNMP_SYSTEM_MIB 1,3,6,1,4,1,8072,3,2,OSTYPE
#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.OSTYPE
#define NETSNMP_SYSTEM_DOT_MIB_LENGTH 10
 
/* The assigned enterprise number for notifications. */
#define NETSNMP_NOTIFICATION_MIB 1,3,6,1,4,1,8072,4
#define NETSNMP_NOTIFICATION_DOT_MIB 1.3.6.1.4.1.8072.4
#define NETSNMP_NOTIFICATION_DOT_MIB_LENGTH 8
 
/* this is the location of the ucdavis mib tree. It shouldn't be
changed, as the places it is used are expected to be constant
values or are directly tied to the UCD-SNMP-MIB. */
#define NETSNMP_UCDAVIS_OID 2021
#define NETSNMP_UCDAVIS_MIB 1,3,6,1,4,1,2021
#define NETSNMP_UCDAVIS_DOT_MIB 1.3.6.1.4.1.2021
#define NETSNMP_UCDAVIS_DOT_MIB_LENGTH 7
 
/* this is the location of the net-snmp mib tree. It shouldn't be
changed, as the places it is used are expected to be constant
values or are directly tied to the UCD-SNMP-MIB. */
#define NETSNMP_OID 8072
#define NETSNMP_MIB 1,3,6,1,4,1,8072
#define NETSNMP_DOT_MIB 1.3.6.1.4.1.8072
#define NETSNMP_DOT_MIB_LENGTH 7
 
/* how long to wait (seconds) for error querys before reseting the error trap.*/
#define NETSNMP_ERRORTIMELENGTH 600
 
/* Exec command to fix PROC problems */
/* %s will be replaced by the process name in error */
 
/* #define NETSNMP_PROCFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
 
/* Exec command to fix EXEC problems */
/* %s will be replaced by the exec/script name in error */
 
/* #define NETSNMP_EXECFIXCMD "/usr/bin/perl /local/scripts/fixproc %s" */
 
/* Should exec output Cashing be used (speeds up things greatly), and
if so, After how many seconds should the cache re-newed? Note:
Don't define CASHETIME to disable cashing completely */
 
#define NETSNMP_EXCACHETIME 30
#define NETSNMP_CACHEFILE ".snmp-exec-cache"
#define NETSNMP_MAXCACHESIZE (200*80) /* roughly 200 lines max */
 
#define MAXDISKS 50 /* can't scan more than this number */
 
/* misc defaults */
 
/* default of 100 meg minimum if the minimum size is not specified in
the config file */
#define NETSNMP_DEFDISKMINIMUMSPACE 100000
 
#define NETSNMP_DEFMAXLOADAVE 12.0 /* default maximum load average before error */
 
/* Because of sleep(1)s, this will also be time to wait (in seconds) for exec
to finish */
#define NETSNMP_MAXREADCOUNT 100 /* max times to loop reading output from execs. */
 
/* The original CMU code had this hardcoded as = 1 */
#define NETSNMP_SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */
 
/* How long to wait before restarting the agent after a snmpset to
EXTENSIBLEMIB.NETSNMP_VERSIONMIBNUM.VERRESTARTAGENT. This is
necessary to finish the snmpset reply before restarting. */
#define NETSNMP_RESTARTSLEEP 5
 
/* Number of community strings to store */
#define NETSNMP_NUM_COMMUNITIES 5
 
/* UNdefine to allow specifying zero-length community string */
/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */
 
#define NETSNMP_LASTFIELD -1 /* internal define */
 
/* configure options specified */
#define NETSNMP_CONFIGURE_OPTIONS ""
 
/* got socklen_t? */
#ifdef HAVE_WIN32_PLATFORM_SDK
#define HAVE_SOCKLEN_T 1
#endif
 
/* got in_addr_t? */
/* #undef HAVE_IN_ADDR_T */
 
#ifdef __MINGW32__
/* got ssize_t? */
#define HAVE_SSIZE_T
#endif
 
/* If you have openssl 0.9.7 or above, you likely have AES support. */
/* #undef NETSNMP_USE_OPENSSL */
 
#ifdef NETSNMP_USE_OPENSSL
 
/* Define to 1 if you have the <openssl/dh.h> header file. */
#define HAVE_OPENSSL_DH_H 1
 
/* Define to 1 if you have the <openssl/aes.h> header file. */
#define HAVE_OPENSSL_AES_H 1
 
/* Define to 1 if you have the `EVP_MD_CTX_create' function. */
#define HAVE_EVP_MD_CTX_CREATE 1
 
/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */
#define HAVE_EVP_MD_CTX_DESTROY 1
 
/* Define to 1 if you have the `AES_cfb128_encrypt' function. */
#define HAVE_AES_CFB128_ENCRYPT 1
 
#if defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)
#define HAVE_AES 1
#endif
 
#else /* ! NETSNMP_USE_OPENSSL */
 
/* define if you are using the MD5 code ...*/
#define NETSNMP_USE_INTERNAL_MD5 1
 
#endif /* ! NETSNMP_USE_OPENSSL */
 
 
/* define random functions */
 
#ifndef HAVE_RANDOM
#ifdef HAVE_LRAND48
#define random lrand48
#define srandom(s) srand48(s)
#else
#ifdef HAVE_RAND
#define random rand
#define srandom(s) srand(s)
#endif
#endif
#endif
 
/* define signal if DNE */
 
#ifndef HAVE_SIGNAL
#ifdef HAVE_SIGSET
#define signal(a,b) sigset(a,b)
#endif
#endif
 
/* define if you have librpm and libdb */
/* #undef HAVE_LIBDB */
/* #undef HAVE_LIBRPM */
 
/* define if you have pkginfo */
/* #undef HAVE_PKGINFO */
 
/* define if you have gethostbyname */
#define HAVE_GETHOSTBYNAME 1
 
/* define if you have gethostbyaddr */
#define HAVE_GETHOSTBYADDR 1
 
/* printing system */
/* #undef HAVE_LPSTAT */
/* #undef LPSTAT_PATH */
/* #undef HAVE_PRINTCAP */
 
/* Pluggable transports. */
 
/* This is defined if support for the UDP/IP transport domain is
available. */
#define NETSNMP_TRANSPORT_UDP_DOMAIN 1
 
/* This is defined if support for the "callback" transport domain is
available. */
#define NETSNMP_TRANSPORT_CALLBACK_DOMAIN 1
 
/* This is defined if support for the TCP/IP transport domain is
available. */
#define NETSNMP_TRANSPORT_TCP_DOMAIN 1
 
/* This is defined if support for the Unix transport domain
(a.k.a. "local IPC") is available. */
/* #undef NETSNMP_TRANSPORT_UNIX_DOMAIN */
 
/* This is defined if support for the AAL5 PVC transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_AAL5PVC_DOMAIN */
 
/* This is defined if support for the IPX transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_IPX_DOMAIN */
 
/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */
/* This is defined if support for the UDP/IPv6 transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */
 
/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */
/* This is defined if support for the TCP/IPv6 transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN */
 
/* This is defined if support for the TLS transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_TLSBASE_DOMAIN */
 
/* This is defined if support for the Alias transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_ALIAS_DOMAIN */
 
/* This is defined if support for the SSH transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_SSH_DOMAIN */
 
/* This is defined if support for the DTLS/UDP transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_DTLSUDP_DOMAIN */
 
/* This is defined if support for the TLS/TCP transport domain is
available. */
/* #undef NETSNMP_TRANSPORT_TLSTCP_DOMAIN */
 
/* This is defined if support for stdin/out transport domain is available. */
/* #undef NETSNMP_TRANSPORT_STD_DOMAIN */
 
/* This is defined if support for the IPv4Base transport domain is available. */
#define NETSNMP_TRANSPORT_IPV4BASE_DOMAIN 1
 
/* define this if the USM security module is available */
#define NETSNMP_SECMOD_USM 1
 
/* define this if the KSM (kerberos based snmp) security module is available */
/* #undef NETSNMP_SECMOD_KSM */
 
/* define this if we're using the new MIT crypto API */
/* #undef NETSNMP_USE_KERBEROS_MIT */
 
/* define if you want to build with reentrant/threaded code (incomplete)*/
/* #undef NETSNMP_REENTRANT */
 
/* on aix, if you have perfstat */
/* #undef HAVE_PERFSTAT */
 
/* Not-to-be-compiled macros for use by configure only */
#define config_require(x)
#define config_version_require(x)
#define config_warning(x)
#define config_error(x)
#define config_exclude(x)
#define config_arch_require(x,y)
#define config_parse_dot_conf(w,x,y,z)
#define config_add_mib(x)
#define config_belongs_in(x)
 
#if defined (WIN32)
#define ENV_SEPARATOR ";"
#define ENV_SEPARATOR_CHAR ';'
#else
#define ENV_SEPARATOR ":"
#define ENV_SEPARATOR_CHAR ':'
#endif
 
/*
* this must be before the system/machine includes, to allow them to
* override and turn off inlining. To do so, they should do the
* following:
*
* #undef NETSNMP_ENABLE_INLINE
* #define NETSNMP_ENABLE_INLINE 0
*
* A user having problems with their compiler can also turn off
* the use of inline by defining NETSNMP_NO_INLINE via their cflags:
*
* -DNETSNMP_NO_INLINE
*
* Header and source files should only test against NETSNMP_USE_INLINE:
*
* #ifdef NETSNMP_USE_INLINE
* NETSNMP_INLINE function(int parm) { return parm -1; }
* #endif
*
* Functions which should be static, regardless of whether or not inline
* is available or enabled should use the NETSNMP_STATIC_INLINE macro,
* like so:
*
* NETSNMP_STATIC_INLINE function(int parm) { return parm -1; }
*
* NOT like this:
*
* static NETSNMP_INLINE function(int parm) { return parm -1; }
*
*/
/*
* Win32 needs extern for inline function declarations in headers.
* See MS tech note Q123768:
* http://support.microsoft.com/default.aspx?scid=kb;EN-US;123768
*/
#define NETSNMP_INLINE extern inline
#define NETSNMP_STATIC_INLINE static inline
#define NETSNMP_ENABLE_INLINE 1
 
#if notused
#include NETSNMP_SYSTEM_INCLUDE_FILE
#include NETSNMP_MACHINE_INCLUDE_FILE
#endif
 
#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE)
# define NETSNMP_USE_INLINE 1
#else
# undef NETSNMP_INLINE
# define NETSNMP_INLINE
# undef NETSNMP_STATIC_INLINE
# define NETSNMP_STATIC_INLINE static
#endif
 
#ifdef WIN32
 
#ifndef __MINGW32__
typedef unsigned short mode_t;
#endif
#ifndef HAVE_STDINT_H
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef unsigned __int16 uint16_t;
typedef __int16 int16_t;
typedef unsigned __int32 uint32_t;
typedef __int32 int32_t;
typedef unsigned __int64 uint64_t;
typedef __int64 int64_t;
typedef unsigned __int64 uintmax_t;
typedef __int64 intmax_t;
#else /* HAVE_STDINT_H */
#include <stdint.h>
#endif /* HAVE_STDINT_H */
 
 
/* (u)intptr_t should only be needed for MSVC 6 32-bit. */
/* SDK has it for 64-bit and newer MSVC should also have it in stddef.h. */
#ifndef _INTPTR_T_DEFINED
#ifdef _M_X64
typedef __int64 intptr_t;
#else
typedef int intptr_t;
#endif
#define _INTPTR_T_DEFINED
#endif
 
#ifndef _UINTPTR_T_DEFINED
#ifdef _M_X64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#define _UINTPTR_T_DEFINED
#endif
 
#ifndef __cplusplus
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4804) // '-' : unsafe use of type 'bool' in operation
#endif
/* SAMO
enum {
netsnmp_compile_time_uintptr_t_size_check
= sizeof(struct netsnmp_compile_time_uintptr_t_size_check_s { int:-!(sizeof(uintptr_t) == sizeof(void*)); })
};
*/
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif
 
/* Define if you have the closesocket function. */
#define HAVE_CLOSESOCKET 1
 
/* Define if you have raise() instead of alarm() */
#define HAVE_RAISE 1
 
/* define to 1 if you do not want to set global snmp_errno */
#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1
 
/* Defining vsnprintf is not necessary for MSVC 2008 or later */
#if defined(_MSC_VER) && _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
 
#if defined(_MSC_VER) && _MSC_VER < 1600
#define EADDRINUSE WSAEADDRINUSE
#endif
 
/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL */
#define NETSNMP_USE_DLL 1
 
#if defined(NETSNMP_DLL) && !defined(NETSNMP_USE_DLL)
#error NETSNMP_USE_DLL must be defined when building libsnmp as a DLL.
#endif
 
/*
* DLL decoration, if used at all, must be consistent.
* This is why NETSNMP_IMPORT is really an export decoration
* when it is encountered in a header file that is included
* during the compilation of a library source file.
* NETSNMP_DLL is set by the MSVC libsnmp_dll project
* in order to signal that the library sources are being compiled.
* Not defining NETSNMP_USE_DLL ignores the preceding, and renders
* the NETSNMP_IMPORT definitions harmless.
*/
 
#ifdef NETSNMP_USE_DLL
#ifdef NETSNMP_DLL
#if defined(_MSC_VER)
#define NETSNMP_IMPORT __declspec(dllexport)
#endif
#else
#if defined(_MSC_VER)
#define NETSNMP_IMPORT __declspec(dllimport)
#endif
#endif /* NETSNMP_DLL */
#endif /* NETSNMP_USE_DLL */
 
/* MSVC OpenSSL linker settings. */
#if defined(_MSC_VER)
# if defined(NETSNMP_USE_OPENSSL)
# ifdef _DLL
# ifdef _DEBUG
# pragma comment(lib, "libeay32MDd.lib")
# else
# pragma comment(lib, "libeay32MD.lib")
# endif
# else
# ifdef _DEBUG
# pragma comment(lib, "libeay32MTd.lib")
# else
# pragma comment(lib, "libeay32MT.lib")
# endif
# endif
# pragma comment(lib, "gdi32.lib")
# pragma comment(lib, "user32.lib")
# endif
#endif
 
#endif /* WIN32 */
 
#ifndef NETSNMP_IMPORT
# define NETSNMP_IMPORT extern
#endif
 
#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE)
#define NETSNMP_CAN_USE_NLIST
#endif
 
#if HAVE_DMALLOC_H
#define DMALLOC_FUNC_CHECK
#endif
 
/* #undef NETSNMP_ENABLE_LOCAL_SMUX */
 
/* define if agentx transport is to use domain sockets only */
/* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */
 
#ifndef LOG_DAEMON
#define LOG_DAEMON (3<<3) /* system daemons */
#endif
 
#if UCD_COMPATIBLE
/* old and in the way */
#define EXTENSIBLEMIB NETSNMP_UCDAVIS_MIB
#endif
 
#ifdef _MSC_VER
/* Windows Vista and higher have inet_ntop but older Windows does not.
* We'll use the Net-SNMP version instead. */
#undef HAVE_INET_NTOP
#undef HAVE_INET_PTON
 
/* IPv6 transports */
#ifdef NETSNMP_ENABLE_IPV6
#define NETSNMP_TRANSPORT_TCPIPV6_DOMAIN 1
#define NETSNMP_TRANSPORT_UDPIPV6_DOMAIN 1
#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
#else
#undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN
#undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN
#endif
#endif
 
/*
* Although if_nametoindex() is available on Windows Vista, Windows Server
* 2008 and later in iphlpapi.dll, do not link with if_nametoindex() such
* that the Net-SNMP executable can be started on earlier Windows versions.
*/
#undef HAVE_IF_NAMETOINDEX
 
#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
#endif
 
/* Define to 1 if you have the `strtoull' function. */
#if _MSC_VER >= 1800
#define HAVE_STRTOULL
#else
/* #undef HAVE_STRTOULL */
#endif
 
/*
* Module configuration and control starts here.
*
* Some of the defines herein are used to control
* groups of modules. The ones that have "CFG"
* are used especially to control the include files
* seen in {agent,mib}_module_includes.h, and the init entries
* which are invoked in {agent,mib}_module_inits.h.
*
* To disable a group, uncomment the associated define.
*/
/* CFG Define if compiling with the ucd_snmp module files. */
#define USING_UCD_SNMP_MODULE 1
/* CFG Define if compiling with the agentx module files. */
#define USING_AGENTX_MODULE 1
/* CFG Define if compiling with the host module files. */
/* #undef USING_HOST_MODULE */
/* CFG Define if compiling with the Rmon module files. */
/* #undef USING_RMON_MODULE */
 
/* CFG Define if compiling with the disman/event-mib module files. */
#define USING_DISMAN_EVENT_MIB_MODULE 1
 
/* CFG Define if compiling with the smux module files. */
/* #undef USING_SMUX_MODULE */
 
/* Define if compiling with the winExtDLL module. */
#define USING_WINEXTDLL_MODULE 1
 
/*
* Module configuration and control ends here.
*/
#define UDP_ADDRESSES_IN_HOST_ORDER 1
 
/* Timeout in milliseconds for Win32 function WaitForSingleObject.
Used by agent pass. */
#define NETSNMP_TIMEOUT_WAITFORSINGLEOBJECT 5000
 
#ifdef HAVE_WIN32_PLATFORM_SDK
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
#endif
 
/* Size prefix to use to printf a uint32_t */
#define NETSNMP_PRI32 ""
 
#ifdef _MSC_VER
#ifdef _WIN64
#define NETSNMP_PRIz "I64"
#else
#define NETSNMP_PRIz ""
#endif
#endif
 
#endif /* NET_SNMP_CONFIG_H */