OpenDDS  Snapshot(2023/04/28-20:55)
UpdateDataTypes.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef UPDATE_DATA_TYPES
9 #define UPDATE_DATA_TYPES
10 
11 #include "dds/DdsDcpsInfoUtilsC.h"
12 #include "dds/DdsDcpsInfrastructureC.h"
13 
14 #include <vector>
15 #include <string>
16 #include <map>
17 
19 
20 namespace Update {
21 
32 };
33 
35 typedef OpenDDS::DCPS::GUID_t IdType; // Federation scope identifier type.
36 typedef std::pair <size_t, char*> BinSeq;
37 typedef std::pair <SpecificQos, BinSeq> QosSeq;
38 typedef long PartIdType;
39 
40 struct IdPath {
41  DomainIdType domain;
42  IdType participant;
43  IdType id;
44 
45  IdPath(DomainIdType d, IdType p, IdType i)
46  : domain(d),
47  participant(p),
48  id(i) { }
49 };
50 
51 struct OwnershipData {
52  DomainIdType domain;
53  IdType participant;
54  long owner;
55 
56  OwnershipData(DomainIdType d, IdType p, long o)
57  : domain(d),
58  participant(p),
59  owner(o) { }
60 };
61 
62 template <typename Q, typename S>
63 struct TopicStrt {
64  DomainIdType domainId;
65  IdType topicId;
66  IdType participantId;
67  S name;
70 
72  DomainIdType dom,
73  IdType to,
74  IdType pa,
75  const char* na,
76  const char* da,
77  Q tQos) :
78  domainId(dom),
79  topicId(to),
80  participantId(pa),
81  name(na),
82  dataType(da),
83  topicQos(tQos) { };
84 };
85 typedef struct TopicStrt<DDS::TopicQos&, std::string> UTopic;
86 typedef struct TopicStrt<QosSeq, std::string> DTopic;
87 
88 template <typename Q>
90  DomainIdType domainId;
91  long owner;
92  IdType participantId;
94 
96  DomainIdType dom,
97  long own,
98  IdType part,
99  Q pQos):
100  domainId(dom),
101  owner(own),
102  participantId(part),
103  participantQos(pQos) { };
104 };
105 typedef struct ParticipantStrt<DDS::DomainParticipantQos&> UParticipant;
106 typedef struct ParticipantStrt<QosSeq> DParticipant;
107 
112 
114  ContentSubscriptionInfo(const char* fcn, const char* fx, const DDS::StringSeq& ep)
115  : filterClassName(fcn), filterExpr(fx), exprParams(ep) {}
116 };
117 
118 // like std::pair but with names instead of "first" and "second", since the
119 // exprParams attribute is itself a std::pair and naming is too confusing with
120 // nested pairs.
124  BinSeq exprParams;
125 };
126 
127 template <typename PSQ, typename RWQ, typename C, typename T, typename CSP, typename STI>
128 struct ActorStrt {
129  DomainIdType domainId;
130  IdType actorId;
131  IdType topicId;
136  RWQ drdwQos;
141 
143  DomainIdType dom,
144  IdType act,
145  IdType top,
146  IdType part,
147  ActorType typ,
148  const char* call,
149  PSQ pub,
150  RWQ drdw,
151  T trans,
152  ACE_CDR::ULong tContext,
153  CSP csProf,
154  STI sti)
155  : domainId(dom),
156  actorId(act),
157  topicId(top),
158  participantId(part),
159  type(typ),
160  callback(call),
161  pubsubQos(pub),
162  drdwQos(drdw),
163  transportInterfaceInfo(trans),
164  transportContext(tContext),
165  contentSubscriptionProfile(csProf),
166  serializedTypeInfo(sti)
167  { };
168 };
169 typedef struct ActorStrt<
170  DDS::SubscriberQos&,
172  std::string,
176 typedef struct ActorStrt<
177  DDS::PublisherQos&,
178  DDS::DataWriterQos&,
179  std::string,
180  OpenDDS::DCPS::TransportLocatorSeq&,
181  ContentSubscriptionInfo&,
182  DDS::OctetSeq&> UWActor;
183 typedef struct ActorStrt<QosSeq, QosSeq, std::string,
184  BinSeq, ContentSubscriptionBin,
185  BinSeq> DActor;
186 
187 template <typename T, typename P, typename A, typename W>
188 struct ImageData {
189  typedef std::vector<T> TopicSeq;
190  typedef std::vector<P> ParticipantSeq;
191  typedef std::vector<A> ReaderSeq;
192  typedef std::vector<W> WriterSeq;
193 
194  unsigned long sequenceNumber;
195  TopicSeq topics;
196  ParticipantSeq participants;
197  ReaderSeq actors;
198  WriterSeq wActors;
199 
200  /// What the last participant id is/was
201  PartIdType lastPartId;
202 };
205 
206 } // namespace Update
207 
209 
210 #endif /* UPDATE_DATA_TYPES */
std::vector< W > WriterSeq
ACE_CDR::ULong transportContext
long PartIdType
std::vector< T > TopicSeq
std::pair< size_t, char * > BinSeq
sequence< TransportLocator > TransportLocatorSeq
std::vector< A > ReaderSeq
OpenDDS::DCPS::GUID_t IdType
DOMAINID_TYPE_NATIVE DomainId_t
DDS::DomainId_t DomainIdType
struct ImageData< UTopic *, UParticipant *, URActor *, UWActor *> UImage
TopicStrt(DomainIdType dom, IdType to, IdType pa, const char *na, const char *da, Q tQos)
std::pair< SpecificQos, BinSeq > QosSeq
PartIdType lastPartId
What the last participant id is/was.
ParticipantSeq participants
sequence< octet > OctetSeq
Definition: DdsDcpsCore.idl:64
std::vector< P > ParticipantSeq
ACE_UINT32 ULong
DomainIdType domainId
The End User API.
ContentSubscriptionInfo(const char *fcn, const char *fx, const DDS::StringSeq &ep)
unsigned long sequenceNumber
OwnershipData(DomainIdType d, IdType p, long o)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
ActorStrt(DomainIdType dom, IdType act, IdType top, IdType part, ActorType typ, const char *call, PSQ pub, RWQ drdw, T trans, ACE_CDR::ULong tContext, CSP csProf, STI sti)
DomainIdType domainId
DomainIdType domain
ParticipantStrt(DomainIdType dom, long own, IdType part, Q pQos)
IdPath(DomainIdType d, IdType p, IdType i)
sequence< string > StringSeq
Definition: DdsDcpsCore.idl:50