Commit 375c3735 authored by julien.delange's avatar julien.delange

* begin to separate sockets stuff with the other services



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@512 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3006e67f
......@@ -14,6 +14,7 @@ EXTRA_DIST = $(srcdir)/po_hi_common.h \
$(srcdir)/po_hi_types.h \
$(srcdir)/po_hi_main.h \
$(srcdir)/po_hi_simulink.h \
$(srcdir)/po_hi_transport_sockets.h \
$(srcdir)/po_hi_transport.h
CLEANFILES = *~
......
......@@ -17,12 +17,12 @@
#include <deployment.h>
#include <request.h>
#define __PO_HI_NOPORT 1
#define __PO_HI_NOADDR ""
typedef __po_hi_uint16_t __po_hi_inetport_t;
typedef char* __po_hi_inetaddr_t;
#define __PO_HI_NOPORT 1
#define __PO_HI_NOADDR ""
int __po_hi_protocols_send (__po_hi_entity_t from,
__po_hi_entity_t to,
__po_hi_msg_t* msg);
......
......@@ -12,6 +12,7 @@
#define __PO_HI_TRANSPORT__
#include <po_hi_messages.h>
#include <po_hi_protocols.h>
#include <deployment.h>
#include <request.h>
......@@ -65,4 +66,5 @@ int __po_hi_transport_low_level_send (__po_hi_entity_t from,
* which is sent.
*/
#endif /* __PO_HI_TRANSPORT__ */
......@@ -31,13 +31,23 @@ CPPFLAGS=$(CFLAGS) $(USER_CPPFLAGS)
LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS)
ifdef TARGET_INCLUDE
INCLUDE=-I. -I$(USER_SOURCES_DIRS) -I$(RUNTIME_PATH)/include/ $(TARGET_INCLUDE)
INCLUDE=-I. -I$(RUNTIME_PATH)/include/ $(TARGET_INCLUDE)
else
INCLUDE=-I. -I$(RUNTIME_PATH)/include/
endif
ifdef USER_SOURCES_DIRS
INCLUDE+=-I$(USER_SOURCES_DIRS)
endif
INCLUDE+=$(USER_INCLUDE)
ifndef $(TARGET_NAME)
TARGET_NAME=$(TARGET)
endif
INCLUDE+=-DTARGET=$(TARGET_NAME)
################################################################################
# Files to be compiled
......
......@@ -9,19 +9,22 @@
*/
#include <pthread.h>
/* POSIX files */
/* system-dependent included files */
#include <deployment.h>
/* included files from the generated code */
#include <po_hi_config.h>
#include <po_hi_returns.h>
#include <po_hi_task.h>
#include <po_hi_protected.h>
/* included files from PolyORB-HI-C */
#include <deployment.h>
/* included files from the generated code */
#if __PO_HI_NB_NODES > 1
#include <po_hi_transport.h>
#include <po_hi_transport_sockets.h>
#endif
int __po_hi_transport_need_receiver_task();
/* included files from PolyORB-HI-C */
void __po_hi_initialize_transport ();
pthread_cond_t cond_init;
......@@ -43,7 +46,7 @@ int __po_hi_initialize ()
nb_tasks_to_init = __PO_HI_NB_TASKS + 1;
#if __PO_HI_NB_NODES > 1
if (__po_hi_transport_need_receiver_task())
if (__PO_HI_TRANSPORT_SOCKET_NEED_RECEIVER_TASK ())
{
nb_tasks_to_init++;
}
......
......@@ -11,6 +11,7 @@
#include <po_hi_config.h>
#include <po_hi_task.h>
#include <po_hi_transport.h>
#include <po_hi_transport_sockets.h>
#include <po_hi_protocols.h>
#include <po_hi_debug.h>
#include <po_hi_types.h>
......@@ -60,9 +61,6 @@
* See the files deployment.h and deployment.c.
*/
extern __po_hi_inetport_t node_port[__PO_HI_NB_NODES];
extern __po_hi_inetaddr_t node_addr[__PO_HI_NB_NODES];
extern __po_hi_node_t mynode;
extern __po_hi_node_t entity_table[__PO_HI_NB_ENTITIES];
/*
......@@ -473,12 +471,3 @@ void* __po_hi_receiver_task (void)
return NULL;
}
int __po_hi_transport_need_receiver_task ()
{
if ((__PO_HI_NB_NODES > 1) && (node_port[mynode] != __PO_HI_NOPORT))
{
return 1;
}
return 0;
}
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