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