indented using indent.sh script to get uniform looking code for release
This commit is contained in:
@@ -45,55 +45,55 @@
|
||||
|
||||
/* there are a few dependencies on the BACnet Protocol-Revision */
|
||||
#if (BACNET_PROTOCOL_REVISION == 0)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 18
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 35
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 18
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 35
|
||||
#elif (BACNET_PROTOCOL_REVISION == 1)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 21
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 37
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 21
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 37
|
||||
#elif (BACNET_PROTOCOL_REVISION == 2)
|
||||
/* from 135-2001 version of the BACnet Standard */
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 23
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 23
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 3)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 23
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 23
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 4)
|
||||
/* from 135-2004 version of the BACnet Standard */
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 25
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 25
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 5)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 30
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 30
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 6)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 31
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 31
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 7)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 31
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 31
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 8)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 31
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 31
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 9)
|
||||
/* from 135-2008 version of the BACnet Standard */
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 38
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 38
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 10)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 51
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 51
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 11)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 51
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 51
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 12)
|
||||
/* from 135-2010 version of the BACnet Standard */
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 51
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 51
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 13)
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 53
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 53
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 40
|
||||
#elif (BACNET_PROTOCOL_REVISION == 14)
|
||||
/* from 135-2012 version of the BACnet Standard */
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 55
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 41
|
||||
#define MAX_ASHRAE_OBJECT_TYPE 55
|
||||
#define MAX_BACNET_SERVICES_SUPPORTED 41
|
||||
#else
|
||||
#error MAX_ASHRAE_OBJECT_TYPE and MAX_BACNET_SERVICES_SUPPORTED not defined!
|
||||
#endif
|
||||
|
||||
@@ -409,12 +409,12 @@ typedef enum {
|
||||
PROP_POWER = 384,
|
||||
PROP_TRANSITION = 385,
|
||||
PROP_EGRESS_ACTIVE = 386
|
||||
/* The special property identifiers all, optional, and required */
|
||||
/* are reserved for use in the ReadPropertyConditional and */
|
||||
/* ReadPropertyMultiple services or services not defined in this standard. */
|
||||
/* Enumerated values 0-511 are reserved for definition by ASHRAE. */
|
||||
/* Enumerated values 512-4194303 may be used by others subject to the */
|
||||
/* procedures and constraints described in Clause 23. */
|
||||
/* The special property identifiers all, optional, and required */
|
||||
/* are reserved for use in the ReadPropertyConditional and */
|
||||
/* ReadPropertyMultiple services or services not defined in this standard. */
|
||||
/* Enumerated values 0-511 are reserved for definition by ASHRAE. */
|
||||
/* Enumerated values 512-4194303 may be used by others subject to the */
|
||||
/* procedures and constraints described in Clause 23. */
|
||||
} BACNET_PROPERTY_ID;
|
||||
|
||||
/* do the MAX as define rather than enumeration for devices
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "bacdef.h"
|
||||
#include "npdu.h"
|
||||
|
||||
struct sockaddr_in; /* Defined elsewhere, needed here. */
|
||||
struct sockaddr_in; /* Defined elsewhere, needed here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -115,7 +115,7 @@ extern "C" {
|
||||
|
||||
/* returns the invoke ID for confirmed request, or 0 if failed */
|
||||
uint8_t Send_Read_Property_Request_Address(
|
||||
BACNET_ADDRESS *dest,
|
||||
BACNET_ADDRESS * dest,
|
||||
uint16_t max_apdu,
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance,
|
||||
|
||||
@@ -135,7 +135,7 @@ extern "C" {
|
||||
* chosen at runtime from among these choices.
|
||||
* - Clause 10 POINT-TO-POINT (PTP) and Clause 11 EIA/CEA-709.1 ("LonTalk") LAN
|
||||
* are not currently supported by this project.
|
||||
*//** @defgroup DLTemplates DataLink Template Functions
|
||||
*//** @defgroup DLTemplates DataLink Template Functions
|
||||
* @ingroup DataLink
|
||||
* Most of the functions in this group are function templates which are assigned
|
||||
* to a specific DataLink network layer implementation either at compile time or
|
||||
|
||||
@@ -89,8 +89,8 @@ extern "C" {
|
||||
uint8_t hundredths);
|
||||
/* utility test for validity */
|
||||
bool datetime_is_valid(
|
||||
BACNET_DATE *bdate,
|
||||
BACNET_TIME *btime);
|
||||
BACNET_DATE * bdate,
|
||||
BACNET_TIME * btime);
|
||||
|
||||
/* utility comparison functions:
|
||||
if the date/times are the same, return is 0
|
||||
|
||||
@@ -94,9 +94,7 @@ extern "C" {
|
||||
*
|
||||
* The network management BIBBs prescribe the BACnet capabilities required to
|
||||
* interoperably perform network management functions.
|
||||
*/
|
||||
|
||||
/** @defgroup DMDCC Device Management-Device Communication Control (DM-DCC)
|
||||
*//** @defgroup DMDCC Device Management-Device Communication Control (DM-DCC)
|
||||
* @ingroup RDMS
|
||||
* 16.1 DeviceCommunicationControl Service <br>
|
||||
* The DeviceCommunicationControl service is used by a client BACnet-user to
|
||||
@@ -109,9 +107,7 @@ extern "C" {
|
||||
* "indefinite," meaning communication must be re-enabled by a
|
||||
* DeviceCommunicationControl or, if supported, ReinitializeDevice service,
|
||||
* not by time.
|
||||
*/
|
||||
|
||||
/** @defgroup NMRC Network Management-Router Configuration (NM-RC)
|
||||
*//** @defgroup NMRC Network Management-Router Configuration (NM-RC)
|
||||
* @ingroup RDMS
|
||||
* The A device may query and change the configuration of routers and
|
||||
* half-routers.
|
||||
|
||||
@@ -202,9 +202,7 @@ extern "C" {
|
||||
* These BIBBs prescribe the BACnet capabilities required to interoperably
|
||||
* perform the alarm and event management functions enumerated in 22.2.1.2
|
||||
* for the BACnet devices defined therein.
|
||||
*/
|
||||
|
||||
/** @defgroup EVNOTFCN Alarm and Event-Notification (AE-N)
|
||||
*//** @defgroup EVNOTFCN Alarm and Event-Notification (AE-N)
|
||||
* @ingroup ALMEVNT
|
||||
* 13.6 ConfirmedCOVNotification Service <br>
|
||||
* The ConfirmedCOVNotification service is used to notify subscribers about
|
||||
@@ -221,9 +219,7 @@ extern "C" {
|
||||
* For unsubscribed notifications, the algorithm for determining when to issue
|
||||
* this service is a local matter and may be based on a change of value,
|
||||
* periodic updating, or some other criteria.
|
||||
*/
|
||||
|
||||
/** @defgroup ALMACK Alarm and Event-ACK (AE-ACK)
|
||||
*//** @defgroup ALMACK Alarm and Event-ACK (AE-ACK)
|
||||
* @ingroup ALMEVNT
|
||||
* 13.5 AcknowledgeAlarm Service <br>
|
||||
* In some systems a device may need to know that an operator has seen the alarm
|
||||
|
||||
+24
-12
@@ -31,40 +31,52 @@ typedef struct fifo_buffer_t FIFO_BUFFER;
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
unsigned FIFO_Count(FIFO_BUFFER const *b);
|
||||
unsigned FIFO_Count(
|
||||
FIFO_BUFFER const *b);
|
||||
|
||||
bool FIFO_Full(FIFO_BUFFER const *b);
|
||||
bool FIFO_Full(
|
||||
FIFO_BUFFER const *b);
|
||||
|
||||
bool FIFO_Available(FIFO_BUFFER const *b,
|
||||
bool FIFO_Available(
|
||||
FIFO_BUFFER const *b,
|
||||
unsigned count);
|
||||
|
||||
bool FIFO_Empty(FIFO_BUFFER const *b);
|
||||
bool FIFO_Empty(
|
||||
FIFO_BUFFER const *b);
|
||||
|
||||
uint8_t FIFO_Peek(FIFO_BUFFER const *b);
|
||||
uint8_t FIFO_Peek(
|
||||
FIFO_BUFFER const *b);
|
||||
|
||||
uint8_t FIFO_Get(FIFO_BUFFER * b);
|
||||
uint8_t FIFO_Get(
|
||||
FIFO_BUFFER * b);
|
||||
|
||||
unsigned FIFO_Pull(FIFO_BUFFER * b,
|
||||
unsigned FIFO_Pull(
|
||||
FIFO_BUFFER * b,
|
||||
uint8_t * data_bytes,
|
||||
unsigned length);
|
||||
|
||||
bool FIFO_Put(FIFO_BUFFER * b,
|
||||
bool FIFO_Put(
|
||||
FIFO_BUFFER * b,
|
||||
uint8_t data_byte);
|
||||
|
||||
bool FIFO_Add(FIFO_BUFFER * b,
|
||||
bool FIFO_Add(
|
||||
FIFO_BUFFER * b,
|
||||
uint8_t * data_bytes,
|
||||
unsigned count);
|
||||
|
||||
void FIFO_Flush(FIFO_BUFFER * b);
|
||||
void FIFO_Flush(
|
||||
FIFO_BUFFER * b);
|
||||
|
||||
/* note: buffer_len must be a power of two */
|
||||
void FIFO_Init(FIFO_BUFFER * b,
|
||||
void FIFO_Init(
|
||||
FIFO_BUFFER * b,
|
||||
volatile uint8_t * buffer,
|
||||
unsigned buffer_len);
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
void testFIFOBuffer(Test * pTest);
|
||||
void testFIFOBuffer(
|
||||
Test * pTest);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -189,14 +189,17 @@ extern "C" {
|
||||
int handler_timesync_encode_recipients(
|
||||
uint8_t * apdu,
|
||||
int max_apdu);
|
||||
void handler_timesync_task(void);
|
||||
void handler_timesync_init(void);
|
||||
void handler_timesync_task(
|
||||
void);
|
||||
void handler_timesync_init(
|
||||
void);
|
||||
bool handler_timesync_recipient_write(
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||
bool handler_timesync_interval_set(uint32_t minutes);
|
||||
bool handler_timesync_interval_set(
|
||||
uint32_t minutes);
|
||||
bool handler_timesync_recipient_address_set(
|
||||
unsigned index,
|
||||
BACNET_ADDRESS *address);
|
||||
BACNET_ADDRESS * address);
|
||||
|
||||
void handler_read_property_multiple(
|
||||
uint8_t * service_request,
|
||||
@@ -313,10 +316,10 @@ extern "C" {
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
||||
|
||||
void get_alarm_summary_ack_handler(
|
||||
uint8_t *service_request,
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS *src,
|
||||
BACNET_CONFIRMED_SERVICE_ACK_DATA *service_data);
|
||||
BACNET_ADDRESS * src,
|
||||
BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -111,10 +111,10 @@ struct mstp_port_struct_t {
|
||||
so that you can be atomic on 8 bit microcontrollers */
|
||||
uint32_t(
|
||||
*SilenceTimer) (
|
||||
void * pArg);
|
||||
void *pArg);
|
||||
void (
|
||||
*SilenceTimerReset) (
|
||||
void * pArg);
|
||||
void *pArg);
|
||||
|
||||
/* A timer used to measure and generate Reply Postponed frames. It is */
|
||||
/* incremented by a timer process and is cleared by the Master Node State */
|
||||
@@ -164,8 +164,8 @@ struct mstp_port_struct_t {
|
||||
uint8_t *OutputBuffer;
|
||||
uint16_t OutputBufferSize;
|
||||
|
||||
/*Platform-specific port data*/
|
||||
void * UserData;
|
||||
/*Platform-specific port data */
|
||||
void *UserData;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -162,9 +162,7 @@ extern "C" {
|
||||
* These BIBBs prescribe the BACnet capabilities required to interoperably
|
||||
* perform the trending functions enumerated in clause 22.2.1.4 for the
|
||||
* BACnet devices defined therein.
|
||||
*/
|
||||
|
||||
/** @defgroup TrendReadRange Trending -Read Range Service (eg, in T-VMT)
|
||||
*//** @defgroup TrendReadRange Trending -Read Range Service (eg, in T-VMT)
|
||||
* @ingroup Trend
|
||||
* 15.8 ReadRange Service <br>
|
||||
* The ReadRange service is used by a client BACnet-user to read a specific
|
||||
|
||||
@@ -53,13 +53,13 @@ extern "C" {
|
||||
RING_BUFFER const *b);
|
||||
bool Ringbuf_Pop(
|
||||
RING_BUFFER * b,
|
||||
uint8_t *data_element);
|
||||
uint8_t * data_element);
|
||||
bool Ringbuf_Put(
|
||||
RING_BUFFER * b, /* ring buffer structure */
|
||||
uint8_t *data_element); /* one element to add to the ring */
|
||||
uint8_t * data_element); /* one element to add to the ring */
|
||||
bool Ringbuf_Put_Front(
|
||||
RING_BUFFER * b, /* ring buffer structure */
|
||||
uint8_t *data_element);
|
||||
RING_BUFFER * b, /* ring buffer structure */
|
||||
uint8_t * data_element);
|
||||
volatile uint8_t *Ringbuf_Alloc(
|
||||
RING_BUFFER * b);
|
||||
/* Note: element_count must be a power of two */
|
||||
@@ -71,10 +71,10 @@ extern "C" {
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
void testRingBufSize16(
|
||||
Test * pTest);
|
||||
void testRingBufSize32(
|
||||
Test * pTest);
|
||||
void testRingBufSize16(
|
||||
Test * pTest);
|
||||
void testRingBufSize32(
|
||||
Test * pTest);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -125,9 +125,7 @@ extern "C" {
|
||||
* These BIBBs prescribe the BACnet capabilities required to interoperably
|
||||
* perform the data sharing functions enumerated in 22.2.1.1 for the BACnet
|
||||
* devices defined therein.
|
||||
*/
|
||||
|
||||
/** @defgroup DSRP Data Sharing -Read Property Service (DS-RP)
|
||||
*//** @defgroup DSRP Data Sharing -Read Property Service (DS-RP)
|
||||
* @ingroup DataShare
|
||||
* 15.5 ReadProperty Service <br>
|
||||
* The ReadProperty service is used by a client BACnet-user to request the
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
struct BACnet_Recipient_List;
|
||||
typedef struct BACnet_Recipient_List {
|
||||
/*
|
||||
BACnetRecipient ::= CHOICE {
|
||||
device [0] BACnetObjectIdentifier,
|
||||
address [1] BACnetAddress
|
||||
}
|
||||
*/
|
||||
BACnetRecipient ::= CHOICE {
|
||||
device [0] BACnetObjectIdentifier,
|
||||
address [1] BACnetAddress
|
||||
}
|
||||
*/
|
||||
uint8_t tag;
|
||||
union {
|
||||
BACNET_OBJECT_ID device;
|
||||
@@ -83,11 +83,11 @@ extern "C" {
|
||||
int timesync_encode_timesync_recipients(
|
||||
uint8_t * apdu,
|
||||
unsigned max_apdu,
|
||||
BACNET_RECIPIENT_LIST *recipient);
|
||||
BACNET_RECIPIENT_LIST * recipient);
|
||||
int timesync_decode_timesync_recipients(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_RECIPIENT_LIST *recipient);
|
||||
BACNET_RECIPIENT_LIST * recipient);
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
|
||||
Reference in New Issue
Block a user