Updated prototypes and include as required and found by compile with extra checking. Thanks to Nigel Jones for his "setting a bad example" article.
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
#include "apdu.h"
|
#include "apdu.h"
|
||||||
#include "datalink.h"
|
#include "datalink.h"
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "client.h"
|
#include "dlenv.h"
|
||||||
#include "tsm.h"
|
#include "tsm.h"
|
||||||
|
|
||||||
/** @file dlenv.c Initialize the DataLink configuration. */
|
/** @file dlenv.c Initialize the DataLink configuration. */
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#if defined(BACFILE)
|
#if defined(BACFILE)
|
||||||
#include "bacfile.h"
|
#include "bacfile.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_arf.c Handles Atomic Read File request. */
|
/** @file h_arf.c Handles Atomic Read File request. */
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#if defined(BACFILE)
|
#if defined(BACFILE)
|
||||||
#include "bacfile.h"
|
#include "bacfile.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_awf.c Handles Atomic Write File request. */
|
/** @file h_awf.c Handles Atomic Write File request. */
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
#if defined(BACFILE)
|
#if defined(BACFILE)
|
||||||
#include "bacfile.h"
|
#include "bacfile.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_cov.c Handles Change of Value (COV) services. */
|
/** @file h_cov.c Handles Change of Value (COV) services. */
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "abort.h"
|
#include "abort.h"
|
||||||
#include "reject.h"
|
#include "reject.h"
|
||||||
#include "dcc.h"
|
#include "dcc.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_dcc.c Handles Device Communication Control request. */
|
/** @file h_dcc.c Handles Device Communication Control request. */
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "abort.h"
|
#include "abort.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "getevent.h"
|
#include "getevent.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_getevent.c Handles Get Event Information request. */
|
/** @file h_getevent.c Handles Get Event Information request. */
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
#include "iam.h"
|
#include "iam.h"
|
||||||
#include "address.h"
|
#include "address.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_iam.c Handles I-Am requests. */
|
/** @file h_iam.c Handles I-Am requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
#include "bactext.h"
|
#include "bactext.h"
|
||||||
#include "ihave.h"
|
#include "ihave.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_ihave.c Handles incoming I-Have messages. */
|
/** @file h_ihave.c Handles incoming I-Have messages. */
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
#include "bits.h"
|
#include "bits.h"
|
||||||
#include "npdu.h"
|
#include "npdu.h"
|
||||||
#include "apdu.h"
|
#include "apdu.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "mydata.h"
|
#include "mydata.h"
|
||||||
#include "ptransfer.h"
|
#include "ptransfer.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_pt.c Handles Confirmed Private Transfer requests. */
|
/** @file h_pt.c Handles Confirmed Private Transfer requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,13 @@
|
|||||||
#if defined(BACFILE)
|
#if defined(BACFILE)
|
||||||
#include "bacfile.h"
|
#include "bacfile.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_pt_a.c Handles Confirmed Private Transfer Acknowledgment. */
|
/** @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 */
|
extern uint8_t IOBufferPT[300]; /* Somewhere to build the encoded result block for Private Transfers */
|
||||||
|
|
||||||
|
static void DecodeBlock(
|
||||||
void DecodeBlock(
|
|
||||||
char cBlockNum,
|
char cBlockNum,
|
||||||
uint8_t * pData)
|
uint8_t * pData)
|
||||||
{
|
{
|
||||||
@@ -116,9 +116,7 @@ void DecodeBlock(
|
|||||||
printf(" String : %s\n\n", Response.sMyString);
|
printf(" String : %s\n\n", Response.sMyString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ProcessPTA(
|
||||||
|
|
||||||
void ProcessPTA(
|
|
||||||
BACNET_PRIVATE_TRANSFER_DATA * data)
|
BACNET_PRIVATE_TRANSFER_DATA * data)
|
||||||
{
|
{
|
||||||
int iLen; /* Index to current location in data */
|
int iLen; /* Index to current location in data */
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "rd.h"
|
#include "rd.h"
|
||||||
/* custom handling in device object */
|
/* custom handling in device object */
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_rd.c Handles Reinitialize Device requests. */
|
/** @file h_rd.c Handles Reinitialize Device requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "rp.h"
|
#include "rp.h"
|
||||||
/* device object has custom handler for all objects */
|
/* device object has custom handler for all objects */
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_rp.c Handles Read Property requests. */
|
/** @file h_rp.c Handles Read Property requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "abort.h"
|
#include "abort.h"
|
||||||
#include "readrange.h"
|
#include "readrange.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_rr.c Handles Read Range requests. */
|
/** @file h_rr.c Handles Read Range requests. */
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ static uint8_t Temp_Buf[MAX_APDU] = { 0 };
|
|||||||
|
|
||||||
/* Encodes the property APDU and returns the length,
|
/* Encodes the property APDU and returns the length,
|
||||||
or sets the error, and returns -1 */
|
or sets the error, and returns -1 */
|
||||||
int Encode_RR_payload(
|
static int Encode_RR_payload(
|
||||||
uint8_t * apdu,
|
uint8_t * apdu,
|
||||||
BACNET_READ_RANGE_DATA * pRequest)
|
BACNET_READ_RANGE_DATA * pRequest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
#include "timesync.h"
|
#include "timesync.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_ts.c Handles TimeSync requests. */
|
/** @file h_ts.c Handles TimeSync requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
/* special for this module */
|
/* special for this module */
|
||||||
#include "cov.h"
|
#include "cov.h"
|
||||||
#include "bactext.h"
|
#include "bactext.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
#ifndef MAX_COV_PROPERTIES
|
#ifndef MAX_COV_PROPERTIES
|
||||||
#define MAX_COV_PROPERTIES 2
|
#define MAX_COV_PROPERTIES 2
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "npdu.h"
|
#include "npdu.h"
|
||||||
#include "abort.h"
|
#include "abort.h"
|
||||||
#include "ptransfer.h"
|
#include "ptransfer.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_upt.c Handles Unconfirmed Private Transfer requests. */
|
/** @file h_upt.c Handles Unconfirmed Private Transfer requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "whohas.h"
|
#include "whohas.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_whohas.c Handles Who-Has requests. */
|
/** @file h_whohas.c Handles Who-Has requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_whois.c Handles Who-Is requests. */
|
/** @file h_whois.c Handles Who-Is requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "wp.h"
|
#include "wp.h"
|
||||||
/* device object has the handling for all objects */
|
/* device object has the handling for all objects */
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file h_wp.c Handles Write Property requests. */
|
/** @file h_wp.c Handles Write Property requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "apdu.h"
|
#include "apdu.h"
|
||||||
#include "npdu.h"
|
#include "npdu.h"
|
||||||
#include "reject.h"
|
#include "reject.h"
|
||||||
|
#include "handlers.h"
|
||||||
|
|
||||||
/** @file noserv.c Handles an unrecognized/unsupported service. */
|
/** @file noserv.c Handles an unrecognized/unsupported service. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -43,6 +42,7 @@
|
|||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "alarm_ack.h"
|
#include "alarm_ack.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_ack_alarm.c Send an Alarm Acknowledgment. */
|
/** @file s_ack_alarm.c Send an Alarm Acknowledgment. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_arfs.c Send part of an Atomic Read File Stream. */
|
/** @file s_arfs.c Send part of an Atomic Read File Stream. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_awfs.c Send part of an Atomic Write File Stream request. */
|
/** @file s_awfs.c Send part of an Atomic Write File Stream request. */
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_cevent.c Send a ConfirmedEventNotification Request. */
|
/** @file s_cevent.c Send a ConfirmedEventNotification Request. */
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_cov.c Send a Change of Value (COV) update or a Subscribe COV request. */
|
/** @file s_cov.c Send a Change of Value (COV) update or a Subscribe COV request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -41,6 +40,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_dcc.c Send a Device Communication Control (DCC) request. */
|
/** @file s_dcc.c Send a Device Communication Control (DCC) request. */
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "iam.h"
|
#include "iam.h"
|
||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_iam.c Send an I-Am message. */
|
/** @file s_iam.c Send an I-Am message. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_ihave.c Send an I-Have (property) message. */
|
/** @file s_ihave.c Send an I-Have (property) message. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -43,6 +42,7 @@
|
|||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "lso.h"
|
#include "lso.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_lso.c Send BACnet Life Safety Operation message. */
|
/** @file s_lso.c Send BACnet Life Safety Operation message. */
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -44,6 +43,7 @@
|
|||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "mydata.h"
|
#include "mydata.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_ptransfer.c Send a Private Transfer request. */
|
/** @file s_ptransfer.c Send a Private Transfer request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_rd.c Send a Reinitialize Device request. */
|
/** @file s_rd.c Send a Reinitialize Device request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -43,6 +42,7 @@
|
|||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "readrange.h"
|
#include "readrange.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_readrange.c Send a ReadRange request. */
|
/** @file s_readrange.c Send a ReadRange request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -40,6 +39,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_router.c Send BACnet Router requests. */
|
/** @file s_router.c Send BACnet Router requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_rp.c Send Read Property request. */
|
/** @file s_rp.c Send Read Property request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "sbuf.h"
|
#include "sbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_rpm.c Send Read Property Multiple request. */
|
/** @file s_rpm.c Send Read Property Multiple request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_ts.c Send TimeSync requests. */
|
/** @file s_ts.c Send TimeSync requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "datalink.h"
|
#include "datalink.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_uevent.c Send an Unconfirmed Event Notification. */
|
/** @file s_uevent.c Send an Unconfirmed Event Notification. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_upt.c Send an Unconfirmed Private Transfer request. */
|
/** @file s_upt.c Send an Unconfirmed Private Transfer request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_whohas.c Send Who-Has requests. */
|
/** @file s_whohas.c Send Who-Has requests. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -43,6 +42,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_whois.c Send a Who-Is request. */
|
/** @file s_whois.c Send a Who-Is request. */
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "config.h"
|
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "txbuf.h"
|
#include "txbuf.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
/** @file s_wp.c Send a Write Property request. */
|
/** @file s_wp.c Send a Write Property request. */
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "lso.h"
|
#include "lso.h"
|
||||||
#include "alarm_ack.h"
|
#include "alarm_ack.h"
|
||||||
#include "ptransfer.h"
|
#include "ptransfer.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
@@ -53,6 +54,11 @@ extern "C" {
|
|||||||
void Send_I_Am_Unicast(
|
void Send_I_Am_Unicast(
|
||||||
uint8_t * buffer,
|
uint8_t * buffer,
|
||||||
BACNET_ADDRESS * src);
|
BACNET_ADDRESS * src);
|
||||||
|
int iam_unicast_encode_pdu(
|
||||||
|
uint8_t * buffer,
|
||||||
|
BACNET_ADDRESS * src,
|
||||||
|
BACNET_ADDRESS * dest,
|
||||||
|
BACNET_NPDU_DATA * npdu_data);
|
||||||
|
|
||||||
void Send_WhoIs(
|
void Send_WhoIs(
|
||||||
int32_t low_limit,
|
int32_t low_limit,
|
||||||
@@ -101,6 +107,11 @@ extern "C" {
|
|||||||
BACNET_ADDRESS * dest,
|
BACNET_ADDRESS * dest,
|
||||||
BACNET_NPDU_DATA * npdu_data,
|
BACNET_NPDU_DATA * npdu_data,
|
||||||
BACNET_COV_DATA * cov_data);
|
BACNET_COV_DATA * cov_data);
|
||||||
|
uint8_t Send_COV_Subscribe(
|
||||||
|
uint32_t device_id,
|
||||||
|
BACNET_SUBSCRIBE_COV_DATA * cov_data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* returns the invoke ID for confirmed request, or 0 if failed */
|
/* returns the invoke ID for confirmed request, or 0 if failed */
|
||||||
uint8_t Send_Read_Property_Request(
|
uint8_t Send_Read_Property_Request(
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ extern "C" {
|
|||||||
uint16_t service_len,
|
uint16_t service_len,
|
||||||
BACNET_ADDRESS * src,
|
BACNET_ADDRESS * src,
|
||||||
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
||||||
|
void handler_dcc_password_set(
|
||||||
|
char *new_password);
|
||||||
|
|
||||||
void handler_i_have(
|
void handler_i_have(
|
||||||
uint8_t * service_request,
|
uint8_t * service_request,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/* encode service */
|
/* encode service */
|
||||||
int timesync_utc_encode_apdu(
|
int timesync_utc_encode_apdu(
|
||||||
uint8_t * apdu,
|
uint8_t * apdu,
|
||||||
BACNET_DATE * my_date,
|
BACNET_DATE * my_date,
|
||||||
@@ -51,7 +51,12 @@ extern "C" {
|
|||||||
uint8_t * apdu,
|
uint8_t * apdu,
|
||||||
BACNET_DATE * my_date,
|
BACNET_DATE * my_date,
|
||||||
BACNET_TIME * my_time);
|
BACNET_TIME * my_time);
|
||||||
/* decode the service request only */
|
int timesync_encode_apdu_service(
|
||||||
|
uint8_t * apdu,
|
||||||
|
BACNET_UNCONFIRMED_SERVICE service,
|
||||||
|
BACNET_DATE * my_date,
|
||||||
|
BACNET_TIME * my_time);
|
||||||
|
/* decode the service request only */
|
||||||
int timesync_decode_service_request(
|
int timesync_decode_service_request(
|
||||||
uint8_t * apdu,
|
uint8_t * apdu,
|
||||||
unsigned apdu_len,
|
unsigned apdu_len,
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ void address_remove_device(
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
struct Address_Cache_Entry *address_remove_oldest(
|
static struct Address_Cache_Entry *address_remove_oldest(
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
struct Address_Cache_Entry *pMatch;
|
struct Address_Cache_Entry *pMatch;
|
||||||
@@ -198,7 +198,7 @@ note: useful for MS/TP Slave static binding
|
|||||||
*/
|
*/
|
||||||
static const char *Address_Cache_Filename = "address_cache";
|
static const char *Address_Cache_Filename = "address_cache";
|
||||||
|
|
||||||
void address_file_init(
|
static void address_file_init(
|
||||||
const char *pFilename)
|
const char *pFilename)
|
||||||
{
|
{
|
||||||
FILE *pFile = NULL; /* stream pointer */
|
FILE *pFile = NULL; /* stream pointer */
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include <stdio.h> /* Standard I/O */
|
#include <stdio.h> /* Standard I/O */
|
||||||
#include <stdlib.h> /* Standard Library */
|
#include <stdlib.h> /* Standard Library */
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
/** @file debug.c Debug print function */
|
/** @file debug.c Debug print function */
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
#include "address.h"
|
#include "address.h"
|
||||||
|
#include "iam.h"
|
||||||
|
|
||||||
/** @file iam.c Encode/Decode I-Am service */
|
/** @file iam.c Encode/Decode I-Am service */
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "bacenum.h"
|
#include "bacenum.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
|
#include "reject.h"
|
||||||
|
|
||||||
/** @file reject.c Encode/Decode Reject APDUs */
|
/** @file reject.c Encode/Decode Reject APDUs */
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "bacenum.h"
|
#include "bacenum.h"
|
||||||
#include "bacdcode.h"
|
#include "bacdcode.h"
|
||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
|
#include "whois.h"
|
||||||
|
|
||||||
/** @file whois.c Encode/Decode Who-Is requests */
|
/** @file whois.c Encode/Decode Who-Is requests */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user