Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
Switch.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2012 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __SENSORS_SWITCH_IDL__
7#define __SENSORS_SWITCH_IDL__
8
9#include <StateSensor.idl>
10#include <UserEvent.idl>
11
12/** Sensors Model */
13module sensors {
14
15 /**
16 * Switch is an actuator and an extension to StateSensor.
17 * An actuator actively outputs its state. In case of a Dry-Contact,
18 * for instance, the switch may output ON or OFF.
19 * Because Switch is a StateSensor it is also possible to
20 * query the actual state of the Switch.
21 * The type of switch is determined by the sensor's TypeSpec
22 */
23 interface Switch extends StateSensor {
24 constant int ERR_INVALID_PARAMETER = 1;
25 constant int ERR_NOT_AVAILABLE = 2;
26 constant int ERR_PDC_POWER_LIMIT = 3;
27
28 /**
29 * This method outputs the given value. The int input value
30 * is the counterpart of the value returned by StateSensor's
31 * getState method. Valid values are determined by the
32 * StateSensor's TypeSpec
33 * @param newState the new state the switch shall switch to
34 * @return 0 if OK
35 * @return ERR_INVALID_PARAMETER if invalid parameter
36 * @return ERR_NOT_AVAILABLE if unable to set new state
37 */
38 int setState(in int newState);
39
40 /** SwitchEvent: new state set to switch via setState */
41 valueobject SwitchEvent extends event.UserEvent {
42 int targetState; ///< target state as set via setState
43 };
44 };
45
46}
47
48#endif
sensors::StateSensor
Sensor with discrete readings.
Definition StateSensor.idl:43
sensors::Switch
Switch is an actuator and an extension to StateSensor.
Definition Switch.idl:23
sensors::Switch::setState
int setState(in int newState)
This method outputs the given value.
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
sensors::Switch::SwitchEvent
SwitchEvent: new state set to switch via setState.
Definition Switch.idl:41
sensors::Switch::SwitchEvent::targetState
int targetState
target state as set via setState
Definition Switch.idl:42