Second phase of address cache refactoring:

1. Added time to live functionality
2. Added option of partial cache init on reset to reduce traffic for controllers that can preserve RAM over power cycle/reset.
3. Can now put new entries in the cache even if it is full - entry nearest to expiry is dropped to make room.
This commit is contained in:
petermcs
2009-10-16 19:27:35 +00:00
parent 0f28f99ade
commit 694abdeb4e
3 changed files with 250 additions and 22 deletions
+11
View File
@@ -46,6 +46,9 @@ extern "C" {
void address_init(
void);
void address_init_partial(
void);
void address_add(
uint32_t device_id,
unsigned max_apdu,
@@ -90,6 +93,14 @@ extern "C" {
uint8_t * apdu,
unsigned apdu_len);
void address_set_device_TTL(
uint32_t device_id,
uint32_t TimeOut,
bool StaticFlag);
void address_cache_timer(
uint16_t uSeconds);
#ifdef __cplusplus
}
#endif /* __cplusplus */