indented to standard from script
This commit is contained in:
@@ -88,7 +88,7 @@ typedef struct BACnet_Access_Error {
|
||||
struct BACnet_Property_Reference;
|
||||
typedef struct BACnet_Property_Reference {
|
||||
BACNET_PROPERTY_ID propertyIdentifier;
|
||||
uint32_t propertyArrayIndex; /* optional */
|
||||
uint32_t propertyArrayIndex; /* optional */
|
||||
/* either value or error, but not both.
|
||||
Use NULL value to indicate error */
|
||||
BACNET_APPLICATION_DATA_VALUE *value;
|
||||
@@ -195,10 +195,10 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef BACAPP_SNPRINTF_ENABLED
|
||||
int bacapp_snprintf_value(
|
||||
char *str,
|
||||
size_t str_len,
|
||||
BACNET_OBJECT_PROPERTY_VALUE * object_value);
|
||||
int bacapp_snprintf_value(
|
||||
char *str,
|
||||
size_t str_len,
|
||||
BACNET_OBJECT_PROPERTY_VALUE * object_value);
|
||||
#endif
|
||||
|
||||
#ifdef BACAPP_PRINT_ENABLED
|
||||
|
||||
@@ -379,12 +379,12 @@ typedef enum {
|
||||
PROP_COVU_PERIOD = 349,
|
||||
PROP_COVU_RECIPIENTS = 350,
|
||||
PROP_EVENT_MESSAGE_TEXTS = 351,
|
||||
/* 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. */
|
||||
/* enumerations used to test Addendum i to ANSI/ASHRAE 135-2008 - private */
|
||||
PROP_BLINK_PRIORITY_THRESHOLD = 4201,
|
||||
PROP_BLINK_TIME = 4202,
|
||||
@@ -1398,10 +1398,10 @@ typedef enum {
|
||||
ERROR_CODE_BUSY = 82,
|
||||
ERROR_CODE_COMMUNICATION_DISABLED = 83,
|
||||
MAX_BACNET_ERROR_CODE = 84
|
||||
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
|
||||
/* Enumerated values 256-65535 may be used by others subject to */
|
||||
/* the procedures and constraints described in Clause 23. */
|
||||
/* The last enumeration used in this version is 50. */
|
||||
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
|
||||
/* Enumerated values 256-65535 may be used by others subject to */
|
||||
/* the procedures and constraints described in Clause 23. */
|
||||
/* The last enumeration used in this version is 50. */
|
||||
} BACNET_ERROR_CODE;
|
||||
#define FIRST_PROPRIETARY_ERROR_CODE 256
|
||||
#define LAST_PROPRIETARY_ERROR_CODE 65535
|
||||
|
||||
@@ -160,7 +160,7 @@ extern "C" {
|
||||
returns true if successfully converted and fits; false if too long */
|
||||
bool octetstring_init_ascii_hex(
|
||||
BACNET_OCTET_STRING * octet_string,
|
||||
const char * ascii_hex);
|
||||
const char *ascii_hex);
|
||||
#endif
|
||||
bool octetstring_copy(
|
||||
BACNET_OCTET_STRING * dest,
|
||||
|
||||
@@ -83,24 +83,26 @@ extern "C" {
|
||||
uint16_t bbmd_port, /* in network byte order */
|
||||
uint16_t time_to_live_seconds);
|
||||
|
||||
struct sockaddr_in; /* Defined elsewhere, needed here. */
|
||||
struct sockaddr_in; /* Defined elsewhere, needed here. */
|
||||
|
||||
/* Note any BVLC_RESULT code, or NAK the BVLL message in the unsupported cases. */
|
||||
int bvlc_for_non_bbmd(
|
||||
struct sockaddr_in * sout,
|
||||
uint8_t * npdu,
|
||||
uint16_t received_bytes);
|
||||
struct sockaddr_in *sout,
|
||||
uint8_t * npdu,
|
||||
uint16_t received_bytes);
|
||||
|
||||
/* Returns the last BVLL Result we received, either as the result of a BBMD
|
||||
* request we sent, or (if not a BBMD or Client), from trying to register
|
||||
* as a foreign device. */
|
||||
BACNET_BVLC_RESULT bvlc_get_last_result(void);
|
||||
BACNET_BVLC_RESULT bvlc_get_last_result(
|
||||
void);
|
||||
|
||||
/* Returns the current BVLL Function Code we are processing.
|
||||
* We have to store this higher layer code for when the lower layers
|
||||
* need to know what it is, especially to differentiate between
|
||||
* BVLC_ORIGINAL_UNICAST_NPDU and BVLC_ORIGINAL_BROADCAST_NPDU. */
|
||||
BACNET_BVLC_FUNCTION bvlc_get_function_code(void);
|
||||
BACNET_BVLC_FUNCTION bvlc_get_function_code(
|
||||
void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -179,70 +179,70 @@
|
||||
**/
|
||||
|
||||
#ifdef TEST
|
||||
#define BACNET_SVC_I_HAVE_A 1
|
||||
#define BACNET_SVC_WP_A 1
|
||||
#define BACNET_SVC_RP_A 1
|
||||
#define BACNET_SVC_RPM_A 1
|
||||
#define BACNET_SVC_DCC_A 1
|
||||
#define BACNET_SVC_RD_A 1
|
||||
#define BACNET_SVC_TS_A 1
|
||||
#define BACNET_SVC_SERVER 0
|
||||
#define BACNET_USE_OCTETSTRING 1
|
||||
#define BACNET_USE_DOUBLE 1
|
||||
#define BACNET_USE_SIGNED 1
|
||||
#else /* Otherwise define our working set - all enabled here to avoid breaking things */
|
||||
#define BACNET_SVC_I_HAVE_A 1
|
||||
#define BACNET_SVC_WP_A 1
|
||||
#define BACNET_SVC_RP_A 1
|
||||
#define BACNET_SVC_RPM_A 1
|
||||
#define BACNET_SVC_DCC_A 1
|
||||
#define BACNET_SVC_RD_A 1
|
||||
#define BACNET_SVC_TS_A 1
|
||||
#define BACNET_SVC_SERVER 0
|
||||
#define BACNET_USE_OCTETSTRING 1
|
||||
#define BACNET_USE_DOUBLE 1
|
||||
#define BACNET_USE_SIGNED 1
|
||||
#define BACNET_SVC_I_HAVE_A 1
|
||||
#define BACNET_SVC_WP_A 1
|
||||
#define BACNET_SVC_RP_A 1
|
||||
#define BACNET_SVC_RPM_A 1
|
||||
#define BACNET_SVC_DCC_A 1
|
||||
#define BACNET_SVC_RD_A 1
|
||||
#define BACNET_SVC_TS_A 1
|
||||
#define BACNET_SVC_SERVER 0
|
||||
#define BACNET_USE_OCTETSTRING 1
|
||||
#define BACNET_USE_DOUBLE 1
|
||||
#define BACNET_USE_SIGNED 1
|
||||
#else /* Otherwise define our working set - all enabled here to avoid breaking things */
|
||||
#define BACNET_SVC_I_HAVE_A 1
|
||||
#define BACNET_SVC_WP_A 1
|
||||
#define BACNET_SVC_RP_A 1
|
||||
#define BACNET_SVC_RPM_A 1
|
||||
#define BACNET_SVC_DCC_A 1
|
||||
#define BACNET_SVC_RD_A 1
|
||||
#define BACNET_SVC_TS_A 1
|
||||
#define BACNET_SVC_SERVER 0
|
||||
#define BACNET_USE_OCTETSTRING 1
|
||||
#define BACNET_USE_DOUBLE 1
|
||||
#define BACNET_USE_SIGNED 1
|
||||
#endif
|
||||
|
||||
/* Do them one by one */
|
||||
#ifndef BACNET_SVC_I_HAVE_A /* Do we send I_Have requests? */
|
||||
#define BACNET_SVC_I_HAVE_A 0
|
||||
#endif
|
||||
#ifndef BACNET_SVC_I_HAVE_A /* Do we send I_Have requests? */
|
||||
#define BACNET_SVC_I_HAVE_A 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_SVC_WP_A /* Do we send WriteProperty requests? */
|
||||
#define BACNET_SVC_WP_A 0
|
||||
#endif
|
||||
#ifndef BACNET_SVC_WP_A /* Do we send WriteProperty requests? */
|
||||
#define BACNET_SVC_WP_A 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_SVC_RP_A /* Do we send ReadProperty requests? */
|
||||
#define BACNET_SVC_RP_A 0
|
||||
#endif
|
||||
#ifndef BACNET_SVC_RP_A /* Do we send ReadProperty requests? */
|
||||
#define BACNET_SVC_RP_A 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_SVC_RPM_A /* Do we send ReadPropertyMultiple requests? */
|
||||
#define BACNET_SVC_RPM_A 0
|
||||
#endif
|
||||
#ifndef BACNET_SVC_RPM_A /* Do we send ReadPropertyMultiple requests? */
|
||||
#define BACNET_SVC_RPM_A 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_SVC_DCC_A /* Do we send DeviceCommunicationControl requests? */
|
||||
#define BACNET_SVC_DCC_A 0
|
||||
#endif
|
||||
#ifndef BACNET_SVC_DCC_A /* Do we send DeviceCommunicationControl requests? */
|
||||
#define BACNET_SVC_DCC_A 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_SVC_RD_A /* Do we send ReinitialiseDevice requests? */
|
||||
#define BACNET_SVC_RD_A 0
|
||||
#endif
|
||||
#ifndef BACNET_SVC_RD_A /* Do we send ReinitialiseDevice requests? */
|
||||
#define BACNET_SVC_RD_A 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_SVC_SERVER /* Are we a pure server type device? */
|
||||
#define BACNET_SVC_SERVER 1
|
||||
#endif
|
||||
#ifndef BACNET_SVC_SERVER /* Are we a pure server type device? */
|
||||
#define BACNET_SVC_SERVER 1
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_USE_OCTETSTRING /* Do we need any octet strings? */
|
||||
#define BACNET_USE_OCTETSTRING 0
|
||||
#endif
|
||||
#ifndef BACNET_USE_OCTETSTRING /* Do we need any octet strings? */
|
||||
#define BACNET_USE_OCTETSTRING 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_USE_DOUBLE /* Do we need any doubles? */
|
||||
#define BACNET_USE_DOUBLE 0
|
||||
#endif
|
||||
#ifndef BACNET_USE_DOUBLE /* Do we need any doubles? */
|
||||
#define BACNET_USE_DOUBLE 0
|
||||
#endif
|
||||
|
||||
#ifndef BACNET_USE_SIGNED /* Do we need any signed integers */
|
||||
#define BACNET_USE_SIGNED 0
|
||||
#endif
|
||||
#ifndef BACNET_USE_SIGNED /* Do we need any signed integers */
|
||||
#define BACNET_USE_SIGNED 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
#define datalink_get_broadcast_address bip_get_broadcast_address
|
||||
#ifdef BAC_ROUTING
|
||||
extern void routed_get_my_address(
|
||||
BACNET_ADDRESS * my_address);
|
||||
BACNET_ADDRESS * my_address);
|
||||
#define datalink_get_my_address routed_get_my_address
|
||||
#else
|
||||
#define datalink_get_my_address bip_get_my_address
|
||||
@@ -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
|
||||
|
||||
@@ -94,7 +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
|
||||
@@ -107,7 +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.
|
||||
|
||||
@@ -35,13 +35,17 @@ extern "C" {
|
||||
void);
|
||||
void dlenv_maintenance_timer(
|
||||
uint16_t elapsed_seconds);
|
||||
|
||||
|
||||
/* Simple setters and getter. */
|
||||
void dlenv_bbmd_address_set( long address );
|
||||
void dlenv_bbmd_port_set( int port );
|
||||
void dlenv_bbmd_ttl_set( int ttl_secs );
|
||||
int dlenv_bbmd_result( void );
|
||||
|
||||
void dlenv_bbmd_address_set(
|
||||
long address);
|
||||
void dlenv_bbmd_port_set(
|
||||
int port);
|
||||
void dlenv_bbmd_ttl_set(
|
||||
int ttl_secs);
|
||||
int dlenv_bbmd_result(
|
||||
void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -202,7 +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
|
||||
@@ -219,7 +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
|
||||
|
||||
@@ -51,7 +51,7 @@ extern "C" {
|
||||
bool FIFO_Full(
|
||||
FIFO_BUFFER const *b);
|
||||
|
||||
bool FIFO_Available (
|
||||
bool FIFO_Available(
|
||||
FIFO_BUFFER const *b,
|
||||
unsigned count);
|
||||
|
||||
|
||||
@@ -215,7 +215,8 @@ extern "C" {
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src,
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
||||
void handler_cov_task(void);
|
||||
void handler_cov_task(
|
||||
void);
|
||||
void handler_cov_timer_seconds(
|
||||
uint32_t elapsed_seconds);
|
||||
void handler_cov_init(
|
||||
|
||||
@@ -178,7 +178,7 @@ extern "C" {
|
||||
volatile struct mstp_port_struct_t
|
||||
*mstp_port);
|
||||
void MSTP_Slave_Node_FSM(
|
||||
volatile struct mstp_port_struct_t * mstp_port);
|
||||
volatile struct mstp_port_struct_t *mstp_port);
|
||||
|
||||
/* returns true if line is active */
|
||||
bool MSTP_Line_Active(
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
unsigned property_list_count(
|
||||
const int *pList);
|
||||
void property_list_special(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
struct special_property_list_t *pPropertyList);
|
||||
unsigned property_list_count(
|
||||
const int *pList);
|
||||
void property_list_special(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
struct special_property_list_t *pPropertyList);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -162,7 +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
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
struct ring_buffer_t {
|
||||
volatile uint8_t * buffer; /* block of memory or array of data */
|
||||
volatile uint8_t *buffer; /* block of memory or array of data */
|
||||
unsigned element_size; /* how many bytes for each chunk */
|
||||
unsigned element_count; /* number of chunks of data */
|
||||
volatile unsigned head; /* where the writes go */
|
||||
volatile unsigned tail; /* where the reads come from */
|
||||
volatile unsigned head; /* where the writes go */
|
||||
volatile unsigned tail; /* where the reads come from */
|
||||
};
|
||||
typedef struct ring_buffer_t RING_BUFFER;
|
||||
|
||||
@@ -43,9 +43,9 @@ typedef struct ring_buffer_t RING_BUFFER;
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
unsigned Ringbuf_Count (
|
||||
unsigned Ringbuf_Count(
|
||||
RING_BUFFER const *b);
|
||||
bool Ringbuf_Full (
|
||||
bool Ringbuf_Full(
|
||||
RING_BUFFER const *b);
|
||||
bool Ringbuf_Empty(
|
||||
RING_BUFFER const *b);
|
||||
@@ -55,13 +55,13 @@ extern "C" {
|
||||
RING_BUFFER * b);
|
||||
bool Ringbuf_Put(
|
||||
RING_BUFFER * b, /* ring buffer structure */
|
||||
volatile uint8_t *data_element); /* one element to add to the ring */
|
||||
volatile uint8_t * data_element); /* one element to add to the ring */
|
||||
volatile uint8_t *Ringbuf_Alloc(
|
||||
RING_BUFFER *b);
|
||||
RING_BUFFER * b);
|
||||
/* Note: element_count must be a power of two */
|
||||
void Ringbuf_Init(
|
||||
RING_BUFFER * b, /* ring buffer structure */
|
||||
volatile uint8_t * buffer, /* data block or array of data */
|
||||
volatile uint8_t * buffer, /* data block or array of data */
|
||||
unsigned element_size, /* size of one element in the data block */
|
||||
unsigned element_count); /* number of elements in the data block */
|
||||
|
||||
|
||||
@@ -125,7 +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
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct BACnet_Write_Property_Data {
|
||||
BACNET_OBJECT_TYPE object_type;
|
||||
uint32_t object_instance;
|
||||
BACNET_PROPERTY_ID object_property;
|
||||
uint32_t array_index; /* use BACNET_ARRAY_ALL when not setting */
|
||||
uint32_t array_index; /* use BACNET_ARRAY_ALL when not setting */
|
||||
uint8_t application_data[MAX_APDU];
|
||||
int application_data_len;
|
||||
uint8_t priority; /* use BACNET_NO_PRIORITY if no priority */
|
||||
|
||||
@@ -49,13 +49,16 @@ extern "C" {
|
||||
|
||||
|
||||
/* encode objects */
|
||||
int wpm_encode_apdu_init (uint8_t * apdu, uint8_t invoke_id);
|
||||
int wpm_encode_apdu_object_begin (
|
||||
int wpm_encode_apdu_init(
|
||||
uint8_t * apdu,
|
||||
uint8_t invoke_id);
|
||||
int wpm_encode_apdu_object_begin(
|
||||
uint8_t * apdu,
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance);
|
||||
int wpm_encode_apdu_object_end (uint8_t * apdu);
|
||||
int wpm_encode_apdu_object_property (
|
||||
int wpm_encode_apdu_object_end(
|
||||
uint8_t * apdu);
|
||||
int wpm_encode_apdu_object_property(
|
||||
uint8_t * apdu,
|
||||
BACNET_WRITE_PROPERTY_DATA * wpdata);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user