Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
TransferSwitch.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2012 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_TRANSFERSWITCH_IDL__
7#define __PDUMODEL_TRANSFERSWITCH_IDL__
8
9#include <EDevice.idl>
10#include <Nameplate.idl>
11#include <Pole.idl>
12#include <StateSensor.idl>
13#include <TransferSwitchBypassStateSensor.idl>
14#include <Waveform.idl>
15
16/**
17 * PDU Model
18 */
19module pdumodel {
20
21 /** Transfer switch interface */
22 interface TransferSwitch extends EDevice {
23
24 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
25 constant int ERR_SWITCH_PREVENTED = 2; ///< Switching failed due to an alarm that may be overridden
26 constant int ERR_SWITCH_FAILED = 3; ///< Switching failed, no override possible
27
28 /** Transfer switch type */
29 enumeration Type {
30 STS, ///< Static transfer switch (using SCRs as switch technology)
31 ATS, ///< Asynchronous transfer switch (using relays)
32 HTS ///< Hybrid transfer switch (relays plus SCRs)
33 };
34
35 [unknown_fallback("REASON_UNKNOWN")]
36 enumeration TransferReason {
37 REASON_UNKNOWN, ///< Transfer reason unknown
38 REASON_STARTUP, ///< Startup or return to normal conditions
39 REASON_MANUAL_TRANSFER, ///< Manual transfer
40 REASON_AUTO_RETRANSFER, ///< Automatic retransfer
41 REASON_POWER_FAILURE, ///< Previous inlet power failed
42 REASON_POWER_QUALITY, ///< New inlet provided better power quality
43 REASON_OVERLOAD, ///< Switched off due to overload alarm
44 REASON_OVERHEAT, ///< Switched off due to overheat alarm
45 REASON_INTERNAL_FAILURE, ///< Transferred because of hardware failure (e.g. switch fault)
46 REASON_BYPASS_ACTIVE ///< Switched off due to active bypass
47 };
48
49 /** Transfer switch metadata */
50 structure MetaData {
51 string label; ///< Transfer switch label
52 Nameplate namePlate; ///< %Nameplate information
53 Rating rating; ///< Numerical usage ratings
54 Type type; ///< Transfer switch type
55 int sourceCount; ///< Number of sources
56 };
57
58 /* Values for operational state sensor */
59 constant int OPERATIONAL_STATE_OFF = 0; ///< Both inlets are off
60 constant int OPERATIONAL_STATE_NORMAL = 1; ///< Active inlet equals preferred inlet
61 constant int OPERATIONAL_STATE_STANDBY = 2; ///< Active inlet and preferred inlet are different
62 constant int OPERATIONAL_STATE_NON_REDUNDANT = 3; ///< Active inlet equals preferred inlet, standby power critical
63 constant int OPERATIONAL_STATE_BYPASSED = 4; ///< Both inlets are off, but bypass is active
64
65 /* Bitmask values for switch fault sensors */
66 constant int SWITCH_FAULT_I1_SHORT = 1; ///< Inlet 1 switch is permanently closed
67 constant int SWITCH_FAULT_I1_OPEN = 2; ///< Inlet 1 switch is permanently open
68 constant int SWITCH_FAULT_I2_SHORT = 4; ///< Inlet 2 switch is permanently closed
69 constant int SWITCH_FAULT_I2_OPEN = 8; ///< Inlet 2 switch is permanently open
70
71 /** Transfer switch sensors */
72 structure Sensors {
73 sensors.StateSensor selectedSource; ///< Selected source sensor
74 sensors.StateSensor operationalState; ///< Operational state sensor (off, normal, standby)
76 ///< Maximum phase difference between two sources
77 sensors.StateSensor overloadAlarm; ///< Overload alarm
78 sensors.StateSensor phaseSyncAlarm; ///< Source phases out of sync
79 sensors.StateSensor switchFault; ///< Switch fault (ok, open, short)
80 sensors.StateSensor installFaultAlarm; ///< Install fault alarm
81 sensors.StateSensor outputStatus; ///< Output voltage status (ok, fault)
83 };
84
85 /** Transfer switch settings */
86 [sparse_in]
87 structure Settings {
88 string name; ///< User-defined name
89
90 int preferredSource; ///< Preferred inlet
91 boolean autoRetransfer; ///< Enable automatic retransfer if power on active inlet is restored
92 boolean noAutoRetransferIfPhaseFault; ///< Don't automatically retransfer if inlet phases are out of sync
93 int autoRetransferWaitTime; ///< Time (in s) to delay retransfer after power restoration
94 boolean manualTransferEnabled; ///< Enable state of 'manual transfer' front panel button
95 boolean phaseSyncSensorEnabled; ///< False to force the 'phaseSyncAlarm' sensor to unavailable
96 };
97
98 /** Transfer switch statistics */
99 structure Statistics {
100 int transferCount; ///< Number of transfers since device startup
101 int powerFailDetectTime; ///< Detection time in us for the last inlet power failure
102 int relayOpenTime; ///< Time in us until all relays have opened during the last transfer
103 int totalTransferTime; ///< Total time in us for last transfer
104 };
105
106 /** Event: Transfer switch settings have been changed */
107 valueobject SettingsChangedEvent extends event.UserEvent {
108 Settings oldSettings; ///< Settings before change
109 Settings newSettings; ///< Settings after change
110 };
111
112 /**
113 * Retrieve the transfer switch metadata.
114 *
115 * @return Transfer switch metadata
116 */
118
119 /**
120 * Get the transfer switch sensors.
121 *
122 * @return Transfer switch sensors
123 */
125
126 /**
127 * Get the list of transfer switch poles.
128 *
129 * @return List of poles
130 */
131 vector<ThrowPole> getPoles();
132
133 /**
134 * Retrieve the transfer switch settings.
135 *
136 * @return Transfer switch settings
137 */
139
140 /**
141 * Change the transfer switch settings.
142 *
143 * @return 0 if OK
144 * @return 1 if any parameters are invalid
145 *
146 * @note The Settings structure can be "sparse"; fields missing in the
147 * JSON representation will remain unchanged.
148 */
149 int setSettings(in Settings settings);
150
151 /**
152 * Retrieve the transfer switch statistics.
153 *
154 * @return Transfer switch statistics
155 */
157
158 /**
159 * Select the active inlet. If the new inlet is available,
160 * it will become both active and preferred.
161 *
162 * @param source New active inlet index
163 * @param faultOverride Force switch even if the phase sync angle
164 * between the inputs is too large
165 *
166 * @return 0 if OK
167 * @return ERR_INVALID_PARAM if the selected source is invalid
168 * @return ERR_SWITCH_PREVENTED if switching failed due to an alarm that may be overridden
169 * @return ERR_SWITCH_FAILED if switching failed and no override is possible
170 */
171 int transferToSource(in int source, in boolean faultOverride);
172
173 /**
174 * Get the reason for the last transfer.
175 *
176 * @return Last transfer reason
177 */
179
180 /**
181 * Get the voltage and current waveforms during the last transfer.
182 *
183 * @return Waveform samples
184 */
186
187 /** Transfer log entry */
189 time timestamp; ///< Time of the transfer (UNIX timestamp, UTC)
190 int oldInlet; ///< Active inlet before transfer (0 for none)
191 int newInlet; ///< Active inlet after transfer (0 for none)
192 TransferReason reason; ///< Transfer reason
193 Waveform waveform; ///< Voltage and current waveforms
194 Statistics statistics; ///< Transfer statistics
195 int switchFault; ///< Switch fault status
196 };
197
198 /**
199 * Retrieve the transfer log.
200 *
201 * @return Transfer log
202 */
203 vector<TransferLogEntry> getTransferLog();
204
205 /**
206 * Transfer switch parameter map.
207 *
208 * The set of parameters, their meaning and allowed set of values are
209 * technology-dependent and subject to change. Do not modify any values
210 * without instruction from Raritan!
211 */
212 typedef map<string, int> Parameters;
213
214 /**
215 * Retrieve the transfer switch parameters.
216 *
217 * @return Parameters map
218 */
220
221 /**
222 * Update one or more transfer switch parameters.
223 *
224 * @param parameters Map of transfer switch parameters. Parameters
225 * which are not in the map remain unchanged.
226 *
227 * @return 0 if OK
228 * @return ERR_INVALID_PARAM if any parameter is invalid
229 */
230 int setParameters(in Parameters parameters);
231
232 };
233
234}
235
236#endif
Common base interface for any kind of electrical device that is used in the PDU model,...
Definition EDevice.idl:27
Overcurrent protector trip sensor interface.
Transfer switch interface.
Type
Transfer switch type.
@ ATS
Asynchronous transfer switch (using relays)
@ STS
Static transfer switch (using SCRs as switch technology)
TransferReason getLastTransferReason()
Get the reason for the last transfer.
Settings getSettings()
Retrieve the transfer switch settings.
Statistics getStatistics()
Retrieve the transfer switch statistics.
int setParameters(in Parameters parameters)
Update one or more transfer switch parameters.
Parameters getParameters()
Retrieve the transfer switch parameters.
Sensors getSensors()
Get the transfer switch sensors.
int transferToSource(in int source, in boolean faultOverride)
Select the active inlet.
Waveform getLastTransferWaveform()
Get the voltage and current waveforms during the last transfer.
MetaData getMetaData()
Retrieve the transfer switch metadata.
map< string, int > Parameters
Transfer switch parameter map.
vector< ThrowPole > getPoles()
Get the list of transfer switch poles.
@ REASON_STARTUP
Startup or return to normal conditions.
@ REASON_POWER_QUALITY
New inlet provided better power quality.
@ REASON_INTERNAL_FAILURE
Transferred because of hardware failure (e.g. switch fault)
@ REASON_UNKNOWN
Transfer reason unknown.
@ REASON_OVERLOAD
Switched off due to overload alarm.
@ REASON_MANUAL_TRANSFER
Manual transfer.
@ REASON_POWER_FAILURE
Previous inlet power failed.
@ REASON_OVERHEAT
Switched off due to overheat alarm.
@ REASON_AUTO_RETRANSFER
Automatic retransfer.
int setSettings(in Settings settings)
Change the transfer switch settings.
vector< TransferLogEntry > getTransferLog()
Retrieve the transfer log.
A sensor with numeric readings.
Sensor with discrete readings.
PDU Model.
Definition Circuit.idl:16
Component nameplate information.
Definition Nameplate.idl:23
Numerical usage ratings.
Definition Nameplate.idl:15
Nameplate namePlate
Nameplate information
Type type
Transfer switch type.
Rating rating
Numerical usage ratings.
string label
Transfer switch label.
sensors::StateSensor outputStatus
Output voltage status (ok, fault)
sensors::StateSensor installFaultAlarm
Install fault alarm.
sensors::StateSensor operationalState
Operational state sensor (off, normal, standby)
sensors::StateSensor switchFault
Switch fault (ok, open, short)
sensors::StateSensor overloadAlarm
Overload alarm.
sensors::StateSensor phaseSyncAlarm
Source phases out of sync.
sensors::NumericSensor sourceVoltagePhaseSyncAngle
Maximum phase difference between two sources.
sensors::StateSensor selectedSource
Selected source sensor.
Event: Transfer switch settings have been changed.
Settings oldSettings
Settings before change.
boolean autoRetransfer
Enable automatic retransfer if power on active inlet is restored.
boolean phaseSyncSensorEnabled
False to force the 'phaseSyncAlarm' sensor to unavailable.
int autoRetransferWaitTime
Time (in s) to delay retransfer after power restoration.
boolean manualTransferEnabled
Enable state of 'manual transfer' front panel button.
boolean noAutoRetransferIfPhaseFault
Don't automatically retransfer if inlet phases are out of sync.
Transfer switch statistics.
int totalTransferTime
Total time in us for last transfer.
int transferCount
Number of transfers since device startup.
int powerFailDetectTime
Detection time in us for the last inlet power failure.
int relayOpenTime
Time in us until all relays have opened during the last transfer.
Waveform waveform
Voltage and current waveforms.
int oldInlet
Active inlet before transfer (0 for none)
int newInlet
Active inlet after transfer (0 for none)
TransferReason reason
Transfer reason.
time timestamp
Time of the transfer (UNIX timestamp, UTC)
Statistics statistics
Transfer statistics.
Waveform data, including metadata.
Definition Waveform.idl:12