esv.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /******************************************************************
  2. *
  3. * uEcho for C
  4. *
  5. * Copyright (C) Satoshi Konno 2015
  6. *
  7. * This is licensed under BSD-style license, see file COPYING.
  8. *
  9. ******************************************************************/
  10. #ifndef _UECHO_ESV_H_
  11. #define _UECHO_ESV_H_
  12. #include <uecho/const.h>
  13. #include <uecho/typedef.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /****************************************
  18. * Data Type
  19. ****************************************/
  20. typedef byte uEchoEsv;
  21. /****************************************
  22. * Constant
  23. ****************************************/
  24. enum {
  25. uEchoEsvWriteRequest = 0x60,
  26. uEchoEsvWriteRequestResponseRequired = 0x61,
  27. uEchoEsvReadRequest = 0x62,
  28. uEchoEsvNotificationRequest = 0x63,
  29. uEchoEsvWriteReadRequest = 0x6E,
  30. uEchoEsvWriteResponse = 0x71,
  31. uEchoEsvReadResponse = 0x72,
  32. uEchoEsvNotification = 0x73,
  33. uEchoEsvNotificationResponseRequired = 0x74,
  34. uEchoEsvNotificationResponse = 0x7A,
  35. uEchoEsvWriteReadResponse = 0x7E,
  36. uEchoEsvWriteRequestError = 0x50,
  37. uEchoEsvWriteRequestResponseRequiredError = 0x51,
  38. uEchoEsvReadRequestError = 0x52,
  39. uEchoEsvNotificationRequestError = 0x53,
  40. uEchoEsvWriteReadRequestError = 0x5E,
  41. };
  42. /****************************************
  43. * Function
  44. ****************************************/
  45. bool uecho_esv_isnotification(uEchoEsv esv);
  46. bool uecho_esv_iswriterequest(uEchoEsv esv);
  47. bool uecho_esv_isreadrequest(uEchoEsv esv);
  48. bool uecho_esv_isnotifyrequest(uEchoEsv esv);
  49. bool uecho_esv_iswriteresponse(uEchoEsv esv);
  50. bool uecho_esv_isreadresponse(uEchoEsv esv);
  51. bool uecho_esv_isnotifyresponse(uEchoEsv esv);
  52. bool uecho_esv_isrequest(uEchoEsv esv);
  53. bool uecho_esv_isresponse(uEchoEsv esv);
  54. #ifdef __cplusplus
  55. } /* extern C */
  56. #endif
  57. #endif /* _UECHO_ESV_H_ */