Started on refactoring of address caching.

1. Added support for building address binding list for device object
2. Changed table traversal code to use pointers instead of array indexes as this produces much more efficient code on many smaller processors where multiplication is expensive
3. fixed issue where binding requests can be overwritten by first I AM that comes along.
4. Converted multiple state variables in cache entries to single flag bitmap.
This commit is contained in:
petermcs
2009-10-01 08:14:28 +00:00
parent 5c94160a50
commit 17e2d7fc8d
3 changed files with 150 additions and 88 deletions
+3 -1
View File
@@ -37,6 +37,7 @@
#include "device.h" /* me */
#include "handlers.h"
#include "datalink.h"
#include "address.h"
#if defined(BACFILE)
#include "bacfile.h" /* object list dependency */
#endif
@@ -682,7 +683,8 @@ int Device_Encode_Property_APDU(
apdu_len = encode_application_unsigned(&apdu[0], apdu_retries());
break;
case PROP_DEVICE_ADDRESS_BINDING:
/* FIXME: encode the list here, if it exists */
/* FIXME: the real max apdu remaining should be passed into function */
apdu_len = address_list_encode(&apdu[0], MAX_APDU);
break;
case PROP_DATABASE_REVISION:
apdu_len =