Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Safir::Dob::NodeParameters Class Reference

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

#include <Safir/Dob/NodeParameters.h>

Inheritance diagram for Safir::Dob::NodeParameters:
Collaboration diagram for Safir::Dob::NodeParameters:

Public Member Functions

 NodeParameters ()
 
virtual
Safir::Dob::Typesystem::ObjectPtr 
Clone () const
 Create a copy of the object. More...
 
virtual
Safir::Dob::Typesystem::TypeId 
GetTypeId () const
 Get the type id of this object. More...
 
virtual bool IsChanged ()
 Check if any member of this object is changed. More...
 
virtual void SetChanged (const bool changed)
 Recursively set change flags in all members of this object. More...
 
virtual
Safir::Dob::Typesystem::ContainerBase
GetMember (const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index)
 Get a reference to a member container from an object. More...
 
virtual const
Safir::Dob::Typesystem::ContainerBase
GetMember (const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) const
 Get a const reference to a member container from an object. More...
 
virtual
Safir::Dob::Typesystem::Int32 
CalculateBlobSize () const
 Calculate the size of the blob-serialized form of this object. More...
 
virtual void WriteToBlob (char *blob, char *&beginningOfUnused) const
 Write the object to a blob. More...
 
 NodeParameters (char const *const blob)
 
- Public Member Functions inherited from Safir::Dob::Parametrization
 Parametrization ()
 
 Parametrization (char const *const blob)
 
- Public Member Functions inherited from Safir::Dob::Typesystem::Object
 Object ()
 Default constructor. More...
 
virtual ~Object ()
 Virtual destructor. More...
 
 Object (char const *const blob)
 Create an Object from a blob. More...
 

Static Public Member Functions

static NodeParametersPtr Create ()
 
static
Safir::Dob::Typesystem::InstanceId 
SystemId ()
 Specifies the Id of the System/System installation. More...
 
static
Safir::Dob::Typesystem::Int32 
SharedMemorySize ()
 Specifies the amount of shared memory to allocate for the Dob distribution (in megabytes) More...
 
static std::wstring NetworkAddress ()
 Use this to select which network card in a multihomed machine that will be used by dose for communication. More...
 
static
Safir::Dob::Typesystem::Int32 
RoutingHops ()
 The number of routing hops (TTL, time-to-live) for the Dob packets. More...
 
static bool ThreadingWarningsEnabled ()
 If True the Dob will check that all calls to Dob Connections are made from the same thread. More...
 
static bool TerminateDoseMainWhenUnrecoverableError ()
 Determines if an unrecoverable error, typically an abondoned locked shared memory lock, causes a termination of dose_main. More...
 
static
Safir::Dob::Typesystem::Int32 
DoseMainThreadWatchdogTimeout ()
 Min time (seconds) before an apparently hanging dose_main thread causes a termination of the dose_main program. More...
 
static
Safir::Dob::Typesystem::Int32 
NumberOfContexts ()
 The number of contexts in the system. More...
 
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. More...
 
static
Safir::Dob::Typesystem::Int32 
NumberOfNodes ()
 The number of nodes in the system. More...
 
static
Safir::Dob::Typesystem::ArrayIndex 
NodesArraySize ()
 
static
Safir::Dob::NodeDefinitionPtr 
Nodes (const Safir::Dob::Typesystem::ArrayIndex index)
 The name of all nodes in the system. More...
 
- 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. More...
 

Static Public Attributes

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

Detailed Description

Contains paramaters for all nodes in the system.

Constructor & Destructor Documentation

Safir::Dob::NodeParameters::NodeParameters ( )
Safir::Dob::NodeParameters::NodeParameters ( char const *const  blob)
explicit

Member Function Documentation

virtual Safir::Dob::Typesystem::Int32 Safir::Dob::NodeParameters::CalculateBlobSize ( ) const
virtual

Calculate the size of the blob-serialized form of this object.

Returns
The needed size in bytes.

Reimplemented from Safir::Dob::Parametrization.

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

Create a copy of the object.

Will create a copy of the object on the heap and return a smart pointer to it. Use boost::static_pointer_cast or boost::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::Parametrization.

static NodeParametersPtr Safir::Dob::NodeParameters::Create ( )
static
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.

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

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::Parametrization.

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

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::Parametrization.

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

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::Parametrization.

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

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::Parametrization.

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.

static Safir::Dob::Typesystem::ArrayIndex Safir::Dob::NodeParameters::LocalContextsArraySize ( )
static
static std::wstring Safir::Dob::NodeParameters::NetworkAddress ( )
static

Use this to select which network card in a multihomed machine that will be used by dose for communication.

If this is set to 0.0.0.0 the routing table will be used.

static Safir::Dob::NodeDefinitionPtr Safir::Dob::NodeParameters::Nodes ( const Safir::Dob::Typesystem::ArrayIndex  index)
static

The name of all nodes in the system.

Must correspond to the NumberOfNodes parameter above.

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

The number of contexts in the system.

(The context numbering starts from 0.)

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

The number of nodes in the system.

Must correspond to the Nodes parameter below.

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

The number of routing hops (TTL, time-to-live) for the Dob packets.

If set to 1 all packets will stay in the subnet.

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

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::Parametrization.

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

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

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

Specifies the Id of the System/System installation.

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

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

If True the Dob will check that all calls to Dob Connections are made from the same thread.

If an incorrect call is detected a PanicLog with a warning will be sent.

virtual void Safir::Dob::NodeParameters::WriteToBlob ( char *  blob,
char *&  beginningOfUnused 
) const
virtual

Write the object to a blob.

Note that the size of the blob is assumed to be correct! No checks are made!

Parameters
blob[in,out] - The blob to write to.
beginningOfUnused[in,out] - The beginning of unused dynamic blob space.

Reimplemented from Safir::Dob::Parametrization.

Member Data Documentation

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

Type id for NodeParameters.