public static PriorityChannelId fromRaw(byte[] rawData, int id) { PriorityChannelId ci = new PriorityChannelId(); id = id * 2; byte lower = rawData[ci.offset + id]; byte upper = rawData[ci.offset + id + 1]; ci.value = upper; ci.value = ci.value << 8; ci.value ^= lower; return(ci); }
private void setDataFromRawData() { name = Name.fromRaw(rawData); priorityChannel1 = PriorityChannelId.fromRaw(rawData, PriorityChannelId.CHANNEL1); priorityChannel2 = PriorityChannelId.fromRaw(rawData, PriorityChannelId.CHANNEL2); txDesignatedChannelId = TXDesignatedChannelId.fromRaw(rawData); signalingHoldTime = SignalingHoldTime.fromRaw(rawData); prioritySampleTime = PrioritySampleTime.fromRaw(rawData); for (int i = 0; i < ChannelId.MAX_ID; i++) { channelIDs[i] = ChannelId.fromRaw(rawData, i); } }