tibrvMsgData_GetBytes()
Function
Declaration
tibrv_statustibrvMsgData_GetBytes(
char** buffer,
const void** src,
tibrv_u32* size);
Purpose
Get data pointer and size from a wire buffer for a decoder.
Remarks
This layer 1 function helps decoders extract data from a message’s wire buffer. It does these steps (see tibrvMsgData_GetBytes):
Procedure
| 1. | Read the size information from the wire buffer (starting at the position *buffer) and store it in the size parameter. |
| 2. | Store the start position of the actual data in the src parameter. |
| 3. | Advance *buffer to point to the end of the actual data. |
| 4. | Return. |
After tibrvMsgData_GetBytes() returns, the decoder can obtain the data by copying *size bytes from the location *src.
|
Parameter |
Description |
|
|
The decoder supplies the location of an address within the wire buffer of a source message. After reading the size information, this function advances |
|
|
The decoder supplies the location of a buffer pointer. This function stores the address of the actual data in that pointer. |
|
|
The decoder supplies a location. This function stores the size of the actual data in that location. |
Figure 198: tibrvMsgData_GetBytes