Command entry for a command table. More...

#include <command-interpreter2.h>

Data Fields

PGM_P name
CommandAction action
PGM_P argumentTypes
PGM_P description

Command entry for a command table.

Definition at line 135 of file command-interpreter2.h.

Field Documentation

CommandAction EmberCommandEntry::action

A reference to a function in the application that implements the command. If this entry refers to a nested command, the action field has to be set to NULL.

Definition at line 154 of file command-interpreter2.h.

PGM_P EmberCommandEntry::argumentTypes

For normal, non-nested, commands, argumentTypes is a string that specifies the number and types of arguments the command accepts. The argument specifiers are:

  • u: one-byte unsigned integer.
  • v: two-byte unsigned integer
  • w: four-byte unsigned integer
  • s: one-byte signed integer
  • b: string. The argument can be entered in ASCII by using quotes, for example: "foo". It can also be entered in hexadecimal values by using curly braces, for example: { 08 A1 f2 }. The number of hexadecimal digits must be even and spaces are ignored.
  • *: zero or more of the previous type. If used, this must be the last specifier.
  • ?: unknown number of arguments. If used this must be the only character, which means that the command interpreter will not perform any validation of arguments and will call the action directly trusting that it will handle whatever arguments are passed in. Integer arguments can be either decimal or hexadecimal. A 0x prefix indicates a hexadecimal integer, for example: 0x3ed.

For a nested command (action is NULL), argumentTypes will contain a pointer to the nested commands.

Definition at line 183 of file command-interpreter2.h.

PGM_P EmberCommandEntry::description

A description of the command.

Definition at line 188 of file command-interpreter2.h.

PGM_P EmberCommandEntry::name

Use letters, digits, and underscores, '_', for the command name. Command names are case-sensitive.

Definition at line 142 of file command-interpreter2.h.

The documentation for this struct was generated from the following file:
  • command-interpreter2.h