Embedded Multicore Building Blocks V1.0.0
Public Member Functions | List of all members
embb::mtapi::NodeAttributes Class Reference

Contains attributes of a Node. More...

#include <node_attributes.h>

Public Member Functions

 NodeAttributes ()
 Constructs a NodeAttributes object. More...
 
 NodeAttributes (NodeAttributes const &other)
 Copies a NodeAttributes object. More...
 
void operator= (NodeAttributes const &other)
 Copies a NodeAttributes object. More...
 
NodeAttributesSetCoreAffinity (embb::base::CoreSet const &cores)
 Sets the core affinity of the Node. More...
 
NodeAttributesSetWorkerPriority (mtapi_worker_priority_entry_t *worker_priorities)
 Sets the priority of the specified worker threads. More...
 
NodeAttributesSetMaxTasks (mtapi_uint_t value)
 Sets the maximum number of concurrently active tasks. More...
 
NodeAttributesSetMaxActions (mtapi_uint_t value)
 Sets the maximum number of actions. More...
 
NodeAttributesSetMaxGroups (mtapi_uint_t value)
 Sets the maximum number of groups. More...
 
NodeAttributesSetMaxQueues (mtapi_uint_t value)
 Sets the maximum number of queues. More...
 
NodeAttributesSetQueueLimit (mtapi_uint_t value)
 Sets the default limit (capacity) of all queues. More...
 
NodeAttributesSetMaxJobs (mtapi_uint_t value)
 Sets the maximum number of available jobs. More...
 
NodeAttributesSetMaxActionsPerJob (mtapi_uint_t value)
 Sets the maximum number of actions per job. More...
 
NodeAttributesSetMaxPriorities (mtapi_uint_t value)
 Sets the maximum number of available priorities. More...
 
NodeAttributesSetReuseMainThread (mtapi_boolean_t reuse)
 Enables or disables the reuse of the main thread as a worker. More...
 
mtapi_node_attributes_t const & GetInternal () const
 Returns the internal representation of this object. More...
 

Detailed Description

Contains attributes of a Node.

Constructor & Destructor Documentation

embb::mtapi::NodeAttributes::NodeAttributes ( )

Constructs a NodeAttributes object.

Concurrency
Thread-safe and wait-free
embb::mtapi::NodeAttributes::NodeAttributes ( NodeAttributes const &  other)

Copies a NodeAttributes object.

Concurrency
Thread-safe and wait-free
Parameters
otherThe NodeAttributes to copy.

Member Function Documentation

void embb::mtapi::NodeAttributes::operator= ( NodeAttributes const &  other)

Copies a NodeAttributes object.

Concurrency
Thread-safe and wait-free
Parameters
otherThe NodeAttributes to copy.
NodeAttributes& embb::mtapi::NodeAttributes::SetCoreAffinity ( embb::base::CoreSet const &  cores)

Sets the core affinity of the Node.

This also determines the number of worker threads.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
coresThe cores to use.
NodeAttributes& embb::mtapi::NodeAttributes::SetWorkerPriority ( mtapi_worker_priority_entry_t worker_priorities)

Sets the priority of the specified worker threads.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
worker_prioritiesArray of priorities
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxTasks ( mtapi_uint_t  value)

Sets the maximum number of concurrently active tasks.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxActions ( mtapi_uint_t  value)

Sets the maximum number of actions.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxGroups ( mtapi_uint_t  value)

Sets the maximum number of groups.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxQueues ( mtapi_uint_t  value)

Sets the maximum number of queues.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetQueueLimit ( mtapi_uint_t  value)

Sets the default limit (capacity) of all queues.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxJobs ( mtapi_uint_t  value)

Sets the maximum number of available jobs.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxActionsPerJob ( mtapi_uint_t  value)

Sets the maximum number of actions per job.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetMaxPriorities ( mtapi_uint_t  value)

Sets the maximum number of available priorities.

The priority values will range from 0 to value - 1 with 0 being the highest priority.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
valueThe value to set.
NodeAttributes& embb::mtapi::NodeAttributes::SetReuseMainThread ( mtapi_boolean_t  reuse)

Enables or disables the reuse of the main thread as a worker.

Returns
Reference to this object.
Concurrency
Not thread-safe
Parameters
reuseThe state to set.
mtapi_node_attributes_t const& embb::mtapi::NodeAttributes::GetInternal ( ) const

Returns the internal representation of this object.

Allows for interoperability with the C interface.

Returns
A reference to the internal mtapi_node_attributes_t structure.
Concurrency
Thread-safe and wait-free