ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES),y)
+ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = h_publisher h_subscriber
+else
utils_PROGRAMS = h_publisher h_subscriber
+endif
h_publisher_SOURCES = h_publisher.c
rtlinux_MODULES = h_publisher_rt h_subscriber_rt
rtlinux_INCLUDES = -I $(srcdir)/../../include
-
+
h_publisher_rt_SOURCES = h_publisher.c
h_subscriber_rt_SOURCES = h_subscriber.c
#include <stdio.h>
#endif
-ORTEDomain *d=NULL;
-char instance2Send[64];
-int counter=0;
+#ifdef MAIN_RENAMED
+#define main orte_h_publisher_main
+#define exit return
+#endif
-void
+static ORTEDomain *d=NULL;
+static char instance2Send[64];
+static int counter=0;
+
+static void
sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam) {
char *instance=(char*)vinstance;
#include <stdio.h>
#endif
+#ifdef MAIN_RENAMED
+#define main orte_h_subscriber_main
+#define exit return
+#endif
-ORTEDomain *d = NULL;
-char instance2Recv[64];
+static ORTEDomain *d = NULL;
+static char instance2Recv[64];
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
char *instance=(char*)vinstance;
}
-void *
+static void *
subscriberCreate(void *arg) {
ORTESubscription *s;
NtpTime deadline,minimumSeparation;
ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES),y)
+ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = m_subscriber
+else
utils_PROGRAMS = m_subscriber
+endif
m_subscriber_SOURCES = m_subscriber.c
#include "orte.h"
#include <stdio.h>
-ORTEDomain *d = NULL;
-char instance2Recv[64];
+#ifdef MAIN_RENAMED
+#define main orte_m_subscriber_main
+#define exit return
+#endif
+
+static ORTEDomain *d = NULL;
+static char instance2Recv[64];
int maxDataSize(ORTEGetMaxSizeParam *gms) {
return gms->max_size;
}
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
char *instance=(char*)vinstance;
}
-void *
+static void *
subscriberCreate(void *arg) {
ORTESubscription *s;
NtpTime deadline,minimumSeparation;
ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES),y)
+ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = orteping
+else
bin_PROGRAMS = orteping
+endif
orteping_SOURCES = orteping.c
#include <getopt.h>
#endif
+#ifdef MAIN_RENAMED
+#define main orte_ping_main
+#define exit return
+#endif
+
Boolean quite=ORTE_FALSE;
int regfail=0;
regfail=1;
}
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
uint32_t *instance=(uint32_t*)vinstance;
}
}
-void
+static void
sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam) {
uint32_t *instance=(uint32_t*)vinstance;
ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES),y)
+ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = r_publisher r_subscriber_reliable r_subscriber_besteffort
+else
utils_PROGRAMS = r_publisher r_subscriber_reliable r_subscriber_besteffort
+endif
r_publisher_SOURCES = r_publisher.c
#endif
#include "orte.h"
-ORTEDomain *d;
-char instance2Send[64];
-int counter=0;
+#ifdef MAIN_RENAMED
+#define main orte_r_publisher_main
+#define exit return
+#endif
+
+static ORTEDomain *d;
+static char instance2Send[64];
+static int counter=0;
-void
+static void
sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam) {
char *instance=(char*)vinstance;
#endif
#include "orte.h"
-ORTEDomain *d;
-char instance2Recv[64];
+#ifdef MAIN_RENAMED
+#define main orte_r_subscriber_besteffort_main
+#define exit return
+#endif
+
+static ORTEDomain *d;
+static char instance2Recv[64];
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
char *instance=(char*)vinstance;
#endif
#include "orte.h"
-ORTEDomain *d;
-char instance2Recv[64];
+#ifdef MAIN_RENAMED
+#define main orte_r_subscriber_reliable_main
+#define exit return
+#endif
+
+static ORTEDomain *d;
+static char instance2Recv[64];
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
char *instance=(char*)vinstance;
ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES),y)
+ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = schneider_subscriber
+else
utils_PROGRAMS = schneider_subscriber
+endif
schneider_subscriber_SOURCES = schneider_subscriber.c
#include "orte.h"
#include <stdio.h>
-ORTEDomain *d = NULL;
-char instance2Recv[64];
+#ifdef MAIN_RENAMED
+#define main orte_schneider_subscriber_main
+#define exit return
+#endif
+
+static ORTEDomain *d = NULL;
+static char instance2Recv[64];
int maxDataSize(ORTEGetMaxSizeParam *gms) {
return gms->max_size;
}
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
char *instance=(char*)vinstance;
}
-void *
+static void *
subscriberCreate(void *arg) {
ORTESubscription *s;
NtpTime deadline,minimumSeparation;
ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES),y)
+ifeq ($(CONFIG_OC_ETH_ORTE_EXAMPLES_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = ortespy
+else
bin_PROGRAMS = ortespy
+endif
ortespy_SOURCES = ortespy.c
#endif
#include "string.h"
-ORTEDomain *d;
-NtpTime deadline,minimumSeparation;
-int32_t instanceRecv;
+#ifdef MAIN_RENAMED
+#define main orte_spy_main
+#define exit return
+#endif
+
+static ORTEDomain *d;
+static NtpTime deadline,minimumSeparation;
+static int32_t instanceRecv;
-void
+static void
recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
char lbuff[MAX_STRING_NTPTIME_LENGTH];
char rbuff[MAX_STRING_NTPTIME_LENGTH];
default_CONFIG = CONFIG_OC_ETH_ORTE_MANAGER=y
+default_CONFIG = CONFIG_OC_ETH_ORTE_MANAGER_AS_LIBRARY=x
ifeq ($(CONFIG_OC_ETH_ORTE_MANAGER),y)
-bin_PROGRAMS = ortemanager
-
INCLUDES = -I $(srcdir)/../include
+ifeq ($(CONFIG_OC_ETH_ORTE_MANAGER_AS_LIBRARY),y)
+INCLUDES += -D MAIN_RENAMED
+lib_LIBRARIES = ortemanager
+else
+bin_PROGRAMS = ortemanager
+endif
+
lib_LOADLIBES = orte pthread
ortemanager_SOURCES = ortemanager.c
ifeq ($(CONFIG_OC_ETH_ORTE_MANAGER_RTL),y)
rtlinux_MODULES = ortemanager_rt
-
+
rtlinux_INCLUDES = -I $(srcdir)/../include
ortemanager_rt_SOURCES = ortemanager.c
#include "orte_all.h"
+#ifdef MAIN_RENAMED
+#define main ortemanager_main
+#define exit return
+#endif
+
#ifndef CONFIG_ORTE_RT
//global variables
-ORTEDomain *d;
-ORTEDomainProp dp;
-int32_t opt,domain=ORTE_DEFAULT_DOMAIN;
-Boolean orteDaemon=ORTE_FALSE;
-Boolean orteWinService=ORTE_FALSE;
-ORTEDomainAppEvents *events=NULL;
+static ORTEDomain *d;
+static ORTEDomainProp dp;
+static int32_t opt,domain=ORTE_DEFAULT_DOMAIN;
+static Boolean orteDaemon=ORTE_FALSE;
+static Boolean orteWinService=ORTE_FALSE;
+static ORTEDomainAppEvents *events=NULL;
//event system
Boolean