Indented according to standard indent rules for this project.

This commit is contained in:
skarg
2009-04-18 20:50:04 +00:00
parent b3fab21603
commit b85c4355d0
43 changed files with 501 additions and 502 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ typedef struct BACnet_Property_Reference {
BACNET_PROPERTY_ID propertyIdentifier;
int32_t propertyArrayIndex; /* optional */
/* either value or error, but not both.
Use NULL value to indicate error */
Use NULL value to indicate error */
BACNET_APPLICATION_DATA_VALUE *value;
BACNET_ACCESS_ERROR error;
/* simple linked list */
+2 -2
View File
@@ -288,11 +288,11 @@ extern "C" {
int decode_enumerated(
uint8_t * apdu,
uint32_t len_value,
uint32_t *value);
uint32_t * value);
int decode_context_enumerated(
uint8_t * apdu,
uint8_t tag_value,
uint32_t *value);
uint32_t * value);
int encode_bacnet_enumerated(
uint8_t * apdu,
uint32_t value);
+3 -5
View File
@@ -898,11 +898,9 @@ typedef enum {
OBJECT_ACCESS_ZONE = 36,
OBJECT_AUTHENTICATION_FACTOR_INPUT = 37,
MAX_ASHRAE_OBJECT_TYPE = 38
/* Enumerated values 0-127 are reserved for definition by ASHRAE. */
/* Enumerated values 128-1023 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* Enumerated values 0-127 are reserved for definition by ASHRAE. */
/* Enumerated values 128-1023 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
} BACNET_OBJECT_TYPE;
/* used for bit string loop */
#define MAX_BACNET_OBJECT_TYPE 1023
+20 -21
View File
@@ -92,30 +92,29 @@
extern "C" {
#endif /* __cplusplus */
int datalink_send_pdu(
BACNET_ADDRESS * dest,
BACNET_NPDU_DATA * npdu_data,
uint8_t * pdu,
unsigned pdu_len);
extern uint16_t datalink_receive(
BACNET_ADDRESS * src,
uint8_t * pdu,
uint16_t max_pdu,
unsigned timeout);
extern void datalink_cleanup(
void);
extern void datalink_get_broadcast_address(
BACNET_ADDRESS * dest);
extern void datalink_get_my_address(
BACNET_ADDRESS * my_address);
extern void datalink_set_interface(
char *ifname);
extern void datalink_set(
char *datalink_string);
int datalink_send_pdu(
BACNET_ADDRESS * dest,
BACNET_NPDU_DATA * npdu_data,
uint8_t * pdu,
unsigned pdu_len);
extern uint16_t datalink_receive(
BACNET_ADDRESS * src,
uint8_t * pdu,
uint16_t max_pdu,
unsigned timeout);
extern void datalink_cleanup(
void);
extern void datalink_get_broadcast_address(
BACNET_ADDRESS * dest);
extern void datalink_get_my_address(
BACNET_ADDRESS * my_address);
extern void datalink_set_interface(
char *ifname);
extern void datalink_set(
char *datalink_string);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif
+12 -12
View File
@@ -46,10 +46,10 @@
#include <stdbool.h>
struct fifo_buffer_t {
volatile unsigned head; /* first byte of data */
volatile unsigned head; /* first byte of data */
volatile unsigned tail; /* last byte of data */
volatile uint8_t *buffer; /* block of memory or array of data */
unsigned buffer_len; /* length of the data */
volatile uint8_t *buffer; /* block of memory or array of data */
unsigned buffer_len; /* length of the data */
};
typedef struct fifo_buffer_t FIFO_BUFFER;
@@ -57,31 +57,31 @@ typedef struct fifo_buffer_t FIFO_BUFFER;
extern "C" {
#endif /* __cplusplus */
bool FIFO_Empty(
bool FIFO_Empty(
FIFO_BUFFER const *b);
uint8_t FIFO_Peek(
uint8_t FIFO_Peek(
FIFO_BUFFER const *b);
uint8_t FIFO_Get(
uint8_t FIFO_Get(
FIFO_BUFFER * b);
bool FIFO_Put(
bool FIFO_Put(
FIFO_BUFFER * b,
uint8_t data_byte);
bool FIFO_Add(
bool FIFO_Add(
FIFO_BUFFER * b,
uint8_t *data_bytes,
uint8_t * data_bytes,
unsigned count);
void FIFO_Flush(
void FIFO_Flush(
FIFO_BUFFER * b);
/* note: buffer_len must be a power of two */
void FIFO_Init(
void FIFO_Init(
FIFO_BUFFER * b,
volatile uint8_t *buffer,
volatile uint8_t * buffer,
unsigned buffer_len);
#ifdef __cplusplus
+7 -7
View File
@@ -169,13 +169,13 @@ extern "C" {
uint8_t * service_request,
uint16_t service_len,
BACNET_ADDRESS * src);
bool handler_lso(
uint8_t * service_request,
uint16_t service_len,
BACNET_ADDRESS * src,
BACNET_CONFIRMED_SERVICE_DATA * service_data);
bool handler_lso(
uint8_t * service_request,
uint16_t service_len,
BACNET_ADDRESS * src,
BACNET_CONFIRMED_SERVICE_DATA * service_data);
#ifdef __cplusplus
}
+30 -31
View File
@@ -58,63 +58,62 @@ extern "C" {
#endif /* __cplusplus */
/* returns head of the list or NULL on failure. */
OS_Keylist Keylist_Create(
void);
OS_Keylist Keylist_Create(
void);
/* delete specified list */
/* note: you should pop all the nodes off the list first. */
void Keylist_Delete(
OS_Keylist list);
void Keylist_Delete(
OS_Keylist list);
/* inserts a node into its sorted position */
/* returns the index where it was added */
int Keylist_Data_Add(
OS_Keylist list,
KEY key,
void *data);
int Keylist_Data_Add(
OS_Keylist list,
KEY key,
void *data);
/* deletes a node specified by its key */
/* returns the data from the node */
void *Keylist_Data_Delete(
OS_Keylist list,
KEY key);
void *Keylist_Data_Delete(
OS_Keylist list,
KEY key);
/* deletes a node specified by its index */
/* returns the data from the node */
void *Keylist_Data_Delete_By_Index(
OS_Keylist list,
int index);
void *Keylist_Data_Delete_By_Index(
OS_Keylist list,
int index);
/* returns the data from last node, and removes it from the list */
void *Keylist_Data_Pop(
OS_Keylist list);
void *Keylist_Data_Pop(
OS_Keylist list);
/* returns the data from the node specified by key */
void *Keylist_Data(
OS_Keylist list,
KEY key);
void *Keylist_Data(
OS_Keylist list,
KEY key);
/* returns the data specified by key */
void *Keylist_Data_Index(
OS_Keylist list,
int index);
void *Keylist_Data_Index(
OS_Keylist list,
int index);
/* return the key at the given index */
KEY Keylist_Key(
OS_Keylist list,
int index);
KEY Keylist_Key(
OS_Keylist list,
int index);
/* returns the next empty key from the list */
KEY Keylist_Next_Empty_Key(
OS_Keylist list,
KEY key);
KEY Keylist_Next_Empty_Key(
OS_Keylist list,
KEY key);
/* returns the number of items in the list */
int Keylist_Count(
OS_Keylist list);
int Keylist_Count(
OS_Keylist list);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
+14 -15
View File
@@ -46,24 +46,23 @@ extern "C" {
/* Life Safety Operation Service */
typedef struct
{
uint32_t processId;
BACNET_CHARACTER_STRING requestingSrc;
BACNET_LIFE_SAFETY_OPERATION operation;
BACNET_OBJECT_ID targetObject;
} BACNET_LSO_DATA;
typedef struct {
uint32_t processId;
BACNET_CHARACTER_STRING requestingSrc;
BACNET_LIFE_SAFETY_OPERATION operation;
BACNET_OBJECT_ID targetObject;
} BACNET_LSO_DATA;
int lso_encode_adpu(
uint8_t *apdu,
uint8_t invoke_id,
BACNET_LSO_DATA *data);
int lso_encode_adpu(
uint8_t * apdu,
uint8_t invoke_id,
BACNET_LSO_DATA * data);
/* decode the service request only */
int lso_decode_service_request(
uint8_t *apdu,
unsigned apdu_len,
BACNET_LSO_DATA *data);
int lso_decode_service_request(
uint8_t * apdu,
unsigned apdu_len,
BACNET_LSO_DATA * data);
#ifdef TEST
+5 -5
View File
@@ -62,7 +62,7 @@ extern "C" {
uint8_t invoke_id,
BACNET_ERROR_CLASS error_class,
BACNET_ERROR_CODE error_code,
BACNET_PRIVATE_TRANSFER_DATA *private_data);
BACNET_PRIVATE_TRANSFER_DATA * private_data);
int ptransfer_error_decode_service_request(
uint8_t * apdu,
unsigned apdu_len,
@@ -73,18 +73,18 @@ extern "C" {
int ptransfer_ack_encode_apdu(
uint8_t * apdu,
uint8_t invoke_id,
BACNET_PRIVATE_TRANSFER_DATA *private_data);
BACNET_PRIVATE_TRANSFER_DATA * private_data);
/* ptransfer_ack_decode_service_request() is the same as
ptransfer_decode_service_request */
#ifdef TEST
#include "ctest.h"
void test_Private_Transfer_Request(
Test * pTest);
Test * pTest);
void test_Private_Transfer_Ack(
Test * pTest);
Test * pTest);
void test_Private_Transfer_Error(
Test * pTest);
Test * pTest);
#endif
#ifdef __cplusplus