45 , m_variable_index(variable_index)
53 auto new_data_offset_it = output.begin() + telegram.size();
69 ROS_INFO(
"Command Variable Acknowledged.");
74 ROS_WARN(
"Command Variable Not Accepted.");
uint16_t getVariableIndex() const
uint8_t getCommandType() const
Returns the command type.
Base class for commands. Defines the base interface and does the common tasks.
std::vector< uint8_t > expandTelegram(const std::vector< uint8_t > &telegram, size_t additional_bytes) const
bool processReply()
Processes the return from the sensor.
std::vector< uint8_t > addTelegramData(const std::vector< uint8_t > &telegram) const
Adds the data to the telegram.
VariableCommand(Cola2Session &session, const uint16_t &variable_index)
Constructor of the command.
uint8_t getCommandMode() const
Returns the command mode.
bool canBeExecutedWithoutSessionID() const
Returns if the command can be executed without a session ID. Will return false for most commands exce...
uint16_t m_variable_index
void writeUint16LittleEndian(std::vector< uint8_t >::iterator it, const uint16_t v)
Writes an unsigned 16-bit integer to a buffer at offset in little endian encoding.
void setVariableIndex(const uint16_t &variable_index)
Establishes a cola2 session with a sensor and enables execution of commands in this session...