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


C++ MSG_DEBUG函数代码示例

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


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


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