ibutton-key.h 589 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <stdint.h>
  3. #include "helpers/key-info.h"
  4. class iButtonKey {
  5. public:
  6. uint8_t get_size();
  7. void set_data(uint8_t* data, uint8_t data_count);
  8. void clear_data();
  9. uint8_t* get_data();
  10. uint8_t get_type_data_size();
  11. void set_name(const char* name);
  12. char* get_name();
  13. void set_type(iButtonKeyType key_type);
  14. iButtonKeyType get_key_type();
  15. iButtonKey();
  16. private:
  17. uint8_t data[IBUTTON_KEY_DATA_SIZE] = {0, 0, 0, 0, 0, 0, 0, 0};
  18. char name[IBUTTON_KEY_NAME_SIZE] = {0};
  19. iButtonKeyType type = iButtonKeyType::KeyDallas;
  20. };