Raritan PX2/PX3 JSON-RPC API
Controller.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright 2010 Raritan Inc. All rights reserved.
4  */
5 
6 #ifndef __PDUMODEL_CONTROLLER_IDL__
7 #define __PDUMODEL_CONTROLLER_IDL__
8 
9 #include <Event.idl>
10 
11 /**
12  * PDU Model
13  */
14 module pdumodel {
15 
16  /** Slave controller statistics */
17  structure CtrlStatistic {
18  int masterCSumErrCnt; ///< Master CRC error counter
19  int slaveCSumErrCnt; ///< Slave CRC error counter
20  int timeoutCnt; ///< Master timeout counter
21  int resetCnt; ///< Controller reset counter
22  int emResetCnt; ///< Energy meter reset counter
23  };
24 
25  /** Slave controller interface */
26  interface Controller_4_0_1 {
27  constant int ERR_NOT_SUPPORTED = 1; ///< Operation not supported
28 
29  /** Communication status */
30  enumeration Status {
31  OK, ///< Communication with controller is known to be working
32  COMMUNICATION_UNSTABLE, ///< Controller can be communicated with sporadically
33  COMMUNICATION_FAILURE, ///< Controller can't be communicated with
34  UNKNOWN, ///< Communication status is unknown, e.g. after startup
35  INCOMPATIBLE, ///< The characteristics of the controller don't meet the expectations
36  FIRMWARE_UPDATE ///< A controller firmware update is in progress
37  };
38 
39  /** Slave controller type */
40  enumeration Type {
41  OUTLET_CTRL, ///< %Outlet controller
42  INLET_CTRL, ///< %Inlet controller
43  METER_CTRL ///< %General metering controller
44  };
45 
46  /** Slave controller metadata */
47  structure MetaData {
48  Type type; ///< %Controller type
49  string address; ///< Slave address
50  int magic; ///< Magic code
51  boolean versionAvailable; ///< \c true if version information and serial number is available
52  int fwAppVersion; ///< Firmware application version; 0 if unavailable
53  int fwBootVersion; ///< Firmware bootloader version; 0 if unavailable
54  int hwVersion; ///< Hardware version; 0 if unavailable
55  string serial; ///< Serial number; empty if unavailable
56  boolean haveResetCnt; ///< \c true if controller reset counter is available
57  boolean haveEmResetCnt; ///< \c true if energy meter reset counter is available
58  };
59 
60  /** Event: Controller communication status has changed */
61  valueobject StatusChangedEvent extends idl.Event {
62  Status oldStatus; ///< Status before change
63  Status newStatus; ///< Status after change
64  };
65 
66  /** Event: Controller metadata has changed */
67  valueobject MetaDataChangedEvent extends idl.Event {
68  MetaData oldMetaData; ///< Metadata before change
69  MetaData newMetaData; ///< Metadata after change
70  };
71 
72  /**
73  * Retrieve the current status of communication with controller
74  *
75  * @return communication status
76  */
77  Status getCommunicationStatus();
78 
79  /**
80  * Retrieve statistics
81  *
82  * @return statistics of %Controller
83  */
84  CtrlStatistic getStatistics();
85 
86  /**
87  * Retrieve the slave controller metadata.
88  *
89  * @return %Controller metadata
90  */
91  MetaData getMetaData();
92 
93  /**
94  * Reset this slave controller.
95  *
96  * Note: Depending on the hardware setup of the specific device, calling
97  * this method may also cause other slave controllers to be reset.
98 
99  * @return 0 on success
100  * ERR_NOT_SUPPORTED if the hardware setup doesn't allow resetting the controller
101  */
102  int reset();
103  };
104 
105 }
106 
107 #endif
int slaveCSumErrCnt
Slave CRC error counter.
Definition: Controller.idl:19
int fwAppVersion
Firmware application version; 0 if unavailable.
Definition: Controller.idl:52
int hwVersion
Hardware version; 0 if unavailable.
Definition: Controller.idl:54
Slave controller metadata.
Definition: Controller.idl:47
Outlet controller
Definition: Controller.idl:41
The characteristics of the controller don&#39;t meet the expectations.
Definition: Controller.idl:35
boolean haveResetCnt
true if controller reset counter is available
Definition: Controller.idl:56
Status newStatus
Status after change.
Definition: Controller.idl:63
string address
Slave address.
Definition: Controller.idl:49
int fwBootVersion
Firmware bootloader version; 0 if unavailable.
Definition: Controller.idl:53
Communication status is unknown, e.g. after startup.
Definition: Controller.idl:34
int magic
Magic code.
Definition: Controller.idl:50
Basic IDL definitions.
Definition: Event.idl:10
Type type
Controller type
Definition: Controller.idl:48
int masterCSumErrCnt
Master CRC error counter.
Definition: Controller.idl:18
Type
Slave controller type.
Definition: Controller.idl:40
Slave controller interface.
Definition: Controller.idl:26
PDU Model.
Definition: Ade.idl:12
boolean versionAvailable
true if version information and serial number is available
Definition: Controller.idl:51
Status
Communication status.
Definition: Controller.idl:30
Controller can&#39;t be communicated with.
Definition: Controller.idl:33
boolean haveEmResetCnt
true if energy meter reset counter is available
Definition: Controller.idl:57
Inlet controller
Definition: Controller.idl:42
int resetCnt
Controller reset counter.
Definition: Controller.idl:21
int emResetCnt
Energy meter reset counter.
Definition: Controller.idl:22
int timeoutCnt
Master timeout counter.
Definition: Controller.idl:20
Slave controller statistics.
Definition: Controller.idl:17
Controller can be communicated with sporadically.
Definition: Controller.idl:32
Communication with controller is known to be working.
Definition: Controller.idl:31
string serial
Serial number; empty if unavailable.
Definition: Controller.idl:55
MetaData newMetaData
Metadata after change.
Definition: Controller.idl:69