本文整理汇总了C++中EventQueue::break_dispatch方法的典型用法代码示例。如果您正苦于以下问题:C++ EventQueue::break_dispatch方法的具体用法?C++ EventQueue::break_dispatch怎么用?C++ EventQueue::break_dispatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventQueue
的用法示例。
在下文中一共展示了EventQueue::break_dispatch方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lora_event_handler
// Event handler
static void lora_event_handler(lorawan_event_t event) {
switch (event) {
case CONNECTED:
printf("Connection - Successful\n");
break;
case DISCONNECTED:
ev_queue.break_dispatch();
printf("Disconnected Successfully\n");
break;
case TX_DONE:
printf("Message Sent to Network Server\n");
break;
case TX_TIMEOUT:
case TX_ERROR:
case TX_CRYPTO_ERROR:
case TX_SCHEDULING_ERROR:
printf("Transmission Error - EventCode = %d\n", event);
break;
case RX_DONE:
printf("Received message from Network Server\n");
receive_message();
break;
case RX_TIMEOUT:
case RX_ERROR:
printf("Error in reception - Code = %d\n", event);
break;
case JOIN_FAILURE:
printf("OTAA Failed - Check Keys\n");
break;
default:
MBED_ASSERT("Unknown Event");
}
}
示例2: worker_loop_end
void worker_loop_end(void)
{
worker_loop_event_queue.break_dispatch();
}