X-Git-Url: https://www.flypig.org.uk/git/?p=libcontrac.git;a=blobdiff_plain;f=include%2Fcontrac%2Frpi.h;fp=include%2Fcontrac%2Frpi.h;h=9da8e627b13de23fb4d7a7c0d4a0f1242f077195;hp=0000000000000000000000000000000000000000;hb=8515bbba069347de07a452586d7e49a2e8bdf151;hpb=79942abab927241b65a29a8a30d71b8efe6b6d94 diff --git a/include/contrac/rpi.h b/include/contrac/rpi.h new file mode 100644 index 0000000..9da8e62 --- /dev/null +++ b/include/contrac/rpi.h @@ -0,0 +1,50 @@ +/** \ingroup contrac + * @file + * @author David Llewellyn-Jones + * @version $(VERSION) + * + * @section LICENSE + * + * + * + * @brief + * @section DESCRIPTION + * + * + * + */ + +#ifndef __RPI_H +#define __RPI_H + +// Includes + +#include "contrac/contrac.h" +#include "contrac/dtk.h" + +// Defines + +#define RPI_SIZE (16) +#define RPI_INTERVAL_MAX (144) +#define RPI_SIZE_BASE64 (24) + +// Structures + +typedef struct _Rpi Rpi; + +// Function prototypes + +Rpi * rpi_new(); +void rpi_delete(Rpi * data); + +bool rpi_generate_proximity_id(Rpi * data, Dtk const * dtk, uint8_t time_interval_number); +const unsigned char * rpi_get_proximity_id(Rpi const * data); +uint8_t rpi_get_time_interval_number(Rpi const * data); +void rpi_assign(Rpi * data, unsigned char const * rpi_bytes, uint8_t time_interval_number); +bool rpi_compare(Rpi const * data, Rpi const * comparitor); + +// Function definitions + +#endif // __RPI_H + +