Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::core::abstraction::NodeAbstraction Class Referenceabstract

Base core node abstraction. More...

#include "node_abstraction.h"

Inheritance diagram for hh::core::abstraction::NodeAbstraction:
Inheritance graph
Collaboration diagram for hh::core::abstraction::NodeAbstraction:
Collaboration graph

Public Member Functions

 NodeAbstraction (std::string name)
 Core node constructor using the core's name.
 
virtual ~NodeAbstraction ()=default
 DEfault destructor.
 
std::string const & name () const
 Accessor to the core's name.
 
virtual std::string id () const
 Core's id ('x' + address of abstraction) as string.
 
bool isRegistered () const
 Accessor to registration flag.
 
GraphNodeAbstractionbelongingGraph () const
 Belonging graph accessor.
 
virtual int deviceId () const
 Get the device identifier (got from belonging graph)
 
virtual size_t graphId () const
 Get the graph identifier (got from belonging graph)
 
std::chrono::nanoseconds const & executionDuration () const
 Execution duration.
 
std::chrono::time_point< std::chrono::system_clock > const & startExecutionTimeStamp () const
 Accessor to the starting execution timestamp.
 
void startExecutionTimeStamp (std::chrono::time_point< std::chrono::system_clock > const &startExecutionTimeStamp)
 Setter to the starting execution timestamp.
 
void incrementExecutionDuration (std::chrono::nanoseconds const &exec)
 Increment execution duration.
 
virtual void registerNode (GraphNodeAbstraction *belongingGraph)
 Register node to the given graph.
 
virtual std::vector< std::pair< std::string const, std::string const > > ids () const =0
 Node ids [nodeId, nodeGroupId] accessor.
 
virtual behavior::Nodenode () const =0
 Node accessor.
 

Private Attributes

std::string const name_
 Name of the core.
 
bool isRegistered_ = false
 Is registered into a graph.
 
GraphNodeAbstractionbelongingGraph_ = nullptr
 Graph holding this node.
 
std::chrono::nanoseconds executionDuration_ = std::chrono::nanoseconds::zero()
 Node execution duration.
 
std::chrono::time_point< std::chrono::system_clock > startExecutionTimeStamp_ = std::chrono::system_clock::now()
 Node begin execution timestamp.
 

Detailed Description

Base core node abstraction.

Definition at line 61 of file node_abstraction.h.

Constructor & Destructor Documentation

◆ NodeAbstraction()

hh::core::abstraction::NodeAbstraction::NodeAbstraction ( std::string  name)
inlineexplicit

Core node constructor using the core's name.

Parameters
nameCore's name

Definition at line 75 of file node_abstraction.h.

Here is the caller graph for this function:

◆ ~NodeAbstraction()

virtual hh::core::abstraction::NodeAbstraction::~NodeAbstraction ( )
virtualdefault

DEfault destructor.

Member Function Documentation

◆ belongingGraph()

GraphNodeAbstraction * hh::core::abstraction::NodeAbstraction::belongingGraph ( ) const
inline

Belonging graph accessor.

Returns
Belonging graph

Definition at line 99 of file node_abstraction.h.

Here is the caller graph for this function:

◆ deviceId()

virtual int hh::core::abstraction::NodeAbstraction::deviceId ( ) const
inlinevirtual

Get the device identifier (got from belonging graph)

Returns
Device id

Reimplemented in hh::core::abstraction::GraphNodeAbstraction.

Definition at line 103 of file node_abstraction.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ executionDuration()

std::chrono::nanoseconds const & hh::core::abstraction::NodeAbstraction::executionDuration ( ) const
inline

Execution duration.

Returns
Duration in nanosecond

Definition at line 111 of file node_abstraction.h.

◆ graphId()

virtual size_t hh::core::abstraction::NodeAbstraction::graphId ( ) const
inlinevirtual

Get the graph identifier (got from belonging graph)

Returns
Graph id

Reimplemented in hh::core::abstraction::GraphNodeAbstraction.

Definition at line 107 of file node_abstraction.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ id()

virtual std::string hh::core::abstraction::NodeAbstraction::id ( ) const
inlinevirtual

Core's id ('x' + address of abstraction) as string.

Returns
Id as string

Reimplemented in hh::core::CoreExecutionPipeline< Separator, AllTypes >, and hh::core::CoreExecutionPipeline< Separator, AllTypes... >.

Definition at line 86 of file node_abstraction.h.

Here is the caller graph for this function:

◆ ids()

◆ incrementExecutionDuration()

void hh::core::abstraction::NodeAbstraction::incrementExecutionDuration ( std::chrono::nanoseconds const &  exec)
inline

Increment execution duration.

Parameters
execDuration to add in nanoseconds

Definition at line 127 of file node_abstraction.h.

Here is the caller graph for this function:

◆ isRegistered()

bool hh::core::abstraction::NodeAbstraction::isRegistered ( ) const
inline

Accessor to registration flag.

Returns
True if the node is registered in a graph, else false

Definition at line 94 of file node_abstraction.h.

Here is the caller graph for this function:

◆ name()

std::string const & hh::core::abstraction::NodeAbstraction::name ( ) const
inline

Accessor to the core's name.

Returns
Name of the core

Definition at line 82 of file node_abstraction.h.

Here is the caller graph for this function:

◆ node()

◆ registerNode()

virtual void hh::core::abstraction::NodeAbstraction::registerNode ( GraphNodeAbstraction belongingGraph)
inlinevirtual

Register node to the given graph.

Parameters
belongingGraphBelonging graph

Reimplemented in hh::core::CoreExecutionPipeline< Separator, AllTypes >, hh::core::CoreExecutionPipeline< Separator, AllTypes... >, and hh::core::abstraction::GraphNodeAbstraction.

Definition at line 131 of file node_abstraction.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startExecutionTimeStamp() [1/2]

std::chrono::time_point< std::chrono::system_clock > const & hh::core::abstraction::NodeAbstraction::startExecutionTimeStamp ( ) const
inline

Accessor to the starting execution timestamp.

Returns
Execution time starting timestamp

Definition at line 115 of file node_abstraction.h.

Here is the caller graph for this function:

◆ startExecutionTimeStamp() [2/2]

void hh::core::abstraction::NodeAbstraction::startExecutionTimeStamp ( std::chrono::time_point< std::chrono::system_clock > const &  startExecutionTimeStamp)
inline

Setter to the starting execution timestamp.

Parameters
startExecutionTimeStampStarting execution timestamp

Definition at line 121 of file node_abstraction.h.

Here is the call graph for this function:

Member Data Documentation

◆ belongingGraph_

GraphNodeAbstraction* hh::core::abstraction::NodeAbstraction::belongingGraph_ = nullptr
private

Graph holding this node.

Definition at line 66 of file node_abstraction.h.

◆ executionDuration_

std::chrono::nanoseconds hh::core::abstraction::NodeAbstraction::executionDuration_ = std::chrono::nanoseconds::zero()
private

Node execution duration.

Definition at line 67 of file node_abstraction.h.

◆ isRegistered_

bool hh::core::abstraction::NodeAbstraction::isRegistered_ = false
private

Is registered into a graph.

Definition at line 64 of file node_abstraction.h.

◆ name_

std::string const hh::core::abstraction::NodeAbstraction::name_
private

Name of the core.

Definition at line 63 of file node_abstraction.h.

◆ startExecutionTimeStamp_

std::chrono::time_point<std::chrono::system_clock> hh::core::abstraction::NodeAbstraction::startExecutionTimeStamp_ = std::chrono::system_clock::now()
private

Node begin execution timestamp.

Definition at line 70 of file node_abstraction.h.