manager: [#25] listen on master
This commit is contained in:
parent
ddc9be976a
commit
e003820710
@ -29,6 +29,10 @@ int main(void)
|
|||||||
qmanager->createQueue(100,
|
qmanager->createQueue(100,
|
||||||
sizeof(Event),
|
sizeof(Event),
|
||||||
ThreadCommon::QueueManager::master_event_all);
|
ThreadCommon::QueueManager::master_event_all);
|
||||||
|
qmanager->createQueue(20,
|
||||||
|
sizeof(Event),
|
||||||
|
ThreadCommon::QueueManager::manager_event_master);
|
||||||
|
|
||||||
//Creating tasks
|
//Creating tasks
|
||||||
manager->createTask(master_thread, "master",
|
manager->createTask(master_thread, "master",
|
||||||
configMINIMAL_STACK_SIZE * 10,tskIDLE_PRIORITY + 1UL,
|
configMINIMAL_STACK_SIZE * 10,tskIDLE_PRIORITY + 1UL,
|
||||||
|
|||||||
@ -21,9 +21,10 @@ Manager::~Manager()
|
|||||||
|
|
||||||
void Manager::taskFunction()
|
void Manager::taskFunction()
|
||||||
{
|
{
|
||||||
|
Event data(Event::Null, 0);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
vTaskDelay(1);
|
_qm->receive<Event>(ThreadCommon::QueueManager::manager_event_master, &data, portMAX_DELAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,6 @@ public:
|
|||||||
virtual ~Manager();
|
virtual ~Manager();
|
||||||
void taskFunction();
|
void taskFunction();
|
||||||
private:
|
private:
|
||||||
Event* message;
|
|
||||||
ThreadCommon::QueueManager* _qm;
|
ThreadCommon::QueueManager* _qm;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user