Safir SDK Core
Loading...
Searching...
No Matches
Safir::Dob::NodeParameters Class Reference

Contains paramaters for all nodes in the system. More...

#include </home/lars/safir/safir-sdk-core/src/safir_dou/gen/cpp/include/Safir/Dob/NodeParameters.h>

Inheritance diagram for Safir::Dob::NodeParameters:
[legend]
Collaboration diagram for Safir::Dob::NodeParameters:
[legend]

Public Member Functions

 NodeParameters ()
 
Safir::Dob::Typesystem::ObjectPtr Clone () const override
 Create a copy of the object.
 
Safir::Dob::Typesystem::TypeId GetTypeId () const override
 Get the type id of this object.
 
bool IsChanged () override
 Check if any member of this object is changed.
 
void SetChanged (const bool changed) override
 Recursively set change flags in all members of this object.
 
Safir::Dob::Typesystem::ContainerBaseGetMember (const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) override
 Get a reference to a member container from an object.
 
const Safir::Dob::Typesystem::ContainerBaseGetMember (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.
 
void WriteToBlob (Safir::Dob::Typesystem::Int64 handle) const override
 Write the object to a blob.
 
 NodeParameters (Safir::Dob::Typesystem::Int64 handle)
 
- Public Member Functions inherited from Safir::Dob::Parametrization
 Parametrization ()
 
Safir::Dob::Typesystem::ObjectPtr Clone () const override
 Create a copy of the object.
 
Safir::Dob::Typesystem::TypeId GetTypeId () const override
 Get the type id of this object.
 
bool IsChanged () override
 Check if any member of this object is changed.
 
void SetChanged (const bool changed) override
 Recursively set change flags in all members of this object.
 
Safir::Dob::Typesystem::ContainerBaseGetMember (const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) override
 Get a reference to a member container from an object.
 
const Safir::Dob::Typesystem::ContainerBaseGetMember (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.
 
void WriteToBlob (Safir::Dob::Typesystem::Int64 handle) const override
 Write the object to a blob.
 
 Parametrization (Safir::Dob::Typesystem::Int64 handle)
 
- Public Member Functions inherited from Safir::Dob::Typesystem::Object
 Object ()
 Default constructor.
 
virtual ~Object ()
 Virtual destructor.
 
 Object (Safir::Dob::Typesystem::Int64 handle)
 Create an Object from a blob.
 

Static Public Member Functions

static NodeParametersPtr Create ()
 
static Safir::Dob::Typesystem::InstanceId SystemId ()
 Specifies the Id of the System/System installation.
 
static Safir::Dob::Typesystem::Int32 SharedMemorySize ()
 Specifies the amount of shared memory to allocate for the Dob distribution (in megabytes)
 
static Safir::Dob::Typesystem::Float64 SharedMemoryLevels (const std::wstring &key)
 Percentages of the SharedMemorySize to enter the different degradation levels.
 
static Safir::Dob::Typesystem::Int32 SharedMemoryLevelsDictionarySize ()
 
static std::wstring SharedMemoryLevelsKeyFromIndex (const Safir::Dob::Typesystem::Int32 index)
 
static Safir::Dob::Typesystem::Float64 SharedMemoryLevelsValueFromIndex (const Safir::Dob::Typesystem::Int32 index)
 
static Safir::Dob::Typesystem::Int32 MaxNumberOfConnections ()
 This controls how many connections the local Dob instance can handle.
 
static Safir::Dob::Typesystem::Int32 MaxNodeNameLength ()
 Maximum string length of a node name and node type name.
 
static bool TerminateDoseMainWhenUnrecoverableError ()
 Determines if an unrecoverable error, typically an abondoned locked shared memory lock, causes a termination of dose_main.
 
static Safir::Dob::Typesystem::Int32 DoseMainThreadWatchdogTimeout ()
 Min time (seconds) before an apparently hanging dose_main thread causes a termination of the dose_main program.
 
static Safir::Dob::Typesystem::Int32 NumberOfContexts ()
 The number of contexts in the system.
 
static Safir::Dob::Typesystem::ArrayIndex LocalContextsArraySize ()
 
static bool LocalContexts (const Safir::Dob::Typesystem::ArrayIndex index)
 Specifies for every context wether or not it is a local context.
 
static std::wstring IncarnationBlacklistFilename ()
 Full filename where the system stores the incarnation blacklist.
 
static Safir::Dob::Typesystem::Si64::Second LocalInterfaceTimeout ()
 How long to wait for the local interfaces becoming available before giving up.
 
static Safir::Dob::Typesystem::Si64::Second NewSystemFormationTimeout ()
 How long to wait at startup to find other nodes before forming a new system.
 
static Safir::Dob::Typesystem::Int32 FragmentSize ()
 Network fragment size.
 
static Safir::Dob::Typesystem::ArrayIndex NodeTypesArraySize ()
 
static Safir::Dob::NodeTypePtr NodeTypes (const Safir::Dob::Typesystem::ArrayIndex index)
 Defines the different node types in the system.
 
- Static Public Member Functions inherited from Safir::Dob::Parametrization
static ParametrizationPtr Create ()
 
- Static Public Member Functions inherited from Safir::Dob::Typesystem::Object
static Dob::Typesystem::ObjectPtr Create ()
 Creates a new Object.
 

Static Public Attributes

static const Safir::Dob::Typesystem::TypeId ClassTypeId = -4532363161627336967LL
 Type id for NodeParameters.
 
- Static Public Attributes inherited from Safir::Dob::Parametrization
static const Safir::Dob::Typesystem::TypeId ClassTypeId = 8075666004421608370LL
 Type id for Parametrization.
 
- Static Public Attributes inherited from Safir::Dob::Typesystem::Object
static const Dob::Typesystem::TypeId ClassTypeId = 5955188366590963785LL
 The TypeId of the Object class.
 

Detailed Description

Contains paramaters for all nodes in the system.

Constructor & Destructor Documentation

◆ NodeParameters() [1/2]

Safir::Dob::NodeParameters::NodeParameters ( )

◆ NodeParameters() [2/2]

Safir::Dob::NodeParameters::NodeParameters ( Safir::Dob::Typesystem::Int64 handle)
explicit

Member Function Documentation

◆ Clone()

Safir::Dob::Typesystem::ObjectPtr Safir::Dob::NodeParameters::Clone ( ) const
overridevirtual

Create a copy of the object.

Will create a copy of the object on the heap and return a smart pointer to it. Use std::static_pointer_cast or std::dynamic_pointer_cast to cast it to the pointer type that you're after.

Returns
A smart pointer to the copy of the object.

Reimplemented from Safir::Dob::Typesystem::Object.

◆ Create()

static NodeParametersPtr Safir::Dob::NodeParameters::Create ( )
static

◆ DoseMainThreadWatchdogTimeout()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::DoseMainThreadWatchdogTimeout ( )
static

Min time (seconds) before an apparently hanging dose_main thread causes a termination of the dose_main program.

◆ FragmentSize()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::FragmentSize ( )
static

Network fragment size.

Messages larger than this value will be split up in fragments.

◆ GetMember() [1/2]

const Safir::Dob::Typesystem::ContainerBase & Safir::Dob::NodeParameters::GetMember ( const Safir::Dob::Typesystem::MemberIndex member,
const Safir::Dob::Typesystem::ArrayIndex index ) const
overridevirtual

Get a const reference to a member container from an object.

Use the methods in Members to get member indices and array sizes for use with this method.

Note: Do not use this method unless you're very sure it is the one you need!

Parameters
member[in] - The index of the member to get.
index[in] - The array index of the member to get.
Returns
A const reference to the member container.
Exceptions
IllegalValueExceptionIf the index is not in the range of the array.
SoftwareViolationExceptionIf the element is not an array and the index is not 0.

Reimplemented from Safir::Dob::Typesystem::Object.

◆ GetMember() [2/2]

Safir::Dob::Typesystem::ContainerBase & Safir::Dob::NodeParameters::GetMember ( const Safir::Dob::Typesystem::MemberIndex member,
const Safir::Dob::Typesystem::ArrayIndex index )
overridevirtual

Get a reference to a member container from an object.

Use the methods in Members to get member indices and array sizes for use with this method.

Note: Do not use this method unless you're very sure it is the one you need!

Parameters
member[in] - The index of the member to get.
index[in] - The array index of the member to get.
Returns
A reference to the member container.
Exceptions
IllegalValueExceptionIf the index is not in the range of the array.
SoftwareViolationExceptionIf the element is not an array and the index is not 0.

Reimplemented from Safir::Dob::Typesystem::Object.

◆ GetTypeId()

Safir::Dob::Typesystem::TypeId Safir::Dob::NodeParameters::GetTypeId ( ) const
overridevirtual

Get the type id of this object.

Gets the type id of the object. Method is virtual to ensure that the right value gets returned for pointers or references.

Note
this method is overridden by all auto-generated classes.
Returns
The TypeId of the object.

Reimplemented from Safir::Dob::Typesystem::Object.

◆ IncarnationBlacklistFilename()

static std::wstring Safir::Dob::NodeParameters::IncarnationBlacklistFilename ( )
static

Full filename where the system stores the incarnation blacklist.

Use forward slashes as directory separator!

◆ IsChanged()

bool Safir::Dob::NodeParameters::IsChanged ( )
overridevirtual

Check if any member of this object is changed.

This method will recursively check if any member of the object has its change flag set.

Note
this method is overridden by all auto-generated classes.
Returns
True if any member has changed.

Reimplemented from Safir::Dob::Typesystem::Object.

◆ LocalContexts()

static bool Safir::Dob::NodeParameters::LocalContexts ( const Safir::Dob::Typesystem::ArrayIndex index)
static

Specifies for every context wether or not it is a local context.

The array length must correspond to the NumberOfContexts parameter above.

◆ LocalContextsArraySize()

static Safir::Dob::Typesystem::ArrayIndex Safir::Dob::NodeParameters::LocalContextsArraySize ( )
static

◆ LocalInterfaceTimeout()

static Safir::Dob::Typesystem::Si64::Second Safir::Dob::NodeParameters::LocalInterfaceTimeout ( )
static

How long to wait for the local interfaces becoming available before giving up.

I.e. if ControlAddress or DataAddress (as specified above) have not become available before this timeout expires safir_control will exit with an error.

◆ MaxNodeNameLength()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::MaxNodeNameLength ( )
static

Maximum string length of a node name and node type name.

◆ MaxNumberOfConnections()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::MaxNumberOfConnections ( )
static

This controls how many connections the local Dob instance can handle.

◆ NewSystemFormationTimeout()

static Safir::Dob::Typesystem::Si64::Second Safir::Dob::NodeParameters::NewSystemFormationTimeout ( )
static

How long to wait at startup to find other nodes before forming a new system.

If this is 0 an automatic timeout will be calculated, the maximum value of MaxLostHeartbeats*HeartbeatInterval*2 for all node types.

◆ NodeTypes()

static Safir::Dob::NodeTypePtr Safir::Dob::NodeParameters::NodeTypes ( const Safir::Dob::Typesystem::ArrayIndex index)
static

Defines the different node types in the system.

◆ NodeTypesArraySize()

static Safir::Dob::Typesystem::ArrayIndex Safir::Dob::NodeParameters::NodeTypesArraySize ( )
static

◆ NumberOfContexts()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::NumberOfContexts ( )
static

The number of contexts in the system.

(The context numbering starts from 0.)

◆ SetChanged()

void Safir::Dob::NodeParameters::SetChanged ( const bool changed)
overridevirtual

Recursively set change flags in all members of this object.

Note
this method is overridden by all auto-generated classes.
Parameters
changed[in] - The value to set the change flags to

Reimplemented from Safir::Dob::Typesystem::Object.

◆ SharedMemoryLevels()

static Safir::Dob::Typesystem::Float64 Safir::Dob::NodeParameters::SharedMemoryLevels ( const std::wstring & key)
static

Percentages of the SharedMemorySize to enter the different degradation levels.

The names have to be exactly these.

◆ SharedMemoryLevelsDictionarySize()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::SharedMemoryLevelsDictionarySize ( )
static

◆ SharedMemoryLevelsKeyFromIndex()

static std::wstring Safir::Dob::NodeParameters::SharedMemoryLevelsKeyFromIndex ( const Safir::Dob::Typesystem::Int32 index)
static

◆ SharedMemoryLevelsValueFromIndex()

static Safir::Dob::Typesystem::Float64 Safir::Dob::NodeParameters::SharedMemoryLevelsValueFromIndex ( const Safir::Dob::Typesystem::Int32 index)
static

◆ SharedMemorySize()

static Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::SharedMemorySize ( )
static

Specifies the amount of shared memory to allocate for the Dob distribution (in megabytes)

◆ SystemId()

static Safir::Dob::Typesystem::InstanceId Safir::Dob::NodeParameters::SystemId ( )
static

Specifies the Id of the System/System installation.

◆ TerminateDoseMainWhenUnrecoverableError()

static bool Safir::Dob::NodeParameters::TerminateDoseMainWhenUnrecoverableError ( )
static

Determines if an unrecoverable error, typically an abondoned locked shared memory lock, causes a termination of dose_main.

Consider setting this parameter to false when running dose_main under a debugger

◆ WriteToBlob()

void Safir::Dob::NodeParameters::WriteToBlob ( Safir::Dob::Typesystem::Int64 handle) const
overridevirtual

Write the object to a blob.

Parameters
handle[in] - Handle to a blobWriter that is the destination of the serialized object.

Reimplemented from Safir::Dob::Typesystem::Object.

Member Data Documentation

◆ ClassTypeId

const Safir::Dob::Typesystem::TypeId Safir::Dob::NodeParameters::ClassTypeId = -4532363161627336967LL
static

Type id for NodeParameters.