public static GtsMsgHeader GetHeader(byte[] bytes) { GtsMsgHeader header = new GtsMsgHeader(); if (-1 == header.DeserializeToStruct(bytes, 0)) { return(null); } return(header); }
public int DeserializeToStruct(byte[] bytes, int offset) { if (bytes.Length - offset < Len) { return(-1); } int used = 0; used += header.DeserializeToStruct(bytes, offset + used); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8Complete); used += 3; return(used); }
public int DeserializeToStruct(byte[] bytes, int offset) { if (bytes.Length - offset < Len) { return(-1); } int used = 0; used += header.DeserializeToStruct(bytes, offset + used); used += SerializeHelper.SerializeBytes(ref u8FileName, 0, bytes, offset + used, GtsMsgType.MAX_FILE_PATH_NAME_LENGTH); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8Completed); return(used); }
public int DeserializeToStruct(byte[] bytes, int offset) { if (bytes.Length - offset < Len) { return(-1); } int used = 0; used += header.DeserializeToStruct(bytes, offset + used); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8DstFrame); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8DstSlot); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8BoardType); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8Pad); return(used); }
public int DeserializeToStruct(byte[] bytes, int offset) { if (bytes.Length - offset < Len) { return(-1); } int used = 0; used += header.DeserializeToStruct(bytes, offset + used); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8OpType); used += SerializeHelper.DeserializeByte(bytes, offset + used, ref u8FileType); used += 2; used += struFileData.DeserializeToStruct(bytes, offset + used); return(used); }
public int DeserializeToStruct(byte[] bytes, int offset) { if (bytes.Length - offset < Len) { return(-1); } int used = 0; used += header.DeserializeToStruct(bytes, offset + used); used += SerializeHelper.DeserializeUshort(bytes, offset + used, ref u16RackNo); used += SerializeHelper.DeserializeUshort(bytes, offset + used, ref u16FrameNo); used += SerializeHelper.DeserializeUshort(bytes, offset + used, ref u16SlotNo); used += SerializeHelper.DeserializeUshort(bytes, offset + used, ref u16ProcId); uint u32Result = 0; used += SerializeHelper.DeserializeInt32(bytes, offset + used, ref u32Result); s32Result = (int)u32Result; return(used); }