/// <summary> /// Decode Set Error Info PDU /// </summary> /// <param name="data">data to be parsed</param> /// <param name="decryptedUserData">decrypted user data to be parsed</param> /// <param name="type">security header type</param> /// <returns>decoded Set Error Info PDU</returns> public StackPacket DecodeSetErrorInfoPDU( byte[] data, byte[] decryptedUserData, SecurityHeaderType type) { Server_Set_Error_Info_Pdu pdu = new Server_Set_Error_Info_Pdu(); // data index int dataIndex = 0; // SetErrorInfoPDU: commonHeader pdu.commonHeader = ParseMcsCommonHeader(data, ref dataIndex, type); // user data index int userDataIndex = 0; // SetErrorInfoPDU: errorInfoPduData pdu.errorInfoPduData = ParseTsSetErrorInfoPdu(decryptedUserData, ref userDataIndex); // Check if data length exceeded expectation VerifyDataLength(decryptedUserData.Length, userDataIndex, ConstValue.ERROR_MESSAGE_DATA_LENGTH_EXCEEDED); return pdu; }
public override StackPacket Clone() { Server_Set_Error_Info_Pdu cloneSetErrorInfoPdu = new Server_Set_Error_Info_Pdu(); cloneSetErrorInfoPdu.commonHeader = commonHeader.Clone(); cloneSetErrorInfoPdu.errorInfoPduData.shareDataHeader = errorInfoPduData.shareDataHeader; cloneSetErrorInfoPdu.errorInfoPduData.errorInfo = errorInfoPduData.errorInfo; return cloneSetErrorInfoPdu; }