EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoDeviceManager Class Reference

Manages the devices. More...

#include <eoDeviceManager.h>

Inheritance diagram for eoDeviceManager:
Collaboration diagram for eoDeviceManager:

Public Member Functions

 eoDeviceManager ()
 
eoDeviceAdd (uint32_t id)
 
eoDeviceGet (uint32_t id)
 
void Remove (uint32_t id)
 
void RemoveAll ()
 
const id_device_mapGetDeviceList () const
 
uint32_t Size () const
 
uint8_t Serialize (eoArchive &a)
 Serialization Function which will be called by the eoStorageManager. More...
 

Detailed Description

Manages the devices.

The DeviceManagaer helps you to manage different devices. Using it functions you can get a eoDevice Pointer to the Devices.

Examples:
deviceManager_example.cpp.

Constructor & Destructor Documentation

◆ eoDeviceManager()

eoDeviceManager::eoDeviceManager ( )

Constructor

Member Function Documentation

◆ Add()

eoDevice* eoDeviceManager::Add ( uint32_t  id)

It a device with same id already exist, returns a pointer to this Device otherwise adds a device with the id to the device manager

Parameters
idThe SourceID of the Device
Returns
Pointer to the Device
Examples:
deviceManager_example.cpp, and Security_example.cpp.

◆ Get()

eoDevice* eoDeviceManager::Get ( uint32_t  id)

Searches for the id in the DeviceManager and returns a Device pointer if there was a device found otherwise NULL

Parameters
idThe SourceID of the Device
Returns
Pointer to the Device
Examples:
deviceManager_example.cpp, and Security_example.cpp.

◆ GetDeviceList()

const id_device_map& eoDeviceManager::GetDeviceList ( ) const

Returns the map containing all the Devices.

Returns
Reference to the id_device_map of the DeviceManager

◆ Remove()

void eoDeviceManager::Remove ( uint32_t  id)

Removes the Device from the DeviceManager if the Device exists

Parameters
idof the Device to Delete
Examples:
deviceManager_example.cpp.

◆ RemoveAll()

void eoDeviceManager::RemoveAll ( )

Removes all the Device from the DeviceManager

◆ Serialize()

uint8_t eoDeviceManager::Serialize ( eoArchive arch)
virtual

Serialization Function which will be called by the eoStorageManager.

This function will be called by the eoArchive(inside of the eoStorageManager) and allows the class to be Serialized.

Parameters
archarchive where to Load or to Store.

Implements eoISerialize.

◆ Size()

uint32_t eoDeviceManager::Size ( ) const

Gets the number of Devices in the DeviceManager

Returns
number of Devices