#include <stdio.h>
#define SER_PORT "/dev/ttyUSB0"//this has to be changed accordingly to your pc/embedded system
void genericProfileExamples()
{
{
printf("Unable to create GenericProfile");
return;
}
printf("Created a new GP, trying to add some Channels\n");
{
printf("Failed to add the first Temperature Channel");
return;
}
{
printf("Failed to add the second Temperature Channel");
return;
}
{
printf("Failed to add the Alarm Flag Channel");
return;
}
{
}
GP_SCAL_1, VAL_CURR) !=
EO_OK)
{
printf("Failed to add the first Temperature Channel");
return;
}
{
printf("Failed to add the On/Off Flag Channel");
return;
}
{
}
{
printf("Teach IN creation failed");
return;
}
gpProf->
SetValue(
S_TEMP, (
float) 20);
gpProf->SetValue(
F_ON_OFF, (uint8_t) 1);
}
void genericProfileWorkingExamples()
{
uint16_t recv;
{
printf("Failed to open USB300\n");
return;
}
printf("EnOcean-Link Gateway\n");
while (1)
{
{
if (profile->
rorg != 0x0B)
{
continue;
}
printf(
"Device %08X Learned-In EEP: %02X-%02X-%02X\n",
{
printf("%s %.2f ... %.2f %s\n",
}
{
{
1);
}
}
while (timer > limit)
{
{
printf("Device did not accept teach in request!");
break;
}
}
break;
}
}
while (1)
{
{
printf(
"Device %08X\n", gateway.
device->
ID);
float f;
uint8_t t;
{
printf("%s %.2f %s\n",
t);
}
}
}
}