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

a class to describe an EnOcean Device More...

#include <eoDevice.h>

Inheritance diagram for eoDevice:
Collaboration diagram for eoDevice:

Public Member Functions

 eoDevice (uint32_t id)
 
eoReturn SetProfile (eoProfile *myProfile)
 
eoReturn SetProfile (const uint8_t rorg, const uint8_t func, const uint8_t type)
 
eoProfileGetProfile (const uint8_t rorg=OMIT_RORG) const
 
eoReturn GetMaintenanceKey (uint8_t keyNumber, uint8_t key[16])
 Get a specific maintenance key. More...
 
eoReturn SetMaintenanceKey (uint8_t keyNumber, uint8_t key[16])
 Set a specific maintenance key which will be used fore secure communication. More...
 
uint8_t Serialize (eoArchive &a)
 Serialization Function which will be called by the eoStorageManager. More...
 
void LoadProfiles (const char *, eoArchive &a)
 

Public Attributes

int8_t dBm
 
uint32_t ID
 
eoSecureInfo secIn
 
eoSecureInfo secOut
 
uint32_t maintenanceRLC
 Rolling code used by the maintenance Device.
 

Detailed Description

a class to describe an EnOcean Device

this class contains all Information to handle a Device.

Examples:
deviceManager_example.cpp, and Security_example.cpp.

Constructor & Destructor Documentation

◆ eoDevice()

eoDevice::eoDevice ( uint32_t  id)

Constructor.

Parameters
idEnOcean ID of the device.

Member Function Documentation

◆ GetMaintenanceKey()

eoReturn eoDevice::GetMaintenanceKey ( uint8_t  keyNumber,
uint8_t  key[16] 
)

Get a specific maintenance key.

Parameters
Keyto get [1-15]
keyarray, in which the get key function writes
Returns
OK or error code

◆ GetProfile()

eoProfile* eoDevice::GetProfile ( const uint8_t  rorg = OMIT_RORG) const

Gets the Pointer to the eoProfile associated to this RORG and device.

Parameters
theRORG for which a profile is searched. Is none is selected the first profile associated with the device is returned.
Returns
the device eoProfile
Examples:
Gateway_example.cpp, Gateway_SubtypeExample.cpp, GatewayFiltered_example.cpp, genericProfile_examples.cpp, tutorial1.cpp, tutorial2.cpp, tutorial3.cpp, tutorial6.cpp, vld_example.cpp, and WatcherMain.cpp.

◆ Serialize()

uint8_t eoDevice::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.

◆ SetMaintenanceKey()

eoReturn eoDevice::SetMaintenanceKey ( uint8_t  keyNumber,
uint8_t  key[16] 
)

Set a specific maintenance key which will be used fore secure communication.

Parameters
Keyto get [1-15]
keyarray, in which the get key function writes
Returns
OK or error code

◆ SetProfile() [1/2]

eoReturn eoDevice::SetProfile ( eoProfile myProfile)

Sets an additional profile for the device.
If the same profile (RORG-FUNC-TYPE) identically , nothing happens. If a profile with the same RORG exist, the other one gets deleted.
If no profile with the same RORG exists for this device, an additional profile is created.

Parameters
myProfile
Note
this behavior changed in EoLink 1.11.0.0,
Returns
eoReturn::EO_OK or eoReturn::WRONG_PARAM if the passed profile has the same EEP

◆ SetProfile() [2/2]

eoReturn eoDevice::SetProfile ( const uint8_t  rorg,
const uint8_t  func,
const uint8_t  type 
)

Sets an additional profile for the device.
If the same profile (RORG-FUNC-TYPE) identically , nothing happens. If a profile with the same RORG exist, the other one gets deleted.
If no profile with the same RORG exists for this device, an additional profile is created.
If no profile can be created an error while be returned.

Parameters
rorgEEP RORG
funcEEP Func
typeEEP Type
Returns
eoReturn::EO_OK or eoReturn::NOT_SUPPORTED

Member Data Documentation

◆ dBm

int8_t eoDevice::dBm

last dBm

Examples:
deviceManager_example.cpp.

◆ ID

◆ secIn

eoSecureInfo eoDevice::secIn

Security Information for decryption

◆ secOut

eoSecureInfo eoDevice::secOut

Security Information for encryption

Examples:
Security_example.cpp.