public static SEGMENT_INFO_MESSAGE DecodeSegmentInfoMessage(byte[] byteArr)
{
int index = 0;
byte[] informationData = GetBytes(byteArr, ref index, byteArr.Length - index);
int tempIndex = 0;
SEGMENT_INFO_MESSAGE segmentInfoMessage;
MESSAGE_HEADER msgHeader;
msgHeader.MinorVersion = informationData[tempIndex++];
msgHeader.MajorVersion = informationData[tempIndex++];
msgHeader.MsgType = (PCHC_MESSAGE_TYPE)GetUInt16(informationData, ref tempIndex, false);
msgHeader.Padding = GetBytes(informationData, ref tempIndex, 4);
segmentInfoMessage.MsgHeader = msgHeader;
CONNECTION_INFORMATION connectionInfo;
connectionInfo.Port = GetUInt16(informationData, ref tempIndex, false);
connectionInfo.Padding = GetBytes(informationData, ref tempIndex, 6);
segmentInfoMessage.ConnectionInfo = connectionInfo;
segmentInfoMessage.ContentTag = GetBytes(informationData, ref tempIndex, 16);
segmentInfoMessage.SegmentInfo = PccrcUtility.ParseContentInformation(informationData, ref tempIndex);
return segmentInfoMessage;
}