Package org.sensorhub.api.command
Class CommandData
java.lang.Object
org.sensorhub.api.command.CommandData
- All Implemented Interfaces:
ICommandData
Immutable object carrying data for a single command associated to a specific command stream.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
CommandData.CommandDataBuilder<B extends CommandData.CommandDataBuilder<B,
T>, T extends CommandData> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CommandData
(long id, DataBlock params) Helper constructor to send a command directly to a driver. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.sensorhub.api.command.ICommandData
hasFoi
-
Field Details
-
UNKNOWN_SENDER
- See Also:
-
id
-
commandStreamID
-
foiID
-
senderID
-
issueTime
-
params
-
-
Constructor Details
-
CommandData
protected CommandData() -
CommandData
Helper constructor to send a command directly to a driver. The builder MUST be used instead when sending a command via the event system since other parameters are needed in this case.- Parameters:
id
- Command IDparams
- Command parameters
-
-
Method Details
-
getID
- Specified by:
getID
in interfaceICommandData
- Returns:
- The ID of the command or null if not yet assigned.
-
assignID
Description copied from interface:ICommandData
Assign the command ID. This property is immutable once it is set.- Specified by:
assignID
in interfaceICommandData
-
getCommandStreamID
- Specified by:
getCommandStreamID
in interfaceICommandData
- Returns:
- The ID of the command stream that this command is part of.
-
getFoiID
- Specified by:
getFoiID
in interfaceICommandData
- Returns:
- The feature of interest (can be the receiver system itself, a subsystem, or another feature) that the command will have an impact on.
-
getSenderID
- Specified by:
getSenderID
in interfaceICommandData
- Returns:
- The ID of the sender
-
getIssueTime
- Specified by:
getIssueTime
in interfaceICommandData
- Returns:
- Time the command was issued
-
getParams
- Specified by:
getParams
in interfaceICommandData
- Returns:
- The command parameters (i.e. command data)
-
toString
-