Commit 15b18b60 authored by julien.delange's avatar julien.delange
Browse files

move sockets function in drivers



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@543 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent e716b468
...@@ -15,7 +15,6 @@ EXTRA_DIST = $(srcdir)/po_hi_common.h \ ...@@ -15,7 +15,6 @@ EXTRA_DIST = $(srcdir)/po_hi_common.h \
$(srcdir)/po_hi_types.h \ $(srcdir)/po_hi_types.h \
$(srcdir)/po_hi_main.h \ $(srcdir)/po_hi_main.h \
$(srcdir)/po_hi_simulink.h \ $(srcdir)/po_hi_simulink.h \
$(srcdir)/po_hi_sockets.h \
$(srcdir)/po_hi_transport.h $(srcdir)/po_hi_transport.h
CLEANFILES = *~ CLEANFILES = *~
......
AUTOMAKE_OPTIONS = no-dependencies AUTOMAKE_OPTIONS = no-dependencies
EXTRA_DIST = $(srcdir)/po_hi_driver_linux_serial.h \ EXTRA_DIST = $(srcdir)/po_hi_driver_linux_serial.h \
$(srcdir)/po_hi_driver_sockets.h \
$(srcdir)/po_hi_driver_rasta_serial.h $(srcdir)/po_hi_driver_rasta_serial.h
CLEANFILES = *~ CLEANFILES = *~
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifndef __PO_HI_DRIVER_LINUX_SERIAL_H__ #ifndef __PO_HI_DRIVER_LINUX_SERIAL_H__
#define __PO_HI_DRIVER_LINUX_SERIAL_H__ #define __PO_HI_DRIVER_LINUX_SERIAL_H__
#ifdef __PO_HI_NEED_SERIAL_LINUX #ifdef __PO_HI_NEED_DRIVER_SERIAL_LINUX
void __po_hi_c_driver_serial_linux_poller (void); void __po_hi_c_driver_serial_linux_poller (void);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifndef __PO_HI_DRIVER_RASTA_SERIAL_H__ #ifndef __PO_HI_DRIVER_RASTA_SERIAL_H__
#define __PO_HI_DRIVER_RASTA_SERIAL_H__ #define __PO_HI_DRIVER_RASTA_SERIAL_H__
#ifdef __PO_HI_NEED_SERIAL_RASTA #ifdef __PO_HI_NEED_DRIVER_SERIAL_RASTA
void __po_hi_c_driver_serial_rasta_poller (void); void __po_hi_c_driver_serial_rasta_poller (void);
......
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2007-2010, European Space Agency.
*/
#include <deployment.h>
/* Include generated files */
#include <po_hi_protocols.h>
/* Files from PolyORB-HI-C */
extern __po_hi_node_t mynode;
extern __po_hi_inetport_t node_port[__PO_HI_NB_NODES];
extern __po_hi_inetaddr_t node_addr[__PO_HI_NB_NODES];
#define __PO_HI_TRANSPORT_SOCKET_NEED_RECEIVER_TASK() \
(node_port[mynode] != __PO_HI_NOPORT)
/*
* Maccro that declare if we need to activate another thread
* that receives data from a socket (receiver task)
*/
void __po_hi_sockets_initialize (void);
/*
* Initialize sockets, create the receiver tasks
* and sender file descriptors
*/
int __po_hi_sockets_send (__po_hi_entity_t from, __po_hi_entity_t to, __po_hi_msg_t* msg);
/*
* Send data through the sending socket
*/
void* __po_hi_sockets_receiver_task (void);
/*
* Task that polls for incoming data
* and dispatch it in po-hi-c queues
*/
...@@ -65,6 +65,7 @@ ifeq ($(NEED_TRANSPORT), yes) ...@@ -65,6 +65,7 @@ ifeq ($(NEED_TRANSPORT), yes)
po_hi_types.o \ po_hi_types.o \
po_hi_gqueue.o \ po_hi_gqueue.o \
drivers/po_hi_driver_linux_serial.o \ drivers/po_hi_driver_linux_serial.o \
drivers/po_hi_driver_sockets.o \
drivers/po_hi_driver_rasta_serial.o \ drivers/po_hi_driver_rasta_serial.o \
$(ACTUAL_TRANSPORT) \ $(ACTUAL_TRANSPORT) \
po_hi_transport.o $(TARGET_TRANSPORT_SOURCES) po_hi_transport.o $(TARGET_TRANSPORT_SOURCES)
......
...@@ -11,7 +11,6 @@ C_FILES = $(srcdir)/po_hi_task.c \ ...@@ -11,7 +11,6 @@ C_FILES = $(srcdir)/po_hi_task.c \
$(srcdir)/po_hi_protocols.c \ $(srcdir)/po_hi_protocols.c \
$(srcdir)/po_hi_transport.c \ $(srcdir)/po_hi_transport.c \
$(srcdir)/po_hi_transport_dummy.c \ $(srcdir)/po_hi_transport_dummy.c \
$(srcdir)/po_hi_sockets.c \
$(srcdir)/po_hi_types.c \ $(srcdir)/po_hi_types.c \
$(srcdir)/po_hi_utils.c \ $(srcdir)/po_hi_utils.c \
$(srcdir)/po_hi_simulink.c \ $(srcdir)/po_hi_simulink.c \
......
AUTOMAKE_OPTIONS = no-dependencies AUTOMAKE_OPTIONS = no-dependencies
C_FILES = $(srcdir)/po_hi_driver_linux_serial.c \ C_FILES = $(srcdir)/po_hi_driver_linux_serial.c \
$(srcdir)/po_hi_driver_sockets.c \
$(srcdir)/po_hi_driver_rasta_serial.c $(srcdir)/po_hi_driver_rasta_serial.c
csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers'} csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers'}
......
...@@ -9,10 +9,14 @@ ...@@ -9,10 +9,14 @@
* Copyright (C) 2007-2008, GET-Telecom Paris. * Copyright (C) 2007-2008, GET-Telecom Paris.
*/ */
#include <deployment.h>
#ifdef __PO_HI_NEED_DRIVER_SOCKETS
#include <po_hi_config.h> #include <po_hi_config.h>
#include <po_hi_task.h> #include <po_hi_task.h>
#include <po_hi_transport.h> #include <po_hi_transport.h>
#include <po_hi_sockets.h> #include <drivers/po_hi_driver_sockets.h>
#include <po_hi_protocols.h> #include <po_hi_protocols.h>
#include <po_hi_debug.h> #include <po_hi_debug.h>
#include <po_hi_types.h> #include <po_hi_types.h>
...@@ -25,7 +29,6 @@ ...@@ -25,7 +29,6 @@
#include <po_hi_giop.h> #include <po_hi_giop.h>
#endif #endif
#include <deployment.h>
#include <activity.h> #include <activity.h>
#include <signal.h> #include <signal.h>
...@@ -470,3 +473,5 @@ void* __po_hi_sockets_receiver_task (void) ...@@ -470,3 +473,5 @@ void* __po_hi_sockets_receiver_task (void)
return NULL; return NULL;
} }
#endif
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#if __PO_HI_NB_PORTS > 1 #if __PO_HI_NB_PORTS > 1
#include <po_hi_transport.h> #include <po_hi_transport.h>
#include <po_hi_sockets.h> #include <drivers/po_hi_driver_sockets.h>
#endif #endif
/* included files from PolyORB-HI-C */ /* included files from PolyORB-HI-C */
......
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
* For more informations, please visit http://ocarina.enst.fr * For more informations, please visit http://ocarina.enst.fr
* *
* Copyright (C) 2007-2008, GET-Telecom Paris. * Copyright (C) 2007-2008, GET-Telecom Paris.
* Copyright (C) 2010, European Space Agency.
*/ */
#include <po_hi_config.h> #include <po_hi_config.h>
#include <po_hi_types.h> #include <po_hi_types.h>
#include <po_hi_debug.h> #include <po_hi_debug.h>
#include <po_hi_transport.h> #include <po_hi_transport.h>
#include <po_hi_sockets.h> #include <drivers/po_hi_driver_sockets.h>
#include <po_hi_giop.h> #include <po_hi_giop.h>
#include <po_hi_messages.h> #include <po_hi_messages.h>
#include <po_hi_returns.h> #include <po_hi_returns.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment