本文整理汇总了C++中LOG_I函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_I函数的具体用法?C++ LOG_I怎么用?C++ LOG_I使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG_I函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ClearActiveD2Ds
static void ClearActiveD2Ds(void)
{
unsigned int i;
LOG_I("%s: Enter.", __func__);
for (i = 0; i < ARRAY_SIZE(u8540_d2ds); i++) {
u8540_d2ds[i].active = false;
}
}
示例2: open_chardev
static int open_chardev(void)
{
LOG_I("Enter.");
if (chardev_fd >= 0) {
LOG_I("Char-dev already open!");
return 0;
}
chardev_fd = open("/dev/" CG2900_AUDIO_DEVICE_NAME, O_RDWR);
if (chardev_fd < 0) {
LOG_E("ERROR: Failed to open device (%s)!", strerror(errno));
return -1;
} else {
return 0;
}
}
示例3: new_module
/*!\fn openair0_device new_module (unsigned int id, dev_type_t type)
* \brief this function
* \param[in]
* \param[out]
* \return
* \note
* @ingroup _oai
*/
static rrh_module_t new_module (unsigned int id) {
rrh_module_t rrh_mod;
openair0_config_t openair0_cfg;
rrh_mod.id=id;
rrh_mod.loopback=loopback_flag;
rrh_mod.measurements=measurements_flag;
/* each module is associated with an ethernet device */
rrh_mod.eth_dev.type=ETH_IF;
rrh_mod.eth_dev.func_type=RRH_FUNC;
get_ip_address(if_name);
openair0_cfg.my_ip=&rrh_ip[0];
openair0_cfg.my_port=rrh_port;
/* ethernet device initialization */
if (openair0_dev_init_eth(&rrh_mod.eth_dev, &openair0_cfg)<0){
LOG_E(RRH,"Exiting, cannot initialize ethernet interface.\n");
exit(-1);
}
/* specify associated RF device */
openair0_device *oai_dv = (openair0_device *)malloc(sizeof(openair0_device));
memset(oai_dv,0, sizeof(openair0_device));
#ifdef EXMIMO
rrh_mod.devs=oai_dv;
rrh_mod.devs->type=EXMIMO_IF;
LOG_I(RRH,"Setting RF device to EXMIMO\n");
#elif OAI_USRP
rrh_mod.devs=oai_dv;
rrh_mod.devs->type=USRP_IF;
LOG_I(RRH,"Setting RF device to USRP\n");
#elif OAI_BLADERF
rrh_mod.devs=oai_dv;
rrh_mod.devs->type=BLADERF_IF;
LOG_I(RRH,"Setting RF device to BLADERF\n");
#else
rrh_mod.devs=oai_dv;
rrh_mod.devs->type=NONE_IF;
LOG_I(RRH,"Setting RF interface to NONE_IF... \n");
#endif
return rrh_mod;
}
示例4: main
int main()
{
ScUuid * uuid1 = NULL;
ScUuid * uuid2 = NULL;
ScUuid * uuid3 = NULL;
//char p1[SC_UUID_LEN] = { 0 };
//char p2[SC_UUID_LEN] = { 0 };
//char p3[SC_UUID_LEN] = { 0 };
LOG_OPEN(NULL);
uuid1 = ScUuid_New();
ScUuid_GenerateRandom(uuid1);
LOG_I("test", "UUID 1: %s", ScUuid_ToString(uuid1, true));
uuid2 = ScUuid_New();
ScUuid_GenerateRandom(uuid2);
LOG_I("test", "UUID 2: %s", ScUuid_ToString(uuid2, true));
LOG_I("test", "UUID 2: %s", ScUuid_ToString(uuid2, false));
LOG_I("test", "UUID1 and UUID2 is %s", ScUuid_Equal(uuid1, uuid2) ? "equal" : "not equal");
ScUuid_Clear(uuid1);
LOG_I("test", "UUID1 clear, UUID1 : %s", ScUuid_IsNull(uuid1) ? "is NULL" : "is Not NULL");
LOG_I("test", "UUID1 and UUID2 is %s", ScUuid_Equal(uuid1, uuid2) ? "equal" : "not equal");
uuid3 = ScUuid_New();
ScUuid_Copy(uuid3, uuid2);
LOG_I("test", "clone from UUID2, UUID3: %s", ScUuid_ToString(uuid3, true));
LOG_I("test", "UUID2 and UUID3 is %s", ScUuid_Equal(uuid2, uuid3) ? "equal" : "not equal");
test_uuid("4A5BFD77-D452-4492-B973-69198200339", false);
test_uuid("84949cc5-4701-4a84-895b-354c584a981b", true);
test_uuid("84949SC5-4701-4A84-895B-354C584A981B", true);
test_uuid("84949cc5-4701-4a84-895b-354c584a981bc", false);
test_uuid("84949cc5-4701-4a84-895b-354c584a981", false);
test_uuid("84949cc5x4701-4a84-895b-354c584a981b", false);
test_uuid("84949cc504701-4a84-895b-354c584a981b", false);
test_uuid("84949cc5-470104a84-895b-354c584a981b", false);
test_uuid("84949cc5-4701-4a840895b-354c584a981b", false);
test_uuid("84949cc5-4701-4a84-895b0354c584a981b", false);
test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", false);
test_uuid("84949cc5-4701-4a84-895b-354c584a981g", false);
ScUuid_Delete(uuid1);
ScUuid_Delete(uuid2);
ScUuid_Delete(uuid3);
LOG_CLOSE();
return 0;
}
示例5: LOG_I
//------------------------------------------------------------------------------
void MobiCoreDriverDaemon::run(
void
) {
LOG_I("Daemon starting up...");
LOG_I("Socket interface version is %u.%u", DAEMON_VERSION_MAJOR, DAEMON_VERSION_MINOR);
#ifdef MOBICORE_COMPONENT_BUILD_TAG
LOG_I("%s", MOBICORE_COMPONENT_BUILD_TAG);
#else
#warning "MOBICORE_COMPONENT_BUILD_TAG is not defined!"
#endif
LOG_I("Build timestamp is %s %s", __DATE__, __TIME__);
int i;
mobiCoreDevice = getDeviceInstance();
LOG_I("Daemon scheduler is %s", enableScheduler? "enabled" : "disabled");
if(!mobiCoreDevice->initDevice(
MC_DRV_MOD_DEVNODE_FULLPATH,
loadMobicore,
mobicoreImage.c_str(),
enableScheduler)) {
LOG_E("%s: Failed to initialize MobiCore!", __FUNCTION__);
return;
}
mobiCoreDevice->start();
checkMobiCoreVersion(mobiCoreDevice);
if (donateRamSize > 0) {
// Donate additional RAM to MC
LOG_I("Donating %u Kbytes to Mobicore", donateRamSize / 1024);
mobiCoreDevice->donateRam(donateRamSize);
}
// Load device driver if requested
if (loadDriver) {
loadDeviceDriver(driverPath);
}
LOG_I("Servers will be created!");
// Start listening for incoming TLC connections
servers[0] = new NetlinkServer(this);
servers[1] = new Server(this, SOCK_PATH);
LOG_I("Servers created!");
// Start all the servers
for (i = 0; i < MAX_SERVERS; i++) {
servers[i]->start();
}
// then wait for them to exit
for (i = 0; i < MAX_SERVERS; i++) {
servers[i]->join();
}
}
示例6: start_stream
static int start_stream(enum cg2900_audio_endpoint_id ep1,
enum cg2900_audio_endpoint_id ep2)
{
LOG_I("Enter.");
int error = 0;
unsigned int data[2];
unsigned char *buf;
size_t len;
ssize_t r;
if (stream_handle != 0xffffffff) {
LOG_I("Tear down old stream.");
/* tear down old stream first */
stop_stream();
}
len = 4 + sizeof(ep1) + sizeof(ep2);
buf = (unsigned char *)malloc(len);
if (!buf) {
LOG_E("Error: Out of memory!");
return -1;
}
memset(buf, 0, len);
buf[0] = CHAR_DEV_OP_CODE_CONNECT_AND_START_STREAM;
memcpy(buf + 4, &ep1, sizeof(ep1));
memcpy(buf + 4 + sizeof(ep1), &ep2, sizeof(ep2));
r = write(chardev_fd, buf, len);
free(buf);
if (r != (ssize_t)len) {
LOG_E("ERROR: Start stream failed (%s)", (r < 0) ? strerror(errno) : "Internal error");
return -1;
}
r = read(chardev_fd, data, sizeof(data));
if ((unsigned int)r < sizeof(data)) {
LOG_E("ERROR: Start stream failed (%s)!", (r < 0) ? strerror(errno) : "Internal error");
error = -1;
} else {
stream_handle = data[1];
}
return error;
}
示例7: LOG_V
Encode_Status VideoEncoderH263::renderSliceParams(EncodeTask *task) {
VAStatus vaStatus = VA_STATUS_SUCCESS;
uint32_t sliceHeight;
uint32_t sliceHeightInMB;
LOG_V("Begin\n\n");
sliceHeight = mComParams.resolution.height;
sliceHeight += 15;
sliceHeight &= (~15);
sliceHeightInMB = sliceHeight / 16;
vaStatus = vaCreateBuffer(
mVADisplay, mVAContext,
VAEncSliceParameterBufferType,
sizeof(VAEncSliceParameterBuffer),
1, NULL, &mSliceParamBuf);
CHECK_VA_STATUS_RETURN("vaCreateBuffer");
VAEncSliceParameterBuffer *sliceParams;
vaStatus = vaMapBuffer(mVADisplay, mSliceParamBuf, (void **)&sliceParams);
CHECK_VA_STATUS_RETURN("vaMapBuffer");
// starting MB row number for this slice
sliceParams->start_row_number = 0;
// slice height measured in MB
sliceParams->slice_height = sliceHeightInMB;
sliceParams->slice_flags.bits.is_intra = (task->type == FTYPE_I)?1:0;
sliceParams->slice_flags.bits.disable_deblocking_filter_idc = 0;
LOG_V("======h263 slice params======\n");
LOG_I("start_row_number = %d\n", (int) sliceParams->start_row_number);
LOG_I("slice_height_in_mb = %d\n", (int) sliceParams->slice_height);
LOG_I("slice.is_intra = %d\n", (int) sliceParams->slice_flags.bits.is_intra);
vaStatus = vaUnmapBuffer(mVADisplay, mSliceParamBuf);
CHECK_VA_STATUS_RETURN("vaUnmapBuffer");
vaStatus = vaRenderPicture(mVADisplay, mVAContext, &mSliceParamBuf, 1);
CHECK_VA_STATUS_RETURN("vaRenderPicture");
LOG_V("end\n");
return ENCODE_SUCCESS;
}
示例8: packet_gen_socket
char* packet_gen_socket(int src, int dst, int state, int ctime){
int size;
char *payload=NULL;
set_ctime(ctime);
LOG_I(OTG,"SOCKET :: num_nodes_tx:: %d , seed:: %d \n", g_otg->num_nodes, g_otg->seed);
LOG_I(OTG,"SOCKET :: NODE_INFO (Source= %d, Destination= %d,State= %d) ctime %d \n", src, dst, state, otg_info->ctime);
LOG_I(OTG,"SOCKET :: INFO_SIM (src=%d, dst=%d, state=%d) application=%d, idt dist =%d, pkts dist= %d\n", src, dst, state, g_otg->application_type[src][dst], g_otg->idt_dist[src][dst][state], g_otg->size_dist[src][dst][state]);
LOG_I(OTG,"SOCKET :: Transmission info: idt=%d, simulation time=%d \n", otg_info->idt[src][dst], ctime);
// do not generate packet for this pair of src, dst : no app type and/or idt are defined
if ((g_otg->application_type[src][dst] == 0) && (g_otg->idt_dist[src][dst][0] == 0)){
LOG_I(OTG,"SOCKET :: Do not generate packet for this pair of src=%d, dst =%d: no app type and/or idt are defined\n", src, dst);
return 0;
}
//pre-config for the standalone
if (ctime<otg_info->ptime[src][dst][state]) //it happends when the emulation was finished
otg_info->ptime[src][dst][state]=ctime;
if (ctime==0)
otg_info->idt[src][dst]=0; //for the standalone mode: the emulation is run several times, we need to initialise the idt to 0 when ctime=0
//end pre-config
if ((otg_info->idt[src][dst]==(ctime-otg_info->ptime[src][dst][state])) || (otg_info->idt[src][dst]==0)) {
LOG_I(OTG,"SOCKET :: Time To Transmit (Source= %d, Destination= %d,State= %d) , (IDT= %d ,simu time= %d, previous packet time= %d) \n", src, dst, state ,otg_info->idt[src][dst], ctime, otg_info->ptime[src][dst][state]);
otg_info->ptime[src][dst][state]=ctime;
otg_info->idt[src][dst]=time_dist(src, dst, state); // update the idt for the next otg_tx
}
else {
LOG_I(OTG,"SOCKET :: It is not the time to transmit (ctime= %d, previous time=%d, packet idt=%d), node( %d,%d) \n", ctime,otg_info->ptime[src][dst][state], otg_info->idt[src][dst], src, dst);
return 0; // do not generate the packet, and keep the idt
}
size=size_dist(src, dst, state);
LOG_I(OTG,"SOCKET :: Generate Packet for (Source= %d, Destination= %d,State= %d) , pkt size dist= %d, simu time= %d ,packet size=%d \n",
src, dst, state, g_otg->size_dist[src][dst][state], otg_info->ctime, size);
if (size>(5* sizeof(int)))
size=size-(5* sizeof(int));
else
size=(5* sizeof(int))+10;
payload=payload_pkts(size);
return(payload);
}
示例9: rx_loss_rate_bytes
void rx_loss_rate_bytes(int src, int dst, int application){
if (otg_info->rx_num_pkt[src][dst][application]<otg_info->tx_num_pkt[src][dst][application])
otg_info->rx_loss_rate[src][dst][application]= 1 - ((double)otg_info->rx_num_bytes[src][dst][application]/otg_info->tx_num_bytes[src][dst][application]);
else
otg_info->rx_loss_rate[src][dst][application]=0;
LOG_I(OTG, "loss rate (src=%d, dst=%d, appli %d ):: = %lf(bytes) \n",src, dst, application, otg_info->rx_loss_rate[src][dst][application]);
}
示例10: LOG_I
OMX_BOOL AlsaSink::isPcmProbeEnabled(OMX_U32 portIdx)
{
LOG_I("Enter.\n");
if (portIdx > 1)
return OMX_FALSE;
return mPcmProbeEnabled[portIdx];
}
示例11: minus
// -------------------------------------------------------------
mcResult_t minus(uint32_t *num1, uint32_t *num2, uint32_t *result)
{
mcResult_t ret;
LOG_I("Foo perform minus (%d) - (%d)", *num2, *num1);
ret = executeCmd(num1, num2, result, CMD_FOO_SUB);
if (ret != RET_OK)
{
LOG_E("Unable to execute CMD_FOO_SUB command: %d", ret);
goto exit;
}
LOG_I("The result is %d", *result);
exit:
return ret;
}
示例12: add
// -------------------------------------------------------------
mcResult_t add(uint32_t *num1, uint32_t *num2, uint32_t *result)
{
mcResult_t ret;
LOG_I("Foo perform addition (%d) + (%d)", *num1, *num2);
ret = executeCmd(num1, num2, result, CMD_FOO_ADD);
if (ret != RET_OK)
{
LOG_E("Unable to execute CMD_FOO_ADD command: %d", ret);
goto exit;
}
LOG_I("The result is %d", *result);
exit:
return ret;
}
示例13: testUtf8
void testUtf8(){
std::string chutf8 = "这是一个字符串";
auto s = XUtf8::utf8ToUnicode(chutf8);
LOG_I(s.c_str());
std::string utf8 = XUtf8::unicodeToUtf8("0x8fd9");
LOG_I(utf8.c_str());
byte buffer[] = {0350, 0377, 0231};
bool isValid = XUtf8::isValidUtf8Buffer(buffer, 3);
LOG_I(u8"🌸%d",isValid);
for(byte b = 0 ; b< byte_max ; b++){
LOG_I(" %d len %d",b,XUtf8::getUtf8ByteLen(b));
}
//
// auto pre0 = XUtf8::findPrefixUtf8("你瞧�瞧");
// auto pre1 = XUtf8::findPrefixUtf8("你瞧瞧332");
// LOG_I(XUtf8::findPrefixUtf8("你瞧�瞧").c_str());
// LOG_I(XUtf8::findPrefixUtf8("你瞧瞧332").c_str());
}
示例14: LOG_I
bool
FlyWebPublishedServerChild::RecvServerReady(const nsresult& aStatus)
{
LOG_I("FlyWebPublishedServerChild::RecvServerReady(%p)", this);
MOZ_ASSERT(mActorExists);
PublishedServerStarted(aStatus);
return true;
}
示例15: cmdlineVerify
static bool cmdlineVerify(honggfuzz_t* hfuzz) {
if (!cmdlineCheckBinaryType(hfuzz)) {
LOG_E("Couldn't test binary for signatures");
return false;
}
if (!hfuzz->exe.fuzzStdin && !hfuzz->exe.persistent &&
!checkFor_FILE_PLACEHOLDER(hfuzz->exe.cmdline)) {
LOG_E("You must specify '" _HF_FILE_PLACEHOLDER
"' if the -s (stdin fuzzing) or --persistent options are not set");
return false;
}
if (hfuzz->exe.fuzzStdin && hfuzz->exe.persistent) {
LOG_E(
"Stdin fuzzing (-s) and persistent fuzzing (-P) cannot be specified at the same time");
return false;
}
if (hfuzz->threads.threadsMax >= _HF_THREAD_MAX) {
LOG_E("Too many fuzzing threads specified %zu (>= _HF_THREAD_MAX (%u))",
hfuzz->threads.threadsMax, _HF_THREAD_MAX);
return false;
}
if (strchr(hfuzz->io.fileExtn, '/')) {
LOG_E("The file extension contains the '/' character: '%s'", hfuzz->io.fileExtn);
return false;
}
if (hfuzz->io.workDir == NULL) {
hfuzz->io.workDir = ".";
}
if (mkdir(hfuzz->io.workDir, 0700) == -1 && errno != EEXIST) {
PLOG_E("Couldn't create the workspace directory '%s'", hfuzz->io.workDir);
return false;
}
if (hfuzz->io.crashDir == NULL) {
hfuzz->io.crashDir = hfuzz->io.workDir;
}
if (mkdir(hfuzz->io.crashDir, 0700) && errno != EEXIST) {
PLOG_E("Couldn't create the crash directory '%s'", hfuzz->io.crashDir);
return false;
}
if (hfuzz->mutate.mutationsPerRun == 0U && hfuzz->cfg.useVerifier) {
LOG_I("Verifier enabled with mutationsPerRun == 0, activating the dry run mode");
}
if (hfuzz->mutate.maxFileSz > _HF_INPUT_MAX_SIZE) {
LOG_E("Maximum file size '%zu' bigger than the maximum size '%zu'", hfuzz->mutate.maxFileSz,
(size_t)_HF_INPUT_MAX_SIZE);
return false;
}
return true;
}