dsi_serial_callback.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. This software is subject to the license described in the License.txt file
  3. included with this software distribution. You may not use this file except
  4. in compliance with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2016
  6. All rights reserved.
  7. */
  8. #if !defined(DSI_SERIAL_CALLBACK_HPP)
  9. #define DSI_SERIAL_CALLBACK_HPP
  10. #include "types.h"
  11. //////////////////////////////////////////////////////////////////////////////////
  12. // Public Class Prototypes
  13. //////////////////////////////////////////////////////////////////////////////////
  14. class DSISerialCallback
  15. {
  16. public:
  17. virtual ~DSISerialCallback(){}
  18. virtual void ProcessByte(UCHAR ucByte_) = 0;
  19. /////////////////////////////////////////////////////////////////
  20. // Processes a single received byte.
  21. // Parameters:
  22. // ucByte_: The byte to process.
  23. /////////////////////////////////////////////////////////////////
  24. virtual void Error(UCHAR ucError_) = 0;
  25. /////////////////////////////////////////////////////////////////
  26. // Signals an error.
  27. // Parameters:
  28. // ucError_: The error that has occured. This error
  29. // is defined by the DSISerial class
  30. // implementation.
  31. /////////////////////////////////////////////////////////////////
  32. };
  33. #endif // !defined(DSI_SERIAL_CALLBACK_HPP)