1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

updated AsyncIP to RT-LAB 11, removed some warnings and fixed a typo

This commit is contained in:
Steffen Vogel 2016-05-19 14:00:30 +02:00
parent affb5c6eb3
commit 3f282a5a9e
3 changed files with 23 additions and 11 deletions

View file

@ -1,17 +1,26 @@
# ----------------------------------------------------------------------------#
# Specify program name
PROGRAM = AsyncIP
PROGRAM = s2ss
# ----------------------------------------------------------------------------#
# Specify default values if we are not compiling from RT-LAB
#
# ----------------------------------------------------------------------------#
TARGET_OPALRT_ROOT = /usr/opalrt
# ----------------------------------------------------------------------------#
# QNX v6.x
#
ifeq "$(SYSNAME)" "nto"
CC = gcc
LD = $(CC)
TARGET_LIB = -lsocket
endif
# ----------------------------------------------------------------------------#
# ----------------------------------------------------------------------------#
# RedHawk Linux
#
ifeq "$(shell uname)" "Linux"
RTLAB_INTEL_COMPILER ?= 1
@ -37,6 +46,7 @@ ifeq "$(shell uname)" "Linux"
TARGET_LIB = -lpthread -lm -ldl -lutil -lrt $(RH_LIBS) $(INTEL_LIBS)
endif
# ----------------------------------------------------------------------------#
# Support for debugging symbols
ifeq ($(DEBUG),1)
@ -48,16 +58,16 @@ else
endif
INCLUDES = -I.
LIBPATH = -L.
CC_OPTS = -std=c99
LD_OPTS =
OBJS = s2ss.o msg.o utils.o socket.o
LIBPATH = -L. $(OPAL_LIBPATH)
CC_OPTS = -std=c99
LD_OPTS =
OBJS = s2ss.o msg.o utils.o socket.o
ADDLIB = -lOpalCore -lOpalUtils
LIBS = -lOpalAsyncApiCore $(ADDLIB) $(TARGET_LIB)
ADDLIB = -lOpalCore -lOpalUtils
LIBS = -lOpalAsyncApiCore $(ADDLIB) $(TARGET_LIB) $(OPAL_LIBS)
CFLAGS = -c $(CC_OPTS) $(CC_DEBUG_OPTS) $(RH_FLAGS) $(INCLUDES)
LDFLAGS = $(LD_OPTS) $(LD_DEBUG_OPTS) $(LIBPATH)
CFLAGS = -c $(CC_OPTS) $(CC_DEBUG_OPTS) $(RH_FLAGS) $(INCLUDES)
LDFLAGS = $(LD_OPTS) $(LD_DEBUG_OPTS) $(LIBPATH)
all: $(PROGRAM)

View file

@ -23,10 +23,10 @@
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <pthread.h>
#if defined(__QNXNTO__)
#include <process.h>
#include <pthread.h>
#include <devctl.h>
#include <sys/dcmd_chr.h>
#elif defined(__linux__)
@ -138,7 +138,7 @@ static void *SendToIPPort(void *arg)
msg.sequence = seq++;
msg.ts.sec = now.tv_sec;
msg.ts.nsec = now.tc_nsec;
msg.ts.nsec = now.tv_nsec;
/* Perform the actual write to the ip port */
if (SendPacket((char *) &msg, MSG_LEN(&msg)) < 0)

View file

@ -16,9 +16,11 @@
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
/* Define RTLAB before including OpalPrint.h for messages to be sent
* to the OpalDisplay. Otherwise stdout will be used. */