11 #ifndef SPACE_MULTI_THREAD_BALANCE_LENGTH_H
12 #define SPACE_MULTI_THREAD_BALANCE_LENGTH_H
18 #include <argos3/core/simulator/space/space.h>
49 struct SThreadLaunchData {
53 SThreadLaunchData(
UInt32 un_thread_id,
55 ThreadId(un_thread_id),
60 pthread_t* m_ptThreads;
63 SThreadLaunchData** m_psThreadData;
69 pthread_mutex_t m_tStartSenseControlPhaseMutex;
71 pthread_mutex_t m_tStartActPhaseMutex;
73 pthread_mutex_t m_tStartPhysicsPhaseMutex;
75 pthread_mutex_t m_tStartMediaPhaseMutex;
77 pthread_mutex_t m_tStartEntityIterPhaseMutex;
79 pthread_mutex_t m_tFetchTaskMutex;
82 pthread_cond_t m_tStartSenseControlPhaseCond;
84 pthread_cond_t m_tStartActPhaseCond;
86 pthread_cond_t m_tStartPhysicsPhaseCond;
88 pthread_cond_t m_tStartMediaPhaseCond;
90 pthread_cond_t m_tStartEntityIterPhaseCond;
92 pthread_cond_t m_tFetchTaskCond;
95 UInt32 m_unSenseControlPhaseIdleCounter;
97 UInt32 m_unActPhaseIdleCounter;
99 UInt32 m_unPhysicsPhaseIdleCounter;
101 UInt32 m_unMediaPhaseIdleCounter;
103 UInt32 m_unEntityIterPhaseIdleCounter;
unsigned int UInt32
32-bit unsigned integer.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
std::function< void(CControllableEntity *)> TControllableEntityIterCBType
The callback type for iteration over controllable entities within the PreStep() and/or PostStep() par...
CSpaceMultiThreadBalanceLength()
virtual void UpdatePhysics()
virtual void UpdateControllableEntitiesSenseStep()
virtual void Update()
Updates the space.
virtual void IterateOverControllableEntities(const TControllableEntityIterCBType &c_cb)
Given a callback specified in the loop functions, iterate over all controllable entities currently pr...
virtual void Destroy()
Destroys the space and all its entities.
friend void * LaunchThreadBalanceLength(void *p_data)
virtual void Init(TConfigurationNode &t_tree)
Initializes the space using the <arena> section of the XML configuration file.
virtual void UpdateControllableEntitiesAct()
virtual ~CSpaceMultiThreadBalanceLength()
virtual void UpdateMedia()