OpenDDS  Snapshot(2023/04/28-20:55)
Classes | Typedefs | Enumerations | Functions
Update Namespace Reference

Classes

struct  ActorStrt
 
struct  ActorStrt< QosSeq, QosSeq, ACE_CString, BinSeq, ContentSubscriptionBin, BinSeq >
 
struct  ContentSubscriptionBin
 
struct  ContentSubscriptionInfo
 
struct  IdPath
 
struct  ImageData
 
class  Manager
 
struct  OwnershipData
 
struct  ParticipantStrt
 
struct  ParticipantStrt< QosSeq >
 
class  PersistenceUpdater
 
class  SeqGuard
 
struct  TopicStrt
 
struct  TopicStrt< QosSeq, ACE_CString >
 
class  Updater
 

Typedefs

typedef DDS::DomainId_t DomainIdType
 
typedef OpenDDS::DCPS::GUID_t IdType
 
typedef std::pair< size_t, char * > BinSeq
 
typedef std::pair< SpecificQos, BinSeqQosSeq
 
typedef long PartIdType
 
typedef struct TopicStrt< DDS::TopicQos &, std::string > UTopic
 
typedef struct TopicStrt< QosSeq, std::string > DTopic
 
typedef struct ParticipantStrt< DDS::DomainParticipantQos &> UParticipant
 
typedef struct ParticipantStrt< QosSeqDParticipant
 
typedef struct ActorStrt< DDS::SubscriberQos &, DDS::DataReaderQos &, std::string, OpenDDS::DCPS::TransportLocatorSeq &, ContentSubscriptionInfo &, DDS::OctetSeq &> URActor
 
typedef struct ActorStrt< DDS::PublisherQos &, DDS::DataWriterQos &, std::string, OpenDDS::DCPS::TransportLocatorSeq &, ContentSubscriptionInfo &, DDS::OctetSeq &> UWActor
 
typedef struct ActorStrt< QosSeq, QosSeq, std::string, BinSeq, ContentSubscriptionBin, BinSeqDActor
 
typedef struct ImageData< UTopic *, UParticipant *, URActor *, UWActor *> UImage
 
typedef struct ImageData< DTopic, DParticipant, DActor, DActorDImage
 

Enumerations

enum  ItemType { Topic, Participant, Actor }
 
enum  ActorType { DataReader, DataWriter }
 
enum  SpecificQos {
  NoQos, ParticipantQos, TopicQos, DataWriterQos,
  PublisherQos, DataReaderQos, SubscriberQos
}
 

Functions

void * createIndex (const std::string &tag, PersistenceUpdater::ALLOCATOR &allocator, size_t size, bool &exists)
 
template<typename I >
void index_cleanup (I *index, PersistenceUpdater::ALLOCATOR *allocator)
 

Typedef Documentation

◆ BinSeq

typedef std::pair<size_t, char*> Update::BinSeq

Definition at line 36 of file UpdateDataTypes.h.

◆ DActor

Definition at line 183 of file UpdateDataTypes.h.

◆ DImage

Definition at line 204 of file UpdateDataTypes.h.

◆ DomainIdType

Definition at line 34 of file UpdateDataTypes.h.

◆ DParticipant

Definition at line 106 of file UpdateDataTypes.h.

◆ DTopic

typedef struct TopicStrt< QosSeq, std::string > Update::DTopic

Definition at line 86 of file UpdateDataTypes.h.

◆ IdType

Definition at line 35 of file UpdateDataTypes.h.

◆ PartIdType

typedef long Update::PartIdType

Definition at line 38 of file UpdateDataTypes.h.

◆ QosSeq

typedef std::pair<SpecificQos, BinSeq> Update::QosSeq

Definition at line 37 of file UpdateDataTypes.h.

◆ UImage

Definition at line 203 of file UpdateDataTypes.h.

◆ UParticipant

Definition at line 105 of file UpdateDataTypes.h.

◆ URActor

Definition at line 169 of file UpdateDataTypes.h.

◆ UTopic

typedef struct TopicStrt< DDS::TopicQos &, std::string > Update::UTopic

Definition at line 85 of file UpdateDataTypes.h.

◆ UWActor

Definition at line 176 of file UpdateDataTypes.h.

Enumeration Type Documentation

◆ ActorType

Enumerator
DataReader 
DataWriter 

Definition at line 23 of file UpdateDataTypes.h.

local interface<%TYPE%> DataReader
Definition: IDLTemplate.txt:72
local interface<%TYPE%> DataWriter
Definition: IDLTemplate.txt:18

◆ ItemType

Enumerator
Topic 
Participant 
Actor 

Definition at line 22 of file UpdateDataTypes.h.

◆ SpecificQos

Enumerator
NoQos 
ParticipantQos 
TopicQos 
DataWriterQos 
PublisherQos 
DataReaderQos 
SubscriberQos 

Definition at line 24 of file UpdateDataTypes.h.

Function Documentation

◆ createIndex()

void* Update::createIndex ( const std::string &  tag,
PersistenceUpdater::ALLOCATOR allocator,
size_t  size,
bool &  exists 
)

Definition at line 231 of file PersistenceUpdater.cpp.

References ACE_ALLOCATOR_RETURN, ACE_ERROR, ACE_TEXT(), ACE_Allocator_Adapter< class >::bind(), ACE_Allocator_Adapter< class >::find(), ACE_Allocator_Adapter< class >::free(), LM_ERROR, and ACE_Allocator_Adapter< class >::malloc().

Referenced by Update::PersistenceUpdater::init().

234 {
235  void* index = 0;
236 
237  // This is the easy case since if we find hash table in the
238  // memory-mapped file we know it's already initialized.
239  if (allocator.find(tag.c_str(), index) == 0) {
240  exists = true;
241  return index;
242 
243  } else {
244  ACE_ALLOCATOR_RETURN(index, allocator.malloc(size), 0);
245 
246  if (allocator.bind(tag.c_str(), index) == -1) {
247  allocator.free(index);
248  index = 0;
249  }
250  }
251 
252  if (!index) {
253  ACE_ERROR((LM_ERROR,
254  ACE_TEXT("(%P|%t) ERROR: PersistenceUpdater::init: ")
255  ACE_TEXT("Initial allocation/Bind failed for %C.\n"),
256  tag.c_str()));
257  }
258 
259  return index;
260 }
#define ACE_ERROR(X)
#define ACE_ALLOCATOR_RETURN(POINTER, ALLOCATOR, RET_VAL)
ACE_TEXT("TCP_Factory")

◆ index_cleanup()

template<typename I >
void Update::index_cleanup ( I index,
PersistenceUpdater::ALLOCATOR allocator 
)

Definition at line 263 of file PersistenceUpdater.cpp.

References ACE_ERROR, ACE_TEXT(), and LM_ERROR.

Referenced by Update::PersistenceUpdater::init().

265 {
266  for (typename I::ITERATOR iter = index->begin()
267  ; iter != index->end();) {
268  typename I::ITERATOR current_iter = iter;
269  iter++;
270 
271  if (index->unbind((*current_iter).ext_id_, allocator) != 0) {
272  ACE_ERROR((LM_ERROR,
273  ACE_TEXT("(%P|%t) ERROR: PersistenceUpdater::init: ")
274  ACE_TEXT("Index unbind failed.\n")));
275  }
276  }
277 }
#define ACE_ERROR(X)
ACE_TEXT("TCP_Factory")