char[] m_sLabel; //note this comes from C and therefore last char must be zero //UINT16 nTotalScreens; //we do not save this one as will burn the FLASH before knowing final value public stFLASH_SweepStart(ref byte[] arrDataBlock, int nOffset) { m_eDataType = eExtFlashDataType.FLASH_DATA_TYPE_SWEEP_START; if (nOffset < arrDataBlock.Length - 3) { m_nSizeBlock16 = arrDataBlock[nOffset + 1]; m_nRecordID = arrDataBlock[nOffset + 2]; m_nInterval = arrDataBlock[nOffset + 3]; } else { m_nSizeBlock16 = 0; m_nRecordID = 0; m_nInterval = 0; } m_sLabel = new char[9]; for (int nInd = 0; nInd < 9; nInd++) m_sLabel[nInd] = (char)arrDataBlock[nOffset + 4 + nInd]; }
byte[] m_arrSweepPoints; //Array with all sweep points downloaded public stFLASH_SweepData_v1(ref byte[] arrDataBlock, int nOffset) { m_eDataType = eExtFlashDataType.FLASH_DATA_TYPE_SWEEP_v1; if (nOffset < arrDataBlock.Length - 1) { m_nSizeBlock16 = arrDataBlock[nOffset + 1]; } else { m_nSizeBlock16 = 0; } m_nFreqStartKHZ = (UInt32)(arrDataBlock[nOffset + 2] + arrDataBlock[nOffset + 3] * 0x100 + arrDataBlock[nOffset + 4] * 0x10000 + arrDataBlock[nOffset + 5] * 0x1000000); m_nFreqStepHZ = (UInt32)(arrDataBlock[nOffset + 6] + arrDataBlock[nOffset + 7] * 0x100 + arrDataBlock[nOffset + 8] * 0x10000 + arrDataBlock[nOffset + 9] * 0x1000000); m_nSweepPoints = arrDataBlock[nOffset + 10]; m_eMode = (RFECommunicator.eMode)arrDataBlock[nOffset + 11]; m_arrSweepPoints = new byte[m_nSweepPoints]; for (int nInd = 0; nInd < m_nSweepPoints; nInd++) { m_arrSweepPoints[nInd] = arrDataBlock[nOffset + 12 + nInd]; } }
char[] m_sLabel; //note this comes from C and therefore last char must be zero //UINT16 nTotalScreens; //we do not save this one as will burn the FLASH before knowing final value public stFLASH_SweepStart(ref byte[] arrDataBlock, int nOffset) { m_eDataType = eExtFlashDataType.FLASH_DATA_TYPE_SWEEP_START; if (nOffset < arrDataBlock.Length - 3) { m_nSizeBlock16 = arrDataBlock[nOffset + 1]; m_nRecordID = arrDataBlock[nOffset + 2]; m_nInterval = arrDataBlock[nOffset + 3]; } else { m_nSizeBlock16 = 0; m_nRecordID = 0; m_nInterval = 0; } m_sLabel = new char[9]; for (int nInd = 0; nInd < 9; nInd++) { m_sLabel[nInd] = (char)arrDataBlock[nOffset + 4 + nInd]; } }
byte[] m_arrSweepPoints; //Array with all sweep points downloaded public stFLASH_SweepData_v1(ref byte[] arrDataBlock, int nOffset) { m_eDataType = eExtFlashDataType.FLASH_DATA_TYPE_SWEEP_v1; if (nOffset < arrDataBlock.Length - 1) m_nSizeBlock16 = arrDataBlock[nOffset + 1]; else m_nSizeBlock16 = 0; m_nFreqStartKHZ = (UInt32)(arrDataBlock[nOffset + 2] + arrDataBlock[nOffset + 3] * 0x100 + arrDataBlock[nOffset + 4] * 0x10000 + arrDataBlock[nOffset + 5]*0x1000000); m_nFreqStepHZ = (UInt32)(arrDataBlock[nOffset + 6] + arrDataBlock[nOffset + 7] * 0x100 + arrDataBlock[nOffset + 8] * 0x10000 + arrDataBlock[nOffset + 9] * 0x1000000); m_nSweepPoints = arrDataBlock[nOffset + 10]; m_eMode = (RFECommunicator.eMode)arrDataBlock[nOffset + 11]; m_arrSweepPoints = new byte[m_nSweepPoints]; for (int nInd = 0; nInd < m_nSweepPoints; nInd++) { m_arrSweepPoints[nInd] = arrDataBlock[nOffset + 12 + nInd]; } }