00001 /** 00002 * @file RtecDefaultEventData.idl 00003 * 00004 * @brief Define the RtecBase module 00005 * 00006 * RtecDefaultEventData.idl,v 1.5 2006/04/19 13:56:21 jwillemsen Exp 00007 * 00008 * TAO's Real-time Event Service is described in: 00009 * 00010 * http://doc.ece.uci.edu/~coryan/EC/ 00011 * 00012 * @author Carlos O'Ryan <coryan@uci.edu> 00013 */ 00014 00015 #ifndef TAO_RTEC_DEFAULTEVENTDATA_IDL 00016 #define TAO_RTEC_DEFAULTEVENTDATA_IDL 00017 00018 #include <OctetSeq.pidl> 00019 00020 #pragma prefix "" 00021 00022 /// Define one of the common event payloads 00023 typedef CORBA::OctetSeq EventPayload; 00024 00025 /** 00026 * @brief User defined Event Data 00027 * 00028 * 00029 * This structure defines the default payload in TAO's Real-time Event 00030 * Service. 00031 * 00032 * Users wanting maximum flexibility can use an Any, users that only 00033 * have one type of event may use structures, other users may preffer 00034 * union, trying to strike a balance between performance and 00035 * flexibility. Users willing to implement their own marshalling may 00036 * use a sequence of octets. 00037 * 00038 * The Event Service is completely transparent as to the contents of 00039 * this structure. 00040 */ 00041 struct RtecEventData 00042 { 00043 #ifndef TAO_LACKS_EVENT_CHANNEL_OCTET_SEQUENCE 00044 /// Add padding to align the octet sequence contents 00045 /** 00046 * This fields ensures that the contents of the octet sequence 00047 * following are always aligned to an 8-byte boundary. 00048 * Such alignment allows application developers to implement custom 00049 * demarshaling from the octet sequence without requiring any data 00050 * copies. 00051 * 00052 * This is how this works: 00053 * - The last field in the header is an 8-byte unsigned long, hence 00054 the header finishes on an 8 byte boundary. 00055 * - The pad1 long has 4 bytes. 00056 * - The length in the octet sequence adds another 4 bytes. 00057 * - Thus the data in the octet sequence starts on an 8 bytes 00058 * boundary too. 00059 */ 00060 long pad1; 00061 00062 /// Octet sequence payload. 00063 /** 00064 * This is the payload used more often by high-performance 00065 * applications. 00066 */ 00067 EventPayload payload; 00068 #endif /* TAO_LACKS_EVENT_CHANNEL_OCTET_SEQUENCE */ 00069 00070 #ifndef TAO_LACKS_EVENT_CHANNEL_ANY 00071 /// Use a CORBA any type as payload. 00072 any any_value; 00073 #endif /* TAO_LACKS_EVENT_CHANNEL_ANY */ 00074 }; 00075 00076 #pragma prefix "" 00077 00078 #endif /* TAO_RTEC_DEFAULTEVENTDATA_IDL */