]> rtime.felk.cvut.cz Git - orte.git/blob - orte/include/protos_api.h
Added prerelease of ORTE-0.2 (Real Time Publisher Subscriber communication protocol...
[orte.git] / orte / include / protos_api.h
1 /*
2  *  $Id: protos_api.h,v 0.0.0.1             2003/09/10 
3  *
4  *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
5  *
6  *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
7  *  --------------------------------------------------------------------
8  *
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.
13  *  
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.
18  *  
19  */
20
21 #ifndef _PROTOS_API_H
22 #define _PROTOS_API_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 ///////////////////////////////////////////////////////////////////////////////
29 // conv.c
30 extern char* 
31 IPAddressToString(IPAddress ipAddress);
32 extern IPAddress
33 StringToIPAddress(const char *string);
34
35 ///////////////////////////////////////////////////////////////////////////////
36 // ORTEDomain.c
37 extern Boolean
38 ORTEDomainPropDefaultGet(ORTEDomainProp *prop);
39 extern Boolean
40 ORTEDomainInitEvents(ORTEDomainAppEvents *events);
41 extern Boolean
42 ORTEPublPropDefaultGet(ORTEDomain *d,ORTEPublProp *pp);
43 extern Boolean
44 ORTEPublPropDefaultSet(ORTEDomain *d,ORTEPublProp *pp);
45 extern Boolean
46 ORTESubsPropDefaultGet(ORTEDomain *d,ORTESubsProp *sp);
47 extern Boolean
48 ORTESubsPropDefaultSet(ORTEDomain *d,ORTESubsProp *sp);
49
50 ///////////////////////////////////////////////////////////////////////////////
51 // ORTEDomainApp.c
52 extern ORTEDomain * 
53 ORTEDomainAppCreate(int domain,ORTEDomainProp *prop,ORTEDomainAppEvents *events);
54 extern Boolean
55 ORTEDomainAppDestroy(ORTEDomain *d);
56 extern Boolean 
57 ORTEDomainAppSubscriptionPatternAdd(ORTEDomain *d,const char *topic,
58     const char *type,ORTESubscriptionPatternCallBack subscriptionCallBack, 
59     void *param);
60 extern Boolean 
61 ORTEDomainAppSubscriptionPatternRemove(ORTEDomain *d,const char *topic,
62     const char *type);
63 extern Boolean 
64 ORTEDomainAppSubscriptionPatternDestroyAll(ORTEDomain *d);
65
66 ///////////////////////////////////////////////////////////////////////////////
67 // ORTEDomainMgr.c
68 extern ORTEDomain *
69 ORTEDomainMgrCreate(int domain, ORTEDomainProp *prop,
70                     ORTEDomainAppEvents *events,Boolean startSendingThread);
71 extern Boolean
72 ORTEDomainMgrDestroy(ORTEDomain *d);
73
74 ///////////////////////////////////////////////////////////////////////////////
75 // ORTEPublication.c
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);
81 extern int
82 ORTEPublicationDestroy(ORTEPublication *cstWriter);
83 extern int
84 ORTEPublicationPropertiesGet(ORTEPublication *cstWriter,ORTEPublProp *pp);
85 extern int
86 ORTEPublicationPropertiesSet(ORTEPublication *cstWriter,ORTEPublProp *pp);
87 extern int
88 ORTEPublicationWaitForSubscriptions(ORTEPublication *cstWriter,NtpTime wait,
89     unsigned int retries,u_int32_t noSubscriptions);
90 extern int
91 ORTEPublicationGetStatus(ORTEPublication *cstWriter,ORTEPublStatus *status);
92 extern int 
93 ORTEPublicationSend(ORTEPublication *cstWriter);
94
95 ///////////////////////////////////////////////////////////////////////////////
96 // ORTESubscription.c
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);
102 extern int
103 ORTESubscriptionDestroy(ORTESubscription *cstReader);
104 extern int
105 ORTESubscriptionPropertiesGet(ORTESubscription *cstReader,ORTESubsProp *sp);
106 extern int
107 ORTESubscriptionPropertiesSet(ORTESubscription *cstReader,ORTESubsProp *sp);
108 extern int
109 ORTESubscriptionWaitForPublications(ORTESubscription *cstReader,NtpTime wait,
110     unsigned int retries,unsigned int noPublications);
111 extern int
112 ORTESubscriptionGetStatus(ORTESubscription *cstReader,ORTESubsStatus *status);
113 extern int
114 ORTESubscriptionPull(ORTESubscription *cstReader);
115
116 ///////////////////////////////////////////////////////////////////////////////
117 // ORTETypeRegister.c
118 extern int
119 ORTETypeRegisterAdd(ORTEDomain *d,char *typeName,ORTETypeSerialize ts,
120                     ORTETypeDeserialize ds,unsigned int gms);
121 extern int
122 ORTETypeRegisterDestroyAll(ORTEDomain *d);
123
124 ///////////////////////////////////////////////////////////////////////////////
125 // ORTEVerbosity.c
126 extern void 
127 ORTEVerbositySetOptions(const char *options);
128 extern void 
129 ORTEVerbositySetLogFile(const char *arg);
130
131
132 ///////////////////////////////////////////////////////////////////////////////
133 // ORTEInit.c
134 extern void
135 ORTEInit(void);
136
137 ///////////////////////////////////////////////////////////////////////////////
138 // ORTEAppSendThread.c
139 extern void 
140 ORTEAppSendThread(ORTEDomain *d);
141
142 #ifdef __cplusplus
143 } /* extern "C"*/
144 #endif
145
146 #endif /* _PROTOS_API_H */