Commands
Functions for issuing ZentriOS commands. More...
Functions | |
zos_result_t | zn_issue_command (const char *fmt,...) |
Issue ZentriOS Command. More... | |
zos_result_t | zn_issue_command_return_uint32 (uint32_t *uint32_ptr, const char *fmt,...) |
Issue ZentriOS command, return the uint32 result. More... | |
zos_result_t | zn_issue_command_return_str (char *buffer, uint16_t len, const char *fmt,...) |
Issue ZentriOS serial command, store string result in buffer. More... | |
zos_result_t | zn_issue_command_return_list_ptr (uint32_t **ptr, const char *fmt,...) |
Issue ZentriOS command, return linked-list result. More... | |
zos_result_t | zn_issue_command_return_data (void *buffer, uint32_t max_size, uint32_t *bytes_read, const char *fmt,...) |
Issue ZentriOS serial command, return result data in buffer. More... | |
zos_result_t | zn_issue_command_with_data (const void *data, uint16_t length, const char *fmt,...) |
Issue ZentriOS serial command with supplied data. More... | |
Detailed Description
Functions for issuing ZentriOS commands.
Function Documentation
zos_result_t zn_issue_command | ( | const char * | fmt, |
... |
|||
) |
Issue ZentriOS Command.
For available commands, see ZentriOS Command API.
- Note
- The command will execute in the Command thread context, this call will block until the command completes.
- Parameters
-
[in] fmt
Formatted ZentriOS command
- Returns
- zos_result_t result of api call
zos_result_t zn_issue_command_return_data | ( | void * | buffer, |
uint32_t | max_size, |
||
uint32_t * | bytes_read, |
||
const char * | fmt, |
||
... |
|||
) |
Issue ZentriOS serial command, return result data in buffer.
For available commands, see ZentriOS 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 ZentriOS serial command
- Returns
- zos_result_t result of api call
- Examples:
- cloud/bluemix/bluemix.c.
zos_result_t zn_issue_command_return_list_ptr | ( | uint32_t ** | ptr, |
const char * | fmt, |
||
... |
|||
) |
Issue ZentriOS command, return linked-list result.
For available commands, see ZentriOS Command API.
- Note
- The command will execute in the Command thread context, this call will block until the command completes.
- Parameters
-
[out] ptr
Pointer to hold linked list result [in] fmt
Formatted ZentriOS command
- Returns
- zos_result_t result of api call
zos_result_t zn_issue_command_return_str | ( | char * | buffer, |
uint16_t | len, |
||
const char * | fmt, |
||
... |
|||
) |
Issue ZentriOS serial command, store string result in buffer.
For available commands, see ZentriOS 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 ZentriOS command
- Returns
- zos_result_t result of api call
zos_result_t zn_issue_command_return_uint32 | ( | uint32_t * | uint32_ptr, |
const char * | fmt, |
||
... |
|||
) |
Issue ZentriOS command, return the uint32 result.
For available commands, see ZentriOS 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 ZentriOS command
- Returns
- zos_result_t result of api call
zos_result_t zn_issue_command_with_data | ( | const void * | data, |
uint16_t | length, |
||
const char * | fmt, |
||
... |
|||
) |
Issue ZentriOS serial command with supplied data.
For available commands, see ZentriOS 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 ZentriOS serial command
- Returns
- zos_result_t result of api call