Class: DroneCommandArgument

DroneCommandArgument(raw)

Drone Command Argument class

Used for storing command arguments

Constructor

new DroneCommandArgument(raw)

Command argument constructor

Parameters:
Name Type Description
raw object

Raw command argument data from the xml specification

Properties:
Name Type Description
enum Enum | undefined

Enum store containing possible enum values if this.type === 'enum'. If set then this.hasEnumProperty === true.

Source:
To Do:
  • allow boolean values for u8 and i8 params

Members

description

Parameter description

Source:

hasEnumProperty

If it has the enum property set

Source:

name

Parameter name

Source:

type

Parameter type

Source:

value

Get the parameter value

Source:
See:

value

Set the parameter value

Source:

Methods

getValueSize() → {number}

Gets the byte size of the value.

Source:
Returns:
  • value size in bytes
Type
number

toString(debug, precision) → {string}

Returns a string representation of the DroneCommandArgument instance

Parameters:
Name Type Default Description
debug boolean false

If extra debug info should be shown.

precision number 3

Amount of precision for numerical values

Source:
Returns:
  • string representation
Type
string