EnOcean Link
1.14.0.0
Middleware to Connect EnOcean easily to other Projects
|
In this Tutorial tutorial3.cpp we receive Information from an EEP A5-02-05 and translate it to A5-02-20 Profile. The same configuration as in Tutorial 2 is used and loaded.
Now as we want to send data, we've to create an eoTelegram and eoProfile. To create an eoProfile we use the static function eoProfileFactory::CreateProfile, which takes as paramaters either an eoTelegram containing a Teach IN telegram, or the RORG,FUNC,TYPE. If eoLink Supports you profile it returns a new instance of the selected profile otherwise it returns a null pointer.
Using the eoProfile we can call the eoProfile::CreateTeachIN function to prepare a teachIN Telegram and send it via the eoGateway.
As in the previous examples, the eoGateway::Receive functions runs in a while loop. As soon as we get temperature, we use the eoProfile::SetValue function and the eoProfile::Create to generate a 4BS datatelegram. Now we use the eoGateway::Send to send the 4bs telegram.