add test setup

This commit is contained in:
Robert 2023-07-02 18:24:59 +02:00
parent 89fcef5619
commit ddf35406c3
3 changed files with 19 additions and 3 deletions

View file

@ -15,14 +15,16 @@ public:
Device(const std::string& macAddress);
Device(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t e, uint8_t f);
inline static std::shared_ptr<Device> create(const std::string& macAddress) {
inline static std::shared_ptr<Device> Create(const std::string& macAddress) {
return std::make_shared<Device>(macAddress);
}
inline static std::shared_ptr<Device> create() {
inline static std::shared_ptr<Device> Create() {
return std::make_shared<Device>(rand() % 256, rand() % 256, rand() % 256, rand() % 256, rand() % 256, rand() % 256);
}
void Connect(std::shared_ptr<Device> other);
private:
void parseAndSetMac(const std::string& macAddress);