Class CommandData

java.lang.Object
org.sensorhub.api.command.CommandData
All Implemented Interfaces:
ICommandData

public class CommandData extends Object implements ICommandData

Immutable object carrying data for a single command associated to a specific command stream.

  • Field Details

  • Constructor Details

    • CommandData

      protected CommandData()
    • CommandData

      public CommandData(long id, DataBlock params)
      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 ID
      params - Command parameters
  • Method Details

    • getID

      public BigId getID()
      Specified by:
      getID in interface ICommandData
      Returns:
      The ID of the command or null if not yet assigned.
    • assignID

      public void assignID(BigId id)
      Description copied from interface: ICommandData
      Assign the command ID. This property is immutable once it is set.
      Specified by:
      assignID in interface ICommandData
    • getCommandStreamID

      public BigId getCommandStreamID()
      Specified by:
      getCommandStreamID in interface ICommandData
      Returns:
      The ID of the command stream that this command is part of.
    • getFoiID

      public BigId getFoiID()
      Specified by:
      getFoiID in interface ICommandData
      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

      public String getSenderID()
      Specified by:
      getSenderID in interface ICommandData
      Returns:
      The ID of the sender
    • getIssueTime

      public Instant getIssueTime()
      Specified by:
      getIssueTime in interface ICommandData
      Returns:
      Time the command was issued
    • getParams

      public DataBlock getParams()
      Specified by:
      getParams in interface ICommandData
      Returns:
      The command parameters (i.e. command data)
    • toString

      public String toString()
      Overrides:
      toString in class Object