Indented.
This commit is contained in:
+71
-34
@@ -42,7 +42,7 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* encode functions */
|
||||
/* Start with the Init function, and then add an object,
|
||||
@@ -51,71 +51,108 @@ extern "C" {
|
||||
until the APDU is full.*/
|
||||
|
||||
/* RPM */
|
||||
int rpm_encode_apdu_init(uint8_t * apdu, uint8_t invoke_id);
|
||||
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_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_property(
|
||||
uint8_t * apdu,
|
||||
BACNET_PROPERTY_ID object_property,
|
||||
int32_t array_index);
|
||||
|
||||
int rpm_encode_apdu_object_end(uint8_t * apdu);
|
||||
int rpm_encode_apdu_object_end(
|
||||
uint8_t * apdu);
|
||||
|
||||
/* decode the object portion of the service request only */
|
||||
int rpm_decode_object_id(uint8_t * apdu,
|
||||
int rpm_decode_object_id(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_OBJECT_TYPE * object_type, uint32_t * object_instance);
|
||||
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);
|
||||
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,
|
||||
int rpm_decode_object_property(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_PROPERTY_ID * object_property, int32_t * array_index);
|
||||
BACNET_PROPERTY_ID * object_property,
|
||||
int32_t * array_index);
|
||||
|
||||
/* RPM Ack - reply from server */
|
||||
int rpm_ack_encode_apdu_init(uint8_t * apdu, uint8_t invoke_id);
|
||||
int rpm_ack_encode_apdu_init(
|
||||
uint8_t * apdu,
|
||||
uint8_t invoke_id);
|
||||
|
||||
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_begin(
|
||||
uint8_t * apdu,
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance);
|
||||
|
||||
int rpm_ack_encode_apdu_object_property(uint8_t * apdu,
|
||||
BACNET_PROPERTY_ID object_property, int32_t array_index);
|
||||
int rpm_ack_encode_apdu_object_property(
|
||||
uint8_t * apdu,
|
||||
BACNET_PROPERTY_ID object_property,
|
||||
int32_t array_index);
|
||||
|
||||
int rpm_ack_encode_apdu_object_property_value(uint8_t * apdu,
|
||||
uint8_t * application_data, unsigned application_data_len);
|
||||
int rpm_ack_encode_apdu_object_property_value(
|
||||
uint8_t * apdu,
|
||||
uint8_t * application_data,
|
||||
unsigned application_data_len);
|
||||
|
||||
int rpm_ack_encode_apdu_object_property_error(uint8_t * apdu,
|
||||
BACNET_ERROR_CLASS error_class, BACNET_ERROR_CODE error_code);
|
||||
int rpm_ack_encode_apdu_object_property_error(
|
||||
uint8_t * apdu,
|
||||
BACNET_ERROR_CLASS error_class,
|
||||
BACNET_ERROR_CODE error_code);
|
||||
|
||||
int rpm_ack_encode_apdu_object_end(uint8_t * apdu);
|
||||
int rpm_ack_encode_apdu_object_end(
|
||||
uint8_t * apdu);
|
||||
|
||||
int rpm_ack_decode_object_id(uint8_t * apdu,
|
||||
int rpm_ack_decode_object_id(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_OBJECT_TYPE * object_type, uint32_t * object_instance);
|
||||
BACNET_OBJECT_TYPE * object_type,
|
||||
uint32_t * object_instance);
|
||||
/* is this the end of the list of this objects properties values? */
|
||||
int rpm_ack_decode_object_end(uint8_t * apdu, unsigned apdu_len);
|
||||
int rpm_ack_decode_object_property(uint8_t * apdu,
|
||||
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);
|
||||
BACNET_PROPERTY_ID * object_property,
|
||||
int32_t * array_index);
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
int rpm_decode_apdu(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);
|
||||
uint8_t ** service_request,
|
||||
unsigned *service_request_len);
|
||||
|
||||
int rpm_ack_decode_apdu(uint8_t * apdu, int apdu_len, /* total length of the 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);
|
||||
uint8_t ** service_request,
|
||||
unsigned *service_request_len);
|
||||
|
||||
void testReadPropertyMultiple(Test * pTest);
|
||||
void testReadPropertyMultipleAck(Test * pTest);
|
||||
void testReadPropertyMultiple(
|
||||
Test * pTest);
|
||||
void testReadPropertyMultipleAck(
|
||||
Test * pTest);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user