The beginning of doxygenation:
As a first step, added an @file description for each file.
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
#include "handlers.h"
|
||||
#include "client.h"
|
||||
|
||||
/** @file dlenv.c Initialize the DataLink configuration. */
|
||||
|
||||
void dlenv_init(
|
||||
void)
|
||||
{
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "alarm_ack.h"
|
||||
#include "handlers.h"
|
||||
|
||||
/** @file h_alarm_ack.c Handles Alarm Acknowledgment. */
|
||||
|
||||
void handler_alarm_ack(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
/** @file h_arf.c Handles Atomic Read File request. */
|
||||
|
||||
/*
|
||||
from BACnet SSPC-135-2004
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file h_arf_a.c Handles Acknowledgment of Atomic Read File response. */
|
||||
|
||||
/* We performed an AtomicReadFile Request, */
|
||||
/* and here is the data from the server */
|
||||
/* Note: it does not have to be the same file=instance */
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
/** @file h_awf.c Handles Atomic Write File request. */
|
||||
|
||||
/*
|
||||
from BACnet SSPC-135-2004
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
/** @file h_cov.c Handles Change of Value (COV) services. */
|
||||
|
||||
/* note: This COV service only monitors the properties
|
||||
of an object that have been specified in the standard. */
|
||||
typedef struct BACnet_COV_Subscription {
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "reject.h"
|
||||
#include "dcc.h"
|
||||
|
||||
/** @file h_dcc.c Handles Device Communication Control request. */
|
||||
|
||||
static char My_Password[32] = "filister";
|
||||
|
||||
void handler_dcc_password_set(
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "event.h"
|
||||
#include "getevent.h"
|
||||
|
||||
/** @file h_getevent.c Handles Get Event Information request. */
|
||||
|
||||
static get_event_info_function Get_Event_Info[MAX_BACNET_OBJECT_TYPE];
|
||||
|
||||
void handler_get_event_information_set(
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "iam.h"
|
||||
#include "address.h"
|
||||
|
||||
/** @file h_iam.c Handles I-Am requests. */
|
||||
|
||||
void handler_i_am_add(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "bactext.h"
|
||||
#include "ihave.h"
|
||||
|
||||
/** @file h_ihave.c Handles incoming I-Have messages. */
|
||||
|
||||
void handler_i_have(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "lso.h"
|
||||
#include "handlers.h"
|
||||
|
||||
/** @file h_lso.c Handles BACnet Life Safey Operation messages. */
|
||||
|
||||
void handler_lso(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
/** @file h_npdu.c Handles messages at the NPDU level of the BACnet stack. */
|
||||
|
||||
void npdu_handler(
|
||||
BACNET_ADDRESS * src, /* source address */
|
||||
uint8_t * pdu, /* PDU data */
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
#include "mydata.h"
|
||||
#include "ptransfer.h"
|
||||
|
||||
/** @file h_pt.c Handles Confirmed Private Transfer requests. */
|
||||
|
||||
#define MYMAXSTR 32
|
||||
#define MYMAXBLOCK 8
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
/** @file h_pt_a.c Handles Confirmed Private Transfer Acknowledgment. */
|
||||
|
||||
extern uint8_t IOBufferPT[300]; /* Somewhere to build the encoded result block for Private Transfers */
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "reject.h"
|
||||
#include "rd.h"
|
||||
|
||||
/** @file h_rd.c Handles Reinitialize Device requests. */
|
||||
|
||||
static reinitialize_device_function Reinitialize_Device_Function;
|
||||
void handler_reinitialize_device_function_set(
|
||||
reinitialize_device_function pFunction)
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "abort.h"
|
||||
#include "rp.h"
|
||||
|
||||
/** @file h_rp.c Handles Read Property requests. */
|
||||
|
||||
/* function that handles the reading of properties from objects */
|
||||
static read_property_function Read_Property_Function;
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file h_rp_a.c Handles Read Property Acknowledgments. */
|
||||
|
||||
/* for debugging... */
|
||||
static void PrintReadPropertyData(
|
||||
BACNET_READ_PROPERTY_DATA * data)
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include "rpm.h"
|
||||
#include "handlers.h"
|
||||
|
||||
/** @file h_rpm.c Handles Read Property Multiple requests. */
|
||||
|
||||
/* function that handles the reading of properties from objects */
|
||||
static read_property_function Read_Property_Function;
|
||||
static rpm_object_property_lists_function RPM_Property_List;
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file h_rpm_a.c Handles Read Property Multiple Acknowledgments. */
|
||||
|
||||
/* returns the number of bytes decoded, or -1 on error */
|
||||
/* note: initial the linked list of read_access_data */
|
||||
static int rpm_ack_decode_service_request(
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "abort.h"
|
||||
#include "readrange.h"
|
||||
|
||||
/** @file h_rr.c Handles Read Range requests. */
|
||||
|
||||
static uint8_t Temp_Buf[MAX_APDU] = { 0 };
|
||||
|
||||
static rr_info_function get_rr_info[MAX_BACNET_OBJECT_TYPE];
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file h_rr_a.c Handles Read Range Acknowledgments. */
|
||||
|
||||
/* for debugging... */
|
||||
static void PrintReadRangeData(
|
||||
BACNET_READ_RANGE_DATA * data)
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "bacdcode.h"
|
||||
#include "timesync.h"
|
||||
|
||||
/** @file h_ts.c Handles TimeSync requests. */
|
||||
|
||||
#if PRINT_ENABLED
|
||||
static void show_bacnet_date_time(
|
||||
BACNET_DATE * bdate,
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
#define MAX_COV_PROPERTIES 2
|
||||
#endif
|
||||
|
||||
/** @file h_ucov.c Handles Unconfirmed COV Notifications. */
|
||||
|
||||
/* note: nothing is specified in BACnet about what to do with the
|
||||
information received from Unconfirmed COV Notifications. */
|
||||
void handler_ucov_notification(
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "abort.h"
|
||||
#include "ptransfer.h"
|
||||
|
||||
/** @file h_upt.c Handles Unconfirmed Private Transfer requests. */
|
||||
|
||||
void handler_unconfirmed_private_transfer(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "device.h"
|
||||
#include "client.h"
|
||||
|
||||
/** @file h_whohas.c Handles Who-Has requests. */
|
||||
|
||||
void handler_who_has(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "client.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file h_whois.c Handles Who-Is requests. */
|
||||
|
||||
void handler_who_is(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "abort.h"
|
||||
#include "wp.h"
|
||||
|
||||
/** @file h_wp.c Handles Write Property requests. */
|
||||
|
||||
static write_property_function Write_Property;
|
||||
|
||||
void handler_write_property_function_set(
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "npdu.h"
|
||||
#include "reject.h"
|
||||
|
||||
/** @file noserv.c Handles an unrecognized/unsupported service. */
|
||||
|
||||
void handler_unrecognized_service(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include "keylist.h"
|
||||
#include "objects.h"
|
||||
|
||||
/** @file objects.c Manage Device Objects. */
|
||||
|
||||
/* list of devices */
|
||||
static OS_Keylist Device_List = NULL;
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "txbuf.h"
|
||||
#include "alarm_ack.h"
|
||||
|
||||
/** @file s_ack_alarm.c Send an Alarm Acknowledgment. */
|
||||
|
||||
/* returns the invoke ID for confirmed request, or zero on failure */
|
||||
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_arfs.c Send part of an Atomic Read File Stream. */
|
||||
|
||||
uint8_t Send_Atomic_Read_File_Stream(
|
||||
uint32_t device_id,
|
||||
uint32_t file_instance,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_awfs.c Send part of an Atomic Write File Stream request. */
|
||||
|
||||
uint8_t Send_Atomic_Write_File_Stream(
|
||||
uint32_t device_id,
|
||||
uint32_t file_instance,
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_cevent.c Send a ConfirmedEventNotification Request. */
|
||||
|
||||
/* returns the invoke id, 0=unsuccessful */
|
||||
uint8_t Send_CEvent_Notify(
|
||||
uint32_t device_id,
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_cov.c Send a Change of Value (COV) update or a Subscribe COV request. */
|
||||
|
||||
int ucov_notify_encode_pdu(
|
||||
uint8_t * buffer,
|
||||
BACNET_ADDRESS * dest,
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_dcc.c Send a Device Communication Control (DCC) request. */
|
||||
|
||||
uint8_t Send_Device_Communication_Control_Request(
|
||||
uint32_t device_id,
|
||||
uint16_t timeDuration, /* 0=optional */
|
||||
|
||||
@@ -40,6 +40,14 @@
|
||||
/* some demo stuff needed */
|
||||
#include "handlers.h"
|
||||
|
||||
/** @file s_iam.c Send an I-Am message. */
|
||||
|
||||
/** Encode an I Am message.
|
||||
* @param buffer [in,out] The buffer to use for building the message.
|
||||
* @param dest [out] The destination address information.
|
||||
* @param npdu_data [out] The NPDU structure describing the message.
|
||||
* @return The length of the message in buffer[].
|
||||
*/
|
||||
int iam_encode_pdu(
|
||||
uint8_t * buffer,
|
||||
BACNET_ADDRESS * dest,
|
||||
@@ -62,6 +70,9 @@ int iam_encode_pdu(
|
||||
return pdu_len;
|
||||
}
|
||||
|
||||
/** Broadcast an I Am message.
|
||||
* @param buffer [in] The buffer to use for building and sending the message.
|
||||
*/
|
||||
void Send_I_Am(
|
||||
uint8_t * buffer)
|
||||
{
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_ihave.c Send an I-Have (property) message. */
|
||||
|
||||
/* find a specific device, or use -1 for limit if you want unlimited */
|
||||
void Send_I_Have(
|
||||
uint32_t device_id,
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "txbuf.h"
|
||||
#include "lso.h"
|
||||
|
||||
/** @file s_lso.c Send BACnet Life Safety Operation message. */
|
||||
|
||||
/* returns the invoke ID for confirmed request, or zero on failure */
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "txbuf.h"
|
||||
#include "mydata.h"
|
||||
|
||||
/** @file s_ptransfer.c Send a Private Transfer request. */
|
||||
|
||||
uint8_t Send_Private_Transfer_Request(
|
||||
uint32_t device_id,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_rd.c Send a Reinitialize Device request. */
|
||||
|
||||
uint8_t Send_Reinitialize_Device_Request(
|
||||
uint32_t device_id,
|
||||
BACNET_REINITIALIZED_STATE state,
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "txbuf.h"
|
||||
#include "readrange.h"
|
||||
|
||||
/** @file s_readrange.c Send a ReadRange request. */
|
||||
|
||||
/* returns invoke id of 0 if device is not bound or no tsm available */
|
||||
uint8_t Send_ReadRange_Request(
|
||||
uint32_t device_id, /* destination device */
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_router.c Send BACnet Router requests. */
|
||||
|
||||
static void npdu_encode_npdu_network(
|
||||
BACNET_NPDU_DATA * npdu_data,
|
||||
BACNET_NETWORK_MESSAGE_TYPE network_message_type,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_rp.c Send Read Property request. */
|
||||
|
||||
/* returns invoke id of 0 if device is not bound or no tsm available */
|
||||
uint8_t Send_Read_Property_Request(
|
||||
uint32_t device_id, /* destination device */
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "sbuf.h"
|
||||
|
||||
/** @file s_rpm.c Send Read Property Multiple request. */
|
||||
|
||||
/* returns invoke id of 0 if device is not bound or no tsm available */
|
||||
uint8_t Send_Read_Property_Multiple_Request(
|
||||
uint8_t * pdu,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_ts.c Send TimeSync requests. */
|
||||
|
||||
void Send_TimeSync(
|
||||
BACNET_DATE * bdate,
|
||||
BACNET_TIME * btime)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "event.h"
|
||||
#include "datalink.h"
|
||||
|
||||
/** @file s_uevent.c Send an Unconfirmed Event Notification. */
|
||||
|
||||
int Send_UEvent_Notify(
|
||||
uint8_t * buffer,
|
||||
BACNET_EVENT_NOTIFICATION_DATA * data,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_upt.c Send an Unconfirmed Private Transfer request. */
|
||||
|
||||
void Send_UnconfirmedPrivateTransfer(
|
||||
BACNET_ADDRESS * dest,
|
||||
BACNET_PRIVATE_TRANSFER_DATA * private_data)
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_whohas.c Send Who-Has requests. */
|
||||
|
||||
/* find a specific device, or use -1 for limit if you want unlimited */
|
||||
void Send_WhoHas_Name(
|
||||
int32_t low_limit,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_whois.c Send a Who-Is request. */
|
||||
|
||||
/* find a specific device, or use -1 for limit if you want unlimited */
|
||||
void Send_WhoIs(
|
||||
int32_t low_limit,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "handlers.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/** @file s_wp.c Send a Write Property request. */
|
||||
|
||||
/* returns the invoke ID for confirmed request, or zero on failure */
|
||||
uint8_t Send_Write_Property_Request_Data(
|
||||
uint32_t device_id,
|
||||
|
||||
@@ -27,4 +27,6 @@
|
||||
#include "config.h"
|
||||
#include "datalink.h"
|
||||
|
||||
/** @file txbuf.c Declare the global Transmit Buffer for handler functions. */
|
||||
|
||||
uint8_t Handler_Transmit_Buffer[MAX_PDU] = { 0 };
|
||||
|
||||
@@ -9,7 +9,7 @@ TARGET = bacserv
|
||||
#BACDL_DEFINE = -DBACDL_ETHERNET
|
||||
#BACDL_DEFINE = -DBACDL_ARCNET
|
||||
#BACDL_DEFINE = -DBACDL_MSTP
|
||||
BACDL_DEFINE = -DBACDL_BIP -DBIP_DEBUG
|
||||
BACDL_DEFINE = -DBACDL_BIP
|
||||
BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE
|
||||
DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE)
|
||||
|
||||
@@ -41,6 +41,9 @@ OPTIMIZATION = -Os
|
||||
ifeq (${BUILD},debug)
|
||||
OPTIMIZATION = -O0
|
||||
DEBUGGING = -g
|
||||
ifeq (${BACDL_DEFINE},-DBACDL_BIP=1)
|
||||
DEFINES += -DBIP_DEBUG
|
||||
endif
|
||||
endif
|
||||
# put all the flags together
|
||||
CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) -fdata-sections -ffunction-sections
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/* include the device object */
|
||||
#include "device.h"
|
||||
|
||||
/* This is an example server application using the BACnet Stack */
|
||||
/** @file server/main.c Example server application using the BACnet Stack */
|
||||
|
||||
/* buffers used for receiving */
|
||||
static uint8_t Rx_Buf[MAX_MPDU] = { 0 };
|
||||
|
||||
Reference in New Issue
Block a user