2 * $Id: protos_api.h,v 0.0.0.1 2003/09/10
4 * AUTHOR: Petr Smolik petr.smolik@wo.cz
6 * ORTE - OCERA Real-Time Ethernet http://www.ocera.org/
7 * --------------------------------------------------------------------
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
28 ///////////////////////////////////////////////////////////////////////////////
31 IPAddressToString(IPAddress ipAddress);
33 StringToIPAddress(const char *string);
35 ///////////////////////////////////////////////////////////////////////////////
38 ORTEDomainPropDefaultGet(ORTEDomainProp *prop);
40 ORTEDomainInitEvents(ORTEDomainAppEvents *events);
42 ORTEPublPropDefaultGet(ORTEDomain *d,ORTEPublProp *pp);
44 ORTEPublPropDefaultSet(ORTEDomain *d,ORTEPublProp *pp);
46 ORTESubsPropDefaultGet(ORTEDomain *d,ORTESubsProp *sp);
48 ORTESubsPropDefaultSet(ORTEDomain *d,ORTESubsProp *sp);
50 ///////////////////////////////////////////////////////////////////////////////
53 ORTEDomainAppCreate(int domain,ORTEDomainProp *prop,ORTEDomainAppEvents *events);
55 ORTEDomainAppDestroy(ORTEDomain *d);
57 ORTEDomainAppSubscriptionPatternAdd(ORTEDomain *d,const char *topic,
58 const char *type,ORTESubscriptionPatternCallBack subscriptionCallBack,
61 ORTEDomainAppSubscriptionPatternRemove(ORTEDomain *d,const char *topic,
64 ORTEDomainAppSubscriptionPatternDestroyAll(ORTEDomain *d);
66 ///////////////////////////////////////////////////////////////////////////////
69 ORTEDomainMgrCreate(int domain, ORTEDomainProp *prop,
70 ORTEDomainAppEvents *events,Boolean startSendingThread);
72 ORTEDomainMgrDestroy(ORTEDomain *d);
74 ///////////////////////////////////////////////////////////////////////////////
76 extern ORTEPublication *
77 ORTEPublicationCreate(ORTEDomain *d,char *topic,char *typeName,
78 void *instance,NtpTime *persistence,int strength,
79 ORTESendCallBack sendCallBack,void *sendCallBackParam,
80 NtpTime *sendCallBackDelay);
82 ORTEPublicationDestroy(ORTEPublication *cstWriter);
84 ORTEPublicationPropertiesGet(ORTEPublication *cstWriter,ORTEPublProp *pp);
86 ORTEPublicationPropertiesSet(ORTEPublication *cstWriter,ORTEPublProp *pp);
88 ORTEPublicationWaitForSubscriptions(ORTEPublication *cstWriter,NtpTime wait,
89 unsigned int retries,u_int32_t noSubscriptions);
91 ORTEPublicationGetStatus(ORTEPublication *cstWriter,ORTEPublStatus *status);
93 ORTEPublicationSend(ORTEPublication *cstWriter);
95 ///////////////////////////////////////////////////////////////////////////////
97 extern ORTESubscription *
98 ORTESubscriptionCreate(ORTEDomain *d,SubscriptionMode mode,SubscriptionType sType,
99 char *topic,char *typeName,void *instance,NtpTime *deadline,
100 NtpTime *minimumSeparation,ORTERecvCallBack recvCallBack,
101 void *recvCallBackParam);
103 ORTESubscriptionDestroy(ORTESubscription *cstReader);
105 ORTESubscriptionPropertiesGet(ORTESubscription *cstReader,ORTESubsProp *sp);
107 ORTESubscriptionPropertiesSet(ORTESubscription *cstReader,ORTESubsProp *sp);
109 ORTESubscriptionWaitForPublications(ORTESubscription *cstReader,NtpTime wait,
110 unsigned int retries,unsigned int noPublications);
112 ORTESubscriptionGetStatus(ORTESubscription *cstReader,ORTESubsStatus *status);
114 ORTESubscriptionPull(ORTESubscription *cstReader);
116 ///////////////////////////////////////////////////////////////////////////////
117 // ORTETypeRegister.c
119 ORTETypeRegisterAdd(ORTEDomain *d,char *typeName,ORTETypeSerialize ts,
120 ORTETypeDeserialize ds,unsigned int gms);
122 ORTETypeRegisterDestroyAll(ORTEDomain *d);
124 ///////////////////////////////////////////////////////////////////////////////
127 ORTEVerbositySetOptions(const char *options);
129 ORTEVerbositySetLogFile(const char *arg);
132 ///////////////////////////////////////////////////////////////////////////////
137 ///////////////////////////////////////////////////////////////////////////////
138 // ORTEAppSendThread.c
140 ORTEAppSendThread(ORTEDomain *d);
146 #endif /* _PROTOS_API_H */