本文整理汇总了C++中NATIVE_PROFILE_PAL_NETWORK函数的典型用法代码示例。如果您正苦于以下问题:C++ NATIVE_PROFILE_PAL_NETWORK函数的具体用法?C++ NATIVE_PROFILE_PAL_NETWORK怎么用?C++ NATIVE_PROFILE_PAL_NETWORK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NATIVE_PROFILE_PAL_NETWORK函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rtp_sig_semaphore_clear
/*----------------------------------------------------------------------*
rtp_sig_semaphore_clear
*----------------------------------------------------------------------*/
void rtp_sig_semaphore_clear (RTP_SEMAPHORE semHandle)
{
NATIVE_PROFILE_PAL_NETWORK();
pollos_clear_q((P_POLLOS_SIGNAL)semHandle);
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:10,代码来源:rtpsignl.cpp
示例2: rtp_sig_semaphore_wait
/*----------------------------------------------------------------------*
rtp_sig_semaphore_wait
*----------------------------------------------------------------------*/
int rtp_sig_semaphore_wait (RTP_SEMAPHORE semHandle)
{
NATIVE_PROFILE_PAL_NETWORK();
return (!pollos_test((P_POLLOS_SIGNAL)semHandle, RTP_TIMEOUT_INFINITE));
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:10,代码来源:rtpsignl.cpp
示例3: lwip_network_uptime_completion
void lwip_network_uptime_completion(void *arg)
{
NATIVE_PROFILE_PAL_NETWORK();
struct netif* pNetIf = (struct netif*)arg;
BOOL status = enc28j60_get_link_status(&g_ENC28J60_LWIP_Config.DeviceConfigs[0].SPI_Config);
if(status != LwipNetworkStatus)
{
if(status)
{
tcpip_callback((sys_timeout_handler)netif_set_link_up, (void*)pNetIf);
tcpip_callback((sys_timeout_handler)netif_set_up, (void*)pNetIf);
Network_PostEvent( NETWORK_EVENT_TYPE__AVAILABILITY_CHANGED, NETWORK_EVENT_FLAGS_IS_AVAILABLE );
}
else
{
tcpip_callback((sys_timeout_handler)netif_set_link_down, (void*)pNetIf);
tcpip_callback((sys_timeout_handler)netif_set_down, (void*)pNetIf);
Network_PostEvent( NETWORK_EVENT_TYPE__AVAILABILITY_CHANGED, 0);
}
Events_Set(SYSTEM_EVENT_FLAG_SOCKET);
Events_Set(SYSTEM_EVENT_FLAG_NETWORK);
LwipNetworkStatus = status;
}
LwipUpTimeCompletion.EnqueueDelta64( 2000000 );
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:33,代码来源:enc28j60_lwip_driver.cpp
示例4: NATIVE_PROFILE_PAL_NETWORK
HRESULT RTIP_SOCKETS_Driver::LoadAdapterConfiguration( UINT32 interfaceIndex, SOCK_NetworkConfiguration* config )
{
NATIVE_PROFILE_PAL_NETWORK();
if(interfaceIndex >= NETWORK_INTERFACE_COUNT)
{
return CLR_E_INVALID_PARAMETER;
}
memcpy(config, &g_NetworkConfig.NetworkInterfaces[interfaceIndex], sizeof(g_NetworkConfig.NetworkInterfaces[interfaceIndex]));
if(config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DHCP)
{
IFACE_INFO info;
if(SOCK_SOCKET_ERROR != xn_interface_info(g_RTIP_SOCKETS_Driver.m_interfaces[interfaceIndex].m_interfaceNumber, &info ))
{
config->ipaddr = *(UINT32*)info.my_ip_address;
config->subnetmask = *(UINT32*)info.ip_mask;
config->gateway = *(UINT32*)info.gateways[0];
config->dnsServer1 = *(UINT32*)info.dns_servers[0];
config->dnsServer2 = *(UINT32*)info.dns_servers[1];
}
else
{
config->ipaddr = 0;
config->subnetmask = 0;
config->gateway = 0;
}
}
return S_OK;
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:33,代码来源:RTIP__Sockets.cpp
示例5: HAL_SOCK_EventsSet
void HAL_SOCK_EventsSet( UINT32 events )
{
NATIVE_PROFILE_PAL_NETWORK();
ASSERT( (events == SOCKET_EVENT_FLAG_SOCKET) || (events == SOCKET_EVENT_FLAG_SOCKETS_READY));
Events_Set( SYSTEM_EVENT_FLAG_SOCKET );
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:7,代码来源:RTIP_Sockets_functions.cpp
示例6: NATIVE_PROFILE_PAL_NETWORK
HRESULT LWIP_SOCKETS_Driver::LoadAdapterConfiguration( UINT32 interfaceIndex, SOCK_NetworkConfiguration* config )
{
NATIVE_PROFILE_PAL_NETWORK();
if(interfaceIndex >= NETWORK_INTERFACE_COUNT)
{
return CLR_E_INVALID_PARAMETER;
}
memcpy(config, &g_NetworkConfig.NetworkInterfaces[interfaceIndex], sizeof(g_NetworkConfig.NetworkInterfaces[interfaceIndex]));
if(config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DHCP)
{
struct netif *pNetIf;
if (pNetIf = netif_find_interface(g_LWIP_SOCKETS_Driver.m_interfaces[interfaceIndex].m_interfaceNumber))
{
config->ipaddr = pNetIf->ip_addr.addr;
config->subnetmask = pNetIf->netmask.addr;
config->gateway = pNetIf->gw.addr;
#if LWIP_DNS
config->dnsServer1 = dns_getserver(0).addr;
config->dnsServer2 = dns_getserver(1).addr;
#endif
}
else
{
config->ipaddr = 0;
config->subnetmask = 0;
config->gateway = 0;
}
}
return S_OK;
}
开发者ID:Ayati1987,项目名称:netmf-interpreter,代码行数:35,代码来源:lwIP__Sockets.cpp
示例7: lwip_network_uptime_completion
void lwip_network_uptime_completion(void *arg)
{
NATIVE_PROFILE_PAL_NETWORK();
BOOL status = ENET_PHY_lwip_get_link_status( );
if(status != LwipNetworkStatus)
{
struct netif* pNetIf = (struct netif*)arg;
if(status)
{
SOCK_NetworkConfiguration *pNetCfg = &g_NetworkConfig.NetworkInterfaces[0];
ENET_PHY_lwip_set_link_speed( );
netif_set_up( pNetIf );
if(pNetCfg->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DHCP)
{
dhcp_start( pNetIf );
}
Network_PostEvent( NETWORK_EVENT_TYPE__AVAILABILITY_CHANGED, NETWORK_EVENT_FLAGS_IS_AVAILABLE );
}
else
{
netif_set_down( (struct netif*)arg );
Network_PostEvent( NETWORK_EVENT_TYPE__AVAILABILITY_CHANGED, 0);
}
LwipNetworkStatus = status;
}
LwipUpTimeCompletion.EnqueueDelta64( 2000000 );
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:34,代码来源:LPC24XX_EMAC_lwip_driver.cpp
示例8: rtp_threads_init
/*----------------------------------------------------------------------*
rtp_threads_init
*----------------------------------------------------------------------*/
int rtp_threads_init (void)
{
NATIVE_PROFILE_PAL_NETWORK();
int i;
#if (INCLUDE_RUN_TIME_CONFIG)
IPTaskContinuation = (HAL_CONTINUATION *) rtp_malloc(sizeof(HAL_CONTINUATION) * CFG_NIFACES);
InterruptTaskContinuation = (HAL_CONTINUATION *) rtp_malloc(sizeof(HAL_CONTINUATION) * CFG_NIFACES);
IPTaskInitialized = (int *) rtp_malloc(sizeof(int) * CFG_NIFACES);
InterruptTaskContInitialized = (int *) rtp_malloc(sizeof(int) * CFG_NIFACES);
if ( ((int)IPTaskContinuation== -1) || ((int)InterruptTaskContinuation== -1) ||
((int)IPTaskInitialized== -1) || ((int)InterruptTaskContInitialized== -1) )
{
return (-1);
}
if ( ((int)IPTaskContinuation== NULL) || ((int)InterruptTaskContinuation== NULL) ||
((int)IPTaskInitialized== NULL) || ((int)InterruptTaskContInitialized== NULL) )
{
return (-1);
}
#endif
for (i = 0; i < CFG_NIFACES; i++)
{
IPTaskInitialized[i] = 0;
InterruptTaskContInitialized[i] = 0;
}
TimerTaskContInitialized = 0;
TimerTaskCompInitialized = 0;
DHCPTaskInitialized = 0;
return (0);
}
开发者ID:Wampamba-Nooh,项目名称:NETMF-LPC,代码行数:37,代码来源:rtpthrd.cpp
示例9: rtp_sig_semaphore_free
/*----------------------------------------------------------------------*
rtp_sig_semaphore_free
*----------------------------------------------------------------------*/
void rtp_sig_semaphore_free (RTP_SEMAPHORE semHandle)
{
NATIVE_PROFILE_PAL_NETWORK();
rtp_free((void *)semHandle);
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:10,代码来源:rtpsignl.cpp
示例10: rtp_get_gmt_date
int rtp_get_gmt_date (RTP_DATE * gmDate, unsigned long utcSec)
{
NATIVE_PROFILE_PAL_NETWORK();
SSL_GetTime( (DATE_TIME_INFO*) gmDate );
return (1);
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:8,代码来源:rtptime.cpp
示例11: rtp_threads_shutdown_cooperative
/** @memo Shutdown the RTPlatform thread API.
@doc When use of the RTPlatform thread API is no longer
needed, this function clears and/or releases any allocated
resources setup by the rtp_threads_init function call.
@return void
*/
void rtp_threads_shutdown_cooperative (void)
{
NATIVE_PROFILE_PAL_NETWORK();
if (rtp_threads_up_cooperative > 0)
{
rtp_threads_up_cooperative --;
}
}
开发者ID:Wampamba-Nooh,项目名称:NETMF-LPC,代码行数:16,代码来源:rtpthrd.cpp
示例12: rtp_thrd_ip_process
/*----------------------------------------------------------------------*
rtp_thrd_ip_process
*----------------------------------------------------------------------*/
void rtp_thrd_ip_process(void* arg)
{
NATIVE_PROFILE_PAL_NETWORK();
tc_ip_process((int*)arg);
SOCKETS_ProcessSocketActivity(SOCK_SOCKET_ERROR);
}
开发者ID:Wampamba-Nooh,项目名称:NETMF-LPC,代码行数:11,代码来源:rtpthrd.cpp
示例13: rtp_thrd_timer_continuation
/*----------------------------------------------------------------------*
rtp_thrd_timer_continuation
*----------------------------------------------------------------------*/
void rtp_thrd_timer_continuation(void* arg)
{
NATIVE_PROFILE_PAL_NETWORK();
/* Step the time in the stack and handle timeouts if any */
tc_timer_main();
}
开发者ID:Wampamba-Nooh,项目名称:NETMF-LPC,代码行数:11,代码来源:rtpthrd.cpp
示例14: NATIVE_PROFILE_PAL_NETWORK
int LWIP_SOCKETS_Driver::GetSockOpt( SOCK_SOCKET socket, int level, int optname, char* optval, int* optlen )
{
NATIVE_PROFILE_PAL_NETWORK();
int nativeLevel;
int nativeOptionName;
char* pNativeOptval = optval;
int ret;
switch(level)
{
case SOCK_IPPROTO_IP:
nativeLevel = IPPROTO_IP;
nativeOptionName = GetNativeIPOption(optname);
break;
case SOCK_IPPROTO_TCP:
nativeLevel = IPPROTO_TCP;
nativeOptionName = GetNativeTcpOption(optname);
break;
case SOCK_IPPROTO_UDP:
case SOCK_IPPROTO_ICMP:
case SOCK_IPPROTO_IGMP:
case SOCK_IPPROTO_IPV4:
case SOCK_SOL_SOCKET:
nativeLevel = SOL_SOCKET;
nativeOptionName = GetNativeSockOption(optname);
break;
default:
nativeLevel = level;
nativeOptionName = optname;
break;
}
ret = lwip_getsockopt(socket, nativeLevel, nativeOptionName, pNativeOptval, (u32_t*)optlen);
if(ret == 0)
{
switch(level)
{
case SOCK_SOL_SOCKET:
switch(optname)
{
case SOCK_SOCKO_EXCLUSIVEADDRESSUSE:
case SOCK_SOCKO_DONTLINGER:
*optval = !(*(int*)optval != 0);
break;
case SOCK_SOCKO_ACCEPTCONNECTION:
case SOCK_SOCKO_BROADCAST:
case SOCK_SOCKO_KEEPALIVE:
*optval = (*(int*)optval != 0);
break;
}
break;
}
}
return ret;
}
开发者ID:piwi1263,项目名称:NETMF-DISCO-429,代码行数:58,代码来源:lwIP__Sockets.cpp
示例15: rtp_thrd_interrupt_continuation
/*----------------------------------------------------------------------*
rtp_thrd_interrupt_continuation
*----------------------------------------------------------------------*/
void rtp_thrd_interrupt_continuation(int index)
{
NATIVE_PROFILE_PAL_NETWORK();
GLOBAL_LOCK(irq);
if(!InterruptTaskContinuation[index].IsLinked())
{
InterruptTaskContinuation[index].Enqueue();
}
}
开发者ID:Wampamba-Nooh,项目名称:NETMF-LPC,代码行数:13,代码来源:rtpthrd.cpp
示例16: lwip_interrupt_continuation
void lwip_interrupt_continuation( void )
{
NATIVE_PROFILE_PAL_NETWORK();
GLOBAL_LOCK(irq);
if(!InterruptTaskContinuation.IsLinked())
{
InterruptTaskContinuation.Enqueue();
}
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:10,代码来源:LPC24XX_EMAC_lwip_driver.cpp
示例17: rtp_get_system_msec
/*----------------------------------------------------------------------*
rtp_get_system_msec
*----------------------------------------------------------------------*/
unsigned long rtp_get_system_msec (void)
{
NATIVE_PROFILE_PAL_NETWORK();
UINT64 currentTime;
/* JRT */
currentTime = HAL_Time_CurrentTime() / 10000;
return ((unsigned long)(currentTime));
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:14,代码来源:rtptime.cpp
注:本文中的NATIVE_PROFILE_PAL_NETWORK函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论