subghz_protocol_star_line.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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(SubGhzProtocolStarLine* instance, uint64_t key, uint8_t bit, uint8_t repeat);
  35. /** Reset internal state
  36. * @param instance - SubGhzProtocolStarLine instance
  37. */
  38. void subghz_protocol_star_line_reset(SubGhzProtocolStarLine* instance);
  39. /** Analysis of received data
  40. *
  41. * @param instance SubGhzProtocolStarLine instance
  42. */
  43. void subghz_protocol_star_line_check_remote_controller(SubGhzProtocolStarLine* instance);
  44. /** Parse accepted duration
  45. *
  46. * @param instance - SubGhzProtocolStarLine instance
  47. * @param data - LevelDuration level_duration
  48. */
  49. void subghz_protocol_star_line_parse(SubGhzProtocolStarLine* instance, bool level, uint32_t duration);
  50. /** Outputting information from the parser
  51. *
  52. * @param instance - SubGhzProtocolStarLine* instance
  53. * @param output - output string
  54. */
  55. void subghz_protocol_star_line_to_str(SubGhzProtocolStarLine* instance, string_t output);
  56. /** Loading protocol from bin data
  57. *
  58. * @param instance - SubGhzDecoderPrinceton instance
  59. * @param context - SubGhzProtocolCommonLoad context
  60. */
  61. void subghz_decoder_star_line_to_load_protocol(SubGhzProtocolStarLine* instance, void* context);