Command types. More...

Typedefs

typedef gos_result_t (* gos_cmd_writer_t ) (void *user, const void *data, uint32_t length)
Command writer prototype. More...
typedef gos_result_t (* gos_cmd_write_poller_t ) (void *user, uint32_t *bytes_available)
Command write poller prototype. More...

Enumerations

enum gos_cmd_result_t {
GOS_CMD_SUCCESS = 0,
GOS_CMD_FAILED = 1,
GOS_CMD_PARSE_ERROR = 2,
GOS_CMD_UNKNOWN = 3,
GOS_CMD_TOO_FEW_ARGS = 4,
GOS_CMD_TOO_MANY_ARGS = 5,
GOS_CMD_UNKNOWN_OPTION = 6,
GOS_CMD_BAD_ARGS = 7,
GOS_CMD_BUFFER_OVERFLOW = 8,
GOS_CMD_BOUNDS_ERROR = 9,
GOS_CMD_SET_OK = 10,
GOS_CMD_EXECUTE_AOK = 11,
GOS_CMD_STOPPED = 12,
GOS_CMD_IN_PROGRESS = 13,
GOS_CMD_TIMEOUT = 14,
GOS_CMD_INVALID_RESPONSE = 15
}
Gecko OS command response codes. More...

Detailed Description

Command types.

Typedef Documentation

gos_cmd_write_poller_t

typedef gos_result_t (* gos_cmd_write_poller_t) (void *user, uint32_t *bytes_available)

Command write poller prototype.

This is used with gos_cmd_read_write_data()

Parameters
user User argument supplied to gos_cmd_read_write_data()
bytes_available_ptr Pointer to hold number of bytes available
Returns
Result of writing, if success should return GOS_SUCCESS , else appropriate error code, see gos_result_t

gos_cmd_writer_t

typedef gos_result_t (* gos_cmd_writer_t) (void *user, const void *data, uint32_t length)

Command writer prototype.

This is used with gos_cmd_read_write_data()

Parameters
user User argument supplied to gos_cmd_read_write_data()
data Data to write
length Length of data to write
Returns
Result of writing, if success should return GOS_SUCCESS , else appropriate error code, see gos_result_t

Enumeration Type Documentation

gos_cmd_result_t

Gecko OS command response codes.

Enumerator
GOS_CMD_SUCCESS

! The command was successful

GOS_CMD_FAILED

! The command failed, probably in the firmware somewhere

GOS_CMD_PARSE_ERROR

! Failed to parse the command

GOS_CMD_UNKNOWN

! Unknown command

GOS_CMD_TOO_FEW_ARGS

! Not enough command arguments

GOS_CMD_TOO_MANY_ARGS

! Too many command arguments

GOS_CMD_UNKNOWN_OPTION

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

GOS_CMD_BAD_ARGS

! Invalid command arguments

GOS_CMD_BUFFER_OVERFLOW

! Serial command line buffer overflow

GOS_CMD_BOUNDS_ERROR

! Command specific, the parameters of the command were exceeded

GOS_CMD_SET_OK

! The 'set' command completed successfully

GOS_CMD_EXECUTE_AOK

! Command executed successfully but doesn't print anything

GOS_CMD_STOPPED

! Command executing in background stopped

GOS_CMD_IN_PROGRESS

! The command is executing in the background

GOS_CMD_TIMEOUT

! Functionality which command requested returned timeout

GOS_CMD_INVALID_RESPONSE

! Invalid command response code, i.e. the result returned by the command isn't in this enum