Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
sensorpush.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2012 Raritan Inc. All rights reserved.
4 */
5
6#include "NumericSensor.idl"
7#include "SensorLogger.idl"
8
9/** The datapush module contains the definition of the JSON-encoded datapush messages. The standard rules for enconding apply.
10
11 \ref datapush_example
12*/
13module datapush {
14 enumeration PowerLine {
15 L1, ///< Line 1
16 L2, ///< Line 2
17 L3, ///< Line 3
18 NEUTRAL, ///< Neutral
19 EARTH, ///< Earth
20 PLUS, ///< Positive (DC)
21 MINUS ///< Negative (DC)
22 };
23
24 /** Device type */
25 enumeration DeviceType {
26 INLET, ///< Inlet
27 INLET_POLE, ///< Inlet Pole
28 OCP, ///< Overcurrent Protector
29 OCP_POLE, ///< Overcurrent Protector Pole
30 OUTLET, ///< Outlet
31 OUTLET_POLE, ///< Outlet Pole
32 WIRE, ///< Wire
33 WIRE_POLE, ///< Wire Pole
34 TRANSFER_SWITCH, ///< Transfer Switch
35 TRANSFER_SWITCH_POLE, ///< Transfer Switch Pole
36 EXTERNAL_SENSOR, ///< External Sensor
37 POWER_METER, ///< Power Meter
38 POWER_METER_POLE, ///< Power Meter Pole
39 PANEL_CIRCUIT, ///< Circuit in a PMC Panel
40 PANEL_CIRCUIT_POLE, ///< Circuit Pole in a PMC Panel
41 PDU, ///< PDU global
42 OUTLET_GROUP, ///< Outlet group,
43 INLET_LINE_PAIR ///< Inlet Line Pair (line-line sensor)
44 };
45
46 /** Device information */
47 structure Device {
48 DeviceType type; ///< Device type
49 string label; ///< Device label
50 string name; ///< Device name (i.e. user-configurable names for Outlets, Inlets, ...)
51 PowerLine line; ///< Power line (pole sensors only)
52 };
53
54 /** Sensor information */
55 structure Sensor {
56 Device device; ///< Device information
57 string id; ///< Sensor identification
59 ///< Reading type (numeric or discrete)
61 ///< Metadata (if readingType is NUMERIC)
62 };
63
64 /** One full log row (one timestamp, mulitple sensors) */
65 structure LogRow {
66 time timestamp; ///< UNIX timestamp (UTC)
68 ///< Log records (one per sensor, same order
69 ///< as in the sensor list)
70 };
71
72 /** Message for pushing one full log record for all sensors */
74 int linkId; ///< Link ID of the Device (always 1 without a Linking Setup)
75 string serialNumber; ///< Device serial number
76 string name; ///< Device name (user-configurable)
77
78 vector<Sensor> sensors; ///< List of logged sensors
79 vector<LogRow> rows; ///< List of log rows
80 };
81}
Sensor logger interface.
A sensor with numeric readings.
The datapush module contains the definition of the JSON-encoded datapush messages.
DeviceType
Device type.
@ PANEL_CIRCUIT
Circuit in a PMC Panel.
@ EXTERNAL_SENSOR
External Sensor.
@ WIRE_POLE
Wire Pole.
@ INLET_LINE_PAIR
Inlet Line Pair (line-line sensor)
@ OCP_POLE
Overcurrent Protector Pole.
@ INLET_POLE
Inlet Pole.
@ POWER_METER_POLE
Power Meter Pole.
@ OUTLET_POLE
Outlet Pole.
@ INLET
Inlet.
@ OCP
Overcurrent Protector.
@ POWER_METER
Power Meter.
@ OUTLET_GROUP
Outlet group,.
@ PANEL_CIRCUIT_POLE
Circuit Pole in a PMC Panel.
@ OUTLET
Outlet.
@ PDU
PDU global.
@ TRANSFER_SWITCH_POLE
Transfer Switch Pole.
@ TRANSFER_SWITCH
Transfer Switch.
@ WIRE
Wire.
Device information.
string label
Device label.
DeviceType type
Device type.
string name
Device name (i.e. user-configurable names for Outlets, Inlets, ...)
PowerLine line
Power line (pole sensors only)
One full log row (one timestamp, mulitple sensors)
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.
int linkId
Link ID of the Device (always 1 without a Linking Setup)
vector< LogRow > rows
List of log rows.
vector< Sensor > sensors
List of logged sensors.
string serialNumber
Device serial number.
string name
Device name (user-configurable)
Sensor information.
Device device
Device information.
sensors::NumericSensor MetaData metadata
Metadata (if readingType is NUMERIC)
string id
Sensor identification.
int readingtype
Reading type (numeric or discrete)
Sensor log record.
Numeric sensor metadata.