support for ena-eke-proxy, improved interface

This commit is contained in:
Lurkars
2020-12-06 12:48:12 +01:00
parent 4029099d2a
commit d0e52071f1
53 changed files with 1478 additions and 5252 deletions
+14
View File
@@ -239,6 +239,20 @@ ena_exposure_config_t *ena_exposure_default_config(void);
*/
void ena_exposure_check(ena_beacon_t beacon, ena_temporary_exposure_key_t temporary_exposure_key);
/**
* @brief find minimal key index of beacons for a certain timestamp
*
* @param[in] timestamp the timestamp to check against
*/
int ena_expore_check_find_min(uint32_t timestamp);
/**
* @brief find maximum key index of beacons for a certain timestamp
*
* @param[in] timestamp the timestamp to check against
*/
int ena_expore_check_find_max(uint32_t timestamp);
/**
* @brief reads Temporary Exposue Key and check for exposures with all beacons
*
+18 -1
View File
@@ -59,7 +59,7 @@ typedef struct __attribute__((__packed__))
uint32_t day; // Day of the exposure, using UTC, encapsulated as the time of the beginning of that day.
int typical_attenuation; // Aggregation of the attenuations of all of a given diagnosis key's beacons received during the scan, in dB.
int min_attenuation; // Minimum attenuation of all of a given diagnosis key's beacons received during the scan, in dB.
int duration_minutes; //The duration of the exposure in minutes.
int duration_minutes; // The duration of the exposure in minutes.
int report_type; // Type of diagnosis associated with a key.
} ena_exposure_information_t;
@@ -113,6 +113,14 @@ uint32_t ena_storage_read_last_exposure_date(void);
*/
void ena_storage_write_last_exposure_date(uint32_t timestamp);
/**
* @brief get number of stored TEKs
*
* @return
* total number of TEKs stored
*/
uint32_t ena_storage_tek_count(void);
/**
* @brief get last stored TEK
*
@@ -123,6 +131,15 @@ void ena_storage_write_last_exposure_date(uint32_t timestamp);
*/
uint32_t ena_storage_read_last_tek(ena_tek_t *tek);
/**
* @brief get stored TEK at given index
*
* @param[in] index the index of the TEK to read
* @param[out] tek pointer to write TEK to
*
*/
void ena_storage_get_tek(uint32_t index, ena_tek_t *tek);
/**
* @brief store given TEK
*