public class SensorControlEvent extends EntityEvent<CommandStatus.StatusCode>
Special type of immutable event carrying status data by reference
Modifier and Type | Field and Description |
---|---|
protected CommandStatus |
status
Status of the command that triggered this event
|
relatedEntityID
Constructor and Description |
---|
SensorControlEvent(long timeStamp,
ISensorControlInterface controlInterface,
CommandStatus status)
Constructs the event for an individual sensor
|
SensorControlEvent(long timeStamp,
java.lang.String sensorID,
ISensorControlInterface controlInterface,
CommandStatus status)
Constructs the event for a sensor that is part of a network
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSensorID()
Gets the unique ID of the sensor related to this event.
For sensor networks, it can be either the ID of the network as a whole (if the command was global) or the ID of one of the sensor in the network (if the command was sent to a particular sensor). |
ISensorControlInterface |
getSource()
Gets the source of the event as an object reference.
|
CommandStatus |
getStatus() |
getRelatedEntityID
getTimeStamp, getType
protected CommandStatus status
public SensorControlEvent(long timeStamp, ISensorControlInterface controlInterface, CommandStatus status)
timeStamp
- unix time of event generationcontrolInterface
- sensor control interface that generated the eventstatus
- status of command at time the event is generatedpublic SensorControlEvent(long timeStamp, java.lang.String sensorID, ISensorControlInterface controlInterface, CommandStatus status)
timeStamp
- unix time of event generationsensorID
- ID of individual sensor in the networkcontrolInterface
- sensor control interface that generated the eventstatus
- status of command at time the event is generatedpublic java.lang.String getSensorID()
public CommandStatus getStatus()
public ISensorControlInterface getSource()
Event
getSource
in class Event<CommandStatus.StatusCode>