/*
* $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
/**
* 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
*/
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
/**
* 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
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
* @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.
*/
NtpTime *deadline,
NtpTime *minimumSeparation,
ORTERecvCallBack recvCallBack,
- void *recvCallBackParam);
+ void *recvCallBackParam,
+ IPAddress multicastIPAddress);
/**
* ORTESubscriptionDestroy - removes a subscription
/**
* 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.
*/
extern int
ORTESubscriptionPull(ORTESubscription *cstReader);
+/**
+ * ORTESubscriptionGetInstance - return pointer to an instance
+ * @cstReader: publication object
+ *
+ * Returns handle
+ */
+extern void *
+ORTESubscriptionGetInstance(ORTESubscription *cstReader);
+
+
///////////////////////////////////////////////////////////////////////////////
// ORTETypeRegister.c
/**
* @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
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
/**