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]fmtFormatted 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]bufferBuffer to hold returned data
[in]max_sizeThe size of the buffer
[out]bytes_readAmount of data returned in buffer
[in]fmtFormatted 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]ptrPointer to hold linked list result
[in]fmtFormatted 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]bufferBuffer to hold string result
[in]lenLength of buffer (i.e. the maximum size of string to return)
[in]fmtFormatted 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_ptrPointer to hold uint32 result
[in]fmtFormatted 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]dataBuffer contain command data
[in]lengthLength of command data buffer
[in]fmtFormatted ZentriOS serial command
Returns
zos_result_t result of api call