EnOcean Link
1.14.0.0
Middleware to Connect EnOcean easily to other Projects
|
handles TeachIn Messages More...
#include <eoTeachInModule.h>
Public Member Functions | |
eoTeachInModule (eoDeviceManager *eoDevManager, eoSecurity *sec) | |
void | SetRPS (uint8_t func, uint8_t type) |
void | Set1BS (uint8_t func, uint8_t type) |
void | Set4BS (uint8_t func, uint8_t type) |
TEACH_RETURN | TeachIN (eoMessage &m) |
handles Teach IN Message More... | |
TEACH_RETURN | TeachIN (uint8_t rorg, uint8_t func, uint8_t type, uint32_t device_id) |
handles Teach IN Message More... | |
void | SetAutoTeachOut (bool enable) |
bool | GetAutoTeachOut () |
void | TeachOut (uint32_t id) |
bool | isTeachedIN (eoMessage &telegram) |
bool | isTeachedIN (eoDevice &dev) |
bool | isTeachedIN (uint32_t deviceID, uint8_t u8Rorg=0xFF) |
DEPRECATED (eoReturn ParseUTE(eoMessage &msg)) | |
DEPRECATED (eoReturn CreateUTEResponse(eoMessage &teachInUTE, eoMessage &responseUTE, UTE_RESPONSE type, UTE_DIRECTION direction)) | |
eoReturn | CreateGPResponse (eoMessage &msg, uint16_t manId, uint32_t destinationId, GP_RESPONSE_RESULT response, eoProfile *profile) |
virtual uint8_t | Serialize (eoArchive &arch) |
Serialization Function which will be called by the eoStorageManager. More... | |
UTE_EEP_TEACH_IN_QUERY | GetUTEQuery () |
Static Public Member Functions | |
static bool | isTeachIN (eoMessage &telegram) |
Friends | |
class | eoTeachMessageHandler |
handles TeachIn Messages
a helper class to handle different TeachIn Messages (GP_TI, UTE, RPS/4BS/1BS EEP Teach IN request and SEC_TI)
eoTeachInModule::eoTeachInModule | ( | eoDeviceManager * | eoDevManager, |
eoSecurity * | sec | ||
) |
Standard constructor for the TeachInModule
eoDevManager | eoDeviceManager |
sec | security Module to use to handle security Messages |
eoReturn eoTeachInModule::CreateGPResponse | ( | eoMessage & | msg, |
uint16_t | manId, | ||
uint32_t | destinationId, | ||
GP_RESPONSE_RESULT | response, | ||
eoProfile * | profile | ||
) |
Creates GP teach in response for GP teach in
msg | |
manId | manufacturer ID |
destinationId | |
response | GP_RESPONSE_RESULT |
profile |
eoTeachInModule::DEPRECATED | ( | eoReturn | ParseUTEeoMessage &msg | ) |
Parse the message into UTE
msg |
eoTeachInModule::DEPRECATED | ( | eoReturn | CreateUTEResponseeoMessage &teachInUTE, eoMessage &responseUTE, UTE_RESPONSE type, UTE_DIRECTION direction | ) |
Creates UTE teach in response from UTE teach in request
teachInUTE | ||
[out] | responseUTE | |
type | UTE_RESPONSE | |
direction | UTE_DIRECTION |
|
inline |
Get the autoTeachOut of the TeachInModule
UTE_EEP_TEACH_IN_QUERY eoTeachInModule::GetUTEQuery | ( | ) |
If an UTE has been received, this returns a copy of the query information
bool eoTeachInModule::isTeachedIN | ( | eoMessage & | telegram | ) |
Checks if the device belonging to the Message is teached IN
telegram |
bool eoTeachInModule::isTeachedIN | ( | eoDevice & | dev | ) |
Checkes if the device is Teached IN
dev | device to check |
bool eoTeachInModule::isTeachedIN | ( | uint32_t | deviceID, |
uint8_t | u8Rorg = 0xFF |
||
) |
Checkes if the device is Teached IN
dev | deviceID to check |
|
static |
Returns True if it is a teach IN telegram for 4BS or 1BS
telegram | to check |
|
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.
arch | archive where to Load or to Store. |
Implements eoISerialize.
void eoTeachInModule::Set1BS | ( | uint8_t | func, |
uint8_t | type | ||
) |
void eoTeachInModule::Set4BS | ( | uint8_t | func, |
uint8_t | type | ||
) |
Allows you to set the manual 4BS EEP to use
func | |
type |
|
inline |
Enables or Disables the autoTeachOut of the TeachInModule
enable | enable or disable autoteachout |
void eoTeachInModule::SetRPS | ( | uint8_t | func, |
uint8_t | type | ||
) |
Allows you to set the manual RPS EEP to use
func | |
type |
TEACH_RETURN eoTeachInModule::TeachIN | ( | eoMessage & | m | ) |
handles Teach IN Message
This function uses the information passed in the message to teach in a new device. If the device is already teached in and the message is not a teach out request, a SECOND_TEACH_IN will be returned and the device will not be teached in. If the message is a security teach in, the security parameters will be set and saved in the device manager, if the security teach Information is from a ptm device, a ptm profile will be generated.
EEP teach in messages and generic teach in messages will be parsed accordingly to spec, and a profile will be created if it is supported.
For profiles which do not support teach in information (e.g. rps), the information has to be set before using the SetRPS,Set1Bs,.. function
If a profile has been set the return value will be either EEP_TEACH_IN,NEW_DEVICE_AND_EPP or GENERIC_TEACH_IN.
If the message is a teach out request, or the request type is set not specified/toogle a REQUEST_FOR_TEACH_OUT is generated
m |
TEACH_RETURN eoTeachInModule::TeachIN | ( | uint8_t | rorg, |
uint8_t | func, | ||
uint8_t | type, | ||
uint32_t | device_id | ||
) |
handles Teach IN Message
This function uses the information passed to manually teach in a new device. If the device is already teached in SECOND_TEACH_IN will be returned and the device will not be teached in.
If a profile has been set the return value will be either EEP_TEACH_IN,NEW_DEVICE_AND_EPP
rorg | |
func | |
type | |
deviceID | Id of the device to teach in |
void eoTeachInModule::TeachOut | ( | uint32_t | id | ) |
Removes all saved information about a device
id | Device ID |