subghz_protocol_came_twee.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma once
  2. #include "subghz_protocol_common.h"
  3. typedef struct SubGhzProtocolCameTwee SubGhzProtocolCameTwee;
  4. /** Allocate SubGhzProtocolCameTwee
  5. *
  6. * @return SubGhzProtocolCameTwee*
  7. */
  8. SubGhzProtocolCameTwee* subghz_protocol_came_twee_alloc();
  9. /** Free SubGhzProtocolCameTwee
  10. *
  11. * @param instance
  12. */
  13. void subghz_protocol_came_twee_free(SubGhzProtocolCameTwee* instance);
  14. /** Get upload protocol
  15. *
  16. * @param instance - SubGhzProtocolCameTwee instance
  17. * @param encoder - SubGhzProtocolCommonEncoder encoder
  18. * @return bool
  19. */
  20. bool subghz_protocol_came_twee_send_key(
  21. SubGhzProtocolCameTwee* instance,
  22. SubGhzProtocolCommonEncoder* encoder);
  23. /** Reset internal state
  24. * @param instance - SubGhzProtocolCameTwee instance
  25. */
  26. void subghz_protocol_came_twee_reset(SubGhzProtocolCameTwee* instance);
  27. /** Parse accepted duration
  28. *
  29. * @param instance - SubGhzProtocolCameTwee instance
  30. * @param data - LevelDuration level_duration
  31. */
  32. void subghz_protocol_came_twee_parse(
  33. SubGhzProtocolCameTwee* instance,
  34. bool level,
  35. uint32_t duration);
  36. /** Outputting information from the parser
  37. *
  38. * @param instance - SubGhzProtocolCameTwee* instance
  39. * @param output - output string
  40. */
  41. void subghz_protocol_came_twee_to_str(SubGhzProtocolCameTwee* instance, string_t output);
  42. /** Get a string to save the protocol
  43. *
  44. * @param instance - SubGhzProtocolCameTwee instance
  45. * @param output - the resulting string
  46. */
  47. void subghz_protocol_came_twee_to_save_str(SubGhzProtocolCameTwee* instance, string_t output);
  48. /** Loading protocol from file
  49. *
  50. * @param file_worker - FileWorker file_worker
  51. * @param instance - SubGhzProtocolCameTwee instance
  52. * @return bool
  53. */
  54. bool subghz_protocol_came_twee_to_load_protocol_from_file(
  55. FileWorker* file_worker,
  56. SubGhzProtocolCameTwee* instance);
  57. /** Loading protocol from bin data
  58. *
  59. * @param instance - SubGhzProtocolCameTwee instance
  60. * @param context - SubGhzProtocolCommonLoad context
  61. */
  62. void subghz_decoder_came_twee_to_load_protocol(SubGhzProtocolCameTwee* instance, void* context);