Exemplo n.º 1
0
        public ResponseHandler(IPacketHandler handler, IAnalyzerState analyzerState)
        {
            this.analyzerState = analyzerState;

            handler.AddResponseHandler((byte)Protocol.ResponsesTypes.BARCODE_RESPONSE, new Action <byte[]>(ProcessBarcodeResponse));
            handler.AddResponseHandler((byte)Protocol.ResponsesTypes.COMMAND_STATE_RESPONSE, new Action <byte[]>(ProcessCommandStateResponse));
            handler.AddResponseHandler((byte)Protocol.ResponsesTypes.DEBUG_MESSAGE_RESPONSE, new Action <byte[]>(ProcessDebugMessageResponse));
            handler.AddResponseHandler((byte)Protocol.ResponsesTypes.FIRMWARE_VERSION_RESPONSE, new Action <byte[]>(ProcessFirmwareVersionResponse));
            handler.AddResponseHandler((byte)Protocol.ResponsesTypes.SENSORS_VALUES_RESPONSE, new Action <byte[]>(ProcessSensorsValuesResponse));
            handler.AddResponseHandler((byte)Protocol.ResponsesTypes.STEPPERS_STATES_RESPONSE, new Action <byte[]>(ProcessSteppersStatesResponse));
        }