.. index:: pair: struct; ComputationalGraphHandle .. _doxid-struct_computational_graph_handle: struct ComputationalGraphHandle =============================== .. toctree:: :hidden: Overview ~~~~~~~~ Uses a Computation Graph to execute datapack transformation operations. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct ComputationalGraphHandle: public :ref:`DataPackProcessor` { // fields bool :target:`_slaveMode`; bool :target:`_spinROS`; PyGILState_STATE :target:`_pyGILState`; std::map`*> :ref:`_inputs`; std::map`*> :ref:`_outputs`; :ref:`InputClockNode`* :ref:`_clock` = nullptr; :ref:`InputIterationNode`* :ref:`_iteration` = nullptr; // construction :target:`ComputationalGraphHandle`( :ref:`SimulationDataManager`* simulationDataManager, bool slaveMode = false, bool spinROS = false ); // methods virtual void :ref:`init`( const :ref:`jsonSharedPtr`& simConfig, const :ref:`engine_interfaces_t`& engines ); virtual void :ref:`updateDataPacksFromEngines`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines); virtual void :ref:`compute`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines); virtual void :ref:`sendDataPacksToEngines`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef std::vector<:ref:`EngineClientInterfaceSharedPtr`> :ref:`engine_interfaces_t`; // methods virtual void :ref:`init`( const :ref:`jsonSharedPtr`& simConfig, const :ref:`engine_interfaces_t`& engines ) = 0; virtual void :ref:`updateDataPacksFromEngines`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines) = 0; virtual void :ref:`compute`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines) = 0; virtual void :ref:`sendDataPacksToEngines`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines) = 0; virtual void :ref:`postEngineInit`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>&); virtual void :ref:`preEngineReset`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>&); virtual void :ref:`postEngineReset`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>&); void :ref:`datapackCycle`(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines); void :ref:`setSimulationTime`(:ref:`SimulationTime` simulationTime); void :ref:`setSimulationIteration`(unsigned long simulationIteration); .. _details-struct_computational_graph_handle: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Uses a Computation Graph to execute datapack transformation operations. Fields ------ .. index:: pair: variable; _inputs .. _doxid-struct_computational_graph_handle_1ab1a8d52ffff96d877b9dffe03aae5afd: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::map`*> _inputs Map containing all InputEngineNodes associated with this simulation. .. index:: pair: variable; _outputs .. _doxid-struct_computational_graph_handle_1ac0c67880e1c1deeb05b110b208613fee: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::map`*> _outputs Map containing all OutputEngineNodes associated with this simulation. .. index:: pair: variable; _clock .. _doxid-struct_computational_graph_handle_1a337b725e74722d759cae27c65b53aab8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`InputClockNode`* _clock = nullptr Pointer to the clock_node of the graph. .. index:: pair: variable; _iteration .. _doxid-struct_computational_graph_handle_1a9acbe9f48b7c9fe48b41b7fef98043c4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`InputIterationNode`* _iteration = nullptr Pointer to the iteration_node of the graph. Methods ------- .. index:: pair: function; init .. _doxid-struct_computational_graph_handle_1ad4795e50c39319f98ed0cf8705a0ce7c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void init( const :ref:`jsonSharedPtr`& simConfig, const :ref:`engine_interfaces_t`& engines ) Initializes the handler. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - simConfig - json object containing configuration information to initialize the handler * - engines - list of Engine clients participating in the simulation .. index:: pair: function; updateDataPacksFromEngines .. _doxid-struct_computational_graph_handle_1ae1bac51ddb9e94aa2ed084e46ed59c34: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void updateDataPacksFromEngines(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines) Request datapacks from engines. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - engines - Engines that are been synchronize in the current loop .. index:: pair: function; compute .. _doxid-struct_computational_graph_handle_1a947daadbefa2a6d742a86aff828245d3: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void compute(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines) Perform computations on datapacks. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - engines - Engines that are been synchronize in the current loop .. index:: pair: function; sendDataPacksToEngines .. _doxid-struct_computational_graph_handle_1a0d4e48152a7cd92114aa82a901441520: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void sendDataPacksToEngines(const std::vector<:ref:`EngineClientInterfaceSharedPtr`>& engines) Send datapacks to engines. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - engines - Engines that are been synchronize in the current loop