当前位置: 首页>>代码示例>>C++>>正文


C++ LOG_E函数代码示例

本文整理汇总了C++中LOG_E函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_E函数的具体用法?C++ LOG_E怎么用?C++ LOG_E使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LOG_E函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: from_wx

void DialogShiftTimes::SaveHistory(json::Array const& shifted_blocks) {
	json::Object new_entry;
	new_entry["filename"] = context->subsController->Filename().filename().string();
	new_entry["is by time"] = shift_by_time->GetValue();
	new_entry["is backward"] = shift_backward->GetValue();
	new_entry["amount"] = from_wx(shift_by_time->GetValue() ? shift_time->GetValue() : shift_frames->GetValue());
	new_entry["fields"] = time_fields->GetSelection();
	new_entry["mode"] = selection_mode->GetSelection();
	new_entry["selection"] = shifted_blocks;

	history->push_front(new_entry);

	try {
		json::Writer::Write(*history, agi::io::Save(history_filename).Get());
	}
	catch (agi::fs::FileSystemError const& e) {
		LOG_E("dialog_shift_times/save_history") << "Cannot save shift times history: " << e.GetChainedMessage();
	}
}
开发者ID:seawaveT,项目名称:Aegisub,代码行数:19,代码来源:dialog_shift_times.cpp

示例2: getTrustletSession

//------------------------------------------------------------------------------
void TrustZoneDevice::notify(
    uint32_t sessionId
)
{
    // Check if it is MCP session - handle openSession() command
    if (sessionId != SID_MCP) {
        // Check if session ID exists to avoid flooding of nq by clients
        TrustletSession *ts = getTrustletSession(sessionId);
        if (ts == NULL) {
            LOG_E("no session with id=%d", sessionId);
            return;
        }

        LOG_I(" Sending notification for session %d to MobiCore", sessionId);
    } else {
        LOG_I(" Sending MCP notification to MobiCore");
    }

    // Notify MobiCore about new data

    notification_t notification = {
        .sessionId = sessionId,
        .payload = 0
    };

    nq->putNotification(&notification);
    //IMPROVEMENT-2012-03-07-maneaval What happens when/if nsiq fails?
    //In the old days an exception would be thrown but it was uncertain
    //where it was handled, some server(sock or Netlink). In that case
    //the server would just die but never actually signaled to the client
    //any error condition
    nsiq();
}

