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