2 * $Id: subscriberbesteffort.c,v 0.0.0.1 2003/12/27
4 * DEBUG: section Subscriber BestEffort
6 * -------------------------------------------------------------------
8 * Open Real-Time Ethernet
10 * Copyright (C) 2001-2006
11 * Department of Control Engineering FEE CTU Prague, Czech Republic
12 * http://dce.felk.cvut.cz
13 * http://www.ocera.org
15 * Author: Petr Smolik petr@smoliku.cz
17 * Project Responsible: Zdenek Hanzalek
18 * --------------------------------------------------------------------
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
34 #include <posix/pthread.h>
39 #define main orte_r_subscriber_besteffort_main
44 static char instance2Recv[64];
47 recvCallBack(const ORTERecvInfo *info, void *vinstance, void *recvCallBackParam)
49 char *instance = (char *)vinstance;
51 switch (info->status) {
53 printf("%s\n", instance);
56 printf("deadline occurred\n");
63 main(int argc, char *args[])
66 NtpTime deadline, minimumSeparation;
69 //ORTEVerbositySetOptions("ALL,10");
70 d = ORTEDomainAppCreate(ORTE_DEFAULT_DOMAIN, NULL, NULL, ORTE_FALSE);
71 ORTETypeRegisterAdd(d, "HelloMsg", NULL, NULL, NULL, sizeof(instance2Recv));
72 NTPTIME_BUILD(deadline, 3);
73 NTPTIME_BUILD(minimumSeparation, 0);
74 s = ORTESubscriptionCreate(
87 printf("ORTESubscriptionCreate failed\n");
90 #ifndef CONFIG_ORTE_RT
106 ORTEDomainAppDestroy(d);
108 MODULE_LICENSE("GPL");
109 module_init(hello_init);
110 module_exit(hello_exit);