Called by the µC/HTTP-client core when the form table is formatted to be sent.
Each HTTPc_KEY_VAL_EXT
objects contained in a table form must have set up a hook function pointer with the parameter OnValTx
. The HTTPc transmit buffer pointer and the length available inside are passed as argument to allow the hook function to copy the data value directly inside the HTTPc buffer.
Prototype
Arguments
p_conn_obj
Pointer to the current HTTPc Connection Object.
p_req_obj
Pointer to the current HTTPc Request Object.
p_key_val_obj
Pointer to the Key-Value Extended object.
p_buf
Pointer to transmit buffer.
buf_len
Length available inside the transmit buffer.
p_len_wr
Data length actually written inside the buffer by the hook function.
Return Values
DEF_YES
, if all the data have been written to the buffer.
DEF_NO
, otherwise
Required Configuration
None.
Notes / Warnings
None.
Example Template
This code uses a variable declared as static for example purpose. It cannot work if multiple connections call the same hook function. In that case, the UserDataPtr
parameter inside the HTTPc_REQ_OBJ
or HTTPc_CONN_OBJ
can be used to store data for the application usage.