private static GetDataFromFrame ( |
||
reply | Received data that includes HDLC frame. | |
info | Reply data. | |
return | void |
private static void GetDataFromFrame(GXByteBuffer reply, GXReplyData info)
{
GXByteBuffer data = info.Data;
int offset = data.Size;
int cnt = info.PacketLength - reply.Position;
if (cnt != 0)
{
data.Capacity = (offset + cnt);
data.Set(reply.Data, reply.Position, cnt);
reply.Position = (reply.Position + cnt);
}
// Set position to begin of new data.
data.Position = offset;
}