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.
ServerPowerState
Server Power Control State.
@ OFF
Server power target is off.
@ UNKNOWN
Power state currently not known.
@ ON
Server power target is on.
ServerReachability
Server Reachability State.
@ REACHABLE
Server is up and running.
@ WAITING
Waiting for reliable connection.
@ UNREACHABLE
No response from server.
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.
@ SWITCHING_ON_FAILED
Switching the outlet or outlet group on failed.
@ SWITCHING_OFF_FAILED
Switching the outlet or outlet group off failed.
@ SHUTDOWN_CMD_FAILED
Error issuing the shutdown command to the server.
@ NO_ERROR
No error, operation may still be in progress.
ServerPowerCheckMethod
Methods of checking power state.
@ TIMER
Server is assumed to be off after a time interval.
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.
Common base for all events.
A new server entry was added.
ServerSettings settings
Settings of the added server.
int id
id of the added server entry
A server entry was deleted.
int id
id of the deleted server entry
Event: A power control operation was completed.
ServerPowerControlResult result
Result of the power control operation.
string host
Server hostname/IP address.
Event: A power control operation was initiated.
boolean on
True if server shall be switched on, false otherwise.
string host
Server hostname/IP address.
Settings for controlling and checking power state of the server.
ServerPowerCheckMethod powerCheck
Method to check server's power state.
string username
Login used to issue shutdown command to the server.
int sshPort
SSH port of the server.
double powerThreshold
Active power below this threshold means server is off (in Watt)
string password
Password for the login, write-only, not set if empty.
Object target
Target for power control, Outlet or OutletGroup.
int timeout
Seconds the power check takes before it ends / times out.
boolean enabled
Power control for this server enabled.
string shutdownCmd
Shutdown command to send to the server.
Event: ServerPowerState has changed.
int id
id of the server entry
ServerPowerState oldPowerState
Old power state.
string host
Server hostname/IP address.
ServerPowerState newPowerState
New power state.
Event: Reachability status for a monitored server has changed or server continues to be unreachable.
ServerReachability reachable
Current Reachability state.
string host
Server hostname/IP address.
int id
id of the server entry
A server entry was changed.
ServerSettings newSettings
Settings after change.
ServerSettings oldSettings
Settings before change.
int id
id of the server entry
Server Reachability Settings.
boolean enabled
Pinging enabled.
int pingInterval
Wait time after successful ping.
int activationCount
Minimum number of successful pings to enable feature.
ServerPowerSettings powerSettings
Settings for controlling the power state of the server.
int retryInterval
Wait time after unsuccessful ping.
int resumeDelay
Wait time before resuming pinging.
int resumeCount
Number of resumes before going back to WAITING state.
int failureCount
Number of unsuccessful pings to consider server down.
string host
Server hostname/IP address.
Server Reachability Status.
time lastResponse
UNIX timestamp (UTC) of last response received.
int failures
Number of consecutive failed pings.
ServerPowerState powerState
Power control state.
int resumes
Number of resumes.
ServerReachability reachable
Reachability state.
int responses
Number of responses received.
ServerPowerControlResult lastPowerControlResult
Last result of a power control operation.
int requests
Number of requests sent.
time lastRequest
UNIX timestamp (UTC) of last request sent.
ServerSettings settings
Server settings.
ServerStatus status
Server status.