protected void ReadChannelId(PduMarshaler marshaler)
{
uint res = 0;
switch (HeaderBits.CbChannelId)
{
case cbChId_Values.OneByte:
res = Convert.ToUInt32(marshaler.ReadByte());
break;
case cbChId_Values.TwoBytes:
res = Convert.ToUInt32(marshaler.ReadUInt16());
break;
case cbChId_Values.FourBytes:
res = Convert.ToUInt32(marshaler.ReadUInt32());
break;
case cbChId_Values.Invalid:
default:
//TODO: handle errors.
break;
}
//TODO: handle errors.
ChannelId = res;
}