public static RXFrequency fromRaw(byte[] rawData) { RXFrequency rxf = new RXFrequency(); byte[] bcdBytes = new byte[4]; Array.Copy(rawData, offset, bcdBytes, 0, 4); if ((bcdBytes[0] ^ 0xff) > 0 && (bcdBytes[1] ^ 0xff) > 0 && (bcdBytes[2] ^ 0xff) > 0 && (bcdBytes[3] ^ 0xff) > 0) { rxf.fromBCD(bcdBytes); } else { rxf.Value = -1; } return(rxf); }
private void setDataFromRawData() { //Mode mode = ChannelMode.fromRaw(rawData); //ChannelName name = ChannelName.fromRaw(rawData); //RxFreq rxFreq = RXFrequency.fromRaw(rawData); //TxFreq txFreq = TXFrequency.fromRaw(rawData); //BW bandwidth = Bandwidth.fromRaw(rawData); //ScnLst scanListId = rawData[11]; //Sql squelch = Squelch.fromRaw(rawData); //RxRef rxRefFrequency = RxTxRefFrequency.fromRaw(rawData, RxTxRefFrequency.OFFSET_RX); //TxRef txRefFrequency = RxTxRefFrequency.fromRaw(rawData, RxTxRefFrequency.OFFSET_TX); //TOT tot = TimeOutTimer.fromRaw(rawData); //Rekey rekeyDelay = rawData[9]; //Power power = TXPower.FromRaw(rawData); //Admit admitCriteria = AdmitCriteria.fromRaw(rawData); //AScn autoScan.fromRaw(rawData); //RxOnly rxOnly.fromRaw(rawData); //Lone loneWorker.fromRaw(rawData); //VOX vox.fromRaw(rawData); //ATA allowTalkAroung.fromRaw(rawData); //Enc encCTCSS = CTCSS.fromRaw(rawData, CTCSS.OFFSET_ENC); //Dec decCTCSS = CTCSS.fromRaw(rawData, CTCSS.OFFSET_DEC); //QtRev qtReverse = QTReverse.fromRaw(rawData); //RxSig rxSignalingSystem = SignalingSystem.fromRaw(rawData, SignalingSystem.OFFSET_RX); //TxSig txSignalingSystem = SignalingSystem.fromRaw(rawData, SignalingSystem.OFFSET_TX); //RBurst reverseBurst.fromRaw(rawData); //PTTID displayPTTId.fromRaw(rawData); //Dec1 decode1.fromRaw(rawData); //Dec2 decode2.fromRaw(rawData); //Dec3 decode3.fromRaw(rawData); //Dec4 decode4.fromRaw(rawData); //Dec5 decode5.fromRaw(rawData); //Dec6 decode6.fromRaw(rawData); //Dec7 decode7.fromRaw(rawData); //Dec8 decode8.fromRaw(rawData); //PCC privateCallConfirmed.fromRaw(rawData); //EAA emergencyCallAck.fromRaw(rawData); //DCC dataCallConfirmed.fromRaw(rawData); //UDP compressedUPDHeader.fromRaw(rawData); //ESyst emergencySystemId = rawData[10]; //Contact contactId = ContactId.fromRaw(rawData); //GrpLst groupListId = rawData[12]; //Color colorCode = ColorCode.fromRaw(rawData); //Priv privacy = Privacy.fromRaw(rawData); //PrivNo privacyNo = PrivacyNo.fromRaw(rawData); //Slot repeaterSlot = RepeaterSlot.fromRaw(rawData); }