]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/include/orte/protos_api.h
updated email address - petr@smoliku.cz
[orte.git] / orte / include / orte / protos_api.h
index e2eefe9a7995f052a684b188d1e2e05efef7246b..b7664372169496e72b5ff03ddca961b1d479b334 100644 (file)
@@ -1,9 +1,18 @@
 /*
  *  $Id: protos_api.h,v 0.0.0.1             2003/09/10 
  *
- *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
- *
- *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
+ *  -------------------------------------------------------------------  
+ *                                ORTE                                 
+ *                      Open Real-Time Ethernet                       
+ *                                                                    
+ *                      Copyright (C) 2001-2006                       
+ *  Department of Control Engineering FEE CTU Prague, Czech Republic  
+ *                      http://dce.felk.cvut.cz                       
+ *                      http://www.ocera.org                          
+ *                                                                    
+ *  Author:             Petr Smolik    petr@smoliku.cz             
+ *  Advisor:            Pavel Pisa                                   
+ *  Project Responsible: Zdenek Hanzalek                              
  *  --------------------------------------------------------------------
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -64,8 +73,10 @@ NtpTimeToStringUs(NtpTime time,char *buff);
 /**
  * ORTEDomainStart - start specific threads
  * @d: domain object handle
- * @recvMetatrafficThread: specifies whether recvMetatrafficThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
- * @recvUserDataThread: specifies whether recvUserDataThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
+ * @recvUnicastMetatrafficThread: specifies whether recvUnicastMetatrafficThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
+ * @recvMulticastMetatrafficThread: specifies whether recvMulticastMetatrafficThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
+ * @recvUnicastUserdataThread: specifies whether recvUnicastUserdataThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
+ * @recvMulticastUserdataThread: specifies whether recvMulticastUserdataThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
  * @sendThread: specifies whether sendThread should be started (ORTE_TRUE) or remain suspended (ORTE_FALSE).
  *
  * Functions @ORTEDomainAppCreate and @ORTEDomainMgrCreate provide facility to create an object with its threads suspended. Use function @ORTEDomainStart to resume those
@@ -73,10 +84,11 @@ NtpTimeToStringUs(NtpTime time,char *buff);
  */
 extern void
 ORTEDomainStart(ORTEDomain *d,
-                Boolean recvMetatrafficThread,
-               Boolean recvUserDataThread,
+                Boolean recvUnicastMetatrafficThread,
+                Boolean recvMulticastMetatrafficThread,
+               Boolean recvUnicastUserdataThread,
+               Boolean recvMulticastUserdataThread,
                Boolean sendThread);
-
 /**
  * ORTEDomainPropDefaultGet - returns default properties of a domain
  * @prop: pointer to struct ORTEDomainProp
@@ -177,7 +189,7 @@ ORTEDomainAppSubscriptionPatternDestroy(ORTEDomain *d);
 
 /**
  * ORTEDomainMgrCreate - create manager object in given domain
- * @d: given domain
+ * @domain: given domain
  * @prop: desired manager's properties
  * @events: manager's event handlers or NULL   
  * @suspended: specifies whether threads of this manager should be started as well (ORTE_FALSE) or stay suspended (ORTE_TRUE). See @ORTEDomainStart for details how to resume
@@ -292,6 +304,27 @@ ORTEPublicationGetStatus(ORTEPublication *cstWriter,ORTEPublStatus *status);
 extern int 
 ORTEPublicationSend(ORTEPublication *cstWriter);
 
+/**
+ * ORTEPublicationSendEx - force publication object to issue new data with additional parameters
+ * @cstWriter: publication object
+ * @psp: publication parameters
+ *
+ * Returns ORTE_OK if successful.
+ */
+extern int
+ORTEPublicationSendEx(ORTEPublication *cstWriter,
+    ORTEPublicationSendParam *psp);
+
+/**
+ * ORTEPublicationGetInstance - return pointer to an instance
+ * @cstWriter: publication object
+ *
+ * Returns handle
+ */
+extern void *
+ORTEPublicationGetInstance(ORTEPublication *cstWriter);
+
+
 ///////////////////////////////////////////////////////////////////////////////
 // ORTESubscription.c
 
