tibrvMsgData_CopyBytes()

Function

Declaration

tibrv_status tibrvMsgData_CopyBytes(
    char**          buffer,
    const void*     src,
    tibrv_u32       size);

Purpose

Copy data into the wire buffer of a message for an encoder.

Remarks

This layer 1 function does these steps (see tibrvMsgData_CopyBytes):

Procedure 

1. Compute the wire size of the data from the size parameter.
2. Write the wire size into the wire buffer, and advance *buffer. (Now *buffer points to the end of the size information, which will be the start of the data.)
3. Copy size bytes from src into the wire buffer, and advance *buffer again. Now *buffer points to the end of the copied data.
4. Return.

Parameter

Description

buffer

The encoder supplies the location of an address within the wire buffer of a destination message. This function copies the source data into the destination message, starting at that address.

Before returning, this function advances *buffer to the end of the data that it copied.

src

Copy the data from this source buffer.

size

Number of bytes to copy.

Figure 194: tibrvMsgData_CopyBytes

See Also

tibrvMsgData_ByteSize()

tibrvMsgData_Encoder