Cyclone ISO C++ API Reference Guide
|
Class for RAII way of beginning/ending coherent publication sets. More...
#include "CoherentSet.hpp"
Inherits dds::core::Value< D >.
Public Member Functions | |
CoherentSet (const dds::pub::Publisher &pub) | |
~CoherentSet () | |
void | end () |
bool | operator!= (const Value &other) const |
D * | operator-> () |
const D * | operator-> () const |
bool | operator== (const Value &other) const |
Class for RAII way of beginning/ending coherent publication sets.
A coherent set is a set of modifications that must be propagated in such a way that they are interpreted at the receivers' side as a consistent set of modifications; that is, the receiver will only be able to access the data after all the modifications in the set are available at the receiver end.
A connectivity change may occur in the middle of a set of coherent changes; for example, the set of partitions used by the Publisher or one of its Subscribers may change, a late-joining DataReader may appear on the network, or a communication failure may occur. In the event that such a change prevents an entity from receiving the entire set of coherent changes, that entity must behave as if it had received none of the set.
The support for coherent changes enables a publishing application to change the value of several data-instances that could belong to the same or different topics and have those changes be seen atomically by the readers. This is useful in cases where the values are inter-related. For example, if there are two data instances representing the altitude and velocity vector of the same aircraft and both are changed, it may be useful to communicate those values in such a way the reader can see both together; otherwise, it may, for example, erroneously interpret that the aircraft is on a collision course.
Definition at line 70 of file CoherentSet.hpp.
|
explicit |
Creating a CoherentSet object, which will begin a ‘coherent set’ of modifications using DataWriter objects attached to this Publisher.
A precondition for making coherent changes is that the PresentationQos of the Publisher has its coherent_access attribute set to TRUE. If this is not the case, the Publisher will not accept any coherent start requests and throw dds::core::PreconditionNotMetError.
pub | The publisher to supsend publications on. |
dds::core::Error | An internal error has occurred. |
dds::core::AlreadyClosedError | The Publisher has already been closed. |
dds::core::NotEnabledError | The Publisher has not yet been enabled. |
dds::core::OutOfResourcesError | The Data Distribution Service ran out of resources to complete this operation. |
dds::core::NullReferenceError | The Publisher was not properly created and references to dds::core::null. |
dds::core::PreconditionNotMetError | The coherent access attribute of the Publisher's PresentationQos is not set to true. |
dds::pub::CoherentSet::~CoherentSet | ( | ) |
The destruction of the CoherentSet will implicitly end the publication of a coheren set if not already ended by a call to end().
When there is a problem with which end() would normally throw an exception, then that exception is swallowed. Errors can be found in the logs.
void dds::pub::CoherentSet::end | ( | ) |
This operation will explicitly end the publication of an coherent set.
If the Publisher already ended its coherent set (by a call to this very operation), then a call to this operation will have no effect.
dds::core::Error | An internal error has occurred. |
dds::core::AlreadyClosedError | The Publisher has already been closed. |
dds::core::NotEnabledError | The Publisher has not yet been enabled. |
dds::core::NullReferenceError | The Publisher was not properly created and references to dds::core::null. |
|
inherited |
Compare this Value with another Value
other | Value |
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
Compare this Value with another Value
other | Value |