Command types. More...

Data Structures

struct  zos_command_t
 Serial command information. More...
 
struct  zos_var_args_command_t
 Serial getter/setter information. More...
 
struct  zos_cmd_list_t
 List of commands::getters/setters. More...
 
struct  zos_cmd_lists_t
 Lists of commands, getters, setters. More...
 

Typedefs

typedef zos_cmd_result_t(* zos_cmd_func_t) (int argc, char **argv)
 Command/getter/setter function prototype. More...
 
typedef uint8_t zos_cmd_list_type_t
 The type of zos_cmd_list_t.
 
typedef uint8_t zos_cmd_list_flag_t
 Flags for a zos_cmd_list_t.
 
typedef zos_result_t(* zos_cmd_writer_t) (void *user, const void *data, int len)
 Command writer prototype.
 

Enumerations

enum  zos_cmd_result_t {
  CMD_SUCCESS = 0,
  CMD_FAILED = 1,
  CMD_PARSE_ERROR = 2,
  CMD_UNKNOWN = 3,
  CMD_TOO_FEW_ARGS = 4,
  CMD_TOO_MANY_ARGS = 5,
  CMD_UNKNOWN_OPTION = 6,
  CMD_BAD_ARGS = 7,
  CMD_BUFFER_OVERFLOW = 8,
  CMD_BOUNDS_ERROR = 9,
  CMD_SET_OK = 10,
  CMD_EXECUTE_AOK = 11,
  CMD_STOPPED = 12,
  CMD_IN_PROGRESS = 13
}
 Error codes returned by ZentriOS commands. More...
 
enum  {
  CMD_LIST_TYPE_COMMANDS = 0,
  CMD_LIST_TYPE_GETTERS = 1,
  CMD_LIST_TYPE_SETTERS = 2
}
 
enum  {
  CMD_LIST_FLAG_IS_LAST_IN_LIST = (1 << 0),
  CMD_LIST_FLAG_EXCLUDE_FROM_SAVE = (1 << 1)
}
 

Detailed Description

Command types.

Typedef Documentation

typedef zos_cmd_result_t(* zos_cmd_func_t) (int argc, char **argv)

Command/getter/setter function prototype.

Parameters
[in]argcContains the number of arguments in argv
[in]argvContains list of string arguments
Returns
The result of the command, see zos_cmd_result_t

Enumeration Type Documentation

anonymous enum
Enumerator
CMD_LIST_FLAG_IS_LAST_IN_LIST 

Internally used to signify the end of the list.

CMD_LIST_FLAG_EXCLUDE_FROM_SAVE 

Internally used, getter list isn't used for saving to file/dct.

anonymous enum
Enumerator
CMD_LIST_TYPE_COMMANDS 

Command list type.

CMD_LIST_TYPE_GETTERS 

Getter list type.

CMD_LIST_TYPE_SETTERS 

Setter list type.

Error codes returned by ZentriOS commands.

Enumerator
CMD_SUCCESS 

The command was successful.

CMD_FAILED 

The command failed, probably in the firmware somewhere.

CMD_PARSE_ERROR 

Failed to parse the command.

CMD_UNKNOWN 

Unknown command.

CMD_TOO_FEW_ARGS 

Not enough command arguments.

CMD_TOO_MANY_ARGS 

Too many command arguments.

CMD_UNKNOWN_OPTION 

Unknown option (e.g. known 'set' command option)

CMD_BAD_ARGS 

Invalid command arguments.

CMD_BUFFER_OVERFLOW 

Serial command line buffer overflow.

CMD_BOUNDS_ERROR 

Command specific, the parameters of the command were exceeded.

CMD_SET_OK 

The 'set' command completed successfully.

CMD_EXECUTE_AOK 

Command executed successfully but doesn't print anything.

CMD_STOPPED 

Command executing in background stopped.

CMD_IN_PROGRESS 

The command is executing in the background.