cleaning up compiler errors.
This commit is contained in:
+31
-17
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "bacdef.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -46,35 +47,44 @@ extern "C" {
|
||||
then add its properties, and then end the object.
|
||||
Continue to add objects and properties as needed
|
||||
until the APDU is full.*/
|
||||
|
||||
/* RPM */
|
||||
int rpm_encode_apdu_init(
|
||||
uint8_t *apdu,
|
||||
uint8_t invoke_id);
|
||||
|
||||
int rpm_encode_apdu_object_begin(
|
||||
uint8_t *apdu,
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance);
|
||||
|
||||
int rpm_encode_apdu_object_property(
|
||||
uint8_t *apdu,
|
||||
BACNET_PROPERTY_ID object_property,
|
||||
int32_t array_index);
|
||||
|
||||
int rpm_encode_apdu_object_end(
|
||||
uint8_t *apdu);
|
||||
|
||||
int rpm_decode_apdu(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len,
|
||||
uint8_t *invoke_id,
|
||||
uint8_t **service_request,
|
||||
unsigned *service_request_len);
|
||||
|
||||
/* decode the object portion of the service request only */
|
||||
int rpm_decode_object_id(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_OBJECT_TYPE *object_type,
|
||||
uint32_t *object_instance);
|
||||
|
||||
/* is this the end of this object property list? */
|
||||
int rpm_decode_object_end(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len);
|
||||
|
||||
/* decode the object property portion of the service request only */
|
||||
int rpm_decode_object_property(
|
||||
uint8_t *apdu,
|
||||
@@ -82,36 +92,25 @@ int rpm_decode_object_property(
|
||||
BACNET_PROPERTY_ID *object_property,
|
||||
int32_t *array_index);
|
||||
|
||||
/* RPM Ack */
|
||||
int rpm_ack_encode_apdu_object_begin(
|
||||
uint8_t *apdu,
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance);
|
||||
|
||||
int rpm_ack_encode_apdu_object_property_value(
|
||||
uint8_t *apdu,
|
||||
BACNET_PROPERTY_ID object_property,
|
||||
int32_t array_index,
|
||||
uint8_t *application_data,
|
||||
unsigned application_data_len);
|
||||
|
||||
int rpm_ack_encode_apdu_object_property_error(
|
||||
uint8_t *apdu,
|
||||
BACNET_PROPERTY_ID object_property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS error_class,
|
||||
BACNET_ERROR_CODE error_code);
|
||||
|
||||
int rpm_ack_encode_apdu_object_end(
|
||||
uint8_t *apdu);
|
||||
int rpm_ack_decode_apdu(
|
||||
uint8_t *apdu,
|
||||
int apdu_len, /* total length of the apdu */
|
||||
uint8_t *invoke_id,
|
||||
uint8_t **service_request,
|
||||
unsigned *service_request_len);
|
||||
|
||||
/* FIXME: seems to me that we could use these decodes to make
|
||||
calls repeatedly to a single function that returns
|
||||
the ReadProperty data structure and amount of APDU used. */
|
||||
|
||||
/* decode the object portion of the service request only */
|
||||
int rpm_ack_decode_object_id(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len,
|
||||
@@ -121,14 +120,29 @@ int rpm_ack_decode_object_id(
|
||||
int rpm_ack_decode_object_end(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len);
|
||||
int rpm_ack_decode_object_property(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_PROPERTY_ID *object_property,
|
||||
int32_t *array_index);
|
||||
int rpm_ack_decode_is_object_property_value(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len);
|
||||
int rpm_ack_decode_is_object_property_error(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len);
|
||||
/* decode the object property value portion of the service request only */
|
||||
int rpm_ack_decode_object_property_value(
|
||||
uint8_t *apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_PROPERTY_ID *object_property,
|
||||
int32_t *array_index,
|
||||
uint8_t **application_data,
|
||||
unsigned *application_data_len);
|
||||
int rpm_ack_decode_apdu(
|
||||
uint8_t *apdu,
|
||||
int apdu_len, /* total length of the apdu */
|
||||
uint8_t *invoke_id,
|
||||
uint8_t **service_request,
|
||||
unsigned *service_request_len);
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
|
||||
Reference in New Issue
Block a user