InertiaSDK

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
inertia::InertiaCommands Struct Reference

Commands. More...

`#include <InertiaCommands.h>`

## Public Member Functions
| InertiaCommands ()
| InertiaCommands (std::vector< uint8_t > const &in)
| InertiaCommands (std::wstring const &argString)
| InertiaCommands (InertiaCommandPtr const &command)
InertiaCommandPtr const | GetCommand () const
InertiaCommandGroups | GetGroup () const
unsigned | GetType () const
bool | GetIsResponse () const
std::vector< uint8_t > | GetBytes () const
const std::wstring | ToString () const

## Static Public Member Functions
static const po::options_description | GetOptionDescription ()

## Detailed Description

Commands.

Class used to store a received command and to create a new command.

## Constructor & Destructor Documentation

## ◆ InertiaCommands() [1/4]

inertia::InertiaCommands::InertiaCommands | ( |  | ) |

Default Constructor. Creates an empty command.

## ◆ InertiaCommands() [2/4]

inertia::InertiaCommands::InertiaCommands | ( | std::vector< uint8_t > const & | in | ) |

Raw data Constructor. Creates a command from raw binary data.

Parameters

  in | input bytes

## ◆ InertiaCommands() [3/4]

inertia::InertiaCommands::InertiaCommands | ( | std::wstring const & | argString | ) |

Constructor with string argument. Creates a command from a string.

Parameters

  argString | string with arguments

## ◆ InertiaCommands() [4/4]

inertia::InertiaCommands::InertiaCommands | ( | InertiaCommandPtr const & | command | ) |

Constructor taking an InertiaCommand.

Parameters

  command | the command

## Member Function Documentation

## ◆ GetBytes()

std::vector< uint8_t > inertia::InertiaCommands::GetBytes | ( |  | ) | const

Get the bytes of the command.

Returns
  a vector with the bytes

## ◆ GetCommand()

InertiaCommandPtr const inertia::InertiaCommands::GetCommand | ( |  | ) | const

Return the associated command.

Returns
  the command, or an empty pointer when not available.

## ◆ GetGroup()

InertiaCommandGroups inertia::InertiaCommands::GetGroup | ( |  | ) | const

Get the command group of the associated command.

Returns
  the InertiaCommandGroups

## ◆ GetIsResponse()

bool inertia::InertiaCommands::GetIsResponse | ( |  | ) | const

Get whether the command is a request or response.

Returns
  true when the command is a response

## ◆ GetOptionDescription()

const po::options_description inertia::InertiaCommands::GetOptionDescription | ( |  | ) |
| static

Get the possible command-line arguments for InertiaCommands. Only available when WITH_BOOST_PROGRAM_OPTIONS is defined.

Returns
  the option description

## ◆ GetType()

unsigned inertia::InertiaCommands::GetType | ( |  | ) | const

Get the type of he associated command, depends on the InertiaCommandGroups.

Returns
  the command type, 0xFF (255) when unknown

## ◆ ToString()

const std::wstring inertia::InertiaCommands::ToString | ( |  | ) | const

Get a string representation of this InertiaCommands. The string is compatible with GetOptionDescription() and InertiaCommands(std::wstring const&).

Returns
  the string

The documentation for this struct was generated from the following file:

- InertiaCommands.h