Raritan PX2/PX3 JSON-RPC API
|
Sensor logger interface. More...
import"SensorLogger.idl";
Classes | |
struct | LogRow |
One full log row. More... | |
struct | Record |
Sensor log record. More... | |
struct | SensorSet |
Set of logged sensors. More... | |
struct | Settings |
Sensor logger settings. More... | |
struct | TimedRecord |
Sensor log record with timestamp. More... | |
Public Member Functions | |
Settings | getSettings () |
Retrieve the sensor logger settings. More... | |
int | setSettings (in boolean isEnabled, in int samplesPerRecord) |
Change the sensor logger settings. More... | |
int | getTimeStamps (out vector< time > timestamps, in int recid, in int count) |
Retrieve a set of log record timestamps. More... | |
int | getSensorRecords (out vector< Record > recs, in sensors::Sensor_4_0_2 sensor, in int recid, in int count) |
Retrieve log records for a given sensor. More... | |
int | getPeripheralDeviceRecords (out vector< Record > recs, in peripheral::DeviceSlot_2_0_2 slot, in int recid, in int count) |
Retrieve log records for an peripheral device slot. More... | |
int | getSensorTimedRecords (out vector< TimedRecord > recs, in sensors::Sensor_4_0_2 sensor, in int recid, in int count) |
Retrieve log records with timestamps for a given sensor. More... | |
int | getPeripheralDeviceTimedRecords (out vector< TimedRecord > recs, in peripheral::DeviceSlot_2_0_2 slot, in int recid, in int count) |
Retrieve log records with timestamps for an peripheral device slot. More... | |
SensorSet | getLoggedSensors () |
Retrieve the set of logged sensors. More... | |
int | setLoggedSensors (in SensorSet sensors) |
Change the set of logged sensors. More... | |
int | enableSensors (in SensorSet sensors) |
Enable logging for one or more sensors or peripheral device slots. More... | |
int | disableSensors (in SensorSet sensors) |
Disable logging for one or more sensors or peripheral device slots. More... | |
boolean | isSensorEnabled (in sensors::Sensor_4_0_2 sensor) |
Check if logging is enabled for a given sensor. More... | |
boolean | isSlotEnabled (in peripheral::DeviceSlot_2_0_2 slot) |
Check if logging is enabled for a given peripheral device slot. More... | |
void | enableAllSensors () |
Enable logging for all PDU sensors. | |
void | disableAllSensors () |
Disable logging for all PDU sensors. | |
time | getSensorSetTimestamp () |
Get the time of the last sensor set modification. More... | |
int | getLogRow (out LogRow row, in int recid) |
Get one full log row. More... | |
Public Attributes | |
valueobject | SettingsChangedEvent: event::UserEvent { Settings oldSettings |
Event: Sensor logger settings have been changed. More... | |
Settings | newSettings |
Settings after change. | |
valueobject | LoggedSensorsChangedEvent: event::UserEvent { SensorSet oldSensors |
Event: Set of logged sensors has been changed. More... | |
SensorSet | newSensors |
Sensor set after change. | |
constant int | STATE_UNAVAILABLE = 0 |
Sensor state in log record. More... | |
constant int | STATE_OPEN = 1 |
Circuit breaker open. | |
constant int | STATE_CLOSE = 2 |
Circuit breaker closed. | |
constant int | STATE_BELOW_LOWER_CRITICAL = 3 |
Numeric sensor below lower critical threshold. | |
constant int | STATE_BELOW_LOWER_WARNING = 4 |
Numeric sensor below lower warning threshold. | |
constant int | STATE_NORMAL = 5 |
Numeric sensor in normal range; normal operation. | |
constant int | STATE_ABOVE_UPPER_WARNING = 6 |
Numeric sensor above upper warning threshold. | |
constant int | STATE_ABOVE_UPPER_CRITICAL = 7 |
Numeric sensor above upper critical threshold. | |
constant int | STATE_ON = 8 |
Power state on. | |
constant int | STATE_OFF = 9 |
Power state off. | |
constant int | STATE_ALARMED = 10 |
Alarmed. | |
constant int | STATE_OK = 11 |
OK. | |
constant int | STATE_MARGINAL = 12 |
Marginal. | |
constant int | STATE_FAIL = 13 |
Fail. | |
constant int | STATE_YES = 14 |
Yes. | |
constant int | STATE_NO = 15 |
No. | |
constant int | STATE_STANDBY = 16 |
Standby operation. | |
constant int | STATE_ONE = 17 |
First source active. | |
constant int | STATE_TWO = 18 |
Second source active. | |
constant int | STATE_IN_SYNC = 19 |
Phases are in sync. | |
constant int | STATE_OUT_OF_SYNC = 20 |
Phases are out of sync. | |
constant int | STATE_FAULT = 21 |
Fault. | |
constant int | STATE_SELF_TEST = 22 |
Sensor is currently testing itself. | |
constant int | STATE_I1_OPEN_FAULT = 23 |
Inlet 1 switch open fault. | |
constant int | STATE_I1_SHORT_FAULT = 24 |
Inlet 1 switch short fault. | |
constant int | STATE_I2_OPEN_FAULT = 25 |
Inlet 2 switch open fault. | |
constant int | STATE_I2_SHORT_FAULT = 26 |
Inlet 2 switch short fault. | |
constant int | STATE_WARNING = 27 |
Warning. | |
constant int | STATE_CRITICAL = 28 |
Critical. | |
constant int | STATE_NON_REDUNDANT = 29 |
Non-redundant operation. | |
Sensor logger interface.
This is a very specific interface to fullfill the the sensor logging requirements as specified by SNMP-MIB. That is reason why sensor logging is not specified along with a sensor but with this special service.
int sensors::Logger_2_1_5::disableSensors | ( | in SensorSet | sensors | ) |
Disable logging for one or more sensors or peripheral device slots.
Sensors in the list that are not logged are ignored. Logged sensors not in the list remain enabled.
sensors | Sensors and slots to be disabled |
int sensors::Logger_2_1_5::enableSensors | ( | in SensorSet | sensors | ) |
Enable logging for one or more sensors or peripheral device slots.
Sensors in the list that are already logged are ignored. Logged sensors not in the list remain enabled.
sensors | Sensors and slots to be logged |
SensorSet sensors::Logger_2_1_5::getLoggedSensors | ( | ) |
Retrieve the set of logged sensors.
int sensors::Logger_2_1_5::getLogRow | ( | out LogRow | row, |
in int | recid | ||
) |
Get one full log row.
row | Result: Log row |
recid | Record id |
int sensors::Logger_2_1_5::getPeripheralDeviceRecords | ( | out vector< Record > | recs, |
in peripheral::DeviceSlot_2_0_2 | slot, | ||
in int | recid, | ||
in int | count | ||
) |
Retrieve log records for an peripheral device slot.
recs | Result: Sensor log records |
slot | Peripheral device slot reference |
recid | First record id |
count | Number of records |
int sensors::Logger_2_1_5::getPeripheralDeviceTimedRecords | ( | out vector< TimedRecord > | recs, |
in peripheral::DeviceSlot_2_0_2 | slot, | ||
in int | recid, | ||
in int | count | ||
) |
Retrieve log records with timestamps for an peripheral device slot.
recs | Result: Sensor log records |
slot | Peripheral device slot reference |
recid | First record id |
count | Number of records |
int sensors::Logger_2_1_5::getSensorRecords | ( | out vector< Record > | recs, |
in sensors::Sensor_4_0_2 | sensor, | ||
in int | recid, | ||
in int | count | ||
) |
Retrieve log records for a given sensor.
recs | Result: Sensor log records |
sensor | Sensor reference |
recid | First record id |
count | Number of records |
time sensors::Logger_2_1_5::getSensorSetTimestamp | ( | ) |
Get the time of the last sensor set modification.
This can be used by clients which keep a cached copy of the sensor set to determine whether that copy is still up-to-date.
int sensors::Logger_2_1_5::getSensorTimedRecords | ( | out vector< TimedRecord > | recs, |
in sensors::Sensor_4_0_2 | sensor, | ||
in int | recid, | ||
in int | count | ||
) |
Retrieve log records with timestamps for a given sensor.
recs | Result: Sensor log records |
sensor | Sensor reference |
recid | First record id |
count | Number of records |
Settings sensors::Logger_2_1_5::getSettings | ( | ) |
Retrieve the sensor logger settings.
int sensors::Logger_2_1_5::getTimeStamps | ( | out vector< time > | timestamps, |
in int | recid, | ||
in int | count | ||
) |
Retrieve a set of log record timestamps.
timestamps | Result: Log record timestamps |
recid | First record id |
count | Number of records |
boolean sensors::Logger_2_1_5::isSensorEnabled | ( | in sensors::Sensor_4_0_2 | sensor | ) |
Check if logging is enabled for a given sensor.
sensor | Sensor to be checked |
true
if sensor is logged, false
otherwise boolean sensors::Logger_2_1_5::isSlotEnabled | ( | in peripheral::DeviceSlot_2_0_2 | slot | ) |
Check if logging is enabled for a given peripheral device slot.
sensor | Peripheral device slot to be checked |
true
if slot is logged, false
otherwise int sensors::Logger_2_1_5::setLoggedSensors | ( | in SensorSet | sensors | ) |
Change the set of logged sensors.
sensors | New set of sensors |
int sensors::Logger_2_1_5::setSettings | ( | in boolean | isEnabled, |
in int | samplesPerRecord | ||
) |
Change the sensor logger settings.
isEnabled | true to enable sensor logging |
samplesPerRecord | Number of samples per log record |
valueobject sensors::Logger_2_1_5::LoggedSensorsChangedEvent |
Event: Set of logged sensors has been changed.
Sensor set before change
valueobject sensors::Logger_2_1_5::SettingsChangedEvent |
Event: Sensor logger settings have been changed.
Settings before change
constant int sensors::Logger_2_1_5::STATE_UNAVAILABLE = 0 |
Sensor state in log record.
Unavailable