2 * $Id: publisher.c,v 0.0.0.1 2003/12/27
4 * DEBUG: section publisher
5 * AUTHOR: Petr Smolik petr.smolik@wo.cz
7 * ORTE - OCERA Real-Time Ethernet http://www.ocera.org/
8 * --------------------------------------------------------------------
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
24 #include <posix/pthread.h>
29 char instance2Send[64];
33 sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam) {
34 char *instance=(char*)vinstance;
36 switch (info->status) {
38 printf("Sampling publication, count %d\n", counter);
39 sprintf(instance,"Hello Universe! (%d)",counter++);
41 case CQL: //criticalQueueLevel
48 main(int argc, char *args[]) {
50 NtpTime persistence,repeating;
53 d=ORTEDomainAppCreate(ORTE_DEFAULT_DOMAIN,NULL,NULL,ORTE_FALSE);
54 ORTETypeRegisterAdd(d,"HelloMsg",NULL,NULL,64);
55 NTPTIME_BUILD(persistence,3);
56 NTPTIME_BUILD(repeating,1);
57 p=ORTEPublicationCreate(
67 #ifndef CONFIG_ORTE_RT
82 ORTEDomainAppDestroy(d);
84 MODULE_LICENSE("GPL");
85 module_init(hello_init);
86 module_exit(hello_exit);