mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
reverting version
This commit is contained in:
18
include/Bus/BusScannerFactory.h
Normal file
18
include/Bus/BusScannerFactory.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user