@@ -307,6 +340,7 @@ ORTEPublicationSend(ORTEPublication *cstWriter);
  * @minimumSeparation: minimum time interval between two publications sent by Publisher as requested by Subscriber (strict - minumSep musi byt 0)
  * @recvCallBack: callback function called when new Subscription has been received or if any change of subscription's status occures
  * @recvCallBackParam: user parameters for @recvCallBack 
+ * @multicastIPAddress: in case multicast subscripton specify multicast IP address or use IPADDRESS_INVALID to unicast communication
  *
  * Returns handle to Subscription object.
  */
@@ -320,7 +354,8 @@ ORTESubscriptionCreate(ORTEDomain *d,
                       NtpTime *deadline,
                       NtpTime *minimumSeparation,
                       ORTERecvCallBack recvCallBack,
-                      void *recvCallBackParam);
+                      void *recvCallBackParam,
+                      IPAddress multicastIPAddress);
                       
 /**
  * ORTESubscriptionDestroy - removes a subscription
@@ -365,7 +400,7 @@ ORTESubscriptionWaitForPublications(ORTESubscription *cstReader,NtpTime wait,
 /**
  * ORTESubscriptionGetStatus - get status of a subscription
  * @cstReader: handle to subscription
- * @status: pointer to ORTESubsStatus structure 
+ * @status: pointer to ORTESubsStatus structure
  *
  * Returns ORTE_OK if successful or ORTE_BAD_HANDLE if @cstReader is not valid subscription handle.
  */
@@ -381,6 +416,16 @@ ORTESubscriptionGetStatus(ORTESubscription *cstReader,ORTESubsStatus *status);
 extern int
 ORTESubscriptionPull(ORTESubscription *cstReader);
 
+/**
+ * ORTESubscriptionGetInstance - return pointer to an instance
+ * @cstReader: publication object
+ *
+ * Returns handle
+ */
+extern void *
+ORTESubscriptionGetInstance(ORTESubscription *cstReader);
+
+
 ///////////////////////////////////////////////////////////////////////////////
 // ORTETypeRegister.c
 /**
@@ -389,18 +434,19 @@ ORTESubscriptionPull(ORTESubscription *cstReader);
  * @typeName: name of data type
  * @ts: pointer to serialization function. If NULL data will be copied without any processing.
  * @ds: deserialization function. If NULL data will be copied without any processing.
- * @gms: maximum length of data (in bytes)
+ * @gms: pointer to a function given maximum length of data (in bytes)
+ * @ms: default maximal size
  *
- * Each data type has to be registered. Main purpose of this process is to define serialization and deserialization functions for given data type. The same data type can be 
+ * Each data type has to be registered. Main purpose of this process is to define serialization and deserialization functions for given data type. The same data type can be
  * registered several times, previous registrations of the same type will be overwritten.
- * 
- * Examples of serialization and deserialization functions can be found if contrib/shape/ortedemo_types.c file. 
+ *
+ * Examples of serialization and deserialization functions can be found if contrib/shape/ortedemo_types.c file.
  *
  * Returns ORTE_OK if new data type has been succesfully registered.
  */
 extern int
 ORTETypeRegisterAdd(ORTEDomain *d,const char *typeName,ORTETypeSerialize ts,
-                    ORTETypeDeserialize ds,unsigned int gms);
+                    ORTETypeDeserialize ds,ORTETypeGetMaxSize gms,unsigned int ms);
 /**
  * ORTETypeRegisterDestroyAll - destroy all registered data types
  * @d: domain object handle
@@ -456,18 +502,6 @@ ORTEVerbositySetLogFile(const char *logfile);
  
 extern void ORTEInit(void);
 
-///////////////////////////////////////////////////////////////////////////////
-// ORTEAppSendThread.c
-
-/**
- * ORTEAppSendThread - resume sending thread in context of calling function. 
- * @d: domain object handle
- *
- * Sending thread will be resumed. This function never returns.
-*/
-extern void 
-ORTEAppSendThread(ORTEDomain *d);
-
 ///////////////////////////////////////////////////////////////////////////////
 // ORTEMisc.c
 /**