Commands
APIs for issuing commands to Mobiles. More...
Functions | |
zos_result_t | s2c_command_issue (uint8_t mobile_num, const char *cmd,...) |
Issue a command to a locally connected Mobile. More... | |
zos_result_t | s2c_command_issue_with_data (uint8_t mobile_num, const void *data, uint16_t data_len, const char *cmd,...) |
Issue a command with additional data to a locally connected Mobile. More... | |
zos_result_t | s2c_command_issue_return_data (uint8_t mobile_num, void *buffer, uint16_t *buffer_len_ptr, const char *cmd,...) |
Issue command to Mobile, return binary data from response. More... | |
zos_result_t | s2c_command_issue_return_uint32 (uint8_t mobile_num, uint32_t *retval_ptr, const char *cmd,...) |
Issue command to Mobile, return uint32 response value. More... | |
zos_result_t | s2c_command_issue_return_str (uint8_t mobile_num, char *str_buffer, uint16_t max_len, const char *cmd,...) |
Issue command to Mobile, return null-terminated string response. More... | |
Detailed Description
APIs for issuing commands to Mobiles.
Function Documentation
zos_result_t s2c_command_issue | ( | uint8_t | mobile_num, |
const char * | cmd, |
||
... |
|||
) |
Issue a command to a locally connected Mobile.
- Parameters
-
mobile_num
The mobile client number cmd
Formatted command string
- Returns
- Result of API call, see zos_result_t
zos_result_t s2c_command_issue_return_data | ( | uint8_t | mobile_num, |
void * | buffer, |
||
uint16_t * | buffer_len_ptr, |
||
const char * | cmd, |
||
... |
|||
) |
Issue command to Mobile, return binary data from response.
Like s2c_command_issue() this issues a command to a Mobile, however it also returns data from the command's response.
An example usage would be the read
command
The 'cmd' arg would be the 'read 25', the 'buffer' arg would be a pointer to buffer to hold 25 bytes of response data from the Mobile.
- Note
- The buffer_len_ptr argument should point to a uint16_t variable containing the size of the supplied buffer. Upon returning the buffer_len_ptr argument contains the actual response data size received from the Mobile.
- Parameters
-
mobile_num
The mobile client number buffer
Buffer to hold command response data buffer_len_ptr
Pointer containing size of supplied buffer, upon returning contains actual response size from Mobile cmd
Formatted command string
- Returns
- Result of API call, see zos_result_t
zos_result_t s2c_command_issue_return_str | ( | uint8_t | mobile_num, |
char * | str_buffer, |
||
uint16_t | max_len, |
||
const char * | cmd, |
||
... |
|||
) |
Issue command to Mobile, return null-terminated string response.
- Parameters
-
mobile_num
The mobile client number str_buffer
Buffer to hold string response max_len
Maximum length of response string (i.e. size of string buffer) cmd
Formatted command string
- Returns
- Result of API call, see zos_result_t
zos_result_t s2c_command_issue_return_uint32 | ( | uint8_t | mobile_num, |
uint32_t * | retval_ptr, |
||
const char * | cmd, |
||
... |
|||
) |
Issue command to Mobile, return uint32 response value.
- Parameters
-
mobile_num
The mobile client number retval_ptr
Pointer to uint32 to hold response value cmd
Formatted command string
- Returns
- Result of API call, see zos_result_t
zos_result_t s2c_command_issue_with_data | ( | uint8_t | mobile_num, |
const void * | data, |
||
uint16_t | data_len, |
||
const char * | cmd, |
||
... |
|||
) |
Issue a command with additional data to a locally connected Mobile.
Like s2c_command_issue() this issues a command to a Mobile, however it also supplies additional data after the command string.
An example usage would be the write
command
The 'cmd' arg would be the 'write 25', the 'data' arg would be a pointer to buffer holding 25 bytes of data.
- Parameters
-
mobile_num
The mobile client number data
Pointer to buffer holding command data data_len
Length of data buffer cmd
Formatted command string
- Returns
- Result of API call, see zos_result_t