indented using indent.sh script.

This commit is contained in:
skarg
2013-10-29 01:55:49 +00:00
parent e3da7d7fed
commit 56b65e9694
43 changed files with 785 additions and 659 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ typedef struct BACnet_Atomic_Read_File_Data {
uint32_t RecordCount;
} record;
} type;
BACNET_OCTET_STRING fileData[BACNET_READ_FILE_RECORD_COUNT];
BACNET_OCTET_STRING fileData[BACNET_READ_FILE_RECORD_COUNT];
bool endOfFile;
} BACNET_ATOMIC_READ_FILE_DATA;
+82 -82
View File
@@ -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. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
@@ -495,9 +495,9 @@ typedef enum {
UNITS_AMPERES_PER_METER = 167,
UNITS_AMPERES_PER_SQUARE_METER = 168,
UNITS_AMPERE_SQUARE_METERS = 169,
UNITS_DECIBELS = 199,
UNITS_DECIBELS_MILLIVOLT = 200,
UNITS_DECIBELS_VOLT = 201,
UNITS_DECIBELS = 199,
UNITS_DECIBELS_MILLIVOLT = 200,
UNITS_DECIBELS_VOLT = 201,
UNITS_FARADS = 170,
UNITS_HENRYS = 171,
UNITS_OHMS = 4,
@@ -702,34 +702,34 @@ typedef enum {
UNITS_WATTS_PER_METER_PER_DEGREE_KELVIN = 189,
UNITS_WATTS_PER_SQUARE_METER_DEGREE_KELVIN = 141,
UNITS_PER_MILLE = 207,
UNITS_GRAMS_PER_GRAM = 208,
UNITS_KILOGRAMS_PER_KILOGRAM = 209,
UNITS_GRAMS_PER_KILOGRAM = 210,
UNITS_MILLIGRAMS_PER_GRAM = 211,
UNITS_MILLIGRAMS_PER_KILOGRAM = 212,
UNITS_GRAMS_PER_MILLILITER = 213,
UNITS_GRAMS_PER_LITER = 214,
UNITS_MILLIGRAMS_PER_LITER = 215,
UNITS_MICROGRAMS_PER_LITER = 216,
UNITS_GRAMS_PER_CUBIC_METER = 217,
UNITS_MILLIGRAMS_PER_CUBIC_METER = 218,
UNITS_MICROGRAMS_PER_CUBIC_METER = 219,
UNITS_NANOGRAMS_PER_CUBIC_METER = 220,
UNITS_GRAMS_PER_CUBIC_CENTIMETER = 221,
UNITS_BECQUERELS = 222,
UNITS_MEGABECQUERELS = 224,
UNITS_GRAY = 225,
UNITS_MILLIGRAY = 226,
UNITS_MICROGRAY = 227,
UNITS_SIEVERTS = 228,
UNITS_MILLISIEVERTS = 229,
UNITS_MICROSIEVERTS = 230,
UNITS_MICROSIEVERTS_PER_HOUR = 231,
UNITS_DECIBELS_A = 232,
UNITS_NEPHELOMETRIC_TURBIDITY_UNIT = 233,
UNITS_PH = 234,
UNITS_GRAMS_PER_SQUARE_METER = 235,
UNITS_MINUTES_PER_DEGREE_KELVIN = 236,
UNITS_GRAMS_PER_GRAM = 208,
UNITS_KILOGRAMS_PER_KILOGRAM = 209,
UNITS_GRAMS_PER_KILOGRAM = 210,
UNITS_MILLIGRAMS_PER_GRAM = 211,
UNITS_MILLIGRAMS_PER_KILOGRAM = 212,
UNITS_GRAMS_PER_MILLILITER = 213,
UNITS_GRAMS_PER_LITER = 214,
UNITS_MILLIGRAMS_PER_LITER = 215,
UNITS_MICROGRAMS_PER_LITER = 216,
UNITS_GRAMS_PER_CUBIC_METER = 217,
UNITS_MILLIGRAMS_PER_CUBIC_METER = 218,
UNITS_MICROGRAMS_PER_CUBIC_METER = 219,
UNITS_NANOGRAMS_PER_CUBIC_METER = 220,
UNITS_GRAMS_PER_CUBIC_CENTIMETER = 221,
UNITS_BECQUERELS = 222,
UNITS_MEGABECQUERELS = 224,
UNITS_GRAY = 225,
UNITS_MILLIGRAY = 226,
UNITS_MICROGRAY = 227,
UNITS_SIEVERTS = 228,
UNITS_MILLISIEVERTS = 229,
UNITS_MICROSIEVERTS = 230,
UNITS_MICROSIEVERTS_PER_HOUR = 231,
UNITS_DECIBELS_A = 232,
UNITS_NEPHELOMETRIC_TURBIDITY_UNIT = 233,
UNITS_PH = 234,
UNITS_GRAMS_PER_SQUARE_METER = 235,
UNITS_MINUTES_PER_DEGREE_KELVIN = 236,
/* 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. */
@@ -772,9 +772,9 @@ typedef enum {
PROGRAM_ERROR_INTERNAL = 2,
PROGRAM_ERROR_PROGRAM = 3,
PROGRAM_ERROR_OTHER = 4,
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
@@ -853,9 +853,9 @@ typedef enum {
RELIABILITY_MEMBER_FAULT = 11,
RELIABILITY_COMMUNICATION_FAILURE = 12,
RELIABILITY_TRIPPED = 13,
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
@@ -876,14 +876,14 @@ typedef enum {
EVENT_EXTENDED = 9,
EVENT_BUFFER_READY = 10,
EVENT_UNSIGNED_RANGE = 11,
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* It is expected that these enumerated values will correspond to */
/* the use of the complex-event-type CHOICE [6] of the */
/* BACnetNotificationParameters production. */
/* The last enumeration used in this version is 11. */
/* do the max range inside of enum so that
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* It is expected that these enumerated values will correspond to */
/* the use of the complex-event-type CHOICE [6] of the */
/* BACnetNotificationParameters production. */
/* The last enumeration used in this version is 11. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
EVENT_PROPRIETARY_MIN = 64,
@@ -914,10 +914,10 @@ typedef enum {
LIFE_SAFETY_MODE_AUTOMATIC_RELEASE_DISABLED = 13,
LIFE_SAFETY_MODE_DEFAULT = 14,
MAX_LIFE_SAFETY_MODE = 15,
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
LIFE_SAFETY_MODE_PROPRIETARY_MIN = 256,
@@ -935,10 +935,10 @@ typedef enum {
LIFE_SAFETY_OP_UNSILENCE = 7,
LIFE_SAFETY_OP_UNSILENCE_AUDIBLE = 8,
LIFE_SAFETY_OP_UNSILENCE_VISUAL = 9,
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
LIFE_SAFETY_OP_PROPRIETARY_MIN = 64,
@@ -972,10 +972,10 @@ typedef enum {
LIFE_SAFETY_STATE_SUPERVISORY = 22,
LIFE_SAFETY_STATE_TEST_SUPERVISORY = 23,
MAX_LIFE_SAFETY_STATE = 24,
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
LIFE_SAFETY_STATE_PROPRIETARY_MIN = 256,
@@ -987,10 +987,10 @@ typedef enum {
SILENCED_STATE_AUDIBLE_SILENCED = 1,
SILENCED_STATE_VISIBLE_SILENCED = 2,
SILENCED_STATE_ALL_SILENCED = 3,
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
SILENCED_STATE_PROPRIETARY_MIN = 64,
@@ -1002,10 +1002,10 @@ typedef enum {
MAINTENANCE_PERIODIC_TEST = 1,
MAINTENANCE_NEED_SERVICE_OPERATIONAL = 2,
MAINTENANCE_NEED_SERVICE_INOPERATIVE = 3,
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
MAINTENANCE_PROPRIETARY_MIN = 256,
@@ -1074,10 +1074,10 @@ typedef enum {
OBJECT_ALERT_ENROLLMENT = 52, /* Addendum 2010-af */
OBJECT_CHANNEL = 53, /* Addendum 2010-aa */
OBJECT_LIGHTING_OUTPUT = 54, /* Addendum 2010-i */
/* 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. */
/* do the max range inside of enum so that
/* 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. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
OBJECT_PROPRIETARY_MIN = 128,
@@ -1101,10 +1101,10 @@ typedef enum {
VT_CLASS_DEC_VT220 = 4,
VT_CLASS_HP_700_94 = 5, /* real name is HP 700/94 */
VT_CLASS_IBM_3130 = 6,
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
/* Enumerated values 0-63 are reserved for definition by ASHRAE. */
/* Enumerated values 64-65535 may be used by others subject to */
/* the procedures and constraints described in Clause 23. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
VT_CLASS_PROPRIETARY_MIN = 64,
@@ -1307,9 +1307,9 @@ typedef enum {
SERVICE_SUPPORTED_UTC_TIME_SYNCHRONIZATION = 36,
SERVICE_SUPPORTED_WHO_HAS = 33,
SERVICE_SUPPORTED_WHO_IS = 34
/* Other services to be added as they are defined. */
/* All values in this production are reserved */
/* for definition by ASHRAE. */
/* Other services to be added as they are defined. */
/* All values in this production are reserved */
/* for definition by ASHRAE. */
} BACNET_SERVICES_SUPPORTED;
typedef enum {
+3 -3
View File
@@ -152,9 +152,9 @@ extern "C" {
int application_data_len,
uint8_t priority,
uint32_t array_index);
uint8_t Send_Write_Property_Multiple_Request_Data(
uint32_t device_id,
BACNET_WRITE_ACCESS_DATA * write_access_data);
uint8_t Send_Write_Property_Multiple_Request_Data(
uint32_t device_id,
BACNET_WRITE_ACCESS_DATA * write_access_data);
/* returns the invoke ID for confirmed request, or 0 if failed */
uint8_t Send_Reinitialize_Device_Request(
+1 -1
View File
@@ -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
+8 -8
View File
@@ -89,18 +89,18 @@ 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);
bool datetime_time_is_valid(
BACNET_TIME *btime);
BACNET_TIME * btime);
bool datetime_date_is_valid(
BACNET_DATE *bdate);
BACNET_DATE * bdate);
/* date and time calculations and summaries */
uint32_t datetime_days_since_epoch(
BACNET_DATE *bdate);
BACNET_DATE * bdate);
void datetime_days_since_epoch_into_date(
uint32_t days,
BACNET_DATE *bdate);
BACNET_DATE * bdate);
bool datetime_is_leap_year(
uint16_t year);
uint8_t datetime_month_days(
@@ -115,9 +115,9 @@ extern "C" {
uint8_t month,
uint8_t day);
uint32_t datetime_seconds_since_midnight(
BACNET_TIME *btime);
BACNET_TIME * btime);
uint16_t datetime_minutes_since_midnight(
BACNET_TIME *btime);
BACNET_TIME * btime);
/* utility comparison functions:
if the date/times are the same, return is 0
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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
+1 -1
View File
@@ -161,7 +161,7 @@ extern "C" {
/** @defgroup Trend Trending BIBBs
* 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.
* BACnet devices defined therein.
*//** @defgroup TrendReadRange Trending -Read Range Service (eg, in T-VMT)
* @ingroup Trend
* 15.8 ReadRange Service <br>
+1 -1
View File
@@ -124,7 +124,7 @@ extern "C" {
/** @defgroup DataShare Data Sharing BIBBs
* 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.
* devices defined therein.
*//** @defgroup DSRP Data Sharing -Read Property Service (DS-RP)
* @ingroup DataShare
* 15.5 ReadProperty Service <br>
+52 -20
View File
@@ -18,24 +18,56 @@
#ifndef _UCI_H__
#define _UCI_H__
struct uci_context* ucix_init(const char *config_file);
struct uci_context* ucix_init_path(const char *path, const char *config_file);
void ucix_cleanup(struct uci_context *ctx);
void ucix_save(struct uci_context *ctx);
void ucix_save_state(struct uci_context *ctx);
const char* ucix_get_option(struct uci_context *ctx,
const char *p, const char *s, const char *o);
int ucix_get_option_int(struct uci_context *ctx,
const char *p, const char *s, const char *o, int def);
void ucix_add_section(struct uci_context *ctx,
const char *p, const char *s, const char *t);
void ucix_add_option(struct uci_context *ctx,
const char *p, const char *s, const char *o, const char *t);
void ucix_add_option_int(struct uci_context *ctx,
const char *p, const char *s, const char *o, int t);
int ucix_commit(struct uci_context *ctx, const char *p);
void ucix_revert(struct uci_context *ctx,
const char *p, const char *s, const char *o);
void ucix_del(struct uci_context *ctx, const char *p,
const char *s, const char *o);
struct uci_context *ucix_init(
const char *config_file);
struct uci_context *ucix_init_path(
const char *path,
const char *config_file);
void ucix_cleanup(
struct uci_context *ctx);
void ucix_save(
struct uci_context *ctx);
void ucix_save_state(
struct uci_context *ctx);
const char *ucix_get_option(
struct uci_context *ctx,
const char *p,
const char *s,
const char *o);
int ucix_get_option_int(
struct uci_context *ctx,
const char *p,
const char *s,
const char *o,
int def);
void ucix_add_section(
struct uci_context *ctx,
const char *p,
const char *s,
const char *t);
void ucix_add_option(
struct uci_context *ctx,
const char *p,
const char *s,
const char *o,
const char *t);
void ucix_add_option_int(
struct uci_context *ctx,
const char *p,
const char *s,
const char *o,
int t);
int ucix_commit(
struct uci_context *ctx,
const char *p);
void ucix_revert(
struct uci_context *ctx,
const char *p,
const char *s,
const char *o);
void ucix_del(
struct uci_context *ctx,
const char *p,
const char *s,
const char *o);
#endif
+13 -13
View File
@@ -35,14 +35,14 @@
extern "C" {
#endif /* __cplusplus */
struct BACnet_Write_Access_Data;
typedef struct BACnet_Write_Access_Data {
BACNET_OBJECT_TYPE object_type;
uint32_t object_instance;
/* simple linked list of values */
BACNET_PROPERTY_VALUE *listOfProperties;
struct BACnet_Write_Access_Data *next;
} BACNET_WRITE_ACCESS_DATA;
struct BACnet_Write_Access_Data;
typedef struct BACnet_Write_Access_Data {
BACNET_OBJECT_TYPE object_type;
uint32_t object_instance;
/* simple linked list of values */
BACNET_PROPERTY_VALUE *listOfProperties;
struct BACnet_Write_Access_Data *next;
} BACNET_WRITE_ACCESS_DATA;
/* decode the service request only */
int wpm_decode_object_id(
@@ -69,11 +69,11 @@ extern "C" {
int wpm_encode_apdu_object_property(
uint8_t * apdu,
BACNET_WRITE_PROPERTY_DATA * wpdata);
int wpm_encode_apdu(
uint8_t * apdu,
size_t max_apdu,
uint8_t invoke_id,
BACNET_WRITE_ACCESS_DATA * write_access_data);
int wpm_encode_apdu(
uint8_t * apdu,
size_t max_apdu,
uint8_t invoke_id,
BACNET_WRITE_ACCESS_DATA * write_access_data);
/* encode service */
int wpm_ack_encode_apdu_init(