Safir SDK Core
Loading...
Searching...
No Matches
NodeType.h
Go to the documentation of this file.
1#pragma once
2
9
10#include <Safir/Dob/Item.h>
12
13#include <Safir/Utilities/Internal/VisibilityHelpers.h>
14
15#ifdef safir_generated_Core_cpp_EXPORTS
16# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_EXPORT
17#else
18# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_IMPORT
19# define SAFIR_LIBRARY_NAME "safir_generated-Core-cpp"
20# include <Safir/Utilities/Internal/AutoLink.h>
21#endif
22#define SAFIR_GENERATED_Core_API_LOCAL SAFIR_HELPER_DLL_LOCAL
23
27namespace Safir
28{
32namespace Dob
33{
34
35 class NodeType; //forward declaration
36 typedef std::shared_ptr<NodeType> NodeTypePtr;
37 typedef std::shared_ptr<const NodeType> NodeTypeConstPtr;
38
42
48 {
49 public:
50 //Constructors and Create routines
54
55 //Name
63
64
65 //MulticastAddressControl
74
75
76 //MulticastAddressData
85
86
87 //HeartbeatInterval
94
95
96 //MaxLostHeartbeats
103
104
105 //SlidingWindowsSize
112
113
114 //AckRequestThreshold
121
122
123 //RetryTimeout
131
132
133 //RequiredForStart
142
143
144 //IsLightNode
152
153
154 //KeepStateWhileDetached
164
165
167 static const Safir::Dob::Typesystem::TypeId ClassTypeId = 5771540742031696125LL;
168
169 //Type id for NodeType
170 Safir::Dob::Typesystem::TypeId GetTypeId() const override {return ClassTypeId;}
171
172 //Check if anything in the object has change flags set
173 bool IsChanged() override;
174
175 //Recursively set all change flags in the object
176 void SetChanged(const bool changed) override;
177
178
179 //Reflection part (Don't use unless you really know what you're doing!!)
181 const Safir::Dob::Typesystem::ArrayIndex index) override;
183 const Safir::Dob::Typesystem::ArrayIndex index) const override;
184
185 void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override;
187
188 private:
189
190#ifdef _MSC_VER
191#pragma warning (push)
192#pragma warning (disable : 4251)
193#endif
194
196 Safir::Dob::Typesystem::StringContainer m_MulticastAddressControlMember;
197 Safir::Dob::Typesystem::StringContainer m_MulticastAddressDataMember;
198 Safir::Dob::Typesystem::Si64::SecondContainer m_HeartbeatIntervalMember;
199 Safir::Dob::Typesystem::Int32Container m_MaxLostHeartbeatsMember;
200 Safir::Dob::Typesystem::Int32Container m_SlidingWindowsSizeMember;
201 Safir::Dob::Typesystem::Int32Container m_AckRequestThresholdMember;
203 Safir::Dob::Typesystem::BooleanContainer m_RequiredForStartMember;
205 Safir::Dob::Typesystem::BooleanContainer m_KeepStateWhileDetachedMember;
206
207#ifdef _MSC_VER
208#pragma warning (pop)
209#endif
210 };
211
212} // Dob
213} // Safir
214
215
#define SAFIR_GENERATED_Core_API
Definition BackdoorCommand.h:18
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
Safir::Dob::Typesystem::ObjectContainerImpl< NodeType > NodeTypeContainer
Definition NodeType.h:39
std::shared_ptr< const NodeType > NodeTypeConstPtr
Definition NodeType.h:37
Safir::Dob::Typesystem::ArrayContainer< NodeTypeContainer > NodeTypeContainerArray
Definition NodeType.h:40
Safir::Dob::Typesystem::GenericObjectSequenceContainer< NodeType > NodeTypeSequenceContainer
Definition NodeType.h:41
std::shared_ptr< NodeType > NodeTypePtr
Definition NodeType.h:36
DotsC_Int32 Int32
32 bit integer type.
Definition Defs.h:66
DotsC_Int64 Int64
64 bit integer type.
Definition Defs.h:69
std::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition Object.h:44
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition Defs.h:246
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
DotsC_MemberIndex MemberIndex
The index of a member in an object.
Definition Defs.h:237
STL container for arrays of DOB-containers.
Definition ArrayContainer.h:59
Base class for all Containers.
Definition ContainerBase.h:44
Definition ContainerProxies.h:39
Template class for all containers of automatically generated DOB objects.
Definition ObjectContainer.h:190
Container class for sequences of values.
Definition SequenceContainer.h:53
Container for base types.
Definition ValueContainers.h:61
Container for strings (std::wstring).
Definition ValueContainers.h:127
The baseclass for all items.
Definition Item.h:46
Defines a number of characteristics that control how nodes of a certain type communicates.
Definition NodeType.h:48
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Si64::SecondContainer > HeartbeatInterval() const
How often shall heartbeats/keepalives be sent.
static Safir::Dob::Typesystem::MemberIndex MulticastAddressDataMemberIndex()
const Safir::Dob::Typesystem::Si64::SecondSequenceContainer & RetryTimeout() const
Time to wait for Ack before retrying transmission to this node.
NodeType(Safir::Dob::Typesystem::Int64 handle)
static Safir::Dob::Typesystem::MemberIndex SlidingWindowsSizeMemberIndex()
void SetChanged(const bool changed) override
Recursively set change flags in all members of this object.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > MulticastAddressControl() const
Multicast address and port used for the control channel for nodes of this type.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::BooleanContainer > IsLightNode() const
If true this node type is a light node.
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Int32Container > SlidingWindowsSize()
void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override
Write the object to a blob.
static NodeTypePtr Create()
static Safir::Dob::Typesystem::Int32 NameMaxStringLength()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::BooleanContainer > IsLightNode()
Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) override
Get a reference to a member container from an object.
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Si64::SecondContainer > HeartbeatInterval()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Int32Container > MaxLostHeartbeats()
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Int32Container > AckRequestThreshold() const
Maximum number of outstanding messages before request receiver to ack.
static Safir::Dob::Typesystem::MemberIndex MaxLostHeartbeatsMemberIndex()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Name()
Safir::Dob::Typesystem::TypeId GetTypeId() const override
Get the type id of this object.
Definition NodeType.h:170
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > MulticastAddressData()
bool IsChanged() override
Check if any member of this object is changed.
static Safir::Dob::Typesystem::MemberIndex HeartbeatIntervalMemberIndex()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Int32Container > AckRequestThreshold()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > MulticastAddressControl()
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > MulticastAddressData() const
Multicast address and port used for the control channel for nodes of this type.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Name() const
Name of the node type.
static Safir::Dob::Typesystem::MemberIndex KeepStateWhileDetachedMemberIndex()
static Safir::Dob::Typesystem::Int32 MulticastAddressControlMaxStringLength()
static Safir::Dob::Typesystem::MemberIndex IsLightNodeMemberIndex()
static Safir::Dob::Typesystem::MemberIndex NameMemberIndex()
const Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) const override
Get a const reference to a member container from an object.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Int32Container > MaxLostHeartbeats() const
How many lost heartbeats before marking nodes of this type as dead.
static Safir::Dob::Typesystem::MemberIndex AckRequestThresholdMemberIndex()
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::BooleanContainer > KeepStateWhileDetached() const
If this value is set to True, all entities and registrations from other nodes are kept when a light n...
Safir::Dob::Typesystem::ObjectPtr Clone() const override
Create a copy of the object.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::BooleanContainer > RequiredForStart() const
If true, a node of this type can start a system of its own.
Safir::Dob::Typesystem::Si64::SecondSequenceContainer & RetryTimeout()
static Safir::Dob::Typesystem::MemberIndex RetryTimeoutMemberIndex()
static Safir::Dob::Typesystem::MemberIndex MulticastAddressControlMemberIndex()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::BooleanContainer > RequiredForStart()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::BooleanContainer > KeepStateWhileDetached()
static Safir::Dob::Typesystem::Int32 MulticastAddressDataMaxStringLength()
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::Int32Container > SlidingWindowsSize() const
Size of the sliding window when communicating with this node.
static Safir::Dob::Typesystem::MemberIndex RequiredForStartMemberIndex()