//------------------------------------------------------------------------------
uint32_t TrustZoneDevice::getMobicoreStatus(void)
{
    uint32_t status;

    pMcKMod->fcInfo(1, &status, NULL);

    return status;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_hardware_samsung_slsi_exynos5,代码行数:44,代码来源:TrustZoneDevice.cpp

示例3: LOG_I

//------------------------------------------------------------------------------
mcResult_t CMcKMod::unlockWsmL2(uint32_t handle)
{
    int ret = 0;

    LOG_I(" Unlocking World Shared Memory with handle %d", handle);

    if (!isOpen()) {
        LOG_E("no connection to kmod");
        return MC_DRV_ERR_KMOD_NOT_OPEN;
    }

    ret = ioctl(fdKMod, MC_IO_UNLOCK_WSM, handle);
    // Failure here is not really important
    if (ret != 0) {
        LOG_I("ret = %d", ret);
    }

    return ret;
}
开发者ID:Fevax,项目名称:hardware_samsung_slsi,代码行数:20,代码来源:CMcKMod.cpp

示例4: CHECK_F

bool _AutoPilot::init(void* pKiss)
{
    CHECK_F(!this->_ThreadBase::init(pKiss));
    Kiss* pK = (Kiss*)pKiss;
    pK->m_pInst = this;

    //create action instance
    Kiss* pCC = pK->o("action");
    CHECK_T(pCC->empty());
    Kiss** pItr = pCC->getChildItr();

    int i = 0;
    while (pItr[i])
    {
        Kiss* pAction = pItr[i];
        i++;

        bool bInst = false;
        F_INFO(pAction->v("bInst", &bInst));
        if (!bInst)continue;
        if (m_nAction >= N_ACTION)LOG(FATAL);

        ActionBase** pA = &m_pAction[m_nAction];
        m_nAction++;

        //Add action modules below

        ADD_ACTION(RC_visualFollow);
        ADD_ACTION(APMcopter_landing);
        ADD_ACTION(APMcopter_guided);
        ADD_ACTION(HM_base);
        ADD_ACTION(HM_follow);
        ADD_ACTION(APMrover_base);
        ADD_ACTION(APMrover_follow);

        //Add action modules above

        LOG_E("Unknown action class: "+pAction->m_class);
    }

    return true;
}
开发者ID:yankailab,项目名称:OpenKAI,代码行数:42,代码来源:_AutoPilot.cpp

示例5: fuzz_runVerifier

static bool fuzz_runVerifier(honggfuzz_t * hfuzz, fuzzer_t * crashedFuzzer)
{
    bool ret = false;
    int crashFd = -1;
    uint8_t *crashBuf = NULL;
    off_t crashFileSz = 0;

    crashBuf = files_mapFile(crashedFuzzer->crashFileName, &crashFileSz, &crashFd, false);
    if (crashBuf == NULL) {
        LOG_E("Couldn't open and map '%s' in R/O mode", crashedFuzzer->crashFileName);
        goto bail;
    }

    LOG_I("Launching verifier for %" PRIx64 " hash", crashedFuzzer->backtrace);
    for (int i = 0; i < _HF_VERIFIER_ITER; i++) {
        fuzzer_t vFuzzer = {
            .pid = 0,
            .timeStartedMillis = util_timeNowMillis(),
            .crashFileName = {0},
            .pc = 0ULL,
            .backtrace = 0ULL,
            .access = 0ULL,
            .exception = 0,
            .dynamicFileSz = 0,
            .dynamicFile = NULL,
            .hwCnts = {
                       .cpuInstrCnt = 0ULL,
                       .cpuBranchCnt = 0ULL,
                       .pcCnt = 0ULL,
                       .pathCnt = 0ULL,
                       .customCnt = 0ULL,
                       },
            .sanCovCnts = {
                           .hitBBCnt = 0ULL,
                           .totalBBCnt = 0ULL,
                           .dsoCnt = 0ULL,
                           .iDsoCnt = 0ULL,
                           .newBBCnt = 0ULL,
                           .crashesCnt = 0ULL,
                           },
            .report = {'\0'},
            .mainWorker = false
开发者ID:quangnh89,项目名称:honggfuzz,代码行数:42,代码来源:fuzz.c

示例6: handle_cwGetGenericDeviceLogs

bool handle_cwGetGenericDeviceLogs(CAbstractPeer& peer, const char **pkt)
{
	int sizePkt = 0, devId, fromTime, decimation, numEntries, i, entriesWritten = 0;
	uint32_t entriesRead = 0;

	bool printHeader = true;

	if (!skipInt(pkt, &devId) ||
		!skipInt(pkt, &fromTime) ||
		!skipInt(pkt, &decimation) ||
		!skipInt(pkt, &numEntries)
	)
	{
		LOG_E( "Invalid pkg");
	}
	else
	{
		for(i=0; i < g_activeDevices.count(); i++)
		{
			if(devId == g_activeDevices[i]->m_ID)
			{
				sizePkt = m_snprintf(g_devScrapBuffer, sizeof(g_devScrapBuffer),
							"%d;%d;%d;", cwReplyGenericDeviceLogs,
							g_activeDevices[i]->m_deviceType, devId);

				do
				{
					sizePkt += deviceReadLog(devId, fromTime, decimation,
											 (char*)(g_devScrapBuffer + sizePkt), sizeof(g_devScrapBuffer) - sizePkt,
											 numEntries, printHeader, entriesWritten, entriesRead);

					fromTime = (fromTime/8192 + 1)*8192;
				}
				while( numEntries > entriesWritten && SystemClock.now(eTZ_UTC).toUnixTime() > fromTime);

				//LOG_I("cwGetGenericDeviceLogs %s", g_devScrapBuffer);
				peer.sendToPeer((const char*)g_devScrapBuffer, sizePkt);
				break;
			}
		}
	}
}
开发者ID:ADiea,项目名称:HA-8266,代码行数:42,代码来源:commWeb.cpp

示例7: LOG_E

//------------------------------------------------------------------------------
bool TrustZoneDevice::nsiq(
    void
)
{
    // There is no need to set the NON-IDLE flag here. Sending an N-SIQ will
    // make the MobiCore run until it could set itself to a state where it
    // set the flag itself. IRQs and FIQs are disbaled for this period, so
    // there is no way the NWd can interrupt here.

    // not needed: mcFlags->schedule = MC_FLAG_SCHEDULE_NON_IDLE;

    int32_t ret = pMcKMod->fcNSIQ();
    if (ret != 0) {
        LOG_E("pMcKMod->fcNSIQ() failed : %d", ret);
        return false;
    }
    // now we have to wake the scheduler, so MobiCore gets CPU time.
    schedSync.signal();
    return true;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_hardware_samsung_slsi_exynos5,代码行数:21,代码来源:TrustZoneDevice.cpp

示例8: malloc

char *str_sub (const char *s, unsigned int start, unsigned int end) {
   
  char *new_s = NULL;
  int i;
  
  if (s != NULL && start < end)   {
    new_s = malloc (sizeof (*new_s) * (end - start + 2));
    if (new_s != NULL) {
      for (i = start; i <= end; i++) {
	new_s[i-start] = s[i];
      }
      new_s[i-start] = '\0';
    }
    else {
	LOG_E(OTG,"Insufficient memory \n");
	exit (-1);
      }
  }
  return new_s;
}
开发者ID:mspublic,项目名称:openair4G-mirror,代码行数:20,代码来源:otg.c

示例9: mRAL_send_link_parameters_report_indication

//-----------------------------------------------------------------------------
void mRAL_send_link_parameters_report_indication(ral_ue_instance_t            instanceP,
    MIH_C_TRANSACTION_ID_T      *transaction_id_pP,
    MIH_C_LINK_TUPLE_ID_T       *link_identifier_pP,
    MIH_C_LINK_PARAM_RPT_LIST_T *link_parameters_report_list_pP)
{
  //-----------------------------------------------------------------------------
  MIH_C_Message_Link_Parameters_Report_indication_t  message;
  Bit_Buffer_t                             *bb_p;
  int                                       message_total_length;
  module_id_t                               mod_id = instanceP - NB_eNB_INST;

  bb_p = new_BitBuffer_0();
  BitBuffer_wrap(bb_p, g_msg_codec_send_buffer, (unsigned int)MSG_CODEC_SEND_BUFFER_SIZE);

  memset(&message, 0, sizeof (MIH_C_Message_Link_Parameters_Report_indication_t));

  message.header.version              = (MIH_C_VERSION_T)MIH_C_PROTOCOL_VERSION;
  message.header.service_identifier   = (MIH_C_SID_T)2;
  message.header.operation_code       = (MIH_C_OPCODE_T)3;
  message.header.action_identifier    = (MIH_C_AID_T)5;
  message.header.transaction_id       = *transaction_id_pP;


  MIH_C_MIHF_ID_set(&message.source, (u_int8_t*)g_ue_ral_obj[mod_id].link_id, strlen(g_ue_ral_obj[mod_id].link_id));

  MIH_C_MIHF_ID_set(&message.destination, (u_int8_t*)g_ue_ral_obj[mod_id].mihf_id, strlen(g_ue_ral_obj[mod_id].mihf_id));


  memcpy(&message.primitive.LinkIdentifier, link_identifier_pP, sizeof(MIH_C_LINK_TUPLE_ID_T));
  memcpy(&message.primitive.LinkParametersReportList_list, link_parameters_report_list_pP, sizeof(MIH_C_LINK_PARAM_RPT_LIST_T));

  message_total_length = MIH_C_Link_Message_Encode_Link_Parameters_Report_indication(bb_p, &message);

  if (mRAL_send_to_mih(instanceP, bb_p->m_buffer,message_total_length)<0) {
    LOG_E(RAL_UE, ": Send Link_Parameters_Report.indication\n");
  } else {
    LOG_D(RAL_UE, ": Sent Link_Parameters_Report.indication\n");
  }

  free_BitBuffer(bb_p);
}
开发者ID:awesome-security,项目名称:openairinterface5g,代码行数:42,代码来源:lteRALue_mih_msg.c

示例10: main

int main(int argc, char **argv) {
	struct sigaction action;
	int exitCode;
	parseArgs(argc,argv);
	initLogs();


	if (keepAsDaemon) {

		LOG_N("Trying to keep as a daemon...");

		if (daemon(false,false)<0) {
			LOG_E(strerror(errno));
			LOG_W("... continuing daemonless");

		} else {

			LOG_N("... Success ");
		}

	}

	memset(&action,0,sizeof(action));
	action.sa_handler =signalHandler;


	sigaction(SIGHUP,&action,NULL);
	sigaction(SIGTERM,&action,NULL);

//	signal(SIGHUP,signalHandler); /* catch hangup signal */
//	signal(SIGTERM,signalHandler); /* catch kill signal */



	exitCode = runMonitor();

	return exitCode;


	//return EXIT_SUCCESS;
}
开发者ID:hclander,项目名称:daemons,代码行数:41,代码来源:gpsd.c

示例11: mRAL_send_capability_discover_confirm

//-----------------------------------------------------------------------------
void mRAL_send_capability_discover_confirm(ral_ue_instance_t          instanceP,
    MIH_C_TRANSACTION_ID_T  *transaction_id_pP,
    MIH_C_STATUS_T          *status_pP,
    MIH_C_LINK_EVENT_LIST_T *supported_link_event_list_pP,
    MIH_C_LINK_CMD_LIST_T   *supported_link_command_list_pP)
{
  //-----------------------------------------------------------------------------
  MIH_C_Message_Link_Capability_Discover_confirm_t  message;
  Bit_Buffer_t                             *bb_p;
  int                                       message_total_length;
  module_id_t                               mod_id = instanceP - NB_eNB_INST;

  bb_p = new_BitBuffer_0();
  BitBuffer_wrap(bb_p, g_msg_codec_send_buffer, (unsigned int)MSG_CODEC_SEND_BUFFER_SIZE);

  memset(&message, 0, sizeof (MIH_C_Message_Link_Capability_Discover_confirm_t));

  message.header.version              = (MIH_C_VERSION_T)MIH_C_PROTOCOL_VERSION;
  message.header.service_identifier   = (MIH_C_SID_T)1;
  message.header.operation_code       = (MIH_C_OPCODE_T)0;
  message.header.action_identifier    = (MIH_C_AID_T)1;
  message.header.transaction_id       = *transaction_id_pP;


  MIH_C_MIHF_ID_set(&message.source, (u_int8_t*)g_ue_ral_obj[mod_id].link_id, strlen(g_ue_ral_obj[mod_id].link_id));
  MIH_C_MIHF_ID_set(&message.destination, (u_int8_t*)g_ue_ral_obj[mod_id].mihf_id, strlen(g_ue_ral_obj[mod_id].mihf_id));

  message.primitive.Status                   = *status_pP;
  message.primitive.SupportedLinkEventList   = supported_link_event_list_pP;
  message.primitive.SupportedLinkCommandList = supported_link_command_list_pP;

  message_total_length = MIH_C_Link_Message_Encode_Capability_Discover_confirm(bb_p, &message);

  if (mRAL_send_to_mih(instanceP, bb_p->m_buffer,message_total_length)<0) {
    LOG_E(RAL_UE, ": Send Link_Capability_Discover.confirm\n");
  } else {
    LOG_D(RAL_UE, ": Sent Link_Capability_Discover.confirm\n");
  }

  free_BitBuffer(bb_p);
}
开发者ID:awesome-security,项目名称:openairinterface5g,代码行数:42,代码来源:lteRALue_mih_msg.c

示例12: while

void *receive_thread(void *args) {

  flexran_agent_instance_t         *d = args;
  void                  *data;
  int                   size;
  int                   priority;
  err_code_t             err_code;

  Protocol__FlexranMessage *msg;
  
  while (1) {

    while (flexran_agent_msg_recv(d->enb_id, FLEXRAN_AGENT_DEFAULT, &data, &size, &priority) == 0) {
      
      LOG_D(FLEXRAN_AGENT,"received message with size %d\n", size);
  
      // Invoke the message handler
      msg=flexran_agent_handle_message(d->enb_id, data, size);

      free(data);
    
      // check if there is something to send back to the controller
      if (msg != NULL){
	data=flexran_agent_pack_message(msg,&size);

	if (flexran_agent_msg_send(d->enb_id, FLEXRAN_AGENT_DEFAULT, data, size, priority)) {
	  err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENQUEUING;
	  goto error;
	}
      
	LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
      } 
    }
  }
    
  return NULL;

error:
  LOG_E(FLEXRAN_AGENT,"receive_thread: error %d occured\n",err_code);
  return NULL;
}
开发者ID:ShibinMathew36,项目名称:OAI-step,代码行数:41,代码来源:flexran_agent.c

示例13: send_chopstick_query_req

int send_chopstick_query_req(void* entity)
{
    if (!entity) return FSM_FAIL;

    CVTTO_PHILOS(phi, entity);
    LOG_D("---%s need chopstick---fsmid[%d]", phi->philos->name, phi->fsmid);
    int chop_idx;
    if (phi->chops[0] == -1){
        chop_idx = QUERY_LEFT(phi->philos->whoami);
        LOG_D("philos[%d] needs left chop[%d]", phi->philos->whoami, chop_idx);
    }
    else if (phi->chops[1] == -1){
        chop_idx = QUERY_RIGHT(phi->philos->whoami);
        LOG_D("philos[%d] needs right chop[%d]", phi->philos->whoami, chop_idx);
    }
    else {
        LOG_E("No need to get chopstick,fsm[%d]", phi->fsmid);
        return FSM_FAIL;
    }
    
    msg_t * m = pack_chop_req_msg(chop_idx, GET, phi->fsmid);

    int ret = fsm_entity_start_timer(entity, QUERY_CHOP_TM, QUERY_CHOPSTICK_TIMEOUT);
    if (0 != ret){
        LOG_NE("start timer failed");
        free (m);
        return FSM_FAIL;
    }

    if (SM_OK != send_msg(m)){
        perror("send msg failed");
        LOG_NE("send msg failed");
        return FSM_FAIL;
    }

    phi->nextjump = proc_chopstick_query_resp;
    philos_set_status(phi->philos, BUSY);

    LOG_D("send chopstick query req success. fsmid[%d]", phi->fsmid);
    return FSM_OK;
}
开发者ID:yangluoshen,项目名称:FSM,代码行数:41,代码来源:philosfsm.c

示例14: copy

void Hotkey::BuildHotkey(std::string const& context, json::Object const& hotkeys) {
	for (auto const& command : hotkeys) {
		const json::Array& command_hotkeys = command.second;

		for (auto const& hotkey : command_hotkeys) {
			std::vector<std::string> keys;

			try {
				const json::Array& arr_mod = hotkey["modifiers"];
				keys.reserve(arr_mod.size() + 1);
				copy(arr_mod.begin(), arr_mod.end(), back_inserter(keys));
				keys.push_back(hotkey["key"]);
			}
			catch (json::Exception const& e) {
				LOG_E("agi/hotkey/load") << "Failed loading hotkey for command '" << command.first << "': " << e.what();
			}

			ComboInsert(Combo(context, command.first, keys));
		}
	}
}
开发者ID:metkaz,项目名称:Aegisub,代码行数:21,代码来源:hotkey.cpp

示例15: nas_ue_process_events

static int nas_ue_process_events(struct epoll_event *events, int nb_events)
{
  int event;
  int exit_loop = FALSE;

  LOG_I(NAS, "[UE] Received %d events\n", nb_events);

  for (event = 0; event < nb_events; event++) {
    if (events[event].events != 0)
    {
      /* If the event has not been yet been processed (not an itti message) */
      if (events[event].data.fd == user_fd) {
        exit_loop = nas_user_receive_and_process(&user_fd, NULL);
      } else {
        LOG_E(NAS, "[UE] Received an event from an unknown fd %d!\n", events[event].data.fd);
      }
    }
  }

  return (exit_loop);
}
开发者ID:mspublic,项目名称:openair4G-mirror,代码行数:21,代码来源:nas_ue_task.c


注:本文中的LOG_E函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。