Loading...
Searching...
No Matches
Switch.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2012 Raritan Inc. All rights reserved.
*/
#ifndef __SENSORS_SWITCH_IDL__
#define __SENSORS_SWITCH_IDL__
#include <StateSensor.idl>
#include <UserEvent.idl>
/** Sensors Model */
module sensors {
/**
* Switch is an actuator and an extension to StateSensor.
* An actuator actively outputs its state. In case of a Dry-Contact,
* for instance, the switch may output ON or OFF.
* Because Switch is a StateSensor it is also possible to
* query the actual state of the Switch.
* The type of switch is determined by the sensor's TypeSpec
*/
interface Switch extends StateSensor {
constant int ERR_INVALID_PARAMETER = 1;
constant int ERR_NOT_AVAILABLE = 2;
constant int ERR_PDC_POWER_LIMIT = 3;
/**
* This method outputs the given value. The int input value
* is the counterpart of the value returned by StateSensor's
* getState method. Valid values are determined by the
* StateSensor's TypeSpec
* @param newState the new state the switch shall switch to
* @return 0 if OK
* @return ERR_INVALID_PARAMETER if invalid parameter
* @return ERR_NOT_AVAILABLE if unable to set new state
*/
int setState(in int newState);
/** SwitchEvent: new state set to switch via setState */
valueobject SwitchEvent extends event.UserEvent {
int targetState; ///< target state as set via setState
};
};
}
#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