mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
19 lines
399 B
C++
19 lines
399 B
C++
#pragma once
|
|
|
|
#include "Bus/BusScanner.h"
|
|
#include "Bus/I2CScanner.h"
|
|
#include "Consts.h"
|
|
#include "Utils/JsonUtils.h"
|
|
|
|
class BusScannerFactory {
|
|
public:
|
|
static BusScanner* get(String& config, BusScanner_t type, String& str) {
|
|
switch (type) {
|
|
case BS_I2C:
|
|
return new I2CScanner(str);
|
|
default:
|
|
return nullptr;
|
|
}
|
|
}
|
|
};
|