Commands

Functions for issuing Gecko OS commands. More...

Modules

Types
Command data types.

Functions

gos_result_t gos_cmd_issue (const char *fmt,...)
Issue Gecko OS Command. More...
gos_result_t gos_cmd_issue_return_uint32 (uint32_t *uint32_ptr, const char *fmt,...)
Issue Gecko OS command, return the uint32 result. More...
gos_result_t gos_cmd_issue_return_str (char *buffer, uint16_t len, const char *fmt,...)
Issue Gecko OS command, store string result in buffer. More...
gos_result_t gos_cmd_issue_return_data (void *buffer, uint32_t max_size, uint32_t *bytes_read, const char *fmt,...)
Issue Gecko OS command, return result data in buffer. More...
gos_result_t gos_cmd_issue_with_data (const void *data, uint16_t length, const char *fmt,...)
Issue Gecko OS command with supplied data. More...
gos_result_t gos_cmd_issue_with_callback ( gos_cmd_operation_callback_t callback, const char *fmt,...)
Issue Gecko OS command asynchronously and invoke callback on completion. More...
gos_result_t gos_cmd_issue_with_config ( gos_cmd_operation_config_t *config, const char *fmt,...)
Issue Gecko OS command with supplied configuration. More...
gos_result_t gos_cmd_issue_with_vconfig ( gos_cmd_operation_config_t *config, const char *fmt, va_list args)
Issue Gecko OS command with supplied configuration. More...

Detailed Description

Functions for issuing Gecko OS commands.

Function Documentation

gos_cmd_issue()

gos_result_t gos_cmd_issue ( const char * fmt,
...
)

Issue Gecko OS Command.

For available commands, see Gecko OS Command API .

Note
The command will execute in the Command thread context, this call will block until the command completes.
Parameters
[in] fmt Formatted Gecko OS command
Returns
gos_result_t result of api call

gos_cmd_issue_return_data()

gos_result_t gos_cmd_issue_return_data ( void * buffer,
uint32_t max_size,
uint32_t * bytes_read,
const char * fmt,
...
)

Issue Gecko OS command, return result data in buffer.

For available commands, see Gecko OS Command API .

Note
The command will execute in the Command thread context, this call will block until the command completes.
Parameters
[out] buffer Buffer to hold returned data
[in] max_size The size of the buffer
[out] bytes_read Amount of data returned in buffer
[in] fmt Formatted Gecko OS serial command
Returns
gos_result_t result of api call

gos_cmd_issue_return_str()

gos_result_t gos_cmd_issue_return_str ( char * buffer,
uint16_t len,
const char * fmt,
...
)

Issue Gecko OS command, store string result in buffer.

For available commands, see Gecko OS Command API .

The supplied buffer will contain the string result. The len parameter specifies the maximum length of the string. The value in the buffer is guaranteed to be null-terminated.

Note
The command will execute in the Command thread context, this call will block until the command completes.
Parameters
[out] buffer Buffer to hold string result
[in] len Length of buffer (i.e. the maximum size of string to return)
[in] fmt Formatted Gecko OS command
Returns
gos_result_t result of api call

gos_cmd_issue_return_uint32()

gos_result_t gos_cmd_issue_return_uint32 ( uint32_t * uint32_ptr,
const char * fmt,
...
)

Issue Gecko OS command, return the uint32 result.

d For available commands, see Gecko OS Command API .

Note
The command will execute in the Command thread context, this call will block until the command completes.
Parameters
[out] uint32_ptr Pointer to hold uint32 result
[in] fmt Formatted Gecko OS command
Returns
gos_result_t result of api call

gos_cmd_issue_with_callback()

gos_result_t gos_cmd_issue_with_callback ( gos_cmd_operation_callback_t callback,
const char * fmt,
...
)

Issue Gecko OS command asynchronously and invoke callback on completion.

For available commands, see Gecko OS Command API .

Note
The command will execute in the Command thread context, the supplied callback is invoked after the commmand completes.
Parameters
[in] callback Command completion callback, see gos_cmd_operation_callback_t
[in] fmt Formatting string
Returns
gos_result_t result of api call

gos_cmd_issue_with_config()

gos_result_t gos_cmd_issue_with_config ( gos_cmd_operation_config_t * config,
const char * fmt,
...
)

Issue Gecko OS command with supplied configuration.

For available commands, see Gecko OS Command API .

Parameters
[in] config Command configuration, see gos_cmd_operation_config_t for more details.
[in] fmt Formatting string
Returns
gos_result_t result of api call
Examples:
network/ethernet_bridge/main.c .

gos_cmd_issue_with_data()

gos_result_t gos_cmd_issue_with_data ( const void * data,
uint16_t length,
const char * fmt,
...
)

Issue Gecko OS command with supplied data.

For available commands, see Gecko OS Command API .

Note
The command will execute in the Command thread context, this call will block until the command completes.
Parameters
[in] data Buffer contain command data
[in] length Length of command data buffer
[in] fmt Formatted Gecko OS serial command
Returns
gos_result_t result of api call

gos_cmd_issue_with_vconfig()

gos_result_t gos_cmd_issue_with_vconfig ( gos_cmd_operation_config_t * config,
const char * fmt,
va_list args
)

Issue Gecko OS command with supplied configuration.

For available commands, see Gecko OS Command API .

Parameters
[in] config Command configuration, see gos_cmd_operation_config_t for more details.
[in] fmt Formatting string
[in] args Formatting string arguments
Returns
gos_result_t result of api call