You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
506 B

#include "protocolGenericTest.h"
int protocolGenericTest::probeData(unsigned char * Data, int DataSize)
{
if (DataSize > 1)
{
if (Data[0] != 0x3C)
{ // Check Header
return -1;
};
if (DataSize < 6)
{ // Check Size
return 1;
};
if (Data[4] == 0x24 && Data[5] == 0x4D)
{ // Check Bottom ( checksumm )
return 0;
};
return -1;
};
}
int protocolGenericTest::parseData(unsigned char * Data, int DataSize)
{
// ToDo: Make Data manipulation
return 6; // Return Size of Package
}