First version of Trend Log which will actually log real data.

This commit is contained in:
petermcs
2009-12-11 14:54:56 +00:00
parent a4a2b09e50
commit 7c13ab6904
7 changed files with 256 additions and 34 deletions
+28 -1
View File
@@ -32,6 +32,7 @@
#include "bacdef.h"
#include "bacdcode.h"
#include "bacerror.h"
#include "bacdevobjpropref.h"
#include "apdu.h"
#include "npdu.h"
#include "abort.h"
@@ -59,7 +60,7 @@ void handler_read_property_object_set(
int Encode_Property_APDU(
uint8_t * apdu,
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
uint32_t object_instance,
BACNET_PROPERTY_ID property,
int32_t array_index,
BACNET_ERROR_CLASS * error_class,
@@ -190,3 +191,29 @@ void handler_read_property(
return;
}
int local_read_property(
uint8_t * value,
uint8_t * status,
BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE *Source,
BACNET_ERROR_CLASS * error_class,
BACNET_ERROR_CODE * error_code)
{
int len = 0;
/* Try to fetch the required property */
len = Encode_Property_APDU(value, Source->objectIdentifier.type,
Source->objectIdentifier.instance, Source->propertyIdentifier,
Source->arrayIndex, error_class, error_code);
if((len >= 0) && (status != NULL)){
/* Fetch the status flags if required */
Encode_Property_APDU(status, Source->objectIdentifier.type,
Source->objectIdentifier.instance, PROP_STATUS_FLAGS,
0, error_class, error_code);
}
return(len);
}