PixelKey
NeoPixel USB Key
Loading...
Searching...
No Matches
PixelKey Command Set

Modules

 Command Parser Internals
 

Data Structures

struct  cmd_args_keyframe_wrapper_t
 Command which wraps a keyframe. More...
 
struct  cmd_args_config_get_t
 Arguments to config-set command. More...
 
struct  cmd_args_config_set_t
 Arguments to config-set command. More...
 
struct  cmd_args_time_set_t
 Arguments to time-set command. More...
 
struct  cmd_args_keyframe_mod_repeat_t
 Arguments for repeat keyframe modifier command. More...
 
struct  cmd_args_keyframe_mod_schedule_t
 Arguments for schedule keyframe modifier command. More...
 
struct  cmd_t
 Parsed command and arguments. More...
 
struct  cmd_list_t
 Parsed command list. More...
 

Macros

#define CMD_PREFIX   ('$')
 Prefix for non-keyframe commands.
 
#define CMD_REPEAT_MOD_PREFIX   ('^')
 Prefix for repeat keyframe modifier command.
 
#define CMD_SCHEDULE_MOD_PREFIX   ('@')
 Prefix for schedule keyframe modifier command.
 
#define CMD_GROUP_BEGIN_MOD_PREFIX   ('{')
 Prefix for group keyframe modifier command.
 
#define CMD_GROUP_END_MOD_PREFIX   ('}')
 Prefix for group keyframe modifier command.
 
#define CMD_CONFIG_KEY_MAX_LENGTH   (32)
 Max string length for configuration keys.
 
#define CMD_TIME_SET_MAX_LENGTH   (26)
 Max string length for time representations.
 
#define CMD_KEYFRAME_WRAPPER_CHANNELS_MAX_LENGTH   (16)
 Maximum length of the index array for keyfrmaes.
 
#define CMD_KEYFRAME_MAX_CHANNEL_NUMBER   (0x7FFF)
 Maximum channel number that can be specified for keyframes.
 

Enumerations

enum  cmd_type_t {
  CMD_TYPE_UNDEFINED = -1 , CMD_TYPE_KEYFRAME_WRAPPER , CMD_TYPE_KEYFRAME_MOD_REPEAT , CMD_TYPE_KEYFRAME_MOD_SCHEDULE ,
  CMD_TYPE_KEYFRAME_MOD_GROUP , CMD_TYPE_CONFIG_GET , CMD_TYPE_CONFIG_SET , CMD_TYPE_RESUME ,
  CMD_TYPE_STOP , CMD_TYPE_STATUS , CMD_TYPE_VERSION , CMD_TYPE_TIME_GET ,
  CMD_TYPE_TIME_SET , CMD_TYPE_HELP , CMD_TYPE_REBOOT , CMD_TYPE_COUNT
}
 Command types. More...
 
enum  value_type_t { VALUE_TYPE_BOOLEAN , VALUE_TYPE_INTEGER , VALUE_TYPE_FLOAT }
 Value types. More...
 

Functions

void pixelkey_cmd_free (cmd_t *p_cmd)
 
void pixelkey_cmd_list_free (cmd_list_t *p_cmd_list)
 
pixelkey_error_t pixelkey_command_parse (char *command_str, cmd_list_t **p_cmd_list)
 Parses a command string. More...
 

Detailed Description

Enumeration Type Documentation

◆ cmd_type_t

enum cmd_type_t

Command types.

Enumerator
CMD_TYPE_UNDEFINED 

Undefined command.

CMD_TYPE_KEYFRAME_WRAPPER 

Command wrapper around a keyframe.

CMD_TYPE_KEYFRAME_MOD_REPEAT 

Keyframe repeat modifier command.

CMD_TYPE_KEYFRAME_MOD_SCHEDULE 

Keyframe schedule modifier command.

CMD_TYPE_KEYFRAME_MOD_GROUP 

Keyframe group modifier command.

CMD_TYPE_CONFIG_GET 

Get a configuration value.

CMD_TYPE_CONFIG_SET 

Set a configuration value.

CMD_TYPE_RESUME 

Resume keyframe processing.

CMD_TYPE_STOP 

Stop keyframe processing and go idle.

CMD_TYPE_STATUS 

Display device status.

CMD_TYPE_VERSION 

Display device firmware version.

CMD_TYPE_TIME_GET 

Get the current system time.

CMD_TYPE_TIME_SET 

Set the current system time.

CMD_TYPE_HELP 

Displays a help message.

CMD_TYPE_REBOOT 

Triggers a software reset of the micro.

CMD_TYPE_COUNT 

Total number of command types.

◆ value_type_t

Value types.

Enumerator
VALUE_TYPE_BOOLEAN 

Boolean value.

VALUE_TYPE_INTEGER 

Integer value.

VALUE_TYPE_FLOAT 

Float value.

Function Documentation

◆ pixelkey_command_parse()

pixelkey_error_t pixelkey_command_parse ( char *  command_str,
cmd_list_t **  p_cmd_list 
)

Parses a command string.

Parameters
[in]command_strPointer to the command string to parse.
[out]p_cmd_listPointer to store the command list.