function decode_realtime(data) {
	function isFlexClass(vita49_dgram) {
		return vita49_dgram.class.oui === VITA_FLEX_OUI &&
			vita49_dgram.class.information_class === VITA_FLEX_INFORMATION_CLASS;
	}

	function isDataStream(vita49_dgram) {
		return vita49_dgram.packet_type == vita49.PacketType.ext_data_stream ||
				vita49_dgram.packet_type == vita49.PacketType.if_data_stream;
	}

	const vita49_dgram = vita49.decode(data);
	if (vita49_dgram) {
		if (isDataStream(vita49_dgram) && isFlexClass(vita49_dgram)) {
			let payload = null;
			switch (vita49_dgram.class.packet_class) {
				case RealtimePacketClass.meter:
					payload = decode_meters(vita49_dgram);
					break;

				case RealtimePacketClass.panadapter:
					payload = decode_panadapter(vita49_dgram);
					break;

				case RealtimePacketClass.waterfall:
					payload = decode_waterfall(vita49_dgram);
					break;

				case RealtimePacketClass.opus:
					payload = decode_opus(vita49_dgram);
					break;

				case RealtimePacketClass.daxAudio:
				case RealtimePacketClass.daxReducedBw:
				case RealtimePacketClass.daxIq24:
				case RealtimePacketClass.daxIq48:
				case RealtimePacketClass.daxIq96:
				case RealtimePacketClass.daxIq192:
					payload = decode_dax(vita49_dgram);
					break;

				case RealtimePacketClass.discovery:
					payload = decode_discovery(vita49_dgram);
					break;

				default:
					payload = vita49_dgram;
					break;
			}

			if (payload) {
				return {
					type: RealtimePacketClass.decode(vita49_dgram.class.packet_class),
					stream: to_hex(vita49_dgram.stream),
					sequence: vita49_dgram.sequence,
					payload: payload
				};
			}
		}
	}

	return null;
}
// decode_realtime() -- decode data sent from a FlexRadio on the UDP data channel
- decode data sent from a FlexRadio on the UDP data channel
- decode data sent from a FlexRadio on the UDP data channel
function decode_realtime(data) {
	function isFlexClass(vita49_dgram) {
		return vita49_dgram.class.oui === VITA_FLEX_OUI &&
			vita49_dgram.class.information_class === VITA_FLEX_INFORMATION_CLASS;
	}
	function isDataStream(vita49_dgram) {
		return vita49_dgram.packet_type == vita49.PacketType.ext_data_stream ||
				vita49_dgram.packet_type == vita49.PacketType.if_data_stream;
	}
	const vita49_dgram = vita49.decode(data);
	if (vita49_dgram) {
		if (isDataStream(vita49_dgram) && isFlexClass(vita49_dgram)) {
			let payload = null;
			switch (vita49_dgram.class.packet_class) {
				case RealtimePacketClass.meter:
					payload = decode_meters(vita49_dgram);
					break;
				case RealtimePacketClass.panadapter:
					payload = decode_panadapter(vita49_dgram);
					break;
				case RealtimePacketClass.waterfall:
					payload = decode_waterfall(vita49_dgram);
					break;
				case RealtimePacketClass.opus:
					payload = decode_opus(vita49_dgram);
					break;
				case RealtimePacketClass.daxAudio:
				case RealtimePacketClass.daxReducedBw:
				case RealtimePacketClass.daxIq24:
				case RealtimePacketClass.daxIq48:
				case RealtimePacketClass.daxIq96:
				case RealtimePacketClass.daxIq192:
					payload = decode_dax(vita49_dgram);
					break;
				case RealtimePacketClass.discovery:
					payload = decode_discovery(vita49_dgram);
					break;
				default:
					payload = vita49_dgram;
					break;
			}
			if (payload) {
				return {
					type: RealtimePacketClass.decode(vita49_dgram.class.packet_class),
					stream: to_hex(vita49_dgram.stream),
					sequence: vita49_dgram.sequence,
					payload: payload
				};
			}
		}
	}
	return null;
}
function decode_realtime ( data ) { function isFlexClass ( vita49_dgram ) { return vita49_dgram . class . oui === VITA_FLEX_OUI && vita49_dgram . class . information_class === VITA_FLEX_INFORMATION_CLASS ; } function isDataStream ( vita49_dgram ) { return vita49_dgram . packet_type == vita49 . PacketType . ext_data_stream || vita49_dgram . packet_type == vita49 . PacketType . if_data_stream ; } const vita49_dgram = vita49 . decode ( data ) ; if ( vita49_dgram ) { if ( isDataStream ( vita49_dgram ) && isFlexClass ( vita49_dgram ) ) { let payload = null ; switch ( vita49_dgram . class . packet_class ) { case RealtimePacketClass . meter : payload = decode_meters ( vita49_dgram ) ; break ; case RealtimePacketClass . panadapter : payload = decode_panadapter ( vita49_dgram ) ; break ; case RealtimePacketClass . waterfall : payload = decode_waterfall ( vita49_dgram ) ; break ; case RealtimePacketClass . opus : payload = decode_opus ( vita49_dgram ) ; break ; case RealtimePacketClass . daxAudio : case RealtimePacketClass . daxReducedBw : case RealtimePacketClass . daxIq24 : case RealtimePacketClass . daxIq48 : case RealtimePacketClass . daxIq96 : case RealtimePacketClass . daxIq192 : payload = decode_dax ( vita49_dgram ) ; break ; case RealtimePacketClass . discovery : payload = decode_discovery ( vita49_dgram ) ; break ; default : payload = vita49_dgram ; break ; } if ( payload ) { return { type : RealtimePacketClass . decode ( vita49_dgram . class . packet_class ) , stream : to_hex ( vita49_dgram . stream ) , sequence : vita49_dgram . sequence , payload : payload } ; } } } return null ; }
decode_realtime() -- decode data sent from a FlexRadio on the UDP data channel
decode_realtime () -- decode data sent from a FlexRadio on the UDP data channel