/// <summary> /// Parse TS_SET_ERROR_INFO_PDU /// (parser index is updated according to parsed length) /// </summary> /// <param name="data">data to be parsed</param> /// <param name="currentIndex">current parser index</param> /// <returns>TS_SET_ERROR_INFO_PDU</returns> private TS_SET_ERROR_INFO_PDU ParseTsSetErrorInfoPdu(byte[] data, ref int currentIndex) { TS_SET_ERROR_INFO_PDU pdu = new TS_SET_ERROR_INFO_PDU(); // TS_SET_ERROR_INFO_PDU: shareDataHeader pdu.shareDataHeader = ParseTsShareDataHeader(data, ref currentIndex); // TS_SET_ERROR_INFO_PDU: errorInfo pdu.errorInfo = (errorInfo_Values)ParseUInt32(data, ref currentIndex, false); return pdu; }
private byte[] EncodeErrorInfoData(TS_SET_ERROR_INFO_PDU errorInfoPduData) { List<byte> dataBuffer = new List<byte>(); RdpbcgrEncoder.EncodeStructure(dataBuffer, errorInfoPduData.shareDataHeader); RdpbcgrEncoder.EncodeStructure(dataBuffer, (uint)errorInfoPduData.errorInfo); return dataBuffer.ToArray(); }