|
MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
|
IO Factory Class. More...
#include <meshx_io_factory.hpp>
Public Member Functions | |
| bool | registerType (IoType type, IoFactoryFunction factory_func) |
| Register IO type factory function. | |
| std::unique_ptr< MeshXIoInterface > | create (const IoConfig &config) |
| Create IO instance. | |
| std::unique_ptr< MeshXIoInterface > | createFromYaml (const void *yaml_config) |
| Create IO instance from YAML configuration. | |
| bool | isTypeSupported (IoType type) const |
| Check if IO type is supported. | |
Static Public Member Functions | |
| static MeshXIoFactory & | getInstance () |
| Get singleton instance. | |
Private Member Functions | |
| MeshXIoFactory ()=default | |
| ~MeshXIoFactory ()=default | |
| MeshXIoFactory (const MeshXIoFactory &)=delete | |
| MeshXIoFactory & | operator= (const MeshXIoFactory &)=delete |
Private Attributes | |
| std::unordered_map< IoType, IoFactoryFunction > | factory_registry_ |
IO Factory Class.
This factory creates IO instances based on configuration.
|
privatedefault |
|
privatedefault |
|
privatedelete |
| std::unique_ptr< MeshXIoInterface > meshx::MeshXIoFactory::create | ( | const IoConfig & | config | ) |
Create IO instance.
| config | IO configuration |
| std::unique_ptr< MeshXIoInterface > meshx::MeshXIoFactory::createFromYaml | ( | const void * | yaml_config | ) |
Create IO instance from YAML configuration.
| yaml_config | YAML configuration node |
|
static |
Get singleton instance.
| bool meshx::MeshXIoFactory::isTypeSupported | ( | IoType | type | ) | const |
Check if IO type is supported.
| type | IO type to check |
|
privatedelete |
| bool meshx::MeshXIoFactory::registerType | ( | IoType | type, |
| IoFactoryFunction | factory_func ) |
Register IO type factory function.
| type | IO type |
| factory_func | Factory function |
|
private |