这篇教程C++ sys_timeout函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中sys_timeout函数的典型用法代码示例。如果您正苦于以下问题:C++ sys_timeout函数的具体用法?C++ sys_timeout怎么用?C++ sys_timeout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了sys_timeout函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: arp_timer/** * Timer callback function that calls etharp_tmr() and reschedules itself. * * @param arg unused argument */static voidarp_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip: etharp_tmr()/n")); etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL);}
开发者ID:ChenZewei,项目名称:acoral,代码行数:13,
示例2: igmp_timer/** * Timer callback function that calls igmp_tmr() and reschedules itself. * * @param arg unused argument */static voidigmp_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: igmp_tmr()/n")); igmp_tmr(); sys_timeout(IGMP_TMR_INTERVAL, igmp_timer, NULL);}
开发者ID:ajbetteridge,项目名称:akaros,代码行数:13,
示例3: tcp_timeout/*-----------------------------------------------------------------------------------*/static voidtcp_timeout(void *data){#if TCP_DEBUG tcp_debug_print_pcbs();#endif /* TCP_DEBUG */ sys_timeout(5000, tcp_timeout, NULL);}
开发者ID:kingcope,项目名称:LikeOS,代码行数:9,
示例4: arp_timer/** * Timer callback function that calls etharp_tmr() and reschedules itself. * * @param arg unused argument */static void ICACHE_FLASH_ATTRarp_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()/n")); etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL);}
开发者ID:AbuShaqra,项目名称:nodemcu-firmware,代码行数:13,
示例5: tcp_timer_coarsestatic void ICACHE_FLASH_ATTRtcp_timer_coarse(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: tcp_tmr()/n")); tcp_tmr(); sys_timeout(TCP_TMR_INTERVAL, tcp_timer_coarse, NULL);}
开发者ID:AbuShaqra,项目名称:nodemcu-firmware,代码行数:8,
示例6: ip_reass_timer/** * Timer callback function that calls ip_reass_tmr() and reschedules itself. * * @param arg unused argument */static void ICACHE_FLASH_ATTRip_reass_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: ip_reass_tmr()/n")); ip_reass_tmr(); sys_timeout(IP_TMR_INTERVAL, ip_reass_timer, NULL);}
开发者ID:AbuShaqra,项目名称:nodemcu-firmware,代码行数:13,
示例7: dns_timer/** * Timer callback function that calls dns_tmr() and reschedules itself. * * @param arg unused argument */static voiddns_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dns_tmr()/n")); dns_tmr(); sys_timeout(DNS_TMR_INTERVAL, dns_timer, NULL);}
开发者ID:ajbetteridge,项目名称:akaros,代码行数:13,
示例8: autoip_timer/** * Timer callback function that calls autoip_tmr() and reschedules itself. * * @param arg unused argument */static voidautoip_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: autoip_tmr()/n")); autoip_tmr(); sys_timeout(AUTOIP_TMR_INTERVAL, autoip_timer, NULL);}
开发者ID:ajbetteridge,项目名称:akaros,代码行数:13,
示例9: dhcp_timer_fine/** * Timer callback function that calls dhcp_fine_tmr() and reschedules itself. * * @param arg unused argument */static voiddhcp_timer_fine(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()/n")); dhcp_fine_tmr(); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);}
开发者ID:ajbetteridge,项目名称:akaros,代码行数:13,
示例10: dhcp_timer_coarse/** * Timer callback function that calls dhcp_coarse_tmr() and reschedules itself. * * @param arg unused argument */static voiddhcp_timer_coarse(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()/r/n")); dhcp_coarse_tmr(); sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL);}
开发者ID:lukas2511,项目名称:LaosLaser_Dirty,代码行数:13,
示例11: mld6_timer/** * Timer callback function that calls mld6_tmr() and reschedules itself. * * @param arg unused argument */static voidmld6_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: mld6_tmr()/n")); mld6_tmr(); sys_timeout(MLD6_TMR_INTERVAL, mld6_timer, NULL);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:13,
示例12: ip6_reass_timer/** * Timer callback function that calls ip6_reass_tmr() and reschedules itself. * * @param arg unused argument */static voidip6_reass_timer(void *arg){ LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: ip6_reass_tmr()/n")); ip6_reass_tmr(); sys_timeout(IP6_REASS_TMR_INTERVAL, ip6_reass_timer, NULL);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:13,
示例13: sys_timeouts_init/** Initialize this module */void sys_timeouts_init(void){#if IP_REASSEMBLY sys_timeout(IP_TMR_INTERVAL, ip_reass_timer, NULL);#endif /* IP_REASSEMBLY */#if LWIP_ARP sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL);#endif /* LWIP_ARP */#if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);#endif /* LWIP_DHCP */#if LWIP_AUTOIP sys_timeout(AUTOIP_TMR_INTERVAL, autoip_timer, NULL);#endif /* LWIP_AUTOIP */#if LWIP_IGMP sys_timeout(IGMP_TMR_INTERVAL, igmp_timer, NULL);#endif /* LWIP_IGMP */#if LWIP_DNS sys_timeout(DNS_TMR_INTERVAL, dns_timer, NULL);#endif /* LWIP_DNS */#if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now();#endif}
开发者ID:comrid1987,项目名称:jb3500,代码行数:28,
示例14: tcp_debug_timeoutstatic voidtcp_debug_timeout(void *data){ LWIP_UNUSED_ARG(data);#if TCP_DEBUG tcp_debug_print_pcbs();#endif /* TCP_DEBUG */ sys_timeout(5000, tcp_debug_timeout, NULL);}
开发者ID:malooei,项目名称:yeejoin-workspace,代码行数:9,
示例15: ping_raw_initstatic void ping_raw_init(void){ ping_pcb = raw_new(IP_PROTO_ICMP); LWIP_ASSERT("ping_pcb != NULL", ping_pcb != NULL); raw_recv(ping_pcb, ping_recv, NULL); raw_bind(ping_pcb, IP_ADDR_ANY); sys_timeout(PING_DELAY, ping_timeout, ping_pcb);}
开发者ID:cjc1029nice,项目名称:ksdk,代码行数:9,
示例16: lwip_dhcp_startvoid lwip_dhcp_start(void *pParameter){ struct netif *pNetif = (struct netif *)pParameter; dhcp_start(pNetif); sys_timeout(2000, lwip_dhcp_stop, pNetif); uprintf(UPRINT_INFO, UPRINT_BLK_NET, "LWIP DHCP started/n");}
开发者ID:phuuix,项目名称:probability,代码行数:9,
示例17: tcp_timer_needed/** * Called from TCP_REG when registering a new PCB: * the reason is to have the TCP timer only running when * there are active (or time-wait) PCBs. */void tcp_timer_needed(void){ /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { /* enable and start timer */ tcpip_tcp_timer_active = 1; sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); }}
开发者ID:BuFran,项目名称:canshark,代码行数:14,
示例18: udp_proxy_timer_neededvoidudp_proxy_timer_needed(void){ /* timer is off but needed again? */ if (!proxy_udp_timer_active && udp_proxy_pcbs) { /* enable and start timer */ proxy_udp_timer_active = 1; sys_timeout(UDP_PROXY_TMR_INTERVAL, proxy_udp_timer, NULL); }}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:10,
示例19: cyclic_timer/** * Timer callback function that calls mld6_tmr() and reschedules itself. * * @param arg unused argument */static voidcyclic_timer(void *arg){ const struct lwip_cyclic_timer* cyclic = (const struct lwip_cyclic_timer*)arg;#if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()/n", cyclic->handler_name));#endif cyclic->handler(); sys_timeout(cyclic->interval_ms, cyclic_timer, arg);}
开发者ID:NCTU-ivan,项目名称:embarc_osp,代码行数:15,
示例20: ip_reass_timer/* Reassembly timer */ static void ip_reass_timer(void *arg){ (void)arg; if (ip_reasstmr > 1) { ip_reasstmr--; sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL); } else if (ip_reasstmr == 1) ip_reasstmr = 0;}
开发者ID:Dzenik,项目名称:FreeRTOS_TEST,代码行数:11,
示例21: ping_timeoutstatic void ping_timeout(void *arg){ struct raw_pcb *pcb = (struct raw_pcb*)arg; ip_addr_t ping_target = PING_TARGET; LWIP_ASSERT("ping_timeout: no pcb given!", pcb != NULL); ping_send(pcb, &ping_target); sys_timeout(PING_DELAY, ping_timeout, pcb);}
开发者ID:cjc1029nice,项目名称:ksdk,代码行数:11,
示例22: delif_output_timeout/*-----------------------------------------------------------------------------------*/static voiddelif_output_timeout(void *arg){ struct netif *netif; struct delif *delif; struct delif_pbuf *dp; unsigned int timeout, now; timeout = DELIF_TIMEOUT; netif = (struct netif*)arg; delif = (struct delif*)netif->state; /* Check if there is anything on the output list. */ dp = output_list; while (dp != NULL) { now = sys_now(); if (dp->time <= now) { LWIP_DEBUGF(DELIF_DEBUG, ("delif_output_timeout: now %u dp->time %u/n", now, dp->time));#if LWIP_IPV4 if(!IP_IS_V6_VAL(dp->ipaddr)) { delif->netif->output(delif->netif, dp->p, ip_2_ip4(&dp->ipaddr)); }#endif /* LWIP_IPV4 */#if LWIP_IPV6 if(IP_IS_V6_VAL(dp->ipaddr)) { delif->netif->output_ip6(delif->netif, dp->p, ip_2_ip6(&dp->ipaddr)); }#endif /* LWIP_IPV6 */ if (dp->next != NULL) { if (dp->next->time > now) { timeout = dp->next->time - now; } else { timeout = 0; } LWIP_DEBUGF(DELIF_DEBUG, ("delif_output_timeout: timeout %u./n", timeout)); } pbuf_free(dp->p); output_list = dp->next; free(dp); dp = output_list; } else { dp = dp->next; } } sys_timeout(timeout, delif_output_timeout, arg);}
开发者ID:Openhab-Nodes,项目名称:libWakaamaEmb,代码行数:55,
示例23: timeout_fnstatic voidtimeout_fn ( void * arg){ int i, j = (int)arg;// diag_printf("Timeout #%d called/n", (int)arg); for (i = 0; i < j; i++) diag_printf(" "); diag_printf("%d/n", j);// sys_timeout( intervals[j], timers[j], arg); sys_timeout( 1000, timers[j], arg); }
开发者ID:houzhenggang,项目名称:mt7688_mips_ecos,代码行数:11,
示例24: tcpip_threadstatic voidtcpip_thread(void *arg){ struct tcpip_msg *msg; (void)arg; ip_init();#if LWIP_UDP udp_init();#endif#if LWIP_TCP tcp_init();#endif#if IP_REASSEMBLY sys_timeout(1000, ip_timer, NULL);#endif if (tcpip_init_done != NULL) { tcpip_init_done(tcpip_init_done_arg); } while (1) { /* MAIN Loop */ sys_mbox_fetch(mbox, (void *)&msg); switch (msg->type) { case TCPIP_MSG_API: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p/n", (void *)msg)); api_msg_input(msg->msg.apimsg); break; case TCPIP_MSG_INPUT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: IP packet %p/n", (void *)msg)); ip_input(msg->msg.inp.p, msg->msg.inp.netif); break; case TCPIP_MSG_CALLBACK: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p/n", (void *)msg)); msg->msg.cb.f(msg->msg.cb.ctx); break; default: break; }#ifdef VBOX if (msg->type == TCPIP_MSG_TERM) { memp_free(MEMP_TCPIP_MSG, msg); break; }#endif memp_free(MEMP_TCPIP_MSG, msg); }#ifdef VBOX if (tcpip_init_done != NULL) { tcpip_init_done(tcpip_init_done_arg); }#endif}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:54,
示例25: sntp_send_request/** Actually send an sntp request to a server. * * @param server_addr resolved IP address of the SNTP server */voidsntp_send_request(ip_addr_t *server_addr){ struct pbuf* p; p = pbuf_alloc(PBUF_TRANSPORT, SNTP_MSG_LEN, PBUF_RAM); if (p != NULL) { struct sntp_msg *sntpmsg = (struct sntp_msg *)p->payload; LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_send_request: Sending request to server/n"));/* os_sprintf(deb,"sntp_send_request: Sending request to server/n"); uart0_sendStr(deb);*/ /* initialize request message */ sntp_initialize_request(sntpmsg); /* send request */ udp_sendto(sntp_pcb, p, server_addr, SNTP_PORT);/* os_sprintf(deb,"sntp_send_request: Sent request to server/n"); uart0_sendStr(deb);*/ /* free the pbuf after sending it */ pbuf_free(p);/* os_sprintf(deb,"sntp_send_request: freed request/n"); uart0_sendStr(deb);*/ /* set up receive timeout: try next server or retry on timeout */ sys_timeout((u32_t)SNTP_RECV_TIMEOUT, sntp_try_next_server, NULL);#if SNTP_CHECK_RESPONSE >= 1 /* save server address to verify it in sntp_recv */ ip_addr_set(&sntp_last_server_address, server_addr);#endif /* SNTP_CHECK_RESPONSE >= 1 */ } else { LWIP_DEBUGF(SNTP_DEBUG_SERIOUS, "sntp_send_request: Out of memory, trying again in %"U32_F" ms/n", (u32_t)SNTP_RETRY_TIMEOUT);/* os_sprintf(deb,"sntp_send_request: Out of memory, trying again in %"U32_F" ms/n",(u32_t)SNTP_RETRY_TIMEOUT); uart0_sendStr(deb);*/ /* out of memory: set up a timer to send a retry */ sys_timeout((u32_t)SNTP_RETRY_TIMEOUT, sntp_request, NULL); } /*os_sprintf(deb,"sntp_send_request: finished/n"); uart0_sendStr(deb);*/}
开发者ID:TomerCo,项目名称:ESP8266-AT,代码行数:45,
示例26: ping_raw_initstatic bool ICACHE_FLASH_ATTRping_raw_init(struct ping_msg *pingmsg){ if (pingmsg == NULL) return false; ip_addr_t ping_target; pingmsg->ping_pcb = raw_new(IP_PROTO_ICMP); LWIP_ASSERT("ping_pcb != NULL", pingmsg->ping_pcb != NULL); raw_recv(pingmsg->ping_pcb, ping_recv, pingmsg); raw_bind(pingmsg->ping_pcb, IP_ADDR_ANY); ping_target.addr = pingmsg->ping_opt->ip; pingmsg ->ping_sent = system_get_time(); ping_send(pingmsg->ping_pcb, &ping_target); sys_timeout(PING_TIMEOUT_MS, ping_timeout, pingmsg); sys_timeout(pingmsg->coarse_time, ping_coarse_tmr, pingmsg); return true;}
开发者ID:piratfm,项目名称:esp8266-tag,代码行数:21,
示例27: lwip_sys_init/** * @brief Initializes the lwIP stack * @param None * @retval None */void lwip_sys_init(void){ struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uprintf_set_enable(UPRINT_INFO, UPRINT_BLK_NET, 1); uprintf_set_enable(UPRINT_DEBUG, UPRINT_BLK_NET, 0); /* Create tcp_ip stack thread */ tcpip_init( NULL, NULL ); /* IP address setting & display on STM32_evalboard LCD*/#ifdef USE_DHCP ipaddr.addr = 0; netmask.addr = 0; gw.addr = 0; /* create a timer to start dhcp */ sys_timeout(2000, lwip_dhcp_start, &xnetif);#else IP4_ADDR(&ipaddr, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3); IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1 , NETMASK_ADDR2, NETMASK_ADDR3); IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3); uprintf(UPRINT_INFO, UPRINT_BLK_NET, "LWIP eth0 IP: %d.%d.%d.%d/n", IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3);#endif /* - netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, void *state, err_t (* init)(struct netif *netif), err_t (* input)(struct pbuf *p, struct netif *netif)) Adds your network interface to the netif_list. Allocate a struct netif and pass a pointer to this structure as the first argument. Give pointers to cleared ip_addr structures when using DHCP, or fill them with sane numbers otherwise. The state pointer may be NULL. The init function pointer must point to a initialization function for your ethernet netif interface. The following code illustrates it's use.*/ netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); /* Registers the default network interface. */ netif_set_default(&xnetif); /* When the netif is fully configured this function must be called.*/ netif_set_up(&xnetif); /* attach ethernet isr */ bsp_isr_attach(16+ETH_IRQn, ethernetif_isr); bsp_irq_unmask(16+ETH_IRQn);}
开发者ID:phuuix,项目名称:probability,代码行数:58,
示例28: sys_timeoutvoid LWIP::tcpip_thread_callback(void *ptr){ lwip_callback *cb = static_cast<lwip_callback *>(ptr); if (cb->delay) { sys_timeout(cb->delay, LWIP::tcpip_thread_callback, ptr); cb->delay = 0; } else { cb->callback(); delete cb; }}
开发者ID:donatieng,项目名称:mbed,代码行数:12,
示例29: tcpip_tcp_timer/*-----------------------------------------------------------------------------------*/static voidtcpip_tcp_timer(void *arg){ (void)arg; tcp_tmr(); if (tcp_active_pcbs || tcp_tw_pcbs) { sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); } else { tcpip_tcp_timer_active = 0; }}
开发者ID:foreverlikeyou9999,项目名称:kos-ports,代码行数:13,
示例30: sys_timeouts_init/** Initialize this module */void sys_timeouts_init(void){ //we don't support ipreassembly // ip_reass_waiter = sys_timeout(IP_TMR_INTERVAL, ip_reass_timer, ip_reass_waiter);#if 0 #if LWIP_ARP sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL);#endif /* LWIP_ARP */#if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);#endif /* LWIP_DHCP */#if LWIP_AUTOIP sys_timeout(AUTOIP_TMR_INTERVAL, autoip_timer, NULL);#endif /* LWIP_AUTOIP */#if LWIP_IGMP sys_timeout(IGMP_TMR_INTERVAL, igmp_timer, NULL);#endif /* LWIP_IGMP */#if LWIP_DNS sys_timeout(DNS_TMR_INTERVAL, dns_timer, NULL);#endif /* LWIP_DNS */ */#endif}
开发者ID:ajbetteridge,项目名称:akaros,代码行数:26,
注:本文中的sys_timeout函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ sys_waitpid函数代码示例 C++ sys_time_register_timer函数代码示例 |