7 #include <UserEvent.idl>
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;
Server Monitor Interface.
Definition: ServerMonitor.idl:13
ServerPowerState
Server Power Control State.
Definition: ServerMonitor.idl:28
@ OFF
Server power target is off.
Definition: ServerMonitor.idl:31
@ UNKNOWN
Power state currently not known.
Definition: ServerMonitor.idl:29
@ ON
Server power target is on.
Definition: ServerMonitor.idl:30
ServerReachability
Server Reachability State.
Definition: ServerMonitor.idl:18
@ REACHABLE
Server is up and running.
Definition: ServerMonitor.idl:20
@ WAITING
Waiting for reliable connection.
Definition: ServerMonitor.idl:19
@ UNREACHABLE
No response from server.
Definition: ServerMonitor.idl:21
int deleteServer(in int id)
Delete a server entry.
int modifyServer(in int id, in ServerSettings settings)
Modify an existing server entry.
ServerPowerControlResult
Server Power Control Result.
Definition: ServerMonitor.idl:38
@ SWITCHING_ON_FAILED
Switching the outlet or outlet group on failed.
Definition: ServerMonitor.idl:42
@ SWITCHING_OFF_FAILED
Switching the outlet or outlet group off failed.
Definition: ServerMonitor.idl:41
@ SHUTDOWN_CMD_FAILED
Error issuing the shutdown command to the server.
Definition: ServerMonitor.idl:40
@ NO_ERROR
No error, operation may still be in progress.
Definition: ServerMonitor.idl:39
ServerPowerCheckMethod
Methods of checking power state.
Definition: ServerMonitor.idl:49
@ TIMER
Server is assumed to be off after a time interval.
Definition: ServerMonitor.idl:50
int powerControl(in int id, in boolean on)
Control the power state of the outlets the server uses.
int getServer(out Server server, in int id)
Retrieve a server entry (settings and status).
map< int, Server > listServers()
Retrieve a list of server entries (settings and status).
int addServer(out int id, in ServerSettings settings)
Add a new server entry.
Basic IDL definitions.
Definition: Event.idl:10
Server Monitor.
Definition: ServerMonitor.idl:10
Common base for all events.
Definition: Event.idl:13
A new server entry was added.
Definition: ServerMonitor.idl:141
ServerSettings settings
Settings of the added server.
Definition: ServerMonitor.idl:143
int id
id of the added server entry
Definition: ServerMonitor.idl:142
A server entry was deleted.
Definition: ServerMonitor.idl:158
int id
id of the deleted server entry
Definition: ServerMonitor.idl:159
Event: A power control operation was completed.
Definition: ServerMonitor.idl:122
ServerPowerControlResult result
Result of the power control operation.
Definition: ServerMonitor.idl:125
int id
id of the server
Definition: ServerMonitor.idl:123
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:124
Event: A power control operation was initiated.
Definition: ServerMonitor.idl:113
int id
id of the server
Definition: ServerMonitor.idl:114
boolean on
True if server shall be switched on, false otherwise.
Definition: ServerMonitor.idl:116
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:115
Settings for controlling and checking power state of the server.
Definition: ServerMonitor.idl:57
ServerPowerCheckMethod powerCheck
Method to check server's power state.
Definition: ServerMonitor.idl:60
string username
Login used to issue shutdown command to the server.
Definition: ServerMonitor.idl:64
int sshPort
SSH port of the server.
Definition: ServerMonitor.idl:66
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
Object target
Target for power control, Outlet or OutletGroup.
Definition: ServerMonitor.idl:59
int timeout
Seconds the power check takes before it ends / times out.
Definition: ServerMonitor.idl:62
boolean enabled
Power control for this server enabled.
Definition: ServerMonitor.idl:58
string shutdownCmd
Shutdown command to send to the server.
Definition: ServerMonitor.idl:63
Event: ServerPowerState has changed.
Definition: ServerMonitor.idl:103
int id
id of the server entry
Definition: ServerMonitor.idl:104
ServerPowerState oldPowerState
Old power state.
Definition: ServerMonitor.idl:106
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:105
ServerPowerState newPowerState
New power state.
Definition: ServerMonitor.idl:107
Event: Reachability status for a monitored server has changed or server continues to be unreachable.
Definition: ServerMonitor.idl:132
ServerReachability reachable
Current Reachability state.
Definition: ServerMonitor.idl:135
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:134
int id
id of the server entry
Definition: ServerMonitor.idl:133
A server entry was changed.
Definition: ServerMonitor.idl:149
ServerSettings newSettings
Settings after change.
Definition: ServerMonitor.idl:152
ServerSettings oldSettings
Settings before change.
Definition: ServerMonitor.idl:151
int id
id of the server entry
Definition: ServerMonitor.idl:150
Server Reachability Settings.
Definition: ServerMonitor.idl:73
boolean enabled
Pinging enabled.
Definition: ServerMonitor.idl:75
int pingInterval
Wait time after successful ping.
Definition: ServerMonitor.idl:76
int activationCount
Minimum number of successful pings to enable feature.
Definition: ServerMonitor.idl:78
ServerPowerSettings powerSettings
Settings for controlling the power state of the server.
Definition: ServerMonitor.idl:82
int retryInterval
Wait time after unsuccessful ping.
Definition: ServerMonitor.idl:77
int resumeDelay
Wait time before resuming pinging.
Definition: ServerMonitor.idl:80
int resumeCount
Number of resumes before going back to WAITING state.
Definition: ServerMonitor.idl:81
int failureCount
Number of unsuccessful pings to consider server down.
Definition: ServerMonitor.idl:79
string host
Server hostname/IP address.
Definition: ServerMonitor.idl:74
Server Reachability Status.
Definition: ServerMonitor.idl:88
time lastResponse
UNIX timestamp (UTC) of last response received.
Definition: ServerMonitor.idl:93
int failures
Number of consecutive failed pings.
Definition: ServerMonitor.idl:96
ServerPowerState powerState
Power control state.
Definition: ServerMonitor.idl:89
int resumes
Number of resumes.
Definition: ServerMonitor.idl:97
ServerReachability reachable
Reachability state.
Definition: ServerMonitor.idl:91
int responses
Number of responses received.
Definition: ServerMonitor.idl:95
ServerPowerControlResult lastPowerControlResult
Last result of a power control operation.
Definition: ServerMonitor.idl:90
int requests
Number of requests sent.
Definition: ServerMonitor.idl:94
time lastRequest
UNIX timestamp (UTC) of last request sent.
Definition: ServerMonitor.idl:92
Server Entry.
Definition: ServerMonitor.idl:165
ServerSettings settings
Server settings.
Definition: ServerMonitor.idl:166
ServerStatus status
Server status.
Definition: ServerMonitor.idl:167