/// <summary> /// Initialize all the codecs. /// </summary> public AdcpCodec() { // Counters _binaryCounter = 0; _dvlCounter = 0; _pd0Counter = 0; _pd6_13Counter = 0; _pd4_5Counter = 0; //PD0 Subsystem Generator _pd0SubsystemGen = new Pd0SubsystemGen(); // Binary Codecs _binaryCodec = new AdcpBinaryCodecNew(); _binaryCodec.ProcessDataEvent += new AdcpBinaryCodecNew.ProcessDataEventHandler(_binaryCodec_ProcessDataEvent); _binaryCodec.ProcessDataCompleteEvent += binaryCodec_ProcessDataCompleteEvent; _binaryCodec.GoodEnsembleEvent += ReceivedGoodEnsembleEvent; _binaryCodec.BadEnsembleEvent += ReceivedBadEnsembleEvent; // DVL Codec _dvlCodec = new AdcpDvlCodec(); _dvlCodec.ProcessDataEvent += new AdcpDvlCodec.ProcessDataEventHandler(_dvlCodec_ProcessDataEvent); _dvlCodec.ProcessDataCompleteEvent += dvlCodec_ProcessDataCompleteEvent; // PD0 Codec _pd0Codec = new Pd0Codec(); _pd0Codec.ProcessDataEvent += new Pd0Codec.ProcessDataEventHandler(_pd0Codec_ProcessDataEvent); _pd0Codec.ProcessDataCompleteEvent += pd0Codec_ProcessDataCompleteEvent; _pd0Codec.GoodEnsembleEvent += ReceivedGoodEnsembleEvent; _pd0Codec.BadEnsembleEvent += ReceivedBadEnsembleEvent; // PD6 and PD13 Codec _pd6_13Codec = new Pd6_13Codec(); _pd6_13Codec.ProcessDataEvent += new Pd6_13Codec.ProcessDataEventHandler(_pd6_13Codec_ProcessDataEvent); _pd6_13Codec.ProcessDataCompleteEvent += pd6_13Codec_ProcessDataCompleteEvent; // PD4 and PD5 Codec _pd4_5Codec = new PD4_5Codec(); _pd4_5Codec.ProcessDataEvent += new PD4_5Codec.ProcessDataEventHandler(_pd4_5Codec_ProcessDataEvent); _pd4_5Codec.ProcessDataCompleteEvent += pd4_5Codec_ProcessDataCompleteEvent; }
/// <summary> /// Initialize all the codecs. /// </summary> public AdcpCodec() { // Counters _binaryCounter = 0; _dvlCounter = 0; _pd0Counter = 0; _pd6_13Counter = 0; _pd4_5Counter = 0; // Binary Codecs _binaryCodec = new AdcpBinaryCodec(); _binaryCodec.ProcessDataEvent += new AdcpBinaryCodec.ProcessDataEventHandler(_binaryCodec_ProcessDataEvent); _binaryCodec.ProcessDataCompleteEvent += binaryCodec_ProcessDataCompleteEvent; // DVL Codec _dvlCodec = new AdcpDvlCodec(); _dvlCodec.ProcessDataEvent += new AdcpDvlCodec.ProcessDataEventHandler(_dvlCodec_ProcessDataEvent); _dvlCodec.ProcessDataCompleteEvent += dvlCodec_ProcessDataCompleteEvent; // PD0 Codec _pd0Codec = new Pd0Codec(); _pd0Codec.ProcessDataEvent += new Pd0Codec.ProcessDataEventHandler(_pd0Codec_ProcessDataEvent); _pd0Codec.ProcessDataCompleteEvent += pd0Codec_ProcessDataCompleteEvent; // PD6 and PD13 Codec _pd6_13Codec = new Pd6_13Codec(); _pd6_13Codec.ProcessDataEvent += new Pd6_13Codec.ProcessDataEventHandler(_pd6_13Codec_ProcessDataEvent); _pd6_13Codec.ProcessDataCompleteEvent += pd6_13Codec_ProcessDataCompleteEvent; // PD4 and PD5 Codec _pd4_5Codec = new PD4_5Codec(); _pd4_5Codec.ProcessDataEvent += new PD4_5Codec.ProcessDataEventHandler(_pd4_5Codec_ProcessDataEvent); _pd4_5Codec.ProcessDataCompleteEvent += pd4_5Codec_ProcessDataCompleteEvent; }