12#include <CigiOutgoingMsg.h>
26 :
public DtSpSubClass<DtCigiPublisherBase, DtTreeClass<DtCigiPublisherBase, DtCigiObjectBase>>
39 virtual bool init()
override;
47 virtual void tick(
double dt);
53 template <
class CHILD_T>
56 std::shared_ptr<CHILD_T> ptr = CHILD_T::createVersion(
sessionVersion());
77 virtual void publish(CigiOutgoingMsg& out);
152 virtual void write(CigiOutgoingMsg& out);
171#define UPDATE_FROM_SHARED(type, value) updateValue<type>(&cigi()->value, shared()->value)
Base CigiData class used by DtCigiDataTemplate.
Definition cigiData.h:25
std::shared_ptr< DtCigiDataBase > CigiBasePtr
Definition cigiObjectBase.h:27
virtual unsigned int sessionVersion() const
Get CIGI protocol major version number for this Session.
virtual std::string sharedKey()
Key to uniquely idenfity the shared data instance associated with the Sim object represented by this ...
Definition cigiPublisherBase.h:118
CigiBasePtr mySharedData
Definition cigiPublisherBase.h:164
double myLastSentToIg
Definition cigiPublisherBase.h:168
DtCigiDataBase *const shared() const
virtual void publish(CigiOutgoingMsg &out)
Causes this Publisher to write CIGI packet data to out.
virtual void updateCigi()
Derived Publisher classes should override updateCigi() to update values in the CIGI data.
Definition cigiPublisherBase.h:148
virtual void setEnabled(bool enabled)
Enable or disable this Publisher.
virtual void createChildren()
Derived Publisher classes should override createChildre() to create child Publishers,...
Definition cigiPublisherBase.h:158
virtual ~DtCigiPublisherBase() override
Definition cigiPublisherBase.h:30
virtual void write(CigiOutgoingMsg &out)
Internal class function invoked from publish if state is dirty. Packs CIGI data into CigiOutgoingMsg.
virtual bool addChild(Sptr child) override
Adds publisher as child of this Publisher.
bool myEnabled
Definition cigiPublisherBase.h:166
virtual void setNeedsReceiptConfirmation(bool needs)
Set/get whether this Publisher should get confirmation that IG has received the last frame where this...
virtual void updateShared()
Derived Publisher classes should override updateShared() to update values in the shared CIGI data obj...
Definition cigiPublisherBase.h:136
virtual bool verifySharedType()=0
virtual bool needsReceiptConfirmation() const
virtual double lastSent()
Returns the time that last update was sent during publish(). (as cgf->simulationServices()->elapsedRe...
virtual void setupShared()
virtual void markDirty(bool childrenToo=false)
Explictly mark this publisher as dirty so that the data is guaranteed to be written during the next p...
bool myNeedsConfirmation
Definition cigiPublisherBase.h:167
virtual void tick(double dt)
DtCigiDataBase * shared()
Get pointer to shared CIGI packet data object.
virtual void initShared()
Derived Publisher classes should override initShared() to set inital values in the shared CIGI data o...
Definition cigiPublisherBase.h:125
std::shared_ptr< CHILD_T > addNewChild(const std::string &name="")
Convenience wrapper for creating, naming, and adding a child Publisher instance of type CHILD_T.
Definition cigiPublisherBase.h:54
virtual void initCigi()
Derived Publisher classes should override initCigi() to set initial values in the CIGI data.
Definition cigiPublisherBase.h:129
virtual void publishChildren(CigiOutgoingMsg &out)
virtual bool enabled() const
virtual bool init() override
virtual void receiptConfirmed()
Called when the IG reports receiving the last frame in which this Pulisher wrote data during publish(...
Definition cigiPublisherBase.h:93
virtual void markClean(bool childrenToo=false)
Clear the dirty flag.
virtual void tickChildren(double dt)
virtual std::string name() const
Gets the name of this object.
Definition baseClass.h:153
DtSpSubClass()
Definition baseClass.h:190
std::shared_ptr< DtCigiPublisherBase > Sptr
Definition baseClass.h:184
Contains the DLL export macro.
#define CIGIHOST_DLL
Definition export.h:20
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Provides a generic hierarchical tree structure implementation.