manager: [#25] listen on master

This commit is contained in:
Vasily Davydov 2023-04-29 06:41:41 +03:00 committed by RedHawk
parent ddc9be976a
commit e003820710
3 changed files with 6 additions and 2 deletions

View File

@ -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,

View File

@ -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);
}
}

View File

@ -17,7 +17,6 @@ public:
virtual ~Manager();
void taskFunction();
private:
Event* message;
ThreadCommon::QueueManager* _qm;
};