#include <protocol.hpp>
Public Member Functions | |
ManagementReply (const char *name_, const char *value_) | |
Construct the record based on the name data and value data. | |
Private Attributes | |
Header | header |
Management records header. | |
uint8_t | nameLength |
Length in bytes of name. | |
uint8_t | valueLength |
Length in bytes of value. | |
uint8_t | name [NAMELENGTH] |
Name data. | |
uint8_t | value [VALUELENGTH] |
Value data. | |
uint8_t | padding [PADDINGLENGTH] |
Padding data. |
This class template is an efficient tool for replying to GET_VALUES management records. The structure represents a complete record (body+header) of a name-value pair to be sent as a reply to a management value query. The templating allows the structure to be exactly the size that is needed so it can be casted to raw data and transmitted as is. Note that the name and value lengths are left as single bytes so they are limited in range from 0-127.
NAMELENGTH | Length of name in bytes (0-127). Null terminator not included. | |
VALUELENGTH | Length of value in bytes (0-127). Null terminator not included. | |
PADDINGLENGTH | Length of padding at the end of the record. This is needed to keep the record size a multiple of chunkSize. |
Definition at line 363 of file protocol.hpp.
Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply | ( | const char * | name_, | |
const char * | value_ | |||
) | [inline] |
Construct the record based on the name data and value data.
A full record is constructed from the name-value data. After construction the structure can be casted to raw data and transmitted as is. The size of the data arrays pointed to by name_ and value_ are assumed to correspond with the NAMELENGTH and PADDINGLENGTH template parameters passed to the class.
[in] | name_ | Pointer to name data |
[in] | value_ | Pointer to value data |
Definition at line 390 of file protocol.hpp.
References Fastcgipp::Protocol::GET_VALUES_RESULT, Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::header, Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::name, Fastcgipp::Protocol::Header::setContentLength(), Fastcgipp::Protocol::Header::setPaddingLength(), Fastcgipp::Protocol::Header::setRequestId(), Fastcgipp::Protocol::Header::setType(), Fastcgipp::Protocol::Header::setVersion(), Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::value, and Fastcgipp::Protocol::version.
Header Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::header [private] |
Management records header.
Definition at line 367 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().
uint8_t Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::name[NAMELENGTH] [private] |
Name data.
Definition at line 373 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().
uint8_t Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::nameLength [private] |
uint8_t Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::padding[PADDINGLENGTH] [private] |
uint8_t Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::value[VALUELENGTH] [private] |
Value data.
Definition at line 375 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().
uint8_t Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::valueLength [private] |