#ifdef WIN32
#include <windows.h>
#define SER_PORT "\\\\.\\COM35" //COM4
#else
#define SER_PORT "/dev/ttyUSB1"
#endif
#define LEARN_TIME_S 1
#include <stdint.h>
#include <stdio.h>
{
switch(watchRes)
{
break;
break;
break;
break;
break;
printf("Possible DOS detected \n");
break;
break;
break;
break;
break;
printf("A possible delay Attack detected \n");
break;
default:
printf("The Security watcher returned a not valid value!\n");
break;
}
}
int main(int argc, const char* argv[])
{
setvbuf(stdout,
NULL, _IONBF, 0);
setvbuf(stderr,
NULL, _IONBF, 0);
printf("Opening Connection to USB300 \n");
{
printf("Failed to open USB300\n");
return 0;
}
printf("EnOcean-Link Gateway LearnMode\n");
{
printf("%s %i.%i.%i.%i, ID:0x%08X on %s\n",
SER_PORT);
}
uint16_t recv;
while(learnTime>time)
{
{
{
printf(
"Device %08X Learned-In EEP: %02X-%02X-%02X\n", myGateway.
device->
ID, profile->
rorg, profile->
func, profile->
type );
{
}
}
}
}
myWatcher->
AddDevice(0x0102CD1C,10000,100,10,5,
true);
std::vector<uint32_t> deadDevices;
while (1)
{
{
}
{
printf(
"Device %08X\n", myGateway.
device->
ID);
float f;
uint8_t t;
{
}
}
if((time-lastTick)>1000)
{
{
for(std::vector<uint32_t>::const_iterator it = deadDevices.begin(); it != deadDevices.end(); ++it)
{
printf("Possible Dead Device %u \n",*it);
}
}
lastTick=time;
}
}
delete myWatcher;
return 0;
}