Raritan PX2/PX3 JSON-RPC API
|
7 #include <UserEvent.idl>
103 valueobject ServerPowerStateEvent extends
idl.Event {
113 valueobject ServerPowerControlInitiatedEvent extends
event.UserEvent {
122 valueobject ServerPowerControlCompletedEvent extends
idl.Event {
132 valueobject ServerReachabilityEvent extends
idl.Event {
141 valueobject ServerAddedEvent extends
event.UserEvent {
149 valueobject ServerSettingsChangedEvent extends
event.UserEvent {
158 valueobject ServerDeletedEvent extends
event.UserEvent {
170 constant
int ERR_NO_SUCH_ID = 1;
171 constant
int ERR_INVALID_SETTINGS = 2;
172 constant
int ERR_DUPLICATE_HOSTNAME = 3;
173 constant
int ERR_MAX_SERVERS_REACHED = 4;
int failures
Number of consecutive failed pings.
Definition: ServerMonitor.idl:96
int sshPort
SSH port of the server.
Definition: ServerMonitor.idl:66
int addServer(out int id, in ServerSettings settings)
Add a new server entry.
map< int, Server > listServers()
Retrieve a list of server entries (settings and status).
int timeout
Seconds the power check takes before it ends / times out.
Definition: ServerMonitor.idl:62
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:105
ServerReachability reachable
Current Reachability state.
Definition: ServerMonitor.idl:135
@ OFF
Server power target is off.
Definition: ServerMonitor.idl:31
Object target
Target for power control, Outlet or OutletGroup.
Definition: ServerMonitor.idl:59
ServerSettings oldSettings
Settings before change.
Definition: ServerMonitor.idl:151
ServerPowerState powerState
Power control state.
Definition: ServerMonitor.idl:89
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:74
ServerSettings settings
Settings of the added server.
Definition: ServerMonitor.idl:143
ServerPowerControlResult result
Result of the power control operation.
Definition: ServerMonitor.idl:125
time lastRequest
UNIX timestamp (UTC) of last request sent.
Definition: ServerMonitor.idl:92
int modifyServer(in int id, in ServerSettings settings)
Modify an existing server entry.
@ TIMER
Server is assumed to be off after a time interval.
Definition: ServerMonitor.idl:50
@ SWITCHING_ON_FAILED
Switching the outlet or outlet group on failed.
Definition: ServerMonitor.idl:42
int resumeDelay
Wait time before resuming pinging.
Definition: ServerMonitor.idl:80
@ UNKNOWN
Power state currently not known.
Definition: ServerMonitor.idl:29
Server Monitor Interface.
Definition: ServerMonitor.idl:13
Server Reachability Settings.
Definition: ServerMonitor.idl:73
ServerSettings newSettings
Settings after change.
Definition: ServerMonitor.idl:152
Settings for controlling and checking power state of the server.
Definition: ServerMonitor.idl:57
boolean enabled
Power control for this server enabled.
Definition: ServerMonitor.idl:58
@ UNREACHABLE
No response from server.
Definition: ServerMonitor.idl:21
@ SHUTDOWN_CMD_FAILED
Error issuing the shutdown command to the server.
Definition: ServerMonitor.idl:40
ServerPowerCheckMethod powerCheck
Method to check server's power state.
Definition: ServerMonitor.idl:60
ServerPowerSettings powerSettings
Settings for controlling the power state of the server.
Definition: ServerMonitor.idl:82
ServerPowerCheckMethod
Methods of checking power state.
Definition: ServerMonitor.idl:49
@ REACHABLE
Server is up and running.
Definition: ServerMonitor.idl:20
int retryInterval
Wait time after unsuccessful ping.
Definition: ServerMonitor.idl:77
ServerPowerControlResult
Server Power Control Result.
Definition: ServerMonitor.idl:38
int resumes
Number of resumes.
Definition: ServerMonitor.idl:97
Basic IDL definitions.
Definition: Event.idl:10
string username
Login used to issue shutdown command to the server.
Definition: ServerMonitor.idl:64
time lastResponse
UNIX timestamp (UTC) of last response received.
Definition: ServerMonitor.idl:93
int pingInterval
Wait time after successful ping.
Definition: ServerMonitor.idl:76
int requests
Number of requests sent.
Definition: ServerMonitor.idl:94
Server Entry.
Definition: ServerMonitor.idl:165
int responses
Number of responses received.
Definition: ServerMonitor.idl:95
Server Reachability Status.
Definition: ServerMonitor.idl:88
Server Monitor.
Definition: ServerMonitor.idl:10
@ WAITING
Waiting for reliable connection.
Definition: ServerMonitor.idl:19
ServerStatus status
Server status.
Definition: ServerMonitor.idl:167
ServerReachability
Server Reachability State.
Definition: ServerMonitor.idl:18
ServerPowerState oldPowerState
Old power state.
Definition: ServerMonitor.idl:106
@ ON
Server power target is on.
Definition: ServerMonitor.idl:30
boolean enabled
Pinging enabled.
Definition: ServerMonitor.idl:75
int getServer(out Server server, in int id)
Retrieve a server entry (settings and status).
int deleteServer(in int id)
Delete a server entry.
int activationCount
Minimum number of successful pings to enable feature.
Definition: ServerMonitor.idl:78
ServerReachability reachable
Reachability state.
Definition: ServerMonitor.idl:91
@ NO_ERROR
No error, operation may still be in progress.
Definition: ServerMonitor.idl:39
string shutdownCmd
Shutdown command to send to the server.
Definition: ServerMonitor.idl:63
double powerThreshold
Active power below this threshold means server is off (in Watt)
Definition: ServerMonitor.idl:61
string password
Password for the login, write-only, not set if empty.
Definition: ServerMonitor.idl:65
int resumeCount
Number of resumes before going back to WAITING state.
Definition: ServerMonitor.idl:81
ServerPowerControlResult lastPowerControlResult
Last result of a power control operation.
Definition: ServerMonitor.idl:90
ServerPowerState newPowerState
New power state.
Definition: ServerMonitor.idl:107
ServerSettings settings
Server settings.
Definition: ServerMonitor.idl:166
ServerPowerState
Server Power Control State.
Definition: ServerMonitor.idl:28
@ SWITCHING_OFF_FAILED
Switching the outlet or outlet group off failed.
Definition: ServerMonitor.idl:41
int powerControl(in int id, in boolean on)
Control the power state of the outlets the server uses.
boolean on
True if server shall be switched on, false otherwise.
Definition: ServerMonitor.idl:116
int failureCount
Number of unsuccessful pings to consider server down.
Definition: ServerMonitor.idl:79