subghz_protocol_star_line.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #pragma once
  2. #include "subghz_protocol_common.h"
  3. typedef struct SubGhzKeystore SubGhzKeystore;
  4. typedef struct SubGhzProtocolStarLine SubGhzProtocolStarLine;
  5. /** Allocate SubGhzProtocolStarLine
  6. *
  7. * @return SubGhzProtocolStarLine*
  8. */
  9. SubGhzProtocolStarLine* subghz_protocol_star_line_alloc(SubGhzKeystore* keystore);
  10. /** Free SubGhzProtocolStarLine
  11. *
  12. * @param instance
  13. */
  14. void subghz_protocol_star_line_free(SubGhzProtocolStarLine* instance);
  15. /** Find and get manufacture name
  16. *
  17. * @param context - SubGhzProtocolStarLine context
  18. * @return name - char* manufacture name
  19. */
  20. const char* subghz_protocol_star_line_find_and_get_manufacture_name(void* context);
  21. /** Get manufacture name
  22. *
  23. * @param context - SubGhzProtocolStarLine context
  24. * @return name - char* manufacture name
  25. */
  26. const char* subghz_protocol_star_line_get_manufacture_name(void* context);
  27. /** Sends the key on the air
  28. *
  29. * @param instance - SubGhzProtocolStarLine instance
  30. * @param key - key send
  31. * @param bit - count bit key
  32. * @param repeat - repeat send key
  33. */
  34. void subghz_protocol_star_line_send_key(
  35. SubGhzProtocolStarLine* instance,
  36. uint64_t key,
  37. uint8_t bit,
  38. uint8_t repeat);
  39. /** Reset internal state
  40. * @param instance - SubGhzProtocolStarLine instance
  41. */
  42. void subghz_protocol_star_line_reset(SubGhzProtocolStarLine* instance);
  43. /** Analysis of received data
  44. *
  45. * @param instance SubGhzProtocolStarLine instance
  46. */
  47. void subghz_protocol_star_line_check_remote_controller(SubGhzProtocolStarLine* instance);
  48. /** Parse accepted duration
  49. *
  50. * @param instance - SubGhzProtocolStarLine instance
  51. * @param data - LevelDuration level_duration
  52. */
  53. void subghz_protocol_star_line_parse(
  54. SubGhzProtocolStarLine* instance,
  55. bool level,
  56. uint32_t duration);
  57. /** Outputting information from the parser
  58. *
  59. * @param instance - SubGhzProtocolStarLine* instance
  60. * @param output - output string
  61. */
  62. void subghz_protocol_star_line_to_str(SubGhzProtocolStarLine* instance, string_t output);
  63. /** Loading protocol from bin data
  64. *
  65. * @param instance - SubGhzDecoderPrinceton instance
  66. * @param context - SubGhzProtocolCommonLoad context
  67. */
  68. void subghz_decoder_star_line_to_load_protocol(SubGhzProtocolStarLine* instance, void* context);