7 #ifndef SPACE_MULTI_THREAD_BALANCE_QUANTITY_H
8 #define SPACE_MULTI_THREAD_BALANCE_QUANTITY_H
10 #include <argos3/core/simulator/space/space.h>
22 struct SUpdateThreadData {
26 SUpdateThreadData(
UInt32 un_thread_id,
28 ThreadId(un_thread_id),
38 SUpdateThreadData** m_psUpdateThreadData;
41 pthread_t* m_ptUpdateThreads;
44 UInt32 m_unSenseControlStepPhaseDoneCounter;
45 UInt32 m_unActPhaseDoneCounter;
46 UInt32 m_unPhysicsPhaseDoneCounter;
47 UInt32 m_unMediaPhaseDoneCounter;
48 UInt32 m_unEntityIterPhaseDoneCounter;
51 pthread_mutex_t m_tSenseControlStepConditionalMutex;
52 pthread_mutex_t m_tActConditionalMutex;
53 pthread_mutex_t m_tPhysicsConditionalMutex;
54 pthread_mutex_t m_tMediaConditionalMutex;
55 pthread_mutex_t m_tEntityIterConditionalMutex;
58 pthread_cond_t m_tSenseControlStepConditional;
59 pthread_cond_t m_tActConditional;
60 pthread_cond_t m_tPhysicsConditional;
61 pthread_cond_t m_tMediaConditional;
62 pthread_cond_t m_tEntityIterConditional;
66 bool m_bIsControllableEntityAssignmentRecalculationNeeded;
91 void UpdateThread(
UInt32 un_id);
128 virtual void ControllableEntityIterationWaitAbort();
unsigned int UInt32
32-bit unsigned integer.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
An entity that contains a pointer to the user-defined controller.
std::function< void(CControllableEntity *)> TControllableEntityIterCBType
The callback type for iteration over controllable entities within the PreStep() and/or PostStep() par...
virtual void UpdateMedia()
CSpaceMultiThreadBalanceQuantity()
virtual void UpdateControllableEntitiesAct()
virtual void AddControllableEntity(CControllableEntity &c_entity)
virtual void UpdatePhysics()
virtual void Destroy()
Destroys the space and all its entities.
virtual void UpdateControllableEntitiesSenseStep()
virtual void Init(TConfigurationNode &t_tree)
Initializes the space using the <arena> section of the XML configuration file.
friend void * LaunchUpdateThreadBalanceQuantity(void *p_data)
virtual ~CSpaceMultiThreadBalanceQuantity()
virtual void IterateOverControllableEntities(const TControllableEntityIterCBType &c_cb)
Given a callback specified in the loop functions, iterate over all controllable entities currently pr...
virtual void RemoveControllableEntity(CControllableEntity &c_entity)