RedFlyNBNS.h 606 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef REDFLYNBNS_h
  2. #define REDFLYNBNS_h
  3. #include <inttypes.h>
  4. #if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR))
  5. # include <avr/pgmspace.h>
  6. #endif
  7. #include "RedFlyServer.h"
  8. class RedFlyNBNS : RedFlyServer
  9. {
  10. public:
  11. RedFlyNBNS(void);
  12. RedFlyNBNS(char *name);
  13. ~RedFlyNBNS(void);
  14. void setName(char *name);
  15. #if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR))
  16. void setNamePGM(PGM_P name);
  17. #endif
  18. uint8_t service(void);
  19. private:
  20. char devname[16+1];
  21. uint8_t decode(char *dst, char *src);
  22. void encode(char *dst, char *src, uint8_t type);
  23. };
  24. #endif //REDFLYNBNS_h