The beginning of doxygenation:

As a first step, added an @file description for each file.
This commit is contained in:
tbrennan3
2010-02-14 05:29:43 +00:00
parent 5c439da7f2
commit cc20f225b9
56 changed files with 112 additions and 6 deletions
+2
View File
@@ -36,6 +36,8 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "bacdef.h" #include "bacdef.h"
/** @file abort.c Abort Encoding/Decoding */
/* encode service */ /* encode service */
int abort_encode_apdu( int abort_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -43,6 +43,8 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "readrange.h" #include "readrange.h"
/** @file address.c Handle address binding */
/* This module is used to handle the address binding that */ /* This module is used to handle the address binding that */
/* occurs in BACnet. A device id is bound to a MAC address. */ /* occurs in BACnet. A device id is bound to a MAC address. */
/* The normal method is using Who-Is, and using the data from I-Am */ /* The normal method is using Who-Is, and using the data from I-Am */
+2
View File
@@ -34,6 +34,8 @@
#include "alarm_ack.h" #include "alarm_ack.h"
/** @file alarm_ack.c Handles Event Notifications (ACKs) */
/*************************************************** /***************************************************
** **
** Creates an Unconfirmed Event Notification APDU ** Creates an Unconfirmed Event Notification APDU
+2
View File
@@ -43,6 +43,8 @@
#include "dcc.h" #include "dcc.h"
#include "iam.h" #include "iam.h"
/** @file apdu.c Handles APDU services */
/* APDU Timeout in Milliseconds */ /* APDU Timeout in Milliseconds */
static uint16_t Timeout_Milliseconds = 3000; static uint16_t Timeout_Milliseconds = 3000;
/* Number of APDU Retries */ /* Number of APDU Retries */
+1 -1
View File
@@ -37,7 +37,7 @@
#include "bacdef.h" #include "bacdef.h"
#include "arf.h" #include "arf.h"
/* Atomic Read File */ /** @file arf.c Atomic Read File */
/* encode service */ /* encode service */
int arf_encode_apdu( int arf_encode_apdu(
+1 -1
View File
@@ -37,7 +37,7 @@
#include "bacdef.h" #include "bacdef.h"
#include "awf.h" #include "awf.h"
/* Atomic Write File */ /** @file awf.c Atomic Write File */
/* encode service */ /* encode service */
int awf_encode_apdu( int awf_encode_apdu(
+2
View File
@@ -37,6 +37,8 @@
#include "config.h" #include "config.h"
#include "bacdef.h" #include "bacdef.h"
/** @file bacaddr.c BACnet Address structure utilities */
void bacnet_address_copy( void bacnet_address_copy(
BACNET_ADDRESS * dest, BACNET_ADDRESS * dest,
BACNET_ADDRESS * src) BACNET_ADDRESS * src)
+2
View File
@@ -46,6 +46,8 @@
#include "bactext.h" #include "bactext.h"
#include "datetime.h" #include "datetime.h"
/** @file bacapp.c Utilities for the BACnet_Application_Data_Value */
int bacapp_encode_application_data( int bacapp_encode_application_data(
uint8_t * apdu, uint8_t * apdu,
BACNET_APPLICATION_DATA_VALUE * value) BACNET_APPLICATION_DATA_VALUE * value)
+3
View File
@@ -42,6 +42,9 @@
#include "bacint.h" #include "bacint.h"
#include "bacreal.h" #include "bacreal.h"
/** @file bacdcode.c Functions to encode/decode BACnet data types */
/* max-segments-accepted /* max-segments-accepted
B'000' Unspecified number of segments accepted. B'000' Unspecified number of segments accepted.
B'001' 2 segments accepted. B'001' 2 segments accepted.
+2
View File
@@ -38,6 +38,8 @@
#include "timestamp.h" #include "timestamp.h"
#include "bacdevobjpropref.h" #include "bacdevobjpropref.h"
/** @file bacdevobjpropref.c BACnet Application Device Object Property Reference */
int bacapp_encode_context_device_obj_property_ref( int bacapp_encode_context_device_obj_property_ref(
uint8_t * apdu, uint8_t * apdu,
uint8_t tag_number, uint8_t tag_number,
+2
View File
@@ -36,6 +36,8 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "bacdef.h" #include "bacdef.h"
/** @file bacerror.c Encode/Decode BACnet Errors */
/* encode service */ /* encode service */
int bacerror_encode_apdu( int bacerror_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -38,6 +38,8 @@
#include <stdbool.h> #include <stdbool.h>
#include "config.h" #include "config.h"
/** @file bacint.c Encode/Decode Integer Types */
int encode_unsigned16( int encode_unsigned16(
uint8_t * apdu, uint8_t * apdu,
uint16_t value) uint16_t value)
+2
View File
@@ -38,6 +38,8 @@
#endif #endif
#include "bacprop.h" #include "bacprop.h"
/** @file bacprop.c Lookup BACnet Property Tags */
PROP_TAG_DATA bacnet_object_device_property_tag_map[] = { PROP_TAG_DATA bacnet_object_device_property_tag_map[] = {
{PROP_OBJECT_IDENTIFIER, BACNET_APPLICATION_TAG_OBJECT_ID} {PROP_OBJECT_IDENTIFIER, BACNET_APPLICATION_TAG_OBJECT_ID}
, ,
+2
View File
@@ -38,6 +38,8 @@
#include "timestamp.h" #include "timestamp.h"
#include "bacpropstates.h" #include "bacpropstates.h"
/** @file bacpropstates.c Encode/Decode BACnet Application Property States */
int bacapp_decode_property_state( int bacapp_decode_property_state(
uint8_t * apdu, uint8_t * apdu,
BACNET_PROPERTY_STATE * value) BACNET_PROPERTY_STATE * value)
+2
View File
@@ -42,6 +42,8 @@
#include "bacint.h" #include "bacint.h"
#include "bacreal.h" #include "bacreal.h"
/** @file bacreal.c Encode/Decode Floating Point (Real) Types */
/* NOTE: byte order plays a role in decoding multibyte values */ /* NOTE: byte order plays a role in decoding multibyte values */
/* http://www.unixpapa.com/incnote/byteorder.html */ /* http://www.unixpapa.com/incnote/byteorder.html */
#ifndef BIG_ENDIAN #ifndef BIG_ENDIAN
+2
View File
@@ -39,6 +39,8 @@
#include "bacstr.h" #include "bacstr.h"
#include "bits.h" #include "bits.h"
/** @file bacstr.c Manipulate Bit/Char/Octet Strings */
void bitstring_init( void bitstring_init(
BACNET_BIT_STRING * bit_string) BACNET_BIT_STRING * bit_string)
{ {
+2
View File
@@ -36,6 +36,8 @@
#include "indtext.h" #include "indtext.h"
#include "bacenum.h" #include "bacenum.h"
/** @file bactext.c Lookup or Translate BACnet Name Text */
static const char *ASHRAE_Reserved_String = "Reserved for Use by ASHRAE"; static const char *ASHRAE_Reserved_String = "Reserved for Use by ASHRAE";
static const char *Vendor_Proprietary_String = "Vendor Proprietary Value"; static const char *Vendor_Proprietary_String = "Vendor Proprietary Value";
+2
View File
@@ -1,6 +1,8 @@
/* Derived from "Unix Incompatibility Notes: Byte Order" by Jan Wolter */ /* Derived from "Unix Incompatibility Notes: Byte Order" by Jan Wolter */
/* http://unixpapa.com/incnote/byteorder.html */ /* http://unixpapa.com/incnote/byteorder.html */
/** @file bigend.c Determination of Endianess */
/* Big-Endian systems save the most significant byte first. */ /* Big-Endian systems save the most significant byte first. */
/* Sun and Motorola processors, IBM-370s and PDP-10s are big-endian. */ /* Sun and Motorola processors, IBM-370s and PDP-10s are big-endian. */
/* "Network Byte Order" is also know as "Big-Endian Byte Order" */ /* "Network Byte Order" is also know as "Big-Endian Byte Order" */
+3
View File
@@ -41,6 +41,9 @@
#if PRINT_ENABLED #if PRINT_ENABLED
#include <stdio.h> /* for standard integer types uint8_t etc. */ #include <stdio.h> /* for standard integer types uint8_t etc. */
#endif #endif
/** @file bip.c Configuration and Operations for BACnet/IP */
static int BIP_Socket = -1; static int BIP_Socket = -1;
/* port to use - stored in host byte order */ /* port to use - stored in host byte order */
static uint16_t BIP_Port = 0xBAC0; static uint16_t BIP_Port = 0xBAC0;
+2
View File
@@ -45,6 +45,8 @@
#endif #endif
#include "debug.h" #include "debug.h"
/** @file bvlc.c Handle the BACnet Virtual Link Control (BVLC) */
/* Handle the BACnet Virtual Link Control (BVLC), which includes: /* Handle the BACnet Virtual Link Control (BVLC), which includes:
BACnet Broadcast Management Device, BACnet Broadcast Management Device,
Broadcast Distribution Table, and Broadcast Distribution Table, and
+1 -1
View File
@@ -38,7 +38,7 @@
#include "bacapp.h" #include "bacapp.h"
#include "cov.h" #include "cov.h"
/* encode service */ /** @file cov.c Encode/Decode Change of Value (COV) services */
/* Change-Of-Value Services /* Change-Of-Value Services
COV Subscribe COV Subscribe
+2
View File
@@ -36,6 +36,8 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
/** @file crc.c Calculate CRCs */
#if defined(CRC_USE_TABLE) #if defined(CRC_USE_TABLE)
/* note: table is created using unit test below */ /* note: table is created using unit test below */
static const uint8_t HeaderCRC[256] = { static const uint8_t HeaderCRC[256] = {
+2
View File
@@ -34,6 +34,8 @@
#include "datalink.h" #include "datalink.h"
#include <string.h> #include <string.h>
/** @file datalink.c Optional run-time assignment of datalink transport */
#if defined(BACDL_ALL) #if defined(BACDL_ALL)
/* Function pointers - point to your datalink */ /* Function pointers - point to your datalink */
bool(*datalink_init) (char *ifname); bool(*datalink_init) (char *ifname);
+2
View File
@@ -40,6 +40,8 @@
#include "datetime.h" #include "datetime.h"
#include "bacdcode.h" #include "bacdcode.h"
/** @file datetime.c Manipulate BACnet Date and Time values */
/* BACnet Date */ /* BACnet Date */
/* year = years since 1900 */ /* year = years since 1900 */
/* month 1=Jan */ /* month 1=Jan */
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "dcc.h" #include "dcc.h"
/** @file dcc.c Enable/Disable Device Communication Control (DCC) */
/* note: the disable and time are not expected to survive /* note: the disable and time are not expected to survive
over a power cycle or reinitialization. */ over a power cycle or reinitialization. */
/* note: time duration is given in Minutes, but in order to be accurate, /* note: time duration is given in Minutes, but in order to be accurate,
+2
View File
@@ -38,6 +38,8 @@
#include <stdlib.h> /* Standard Library */ #include <stdlib.h> /* Standard Library */
#include <stdarg.h> #include <stdarg.h>
/** @file debug.c Debug print function */
void debug_printf( void debug_printf(
const char *format, const char *format,
...) ...)
+3
View File
@@ -41,6 +41,9 @@
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
/** @file src/dlmstp.c Win32 MS/TP Functions */
/* Number of MS/TP Packets Rx/Tx */ /* Number of MS/TP Packets Rx/Tx */
uint16_t MSTP_Packets = 0; uint16_t MSTP_Packets = 0;
/* The minimum time without a DataAvailable or ReceiveError event */ /* The minimum time without a DataAvailable or ReceiveError event */
+2
View File
@@ -38,6 +38,8 @@
#include "device.h" #include "device.h"
#include "timestamp.h" #include "timestamp.h"
/** @file event.c Encode/Decode Event Notifications */
int uevent_notify_encode_apdu( int uevent_notify_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
BACNET_EVENT_NOTIFICATION_DATA * data) BACNET_EVENT_NOTIFICATION_DATA * data)
+2
View File
@@ -33,6 +33,8 @@
------------------------------------------- -------------------------------------------
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
/** @file fifo.c Generic FIFO library for deeply embedded system */
/* Functional Description: Generic FIFO library for deeply /* Functional Description: Generic FIFO library for deeply
embedded system. See the unit tests for usage examples. */ embedded system. See the unit tests for usage examples. */
+2
View File
@@ -34,6 +34,8 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
/** @file filename.c Function for filename manipulation */
char *filename_remove_path( char *filename_remove_path(
const char *filename_in) const char *filename_in)
{ {
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "getevent.h" #include "getevent.h"
/** @file getevent.c Encode/Decode GetEvent services */
/* encode service */ /* encode service */
int getevent_encode_apdu( int getevent_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -40,6 +40,8 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "address.h" #include "address.h"
/** @file iam.c Encode/Decode I-Am service */
/* encode I-Am service */ /* encode I-Am service */
int iam_encode_apdu( int iam_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "ihave.h" #include "ihave.h"
/** @file ihave.c Encode/Decode I-Have service */
int ihave_encode_apdu( int ihave_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
BACNET_I_HAVE_DATA * data) BACNET_I_HAVE_DATA * data)
+2
View File
@@ -35,6 +35,8 @@
#include <string.h> #include <string.h>
#include "indtext.h" #include "indtext.h"
/** @file indtext.c Maps text strings and indices of type INDTEXT_DATA */
#if !defined(__BORLANDC__) && !defined(_MSC_VER) #if !defined(__BORLANDC__) && !defined(_MSC_VER)
#include <ctype.h> #include <ctype.h>
int stricmp( int stricmp(
+2
View File
@@ -35,6 +35,8 @@
/*#define TEST_KEY */ /*#define TEST_KEY */
#include "key.h" #include "key.h"
/** @file key.c Tests (only) of key encoding/decoding. */
#ifdef TEST #ifdef TEST
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
+2 -1
View File
@@ -30,7 +30,8 @@
------------------------------------------- -------------------------------------------
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
/* Keyed Linked List Library */ /** @file keylist.c Keyed Linked List Library */
/* */ /* */
/* This is an enhanced array of pointers to data. */ /* This is an enhanced array of pointers to data. */
/* The list is sorted, indexed, and keyed. */ /* The list is sorted, indexed, and keyed. */
+1 -1
View File
@@ -35,7 +35,7 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "apdu.h" #include "apdu.h"
/* BACnet Life Safety Operation */ /** @file lso.c BACnet Life Safety Operation encode/decode */
int lso_encode_adpu( int lso_encode_adpu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -33,6 +33,8 @@
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
#include <stddef.h> #include <stddef.h>
/** @file memcopy.c Custom memcopy function */
/* copy len bytes from src to offset of dest if there is enough space. */ /* copy len bytes from src to offset of dest if there is enough space. */
/* returns 0 if there is not enough space, or the number of bytes copied. */ /* returns 0 if there is not enough space, or the number of bytes copied. */
size_t memcopy( size_t memcopy(
+2
View File
@@ -33,6 +33,8 @@
------------------------------------------- -------------------------------------------
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
/** @file mstp.c BACnet Master-Slave Twisted Pair (MS/TP) functions */
/* This clause describes a Master-Slave/Token-Passing (MS/TP) data link */ /* This clause describes a Master-Slave/Token-Passing (MS/TP) data link */
/* protocol, which provides the same services to the network layer as */ /* protocol, which provides the same services to the network layer as */
/* ISO 8802-2 Logical Link Control. It uses services provided by the */ /* ISO 8802-2 Logical Link Control. It uses services provided by the */
+2
View File
@@ -36,6 +36,8 @@
#include "indtext.h" #include "indtext.h"
#include "bacenum.h" #include "bacenum.h"
/** @file mstptext.c Text mapping functions for BACnet MS/TP */
static INDTEXT_DATA mstp_receive_state_text[] = { static INDTEXT_DATA mstp_receive_state_text[] = {
{MSTP_RECEIVE_STATE_IDLE, "IDLE"}, {MSTP_RECEIVE_STATE_IDLE, "IDLE"},
{MSTP_RECEIVE_STATE_PREAMBLE, "PREAMBLE"}, {MSTP_RECEIVE_STATE_PREAMBLE, "PREAMBLE"},
+2
View File
@@ -41,6 +41,8 @@
#include "npdu.h" #include "npdu.h"
#include "apdu.h" #include "apdu.h"
/** @file npdu.c Encode/Decode NPDUs - Network Protocol Data Units */
void npdu_copy_data( void npdu_copy_data(
BACNET_NPDU_DATA * dest, BACNET_NPDU_DATA * dest,
BACNET_NPDU_DATA * src) BACNET_NPDU_DATA * src)
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "ptransfer.h" #include "ptransfer.h"
/** @file ptransfer.c Encode/Decode Private Transfer data */
/* encode service */ /* encode service */
int pt_encode_apdu( int pt_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "rd.h" #include "rd.h"
/** @file rd.c Encode/Decode Reinitialize Device APDUs */
/* encode service */ /* encode service */
int rd_encode_apdu( int rd_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "readrange.h" #include "readrange.h"
/** @file readrange.c Encode/Decode ReadRange requests */
/* /*
* ReadRange-Request ::= SEQUENCE { * ReadRange-Request ::= SEQUENCE {
* objectIdentifier [0] BACnetObjectIdentifier, * objectIdentifier [0] BACnetObjectIdentifier,
+2
View File
@@ -36,6 +36,8 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "bacdef.h" #include "bacdef.h"
/** @file reject.c Encode/Decode Reject APDUs */
/* encode service */ /* encode service */
int reject_encode_apdu( int reject_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -33,6 +33,8 @@
------------------------------------------- -------------------------------------------
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
/** @file ringbuf.c Generic ring buffer library for deeply embedded system. */
/* Functional Description: Generic ring buffer library for deeply /* Functional Description: Generic ring buffer library for deeply
embedded system. See the unit tests for usage examples. */ embedded system. See the unit tests for usage examples. */
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "rp.h" #include "rp.h"
/** @file rp.c Encode/Decode Read Property and RP ACKs */
/* encode service */ /* encode service */
int rp_encode_apdu( int rp_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -40,6 +40,8 @@
#include "memcopy.h" #include "memcopy.h"
#include "rpm.h" #include "rpm.h"
/** @file rpm.c Encode/Decode Read Property Multiple and RPM ACKs */
/* encode the initial portion of the service */ /* encode the initial portion of the service */
int rpm_encode_apdu_init( int rpm_encode_apdu_init(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -33,6 +33,8 @@
------------------------------------------- -------------------------------------------
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
/** @file sbuf.c Static buffer library for deeply embedded system. */
/* Functional Description: Static buffer library for deeply /* Functional Description: Static buffer library for deeply
embedded system. See the unit tests for usage examples. */ embedded system. See the unit tests for usage examples. */
#include <stdint.h> #include <stdint.h>
+3
View File
@@ -35,6 +35,9 @@
#include "assert.h" #include "assert.h"
#include "timestamp.h" #include "timestamp.h"
/** @file timestamp.c Encode/Decode BACnet Timestamps */
void bacapp_timestamp_copy( void bacapp_timestamp_copy(
BACNET_TIMESTAMP * dest, BACNET_TIMESTAMP * dest,
BACNET_TIMESTAMP * src) BACNET_TIMESTAMP * src)
+2
View File
@@ -38,6 +38,8 @@
#include "bacapp.h" #include "bacapp.h"
#include "timesync.h" #include "timesync.h"
/** @file timesync.c Encode/Decode TimeSync APDUs */
/* encode service */ /* encode service */
int timesync_encode_apdu_service( int timesync_encode_apdu_service(
uint8_t * apdu, uint8_t * apdu,
+2 -1
View File
@@ -47,8 +47,9 @@
#include "address.h" #include "address.h"
#include "bacaddr.h" #include "bacaddr.h"
/** @file tsm.c BACnet Transaction State Machine operations */
#if (MAX_TSM_TRANSACTIONS) #if (MAX_TSM_TRANSACTIONS)
/* Transaction State Machine */
/* Really only needed for segmented messages */ /* Really only needed for segmented messages */
/* and a little for sending confirmed messages */ /* and a little for sending confirmed messages */
/* If we are only a server and only initiate broadcasts, */ /* If we are only a server and only initiate broadcasts, */
+2
View File
@@ -33,4 +33,6 @@
####COPYRIGHTEND####*/ ####COPYRIGHTEND####*/
#include "version.h" #include "version.h"
/** @file version.c Sets the BACnet Version. */
char *BACnet_Version = BACNET_VERSION_TEXT; char *BACnet_Version = BACNET_VERSION_TEXT;
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "whohas.h" #include "whohas.h"
/** @file whohas.c Encode/Decode Who-Has requests */
/* encode service - use -1 for limit for unlimited */ /* encode service - use -1 for limit for unlimited */
int whohas_encode_apdu( int whohas_encode_apdu(
+2
View File
@@ -36,6 +36,8 @@
#include "bacdcode.h" #include "bacdcode.h"
#include "bacdef.h" #include "bacdef.h"
/** @file whois.c Encode/Decode Who-Is requests */
/* encode I-Am service - use -1 for limit if you want unlimited */ /* encode I-Am service - use -1 for limit if you want unlimited */
int whois_encode_apdu( int whois_encode_apdu(
uint8_t * apdu, uint8_t * apdu,
+2
View File
@@ -37,6 +37,8 @@
#include "bacdef.h" #include "bacdef.h"
#include "wp.h" #include "wp.h"
/** @file wp.c Encode/Decode BACnet Write Property APDUs */
/* encode service */ /* encode service */
int wp_encode_apdu( int wp_encode_apdu(
uint8_t * apdu, uint8_t * apdu,