Command Handler: Variables support

Overview

// global functions

int rcf_ch_vread(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var);
int rcf_ch_vwrite(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var, ...);

Detailed Documentation

Global Functions

int rcf_ch_vread(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var)

Get value of the variable from the Test Agent or NUT served by it.

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

type

type of the variable

var

name of the variable

0

command is supported

-1

command is not supported

other

error returned by communication library

Returns:

Indication of command support or error code

int rcf_ch_vwrite(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var, ...)

Change value of the variable on the Test Agent or NUT served by it.

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

type

type of the variable

var

name of the variable

new value

0

command is supported

-1

command is not supported

other

error returned by communication library

Returns:

indication of command support or error code