Modified the demo/readfile to work under linux.
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
#include "npdu.h"
|
#include "npdu.h"
|
||||||
#include "apdu.h"
|
#include "apdu.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
#include "net.h"
|
||||||
#include "datalink.h"
|
#include "datalink.h"
|
||||||
#include "whois.h"
|
#include "whois.h"
|
||||||
/* some demo stuff needed */
|
/* some demo stuff needed */
|
||||||
@@ -56,8 +57,6 @@ static bool End_Of_File_Detected = false;
|
|||||||
static bool Error_Detected = false;
|
static bool Error_Detected = false;
|
||||||
static uint8_t Current_Invoke_ID = 0;
|
static uint8_t Current_Invoke_ID = 0;
|
||||||
|
|
||||||
#define MIN(X,Y) ((X) < (Y) ? : (X) : (Y))
|
|
||||||
|
|
||||||
static void Atomic_Read_File_Error_Handler(
|
static void Atomic_Read_File_Error_Handler(
|
||||||
BACNET_ADDRESS *src,
|
BACNET_ADDRESS *src,
|
||||||
uint8_t invoke_id,
|
uint8_t invoke_id,
|
||||||
@@ -362,6 +361,7 @@ int main(int argc, char *argv[])
|
|||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
/* configure standard BACnet/IP port */
|
/* configure standard BACnet/IP port */
|
||||||
|
bip_set_interface("eth0"); /* for linux */
|
||||||
bip_set_port(0xBAC0);
|
bip_set_port(0xBAC0);
|
||||||
if (!bip_init())
|
if (!bip_init())
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -17,11 +17,8 @@ CFLAGS = -Wall -g $(INCLUDES) $(DEFINES)
|
|||||||
TARGET = readfile
|
TARGET = readfile
|
||||||
|
|
||||||
SRCS = demo/readfile/readfile.c \
|
SRCS = demo/readfile/readfile.c \
|
||||||
ports/linux/ethernet.c \
|
|
||||||
ports/linux/arcnet.c \
|
|
||||||
ports/linux/bip-init.c \
|
ports/linux/bip-init.c \
|
||||||
bip.c \
|
bip.c \
|
||||||
dlmstp.c \
|
|
||||||
demo/handler/txbuf.c \
|
demo/handler/txbuf.c \
|
||||||
demo/handler/noserv.c \
|
demo/handler/noserv.c \
|
||||||
demo/handler/h_whois.c \
|
demo/handler/h_whois.c \
|
||||||
|
|||||||
Reference in New Issue
Block a user