Loading...
Searching...
No Matches
sensorpush.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2012 Raritan Inc. All rights reserved.
*/
#include "NumericSensor.idl"
#include "SensorLogger.idl"
/** The datapush module contains the definition of the JSON-encoded datapush messages. The standard rules for enconding apply.
\ref datapush_example.md
*/
module datapush {
enumeration PowerLine {
L1, ///< Line 1
L2, ///< Line 2
L3, ///< Line 3
NEUTRAL, ///< Neutral
EARTH, ///< Earth
PLUS, ///< Positive (DC)
MINUS ///< Negative (DC)
};
/** Device type */
enumeration DeviceType {
INLET, ///< Inlet
INLET_POLE, ///< Inlet Pole
OCP, ///< Overcurrent Protector
OCP_POLE, ///< Overcurrent Protector Pole
OUTLET, ///< Outlet
OUTLET_POLE, ///< Outlet Pole
WIRE, ///< Wire
WIRE_POLE, ///< Wire Pole
TRANSFER_SWITCH, ///< Transfer Switch
TRANSFER_SWITCH_POLE, ///< Transfer Switch Pole
EXTERNAL_SENSOR, ///< External Sensor
POWER_METER, ///< Power Meter
POWER_METER_POLE, ///< Power Meter Pole
PANEL_CIRCUIT, ///< Circuit in a PMC Panel
PANEL_CIRCUIT_POLE, ///< Circuit Pole in a PMC Panel
PDU, ///< PDU global
OUTLET_GROUP, ///< Outlet group,
INLET_LINE_PAIR ///< Inlet Line Pair (line-line sensor)
};
/** Device information */
structure Device {
DeviceType type; ///< Device type
string label; ///< Device label
string name; ///< Device name (i.e. user-configurable names for Outlets, Inlets, ...)
PowerLine line; ///< Power line (pole sensors only)
};
/** Sensor information */
structure Sensor {
Device device; ///< Device information
string id; ///< Sensor identification
int readingtype;
///< Reading type (numeric or discrete)
sensors.NumericSensor.MetaData metadata;
///< Metadata (if readingType is NUMERIC)
};
/** One full log row (one timestamp, mulitple sensors) */
structure LogRow {
time timestamp; ///< UNIX timestamp (UTC)
vector<sensors.Logger.Record> records;
///< Log records (one per sensor, same order
///< as in the sensor list)
};
/** Message for pushing one full log record for all sensors */
structure SensorLogPushMessage {
int linkId; ///< Link ID of the Device (always 1 without a Linking Setup)
string serialNumber; ///< Device serial number
string name; ///< Device name (user-configurable)
vector<Sensor> sensors; ///< List of logged sensors
vector<LogRow> rows; ///< List of log rows
};
}
sensors::Logger
Sensor logger interface.
Definition SensorLogger.idl:31
sensors::NumericSensor
A sensor with numeric readings.
Definition NumericSensor.idl:17
datapush
The datapush module contains the definition of the JSON-encoded datapush messages.
Definition assetmgrpush.idl:10
datapush::PowerLine
PowerLine
Definition sensorpush.idl:14
datapush::DeviceType
DeviceType
Device type.
Definition sensorpush.idl:25
datapush::PANEL_CIRCUIT
@ PANEL_CIRCUIT
Circuit in a PMC Panel.
Definition sensorpush.idl:39
datapush::EXTERNAL_SENSOR
@ EXTERNAL_SENSOR
External Sensor.
Definition sensorpush.idl:36
datapush::WIRE_POLE
@ WIRE_POLE
Wire Pole.
Definition sensorpush.idl:33
datapush::INLET_LINE_PAIR
@ INLET_LINE_PAIR
Inlet Line Pair (line-line sensor)
Definition sensorpush.idl:43
datapush::OCP_POLE
@ OCP_POLE
Overcurrent Protector Pole.
Definition sensorpush.idl:29
datapush::INLET_POLE
@ INLET_POLE
Inlet Pole.
Definition sensorpush.idl:27
datapush::POWER_METER_POLE
@ POWER_METER_POLE
Power Meter Pole.
Definition sensorpush.idl:38
datapush::OUTLET_POLE
@ OUTLET_POLE
Outlet Pole.
Definition sensorpush.idl:31
datapush::INLET
@ INLET
Inlet.
Definition sensorpush.idl:26
datapush::OCP
@ OCP
Overcurrent Protector.
Definition sensorpush.idl:28
datapush::POWER_METER
@ POWER_METER
Power Meter.
Definition sensorpush.idl:37
datapush::OUTLET_GROUP
@ OUTLET_GROUP
Outlet group,.
Definition sensorpush.idl:42
datapush::PANEL_CIRCUIT_POLE
@ PANEL_CIRCUIT_POLE
Circuit Pole in a PMC Panel.
Definition sensorpush.idl:40
datapush::OUTLET
@ OUTLET
Outlet.
Definition sensorpush.idl:30
datapush::PDU
@ PDU
PDU global.
Definition sensorpush.idl:41
datapush::TRANSFER_SWITCH_POLE
@ TRANSFER_SWITCH_POLE
Transfer Switch Pole.
Definition sensorpush.idl:35
datapush::TRANSFER_SWITCH
@ TRANSFER_SWITCH
Transfer Switch.
Definition sensorpush.idl:34
datapush::WIRE
@ WIRE
Wire.
Definition sensorpush.idl:32
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
datapush::Device
Device information.
Definition sensorpush.idl:47
datapush::Device::label
string label
Device label.
Definition sensorpush.idl:49
datapush::Device::type
DeviceType type
Device type.
Definition sensorpush.idl:48
datapush::Device::name
string name
Device name (i.e. user-configurable names for Outlets, Inlets, ...)
Definition sensorpush.idl:50
datapush::Device::line
PowerLine line
Power line (pole sensors only)
Definition sensorpush.idl:51
datapush::LogRow
One full log row (one timestamp, mulitple sensors)
Definition sensorpush.idl:65
datapush::LogRow::timestamp
time timestamp
UNIX timestamp (UTC)
Definition sensorpush.idl:66
datapush::LogRow::records
vector< sensors::Logger.Record > records
Log records (one per sensor, same order as in the sensor list)
Definition sensorpush.idl:67
datapush::SensorLogPushMessage
Message for pushing one full log record for all sensors.
Definition sensorpush.idl:73
datapush::SensorLogPushMessage::linkId
int linkId
Link ID of the Device (always 1 without a Linking Setup)
Definition sensorpush.idl:74
datapush::SensorLogPushMessage::rows
vector< LogRow > rows
List of log rows.
Definition sensorpush.idl:79
datapush::SensorLogPushMessage::sensors
vector< Sensor > sensors
List of logged sensors.
Definition sensorpush.idl:78
datapush::SensorLogPushMessage::serialNumber
string serialNumber
Device serial number.
Definition sensorpush.idl:75
datapush::SensorLogPushMessage::name
string name
Device name (user-configurable)
Definition sensorpush.idl:76
datapush::Sensor
Sensor information.
Definition sensorpush.idl:55
datapush::Sensor::device
Device device
Device information.
Definition sensorpush.idl:56
datapush::Sensor::metadata
sensors::NumericSensor MetaData metadata
Metadata (if readingType is NUMERIC)
Definition sensorpush.idl:60
datapush::Sensor::id
string id
Sensor identification.
Definition sensorpush.idl:57
datapush::Sensor::readingtype
int readingtype
Reading type (numeric or discrete)
Definition sensorpush.idl:58
sensors::Logger::Record
Sensor log record.
Definition SensorLogger.idl:153
sensors::NumericSensor::MetaData
Numeric sensor metadata.
Definition NumericSensor.idl:40