tibrvMsgData_GetSize()
Function
Declaration
tibrv_statustibrvMsgData_GetSize(
char** buffer,
tibrv_u32* size);
Purpose
Get the data 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 only part of the work that tibrvMsgData_GetBytes() does (see tibrvMsgData_GetSize):
Procedure
| 1. | Read the size information from the wire buffer (starting at the position *buffer) and store it in the size parameter. |
| 2. | Advance *buffer to point to the end of the size information, which is the start of the actual data. |
| 3. | Return. |
After tibrvMsgData_GetSize() returns, the decoder can obtain the data by copying *size bytes from the location *buffer. We recommend using the more complete function tibrvMsgData_GetBytes(); this function gives programmers finer control over pointer advancement (along with the responsibility to advance that pointer appropriately).
|
Parameter |
Description |
|
|
The decoder supplies the address of the wire buffer within the message. The function advances |
|
|
The decoder supplies a location. This function stores the size of the actual data in that location. |
Figure 200: tibrvMsgData_GetSize