Command Handler: Reboot and shutdown support
Overview
// global functions int rcf_ch_shutdown(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen); int rcf_ch_reboot(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, const char* params);
Detailed Documentation
Global Functions
int rcf_ch_shutdown(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen)
Shutdown the Test Agent (answer should be sent before shutdown).
Parameters:
handle |
connection handle |
cbuf |
command buffer |
buflen |
length of the command buffer |
answer_plen |
number of bytes in the command buffer to be copied to the answer |
0 |
command is supported |
-1 |
command is not supported |
Returns:
Indication of command support
int rcf_ch_reboot(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, const char* params)
Reboot the Test Agent or NUT served by it (answer should be sent before reboot).
Parameters:
handle |
connection handle |
cbuf |
command buffer |
buflen |
length of the command buffer |
answer_plen |
number of bytes in the command buffer to be copied to the answer |
ba |
pointer to location of binary attachment in the command buffer or NULL if no binary attachment is provided |
cmdlen |
full length of the command including binary attachment |
params |
reboot parameters |
0 |
command is supported |
-1 |
command is not supported |
Returns:
Indication of command support