• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MSG_DEBUG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: MSG_DEBUG

void GraphCanvas::DrawGraph(uint i, float xmax, float xmin,
                            int x, float xscale,
                            int y, float yscale) const
{
  const Result &res = results[i];
  const Color& color = res.color;

  if (!res.list.size()) {
    MSG_DEBUG("menu", "   No point !?!");
    return;
  }

  int sx = x+int((res.list[0].first-xmin)*xscale)+thickness,
      sy = y-int(res.list[0].second*yscale);
  Surface &surface = GetMainWindow();
  MSG_DEBUG("menu", "   First point: (%.3f,%.3f) -> (%i,%i)",
            res.list[0].first, res.list[0].second, sx, sy);

  for (uint i=0; i<res.list.size(); i++) {
    const Value& val = res.list[i];
    int ex = x+int((val.first-xmin)*xscale),
        ey = y-int(val.second*yscale);

    MSG_DEBUG("menu", "   Next point: (%.3f,%.3f) -> (%i,%i)",
              val.first, val.second, ex, ey);
    surface.BoxColor(Rectanglei(sx, sy, ex-sx, thickness), color);
    surface.BoxColor(Rectanglei(ex, std::min(sy,ey), thickness, abs(ey-sy)), color);

    sx = ex;
    sy = ey;
  }

  // Missing point
  if (res.list[res.list.size()-1].first < xmax) {
    int ex = x+int((xmax-xmin)*xscale);
    MSG_DEBUG("menu", "   Last point -> (%i,%i)", ex, sy);
    surface.BoxColor(Rectanglei(sx, sy, ex-sx, thickness), color);
  }
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:39,代码来源:graph_canvas.cpp


示例2: intermediate_close

/**
 * \brief Close intermediate plugin
 *
 * \param[in] config plugin configuration
 * \return 0 on success
 */
int intermediate_close(void *config)
{
	MSG_DEBUG(msg_module, "CLOSING");
	plugin_conf *conf = static_cast<plugin_conf*>(config);
	
	/* Force update counters */
	stats_flush_counters(conf, true);

	/* Destroy configuration */
	delete conf;

	return 0;
}
开发者ID:rickhofstede,项目名称:ipfixcol,代码行数:19,代码来源:stats.cpp


示例3: OBJ_ASSERT

bool CXsiObjConverter::DotXSILoadModel(CSLModel* pModel, std::string& modelName)
{
	OBJ_ASSERT(pModel);
	if(!pModel)
		return false;

	// Get the model's name
	modelName = pModel->GetName();

	MSG_DEBUG("Model Name: " << modelName);

	return true;
}
开发者ID:azunite,项目名称:3d-converter,代码行数:13,代码来源:xsiObjConverter.cpp


示例4: prctl

/**
 * \brief Main loop
 */
void Scanner::loop()
{
	prctl(PR_SET_NAME, "fbitexp:Scanner\0", 0, 0, 0);
	
	std::mutex mtx;
	std::unique_lock<std::mutex> lock(mtx);
	
	MSG_DEBUG(msg_module, "started");
	
	while (!_done) {
		/* 
		 * This is before waiting because we want to check size on startup before 
		 * any scan or add requests
		 */
		if (totalSize() > _max_size) {
			removeDirs();
		}
		
		MSG_DEBUG(msg_module, "Total size: %s, Max: %s, Watermark: %s", 
			sizeToStr(totalSize()).c_str(), sizeToStr(_max_size).c_str(), sizeToStr(_watermark).c_str());
		_cv.wait(lock, [&]{ return scanCount() > 0 || addCount() > 0 || _done || totalSize() > _max_size; });
		
		if (_done) {
			break;
		}
		
		/* Add dirs from queue */
		if (addCount() > 0) {
			addNewDirs();
		}
		
		/* Scan dirs in queue */
		if (scanCount() > 0) {
			rescanDirs();
		}
	}
	
	MSG_DEBUG(msg_module, "closing thread");
}
开发者ID:ADTRAN,项目名称:ipfixcol,代码行数:42,代码来源:Scanner.cpp


示例5: MSG_DEBUG

void ObjectsList::PlaceBarrels()
{
  MSG_DEBUG("lst_objects","Placing barrels");
  for (uint i= 0; i<ActiveMap()->LoadedData()->GetNbBarrel(); ++i)
  {
    PetrolBarrel *obj = new PetrolBarrel();

    if (obj->PutRandomly(false, 20.0))
      push_back(obj);
    else
      delete obj;
  }
}
开发者ID:yeKcim,项目名称:warmux,代码行数:13,代码来源:objects_list.cpp


示例6: MSG_DEBUG

/**
 * \brief Compute directory size
 * 
 * \param path Directory path
 * \param recursive If true, recursively compute size of subfolders
 * \return Directory size in bytes
 */
uint64_t Directory::dirSize(std::string path, bool force, bool recursive, bool writestats)
{
	std::string entry_path, entry_name;
	struct dirent *entry;
	struct stat st;
	uint64_t size{0};
	
	MSG_DEBUG(msg_module, "scanning %s", path.c_str());     
	
	std::string statsfile(path + "/stats.txt");
	if (!force && stat(statsfile.c_str(), &st)) {
		/* stats.txt not exists - force scan*/
		force = true;
	}
	
	if (!force) {
		MSG_DEBUG(msg_module, "reading %s", statsfile.c_str());
		std::ifstream sfile(statsfile, std::ios::in);
		sfile >> size;
		sfile.close();
		return size;
	}
开发者ID:ADTRAN,项目名称:ipfixcol,代码行数:29,代码来源:Directory.cpp


示例7: MSG_DEBUG

void Single_Scene::outpost_notice_exit(const int64_t monster_role_id, bool clear_single){
	if(monster_role_id != 0){
		Mover* mover = this->find_mover_with_layer(0, monster_role_id);
		if(mover && mover->monster_self()){
			mover->exit_move_scene();
		}
	}
	if(clear_single){
		this->set_scene_status(Move_Scene::SCENE_RECOVER_STATUS);
		MSG_DEBUG("single scene recover outpost notice, scene id:%ld", this->scene_id());
		recover_time_ = Time_Value::zero;
	}
}
开发者ID:tidaybreak,项目名称:game-server,代码行数:13,代码来源:Single_Scene.cpp


示例8: MsgGetMsgTypeHandler

int MsgGetMsgTypeHandler(const MSG_CMD_S *pCmd, char **ppEvent)
{
	msg_error_t err = MSG_SUCCESS;

	char* encodedData = NULL;
	AutoPtr<char> buf(&encodedData);


	int dataSize = 0, eventSize = 0;

	// Get Message ID
	msg_message_id_t msgId;

	memcpy(&msgId, (void*)((char*)pCmd+sizeof(MSG_CMD_TYPE_T)+MAX_COOKIE_LEN), sizeof(msg_message_id_t));

	// Get Msg Type
	MSG_MESSAGE_TYPE_S msgType;

	err = MsgStoGetMsgType(msgId, &msgType);

	if (err == MSG_SUCCESS)
	{
		MSG_DEBUG("Command Handle Success : MsgStoGetMsgType()");

		// Encoding Storage List Data
		dataSize = MsgEncodeMsgType(&msgType, &encodedData);

	}
	else
	{
		MSG_DEBUG("Command Handle Fail : MsgStoGetMsgType()");
	}

	// Make Event Data
	eventSize = MsgMakeEvent(encodedData, dataSize, MSG_EVENT_GET_MSG_TYPE, err, (void**)ppEvent);

	return eventSize;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:38,代码来源:MsgCmdHandlerStorage.cpp


示例9: MsgCountMsgByContactHandler

int MsgCountMsgByContactHandler(const MSG_CMD_S *pCmd, char **ppEvent)
{
	msg_error_t err = MSG_SUCCESS;

	// Get From address
	MSG_THREAD_LIST_INDEX_S addrInfo;

	memcpy(&addrInfo, (void*)((char*)pCmd+sizeof(MSG_CMD_TYPE_T)+MAX_COOKIE_LEN), sizeof(MSG_THREAD_LIST_INDEX_S));

	char* encodedData = NULL;
	AutoPtr<char> buf(&encodedData);

	int dataSize = 0, eventSize = 0;

	// Get Message Common Info
	MSG_THREAD_COUNT_INFO_S threadCountInfo = {0};

	err = MsgStoCountMsgByContact(&addrInfo, &threadCountInfo);

	if (err == MSG_SUCCESS)
	{
		MSG_DEBUG("Command Handle Success : MsgStoCountMsgByContact()");

		// Encoding Folder View List Data
		dataSize = MsgEncodeMsgGetContactCount(&threadCountInfo, &encodedData);

		MSG_DEBUG("dataSize [%d]", dataSize);
	}
	else
	{
		MSG_DEBUG("Command Handle Fail : MsgStoCountMsgByContact()");
	}

	// Make Event Data
	eventSize = MsgMakeEvent(encodedData, dataSize, MSG_EVENT_GET_CONTACT_COUNT, err, (void**)ppEvent);

	return eventSize;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:38,代码来源:MsgCmdHandlerStorage.cpp


示例10: MsgSoundGetUnreadMsgCnt

int MsgSoundGetUnreadMsgCnt()
{
	int unreadCnt = 0;

	/*  Get SMS Count */
	unreadCnt = MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_SMS_STATE);

	/*  Get MMS Count */
	unreadCnt += MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_MMS_STATE);

	MSG_DEBUG("unread count : [%d]", unreadCnt);

	return unreadCnt;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:14,代码来源:MsgSoundPlayer.cpp


示例11: MsgSoundPlayCallback

static int MsgSoundPlayCallback(int message, void *param, void *user_param)
{
	switch (message)
	{
		case MM_MESSAGE_ERROR:
			MSG_DEBUG("ERROR is happened.");
			g_idle_add (MsgUninitAndExit, NULL);
			break;
		case MM_MESSAGE_BEGIN_OF_STREAM:
			MSG_DEBUG("Play is started.");
			break;
		case MM_MESSAGE_END_OF_STREAM:
		case MM_MESSAGE_STATE_INTERRUPTED:
			MSG_DEBUG("EOS or Interrupted.");
			g_idle_add (MsgStopAndExit, NULL);
			break;
		default:
			MSG_DEBUG("message = %d", message);
			break;
	}

	return 1;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:23,代码来源:MsgSoundPlayer.cpp


示例12: MsgSettingGetString

char* MsgSettingGetString(const char *pKey)
{
	if (pKey == NULL)
	{
		MSG_DEBUG("IN Parameter is NULL");
		return NULL;
	}

#ifdef USE_GCONF
	return gconf_client_get_string((GConfClient*)pClient, pKey, NULL);
#else
	return vconf_get_str(pKey);
#endif
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:14,代码来源:MsgGconfWrapper.cpp


示例13: calloc

/**
 * \brief Create new maintainer of an Observation Domain ID
 * \param[in] odid Observation Domain ID (ODID)
 * \return Pointer or NULL
 */
static fwd_odid_t *fwd_odid_create(uint32_t odid)
{
	fwd_odid_t *res = calloc(1, sizeof(*res));
	if (!res) {
		MSG_ERROR(msg_module, "Memory allocation failed (%s:%d)",
			__FILE__, __LINE__);
		return NULL;
	}

	res->odid = odid;

	MSG_DEBUG(msg_module, "ODID %" PRIu32 " maintainer created.", odid);
	return res;
}
开发者ID:SecDorks-TorchSis,项目名称:ipfixcol,代码行数:19,代码来源:templates.c


示例14: IsDead

void PhysicalObj::Ghost()
{
  if (m_alive == GHOST)
    return;

  bool was_dead = IsDead();
  m_alive = GHOST;
  MSG_DEBUG("physic.state", "%s - Ghost, was_dead = %d", GetName().c_str(), was_dead);

  // The object became a gost
  StopMoving();

  SignalGhostState(was_dead);
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:14,代码来源:physical_obj.cpp


示例15: switch

void PhysicalObj::Collide(collision_t collision, PhysicalObj* collided_obj, const Point2d& position)
{
  Point2d contactPos;
  Double contactAngle;

  switch (collision) {
  case NO_COLLISION:
    // Nothing more to do!
    return;

  case COLLISION_ON_GROUND:
    ContactPointAngleOnGround(position, contactPos, contactAngle);
    ASSERT(!collided_obj);
    break;

  case COLLISION_ON_OBJECT:
    contactPos = position;
    contactAngle = - GetSpeedAngle();

    // Compute the new speed norm of this and collided_obj, new speed angle will be set
    // thanks to Rebound()

    // Get the current speed
    Double v1, v2, mass1, angle1, angle2, mass2;
    collided_obj->GetSpeed(v1, angle1);
    GetSpeed(v2, angle2);
    mass1 = GetMass();
    mass2 = collided_obj->GetMass();

    // Give speed to the other object
    // thanks to physic and calculations about chocs, we know that :
    //
    // v'1 =  ((m1 - m2) * v1 + 2m1 *v2) / (m1 + m2)
    // v'2 =  ((m2 - m1) * v2 + 2m1 *v1) / (m1 + m2)
    collided_obj->SetSpeed(abs(((mass1 - mass2) * v1 + 2 * mass1 *v2 * m_cfg.m_rebound_factor) / (mass1 + mass2)),
                           angle1);
    SetSpeed(abs(((mass2 - mass1) * v2 + 2 * mass1 *v1 * m_cfg.m_rebound_factor) / (mass1 + mass2)), angle2);
    break;
  }

  // Mark it as last collided object
  m_last_collided_object = collided_obj;

  // Make it rebound!!
  MSG_DEBUG("physic.state", "%s rebounds at %.3f,%.3f", GetName().c_str(),
            contactPos.x.tofloat(), contactPos.y.tofloat());

  Rebound(contactPos, contactAngle);
  CheckRebound();
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:50,代码来源:physical_obj.cpp


示例16: MSG_DEBUG

void MsgProxyListener::start()
{
	if (running == 0)
	{
		mx.lock();
		cliSock.connect(MSG_SOCKET_PATH);
		cv.signal(); // wake up the waiting thread
		mx.unlock();

		int fd = cliSock.fd();

		MSG_DEBUG("Socket Fd : %d", fd);

		channel = g_io_channel_unix_new(fd); // initializes ref_count = 1

		eventSourceId = g_io_add_watch(channel, (GIOCondition)(G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL), &readSocket, NULL); // increments ref_count =2

		MSG_DEBUG("Call g_io_add_watch() : %d", eventSourceId);
	}

	running++;
	MSG_DEBUG("add Listener and [%d] are running.", running);
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:23,代码来源:MsgProxyListener.cpp


示例17: Mix_VolumeChunk

int JukeBox::PlaySample(Mix_Chunk * sample, float level, int loop)
{
  if (loop != -1) loop--;
  Mix_VolumeChunk(sample, int(0.5f+level*Config::GetInstance()->GetVolumeEffects()));
  int channel = Mix_PlayChannel(-1, sample, loop);

  if (channel == -1) {
    MSG_DEBUG("jukebox", "Error: Jukebox::PlaySample: %s", Mix_GetError());
    m_cache.FreeChunk(sample);
  }
  else
    chunks[channel] = sample;
  return channel;
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:14,代码来源:jukebox.cpp


示例18: lock

bool MsgProxyListener::regMMSConfMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_mms_conf_msg_incoming_cb pfNewMMSConfMessage, const char *pAppId, void *pUserParam)
{
	MutexLocker lock(mx);

	std::list<MSG_MMS_CONF_INCOMING_CB_ITEM_S>::iterator it = newMMSConfMessageCBList.begin();

	for (; it != newMMSConfMessageCBList.end(); it++)
	{
		if (it->pfMMSConfIncomingCB == pfNewMMSConfMessage)
		{

			if(pAppId == NULL)
			{
				MSG_DEBUG("msg_mms_conf_msg_incoming_cb() callback is already registered!!!");

				return false;
			}
			else if(!strncmp(it->appId, pAppId, MAX_MMS_JAVA_APPID_LEN))
			{
				MSG_DEBUG("msg_mms_conf_msg_incoming_cb() callback : AppId [%s] is already registered!!!", pAppId);

				it->userParam = pUserParam;

				return false;
			}
		}
	}

	MSG_MMS_CONF_INCOMING_CB_ITEM_S incomingConfCB = {pMsgHandle, pfNewMMSConfMessage, {0}, pUserParam};

	if (pAppId != NULL)
		strncpy(incomingConfCB.appId, pAppId, MAX_MMS_JAVA_APPID_LEN);

	newMMSConfMessageCBList.push_back(incomingConfCB);

	return true;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:37,代码来源:MsgProxyListener.cpp


示例19: MmsUpdateRejectStatus

msg_error_t MmsUpdateRejectStatus(MSG_MESSAGE_INFO_S *pMsgInfo)
{
	MSG_BEGIN();

	msg_error_t err = MSG_SUCCESS;

	try {
		char szTrID[MMS_TR_ID_LEN + 1] = {0x00};
		bool bReportAllowed;

		err = MmsPluginStorage::instance()->getTrID(pMsgInfo,szTrID,sizeof(szTrID));
		if (err != MSG_SUCCESS)
			MSG_DEBUG("MmsPlgUpdRejectStatus : Get MMS Transacation id Failed");

		memset(pMsgInfo->msgData, 0, MAX_MSG_DATA_LEN + 1);
		MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed);
		if (MmsPluginInternal::instance()->encodeNotifyRespInd(szTrID, MSG_DELIVERY_REPORT_REJECTED, bReportAllowed, pMsgInfo->msgData)) {
			MSG_DEBUG("MmsPlgUpdRejectStatus : Encode Notify Response Success");
			pMsgInfo->dataSize = strlen(pMsgInfo->msgData);
			pMsgInfo->bTextSms = true;
		} else
			MSG_DEBUG("MmsPlgSetRejectStatus : Encode Notify Response Failed");
	} catch (MsgException& e) {
		MSG_FATAL("%s", e.what());
		return MSG_ERR_PLUGIN_STORAGE;
	} catch (exception& e) {
		MSG_FATAL("%s", e.what());
		return MSG_ERR_PLUGIN_STORAGE;
	}

	if (err != MSG_SUCCESS)
		MSG_DEBUG("MmsPlgSetRejectStatus : Update MMS Message Failed");

	MSG_END();

	return err;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:37,代码来源:MmsPluginMain.cpp


示例20: MsgSoundPlayMelody

int MsgSoundPlayMelody(char *pMsgToneFilePath, bool bIncreasing)
{
	int err = MM_ERROR_NONE;

	/* Setting fade in,out */
	err = mm_player_set_attribute(hPlayerHandle, NULL, "sound_priority", 2, NULL);

	if (err != MM_ERROR_NONE) {
		MSG_DEBUG("error setting the profile attr");
		return err;
	}

	/* Setting the Volume */
	err = mm_player_set_attribute(hPlayerHandle, NULL, "sound_volume_type", MM_SOUND_VOLUME_TYPE_NOTIFICATION,
													"profile_uri", pMsgToneFilePath, strlen(pMsgToneFilePath), NULL);

	if (err != MM_ERROR_NONE) {
		MSG_DEBUG("error setting the profile attr");
		return err;
	}

	err = mm_player_realize(hPlayerHandle);

	if (err != MM_ERROR_NONE) {
		MSG_DEBUG("mm_player_realize() error : [%d]", err);
		return err;
	}

	/* Add Timer to stop playing after 5 sec. */
	int g_contact_timer = -1;
	g_contact_timer = g_timeout_add(5500, (GSourceFunc)MsgSoundMelodyTimeout, NULL);

	err = mm_player_start(hPlayerHandle);

	if (err != MM_ERROR_NONE) {
	 	MSG_DEBUG("mm_player_start, FAIL [%x]", err);
		bPlaying = false;

		return err;
	}

	bPlaying = true;

	pthread_mutex_lock(&muMmPlay);

	while (bPlaying)
	{
		MSG_DEBUG("Ring Alert Playing");
		pthread_cond_wait(&cvMmPlay, &muMmPlay);
	}

	pthread_mutex_unlock(&muMmPlay);

	MSG_DEBUG("Ring Alert Idle");

	return err;
}
开发者ID:tizenorg,项目名称:platform.core.messaging.msg-service,代码行数:57,代码来源:MsgSoundPlayer.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MSG_ERR函数代码示例发布时间:2022-05-30
下一篇:
C++ MSG_Bitstream函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap