这篇教程C++ vm_log_info函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中vm_log_info函数的典型用法代码示例。如果您正苦于以下问题:C++ vm_log_info函数的具体用法?C++ vm_log_info怎么用?C++ vm_log_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了vm_log_info函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: at_callback/* AT command callback, which will be called after the AT command is sent from the Monitor tool */static void at_callback(vm_cmd_command_t* param, void* user_data){ VMINT result; if(strcmp("Test01",(char*)param->command_buffer) == 0) { /* Opens the cell when receiving AT command: AT+[1000]Test01 */ result = vm_gsm_cell_open(); vm_log_info("open result = %d",result); } else if(strcmp("Test02",(char*)param->command_buffer) == 0) { /* Gets the current cell info when receiving AT command: AT+[1000]Test02 */ vm_gsm_cell_get_current_cell_info(&g_info); vm_log_info("ar=%d, bsic=%d, rxlev=%d, mcc=%d, mnc=%d, lac=%d, ci=%d", g_info.arfcn, g_info.bsic, g_info.rxlev, g_info.mcc, g_info.mnc, g_info.lac, g_info.ci); } else if(strcmp("Test03",(char*)param->command_buffer) == 0) { /* Gets the neighboring cell info when receiving AT command: AT+[1000]Test03 */ int i, count; count = vm_gsm_cell_get_neighbor_number(); vm_log_info("neighbor count=%d", count); for(i=0; i<count; i++) { vm_gsm_cell_get_neighbor_cell_info(&g_info, i); vm_log_info("ar=%d, bsic=%d, rxlev=%d, mcc=%d, mnc=%d, lac=%d, ci=%d", g_info.arfcn, g_info.bsic, g_info.rxlev, g_info.mcc, g_info.mnc, g_info.lac, g_info.ci); } } else if(strcmp("Test04",(char*)param->command_buffer) == 0) { /* Closes the cell when receiving AT command: AT+[1000]Test04 */ vm_gsm_cell_close(); }}
开发者ID:Frank-KunLi,项目名称:LinkItProjects,代码行数:35,
示例2: onWifiConnectedstatic void onWifiConnected(void *user_data, vm_wlan_conn_res_struct *conn_res){ vm_log_info("onWifiConnected (MMI)"); LWiFiConnectContext *pContext = (LWiFiConnectContext*)user_data; // connect result pContext->result = *conn_res; vm_log_info("onWifiConnected result=%d", conn_res->result); if (VM_WLAN_RESULT_SUCCESS != pContext->result.result) { vm_log_info("FAILED ret=%d cause=%d", conn_res->result, conn_res->cause); // connect fail, // wakeup Arduino thread directly LTask.post_signal(); } else { // connect OK, // retrieve AP & IP info. // in DHCP case, we may need to wait for IP ready vm_wlan_get_connected_ap_info((void*)&pContext->connectedInfo, VM_WLAN_AP_INFO_ALL); // We should then wait for IP info, which will be callbacked } return;}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:28,
示例3: onWiFiSnifferOnstatic void onWiFiSnifferOn(void *userData, vm_wlan_sniffer_on_res_struct *res){ LWiFiConnectContext *pContext = (LWiFiConnectContext*)userData; vm_log_info("onWiFiSnifferOn result=%d, cb_type=%d", res->result, res->cb_type); if(VM_WLAN_SNIFFER_SUCCESS == res->result) { if(VM_WLAN_SNIFFER_ON_RES == res->cb_type) { } else if(VM_WLAN_SNIFFER_ON_AP_INFO == res->cb_type) { vm_wlan_prof_struct prof; memset(&prof, 0, sizeof(vm_wlan_prof_struct)); memcpy(&prof, &(res->profile), sizeof(vm_wlan_prof_struct)); pContext->apInfo.auth_mode = prof.auth_mode; strncpy((char*)pContext->apInfo.ssid, (char*)prof.ssid, VM_WLAN_PROF_MAX_SSID_LEN); strncpy((char*)pContext->apInfo.password, (char*)prof.password, VM_WLAN_PROF_PSWD_MAX_LEN); vm_log_info("auth_mode: %d", res->profile.auth_mode); vm_log_info("ssid: %s", (char*)pContext->apInfo.ssid); vm_log_info("password: %s", (char*)pContext->apInfo.password); vm_wlan_sniffer_off(onWiFiSnifferOff, pContext); } } else { vm_log_info("vm_wlan_sniffer_on fails, result=%d", res->result); pContext->result.result = VM_WLAN_RESULT_FAILED; LTask.post_signal(); }}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:33,
示例4: vm_log_infoint LGPRSClass::hostByName(const char* aHostname, IPAddress& aResult){ vm_log_info("hostByName"); LGPRSResolveContext context; // no memory copy since we're blocking call context.domainName = aHostname; LTask.remoteCall(&gprsResolveDomainName, (void*)&context); vm_log_info("context.resolveState = %d", context.resolveState); unsigned char* ipArray = (unsigned char*)&context.dns.address[0]; vm_log_info("Arduino DNS resolve callback, cause=%d, num=%d, address=%d.%d.%d.%d", context.dns.error_cause, context.dns.num, ipArray[0], ipArray[1], ipArray[2], ipArray[3]); // parse result if (VM_E_SOC_SUCCESS == context.resolveState) { // There may have multiple ip addresses. We take the 1st one. aResult = context.dns.address[0]; vm_log_info("get IP=%d.%d.%d.%d", aResult[0], aResult[1], aResult[2], aResult[3]); return 1; } else { return 0; }}
开发者ID:Litchee,项目名称:LinkIt-ONE-IDE,代码行数:35,
示例5: gprsResolveDomainNamestatic boolean gprsResolveDomainName(void *userData){ LGPRSResolveContext *pContext = (LGPRSResolveContext*)userData; vm_log_info("vm_soc_get_host_by_name_ex: %s", pContext->domainName); pContext->resolveState = vm_soc_get_host_by_name_ex(VM_TCP_APN_CMNET, pContext->domainName, &pContext->dns, &gprsResolveCallback, pContext); vm_log_info("vm_soc_get_host_by_name_ex ret = %d", pContext->resolveState); if (pContext->resolveState > 0) { // not done yet return false; } switch(pContext->resolveState) { case VM_E_SOC_SUCCESS: // Get IP address successfully, result is filled. return true; case VM_E_SOC_WOULDBLOCK: // wait response from network, result could be gotten from callback. // need to wait, return directly // so MMI message loop may continue. return false; case VM_E_SOC_INVAL: // invalid arguments: null domain_name, etc. case VM_E_SOC_ERROR: // unspecified error case VM_E_SOC_LIMIT_RESOURCE: // socket resources not available case VM_E_SOC_INVALID_ACCOUNT: // invalid data account id return true; }}
开发者ID:Litchee,项目名称:LinkIt-ONE-IDE,代码行数:33,
示例6: vm_log_infoboolean LTcpClient::wifiRead(void *userData){ LTcpReadWriteContext *pContext = (LTcpReadWriteContext*)userData; LTcpClient *pThis = pContext->pInst; pContext->lenProcessed = 0; // parameter check if(pContext->len <= 0) { return true; } vm_log_info("wifiRead len=%d", pContext->len); // check peek state if(pThis->m_peekBuffered) { // insert the peeked byte *((VMINT8*)pContext->buf) = pThis->m_peekByte; pContext->lenProcessed += 1; pContext->len--; // clear peek state pThis->m_peekByte = -1; pThis->m_peekBuffered = false; } VMINT readResult = VM_TCP_READ_EOF; // actually read from TCP socket if (pContext->serverHandle != -1) { readResult = vm_soc_svr_read(pContext->serverHandle, pContext->handle, pContext->buf, pContext->len); } else { readResult = vm_tcp_read(pContext->handle, pContext->buf, pContext->len); } if (readResult > 0) { pContext->lenProcessed += readResult; } if (readResult == VM_TCP_READ_EOF) { // we may cache a peek byte even if the socket is disconnected vm_log_info("wifiRead socket disconnected"); } vm_log_info("wifiRead %d bytes", pContext->lenProcessed); return true;}
开发者ID:Iwilliams32,项目名称:LinkIt-ONE-IDE,代码行数:58,
示例7: vm_log_infoint8_t LWiFiClass::scanNetworks(){ vm_log_info("scanNetworks"); LWiFiScanContext context; LTask.remoteCall(&LWiFiScanContext::mmiCall, &context); m_scanInfo = context.result; vm_log_info("scanNetworks ret=%d", m_scanInfo.ap_list_num); return m_scanInfo.ap_list_num;}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:9,
示例8: vm_log_infoboolean LUDP::udpSend(void* userdata){ LUDPSendContext *pCntx = (LUDPSendContext*)userdata; LUDP* pThis = pCntx->pThis; VMINT remainBuffer = pThis->m_writePos; VMUINT8 *pBuf = &pThis->m_writeBuffer[0]; vm_sockaddr_struct sendto = {0}; sendto.addr[0] = pThis->m_sendToIP[0]; sendto.addr[1] = pThis->m_sendToIP[1]; sendto.addr[2] = pThis->m_sendToIP[2]; sendto.addr[3] = pThis->m_sendToIP[3]; sendto.addr_len = 4; sendto.port = pThis->m_sendToPort; vm_log_info("send packet len:%d to %d.%d.%d.%d:%d", remainBuffer, sendto.addr[0], sendto.addr[1], sendto.addr[2], sendto.addr[3], sendto.port); while(remainBuffer > 0) { VMINT sentBytes = 0; sentBytes = vm_udp_sendto(pThis->m_serverHandle, pBuf, remainBuffer, &sendto); vm_log_info("vm_udp_sendto returns %d", sentBytes); if(sentBytes <= 0) { vm_log_error("vm_udp_sendto sent no content"); break; } pBuf += sentBytes; remainBuffer -= sentBytes; } // check if buffer is completely sent if(remainBuffer <= 0) { pCntx->sentComplete = 1; } else { pCntx->sentComplete = 0; } return true;}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:56,
示例9: handle_sysevt/* The callback to be invoked by the system engine. */void handle_sysevt(VMINT message, VMINT param) { switch (message) { case VM_EVENT_CREATE: vm_log_info("reboot test create"); reboot_test_main(); break; case VM_EVENT_QUIT: vm_log_info("reboot test quit"); break; }}
开发者ID:eggfly,项目名称:LinkIt_Assist_2502_SDK,代码行数:13,
示例10: gsm_sms_get_unreadVMUINT8 gsm_sms_get_unread(void* userdata){ sms_unread_msg_struct *dest = (sms_unread_msg_struct*)userdata; VMINT16 message_id; vm_gsm_sms_read_message_data_t* message_data = NULL; VMWCHAR* content_buff; VMINT res; //message_id = vm_gsm_sms_get_message_id(VM_GSM_SMS_BOX_INBOX, 0); //dest -> id = message_id; message_id = dest->id; if(message_id >= 0) { // Allocates memory for the message data message_data = (vm_gsm_sms_read_message_data_t*)vm_calloc(sizeof(vm_gsm_sms_read_message_data_t)); if(message_data == NULL) { vm_log_info("sms read malloc message data fail"); return FALSE; } // Allocates memory for the content buffer of the message content_buff = (VMWCHAR*)vm_calloc((500+1)*sizeof(VMWCHAR)); if(content_buff == NULL) { vm_free(message_data); vm_log_info("sms read malloc content fail"); return FALSE; } message_data->content_buffer = content_buff; message_data->content_buffer_size = 500; // Reads the message res = vm_gsm_sms_read_message(message_id, VM_TRUE, message_data, sms_read_callback, NULL); //vm_log_info("vm_gsm_sms_read_message message_id is %d", message_id); if(res != VM_GSM_SMS_RESULT_OK) { vm_free(content_buff); vm_free(message_data); vm_log_info("register read callback fail"); return FALSE; } else { return TRUE; } }}
开发者ID:Frank-KunLi,项目名称:LinkItProjects,代码行数:52,
示例11: onWiFiEnabledstatic void onWiFiEnabled(void *userData, vm_wlan_req_res_enum result){ LWiFiConnectContext *pContext = (LWiFiConnectContext*)userData; vm_log_info("onWiFiEnabled result=%d", result); do { if (VM_WLAN_REQ_RES_DONE != result) { vm_log_info("wifi status change error=%d", result); break; } if(true == pContext->isWaitApInfo) { VMINT snifferOnRet = vm_wlan_sniffer_on(NULL, &onWiFiSnifferOn, pContext); if(VM_WLAN_RESULT_PROCESSING != snifferOnRet) { vm_log_info("wlan sniffer on fails ret=%d", snifferOnRet); break; } vm_log_info("start waiting AP info"); return; } vm_log_info("vm_wlan_reg_noti"); // register IP callback vm_wlan_reg_noti(VM_WLAN_NOTI_IP_AVAILABLE, &onWiFiIPReady, pContext); vm_log_info("vm_wlan_connect"); // connect to AP VMINT connectRet = vm_wlan_connect(&pContext->apInfo, &onWifiConnected, pContext); vm_log_info("vm_wlan_connect ret =%d", connectRet); if (connectRet != VM_WLAN_RESULT_PROCESSING) { vm_log_info("vm_wlan_connect fails ret=%d", connectRet); break; } vm_log_info("start waiting connect & IP address"); return; } while (0); // fail and allow arduino thread to keep going vm_log_info("vm_wlan_mode_set cb result=%d", result); pContext->result.result = VM_WLAN_RESULT_FAILED; LTask.post_signal();}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:52,
示例12: wifiMacAddressstatic boolean wifiMacAddress(void* userData){ vm_log_info("wifiMacAddress called"); LWiFiClass *pThis = (LWiFiClass*)userData; vm_wlan_prof_str_info_qry_struct qry; qry.dest = pThis->m_macAddress; qry.dest_len = VM_WLAN_WNDRV_MAC_ADDRESS_LEN; qry.req_len = VM_WLAN_WNDRV_MAC_ADDRESS_LEN; pThis->m_lastError = vm_wlan_get_mac_address(&qry); vm_log_info("wifiMacAddress called, result = %d", pThis->m_lastError); vm_log_info("req_len=%d", qry.req_len); return true;}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:13,
示例13: m_handleSharedHandle::SharedHandle(VMINT clientHandle, VMINT serverHandle): m_handle(clientHandle), m_serverHandle(serverHandle), m_pSharedCount(new VMINT(1)){ vm_log_info("SharedHandle create: c:%d, s:%d", m_handle, m_serverHandle);}
开发者ID:Iwilliams32,项目名称:LinkIt-ONE-IDE,代码行数:7,
示例14: UartIrqHandlervoid UartIrqHandler(void* parameter, VM_DCL_EVENT event, VM_DCL_HANDLE device_handle){ if(event == VM_UART_READY_TO_READ) { char data[SERIAL_BUFFER_SIZE]; int i; VM_DCL_STATUS status; VM_DCL_BUFF_LEN returned_len; status = vm_dcl_read(device_handle,(VM_DCL_BUFF*)data,SERIAL_BUFFER_SIZE,&returned_len,vm_dcl_get_ownerid()); if(status<VM_DCL_STATUS_OK) { vm_log_info((char*)"read failed"); } if(device_handle == g_APinDescription[0].ulHandle) { for(i=0;i<returned_len;i++) { Serial1._rx_buffer->store_char(data[i]); } } else { for(i=0;i<returned_len;i++) { Serial._rx_buffer->store_char(data[i]); } } } else { }}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:33,
示例15: vm_log_infouint8_t TwoWire::endTransmission(uint8_t sendStop) { vm_i2c_ctrl_config_t conf_data; vm_i2c_ctrl_single_write_t write_data; VM_DCL_STATUS ret = 0; int32_t sent = 0; if(i2c_handle==-1) { vm_log_info("endTransmission,i2c handle is invalid.i2c_handle:%d",i2c_handle); return 0; } if(0 < txBufferLength) { conf_data.Reserved0 = (VM_DCL_I2C_OWNER)0; conf_data.eTransactionMode = VM_DCL_I2C_TRANSACTION_FAST_MODE; conf_data.fgGetHandleWait = 0; conf_data.Reserved1 = 0; conf_data.u1DelayLen = 0; conf_data.u1SlaveAddress = txAddress; conf_data.u4FastModeSpeed = 100; conf_data.u4HSModeSpeed = 0; ret = vm_dcl_control(i2c_handle,VM_I2C_CMD_CONFIG,(void *)&conf_data); write_data.pu1Data = &(txBuffer[0]); write_data.u4DataLen = txBufferLength; ret = vm_dcl_control(i2c_handle,VM_I2C_CMD_SINGLE_WRITE,(void *)&write_data); sent = txBufferLength; } txBufferLength = 0; status = MASTER_IDLE; return sent;}
开发者ID:functionalbeing,项目名称:Reflow-Toaster-Oven,代码行数:35,
示例16: vm_log_infovoid TwoWire::beginTransmission(uint8_t address) { if(i2c_handle==-1) { vm_log_info("[TwoWire]beginTransmission:i2c handle is invalid,return"); return; } status = MASTER_SEND; // save address of target and empty buffer txAddress = address<<1; // frist transfer if (txBufferLength == 0) { bytes_per_transfer = 0; num_transfer = 1; } else { // conut the number of repeated start signal num_transfer++; } rxBufferLength = 0; bytes_per_read = 0; num_read = 0;}
开发者ID:hunianhang,项目名称:arduino_nufront,代码行数:27,
示例17: call_voiceCall_callbackstatic voidcall_voiceCall_callback(vm_gsm_tel_call_actions_callback_data_t *data) { vm_log_info("call_voiceCall_callback"); if (data->type_action == VM_GSM_TEL_CALL_ACTION_DIAL) { if (data->data_act_rsp.result_info.result == VM_GSM_TEL_OK) { g_call_status = CALLING; } else { g_call_status = IDLE_CALL; } } else if (data->type_action == VM_GSM_TEL_CALL_ACTION_ACCEPT) { if (data->data_act_rsp.result_info.result == VM_GSM_TEL_OK) { g_call_status = TALKING; } else { g_call_status = IDLE_CALL; } } else if (data->type_action == VM_GSM_TEL_CALL_ACTION_HOLD) { } else if (data->type_action == VM_GSM_TEL_CALL_ACTION_END_SINGLE) { g_call_status = IDLE_CALL; } else { }}
开发者ID:WayenWeng,项目名称:Lua_for_RePhone,代码行数:30,
示例18: adc_callbackvoid adc_callback(void* parameter, VM_DCL_EVENT event, VM_DCL_HANDLE device_handle){ vm_dcl_callback_data_t *data; vm_dcl_adc_measure_done_confirm_t * result; vm_dcl_adc_control_send_stop_t stop_data; VMINT status = 0; if(parameter!=NULL) { data = ( vm_dcl_callback_data_t*)parameter; result = (vm_dcl_adc_measure_done_confirm_t *)(data->local_parameters); if( result != NULL ) { double *p; p =(double*)&(result->value); g_adc_result = (unsigned int)*p; vm_log_info("get adc data is %d",g_adc_result); } } // Stop ADC stop_data.owner_id = vm_dcl_get_owner_id(); status = vm_dcl_control(g_adc_handle,VM_DCL_ADC_COMMAND_SEND_STOP,(void *)&stop_data); vm_dcl_close(g_adc_handle);}
开发者ID:CatEngineer,项目名称:Draw-image-on-RePhone,代码行数:28,
示例19: wifiBeginstatic boolean wifiBegin(void* userData){ vm_log_info("wifiBegin (in MMI)"); LWiFiConnectContext *pContext = (LWiFiConnectContext*)userData; const VMINT wlanStatus = vm_wlan_status(); // check if we already connected if (wlanStatus & VM_WLAN_STA_STATUS_CONNECTED) { pContext->result.result = VM_WLAN_RESULT_STATE_ERROR; return true; } // first we enable WiFi and wait for callback if (VM_WLAN_SET_MODE_STA != vm_wlan_mode_get()) { vm_wlan_mode_set(VM_WLAN_SET_MODE_STA, &onWiFiEnabled, pContext); } else { onWiFiEnabled(pContext, VM_WLAN_REQ_RES_DONE); } // block Arduino thread return false;}
开发者ID:ReeveBlue,项目名称:LinkIt-ONE-IDE,代码行数:28,
示例20: _sbrkextern caddr_t _sbrk ( int incr ){ static void* heap = NULL ; static void* base = NULL ; void* prev_heap ; if ( heap == NULL ) { base = (unsigned char *)g_base_address; if(base == NULL) { vm_log_fatal("malloc failed"); } else { heap = base; vm_log_info("init memory success"); } } if (heap + incr > g_base_address + g_memory_size) { vm_log_fatal("memory not enough"); } prev_heap = heap; heap += incr ; return (caddr_t) prev_heap ;}
开发者ID:fun-alex-alex2006hw,项目名称:Arduino_IDE_for_RePhone,代码行数:31,
示例21: handle_sysevtvoid handle_sysevt(VMINT message, VMINT param){ switch (message) { case VM_EVENT_CREATE: /* delay for catch logs */ vm_thread_sleep(8000); vm_log_info("Sample of FS list file - Start."); fs_demo_find_files(); break; case VM_EVENT_QUIT: vm_log_info("Sample of FS list file - End."); break; }}
开发者ID:Frank-KunLi,项目名称:LinkItProjects,代码行数:17,
注:本文中的vm_log_info函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ vm_object_deallocate函数代码示例 C++ vm_isokendpt函数代码示例 |