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

C++ ACS_SHORT_LOG函数代码示例

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

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



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

示例1: run

    virtual void run()
	{
    	try
		{
    		// Just to stabilize
    		dev_m->off();
			ACE_OS::sleep(2);

			// Activate the alarm
			ACS_SHORT_LOG((LM_INFO, "==> Going to changing value to ENABLE (1) to trigger an alarm."));
			dev_m->enable();
			ACE_OS::sleep(4);

			// Test changeAlarmFFFM with activated alarm
			ACS_SHORT_LOG((LM_INFO, "==> Going to test changing of FF and FM if we have an alarm."));
			dev_m->changeAlarmFFFM("UserDefinedFF", "UserDefinedFM");
			ACE_OS::sleep(2);

			// Deactivate the alarm
			ACS_SHORT_LOG((LM_INFO, "==> Going to changing value to DIAGNOSE (2) to deactivate the alarm."));
			dev_m->diagnose();
			ACE_OS::sleep(2);

			// Test changeAlarmFFFM with deactivated alarm
			ACS_SHORT_LOG((LM_INFO, "==> Going to test changing of FF and FM if we do not have an alarm."));
			dev_m->changeAlarmFFFM("UserDefinedFF2", "UserDefinedFM2");

			ACE_OS::sleep(4);
	    }
		catch(...)
	    {
		    ACS_SHORT_LOG((LM_ERROR,"Error!"));
	    }

	}
开发者ID:ACS-Community,项目名称:ACS,代码行数:35,代码来源:alarmTestSetFFFM.cpp


示例2: ACS_TRACE

//-----------------------------------------------------------------------------
void 
Consumer::suspend()
{
    ACS_TRACE("Consumer::suspend");
    
    try
	{
	proxySupplier_m->suspend_connection();
	}
    catch(CosNotifyChannelAdmin::ConnectionAlreadyInactive e)
	{
	//OK to ignore
	ACS_SHORT_LOG((LM_INFO,"Consumer::suspend failed because already suspended for the '%s' channel!",
		       channelName_mp));
	}
    catch(CosNotifyChannelAdmin::NotConnected e)
	{
	//OK to ignore
	ACS_SHORT_LOG((LM_INFO,"Consumer::suspend failed because not connected to the '%s' channel!",
		       channelName_mp));
	}
    catch(...)
	{
	ACS_SHORT_LOG((LM_INFO,"Consumer::suspend failed for the '%s' channel!",
		       channelName_mp));
	CORBAProblemExImpl err = CORBAProblemExImpl(__FILE__,__LINE__,"nc::Consumer::suspend");
	throw err.getCORBAProblemEx();
	}
}
开发者ID:jbarriosc,项目名称:ACS,代码行数:30,代码来源:acsncConsumerImpl.cpp


示例3: ACS_SHORT_LOG

void ImpController::setConfigurationReference(const short instance_number, const ::acsdaemon::ServiceInfoSeq & services_info) {
    try {
        ACS_SHORT_LOG((LM_DEBUG, "Setting configuration reference at instance %d to Imp with Corba URI '%s'.", instance_number, corbaloc.c_str()));
        CORBA::Object_var obj = getContext()->getORB()->string_to_object(corbaloc.c_str());
        if (CORBA::is_nil(obj.in())) {
            ACS_SHORT_LOG((LM_ERROR, "Failed to parse Corba URI '%s' for Imp '%s'!", corbaloc.c_str(), acsServices[service].impname));
            return;
        }

        obj = acsQoS::Timeout::setObjectTimeout(CORBA_TIMEOUT, obj.in());

        acsdaemon::ImpBase_var imp = acsdaemon::ImpBase::_narrow(obj.in());
        if (CORBA::is_nil(imp.in())) {
            ACS_SHORT_LOG((LM_INFO, "Imp reference '%s' is not valid.", acsServices[service].impname));
            return;
        }

        imp->set_configuration_reference(instance_number, services_info);
        ACS_SHORT_LOG((LM_DEBUG, "Configuration reference at instance %d set to Imp '%s'.", instance_number, acsServices[service].impname));
        return;
    } catch(CORBA::Exception &ex) {
        ACS_SHORT_LOG((LM_ERROR, "Failed to contact Imp '%s'.", acsServices[service].impname));
        return;
    }
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:25,代码来源:acsServiceController.cpp


示例4: getSender

void SenderPTImpl::stopSendNew(CORBA::Long flwNmbr)
{
    CORBA::ULong flowNumber = flwNmbr;

    try
    {
        getSender()->stopSend(flowNumber);
    }
    catch(ACSErr::ACSbaseExImpl &ex)
    {
        ACS_SHORT_LOG((LM_WARNING,"senderPTImpl::stopSendNew base exception catched !"));
        ACSBulkDataError::AVStopSendErrorExImpl err = ACSBulkDataError::AVStopSendErrorExImpl(ex,__FILE__,__LINE__,"senderPTImpl::stopSendNew");
        throw err.getAVStopSendErrorEx();
    }
    /*catch (AVInvalidFlowNumberExImpl & ex)
    {
    ACS_SHORT_LOG((LM_INFO,"SenderPTImpl::stopSendNew AVInvalidFlowNumberExImpl exception catched !"));
    AVStopSendErrorExImpl err = AVStopSendErrorExImpl(ex,__FILE__,__LINE__,"SenderPTImpl::stopSendNew");
    throw err.getAVStopSendErrorEx();
    }*/
    catch (...)
    {
        ACS_SHORT_LOG((LM_ERROR,"senderPTImpl::stopSendNew UNKNOWN exception"));
        ACSBulkDataError::AVStopSendErrorExImpl err = ACSBulkDataError::AVStopSendErrorExImpl(__FILE__,__LINE__,"senderPTImpl::stopSendNew");
        throw err.getAVStopSendErrorEx();
    }
}
开发者ID:jantogni,项目名称:ACS,代码行数:27,代码来源:senderPTImpl.cpp


示例5: ACS_TRACE

//-----------------------------------------------------------------------------
void
Helper::resolveNamingService(CORBA::ORB_ptr orb_mp)
{
    ACS_TRACE("Helper::resolveNamingService");
    try
	{
	//Here we try a couple of different methods to get at the naming service.
	if(orb_mp == 0)    //We've been passed a fake ORB.
	    {
	    //Try to get at the Naming Service using the activator singleton first.
	    if ((ContainerImpl::getContainer() != 0) &&
		(ContainerImpl::getContainer()->getContainerCORBAProxy() != maci::Container::_nil()))
		{
		namingContext_m = ContainerImpl::getContainer()->getService<CosNaming::NamingContext>(acscommon::NAMING_SERVICE_NAME, 0, true);
		}
	    //DWF - Ideally there would be a SimpleClient singleton that we would try next (this would
	    // be especially useful in Consumers), but instead we will just create our own ORB
	    // and hope this is running on the same host as the Naming Service =(
	    else    //This is basically just a fail-safe mechanism.
		{
		ACS_SHORT_LOG((LM_INFO,
			       "Helper::resolveNameService wrong constructor - attempting recovery for the '%s' channel!",
			       channelName_mp));

		if (orbHelper_mp == 0)
		    {
		    //should never be the case but if it does happen...
		    orbHelper_mp = new ORBHelper();
		    orbHelper_mp->runOrb();
		    }
		// Get the naming context
		namingContext_m=MACIHelper::resolveNameService(orbHelper_mp->getORB());
		}
	    }

	//Passed a valid orb so we try to resolve the naming service using
	//the "normal" method
	else
	    {
	    namingContext_m=MACIHelper::resolveNameService(orb_mp);
	    }
	}
    catch(...)
	{
        ACS_SHORT_LOG((LM_ERROR, "Helper::resolveNameService CORBA exception caught for the '%s' channel!",
		       channelName_mp));
	CORBAProblemExImpl err = CORBAProblemExImpl(__FILE__,__LINE__,"nc::Helper::resolveNamingService");
	throw err.getCORBAProblemEx();
	}

	//one last check to make sure we have the correct reference to the name service
	if(CORBA::is_nil(namingContext_m))
	    {
	    ACS_SHORT_LOG((LM_ERROR,"Helper::resolveNameService unable to resolve name service for the '%s' channel!",
			   channelName_mp));
	    CORBAProblemExImpl err = CORBAProblemExImpl(__FILE__,__LINE__,"nc::Helper::resolveNamingService");
	    throw err.getCORBAProblemEx();
	    }
}
开发者ID:jbarriosc,项目名称:ACS,代码行数:60,代码来源:acsncHelperImpl.cpp


示例6: run

    virtual void run()
	{
	    		try
		    {
	    			for(unsigned int i=0; i<3; i++)
	    			{

	    				ACS_SHORT_LOG((LM_INFO, "==> Going to changing value to ENABLE (1) to trigger an alarm."));
	    				dev_m->enable ();
	    				ACE_OS::sleep(2);


	    				ACS_SHORT_LOG((LM_INFO, "==> Going to test changing of FF and FM if we have an alarm."));
	    				// first heaving an alarm
	    				dev_m->changeAlarmFFFM("UserDefinedFF", "UserDefinedFM");

	    				dev_m->disable ();
	    				ACE_OS::sleep(2);

	    				dev_m->diagnose ();
	    				ACE_OS::sleep(2);
	    				// here we should not have an alarm anymore
	    				ACS_SHORT_LOG((LM_INFO, "==> Going to test changing of FF and FM if we do not have an alarm."));

	    				dev_m->shutdown ();
	    				ACE_OS::sleep(2);
	    			}//for
		    }
		catch(...)
		    {
		    ACS_SHORT_LOG((LM_ERROR,"Error!"));
		    }

		/*
			    	ACS_SHORT_LOG((LM_INFO, "==> Going to test changing of FF and FM if we have a previous alarm."));
	    	// first heaving an alarm
	    	comp_m->changeAlarmFFFM("UserDefinedFF", "UserDefinedFM");

	    	// reset all alarms
	    	ACS_SHORT_LOG((LM_INFO, "==> Going to test changing of FF and FM if we do not have a previous alarm."));
	    	ACS_SHORT_LOG((LM_INFO, "==> First we reset all alarms an wait that are actaully cleared."));
	    	ACS_SHORT_LOG((LM_INFO, "%s: Setting rwPattern to %d", getName().c_str(), 2));
			rwPattern_m->set_sync(2);
			ACE_OS::sleep(2); //we have to wait that alarm is actually cleaned
			ACS_SHORT_LOG((LM_INFO, "==> After resting alarms  we set new FF FM"));
			comp_m->changeAlarmFFFM("AnotherUserDefinedFF", "AnotherUserDefinedFM");

			ACS_SHORT_LOG((LM_INFO, "==>  Generate an alarm after we have changed FF, FM."));
	    	ACS_SHORT_LOG((LM_INFO, "%s: Setting rwPattern to %d", getName().c_str(), 1));
			rwPattern_m->set_sync(1);

	    	setStopped();
	    	ACS_SHORT_LOG((LM_INFO, "%s: Stopped thread", getName().c_str()));
	    */
	}
开发者ID:jjpopski,项目名称:ACS,代码行数:55,代码来源:alarmTestSetFFFM.cpp


示例7: checkLogging

static void checkLogging(ACSDaemonContext * context, short instance)
{
	if (!loggingSystemInitialized)
	{
		// we need msg_callback to get LoggingProxy
		if (ACE_LOG_MSG->msg_callback () != 0 &&
				context->hasConfigurationReference(instance, acsServices[NAMING_SERVICE].xmltag))
		{
			try
			{
				// we get via NS and not a manager (to support logging when manager is not running)
				std::string nsReference = context->getConfigurationReference(instance, acsServices[NAMING_SERVICE].xmltag);
				CORBA::Object_var nc_obj = context->getORB()->string_to_object(nsReference.c_str());
				if (nc_obj.ptr() != CORBA::Object::_nil())
				{
					CosNaming::NamingContext_var nc = CosNaming::NamingContext::_narrow(nc_obj.in());
					if (nc.ptr() != CosNaming::NamingContext::_nil())
					{
						CosNaming::Name name;
						name.length(1);
						name[0].id = CORBA::string_dup("Log");

						CORBA::Object_var obj = nc->resolve(name);
						if (!CORBA::is_nil(obj.in()))
                    	{
							Logging::AcsLogService_var logger = Logging::AcsLogService::_narrow(obj.in());

							LoggingProxy* lp = static_cast<LoggingProxy*>(ACE_LOG_MSG->msg_callback());
							lp->setCentralizedLogger(logger.in());
							lp->setNamingContext(nc.in());
                            loggingSystemInitialized = true;
                            ACS_SHORT_LOG((LM_DEBUG, "Remote logging system initialized."));
                        }
						else
						{
							ACS_SHORT_LOG((LM_DEBUG, "Unable to resolve Log from the naming service."));
						}
					}
					else
					{
						ACS_SHORT_LOG((LM_DEBUG, "Unable to narrow NamingContext."));
					}
				}
				else
				{
					ACS_SHORT_LOG((LM_ERROR, "Unable to resolve naming service, invalid corbaloc reference: '%s'.", nsReference.c_str()));
				}
			}
			catch (...)
			{
				ACS_SHORT_LOG((LM_DEBUG, "Unable to initialize logging sytem, unexpected exception caught."));
			}
		}
	}
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:55,代码来源:acsServiceController.cpp


示例8: ACS_SHORT_LOG

/* --------------------- [ CORBA interface ] ----------------------*/
CORBA::Long
CounterSupplierImpl::sendBlocks (const CORBA::Long initialVal,
		const CORBA::Long lastVal,
		const CORBA::Long changeVal,
		const CORBA::Float period)	
{

	CORBA::Boolean flag = false;
	
	ACS_SHORT_LOG((LM_INFO, "sendBlocks called ...."));

	ACS_SHORT_LOG((LM_INFO, "Ready to send NC events..."));
	// Send the events
	int val = (int)initialVal;
	int eventCount = 0;
	
	::COUNTER::statusBlockEvent t_data;
	
	while (val < (int)lastVal) {
		if (val < (int)changeVal)
			flag = false;
		else
			flag = true;

		t_data.onOff    = COUNTER::ON;
		//t_data.onOff    = 1.0;
		t_data.myString = "C++ supplier";
		t_data.counter1 = val;
		t_data.counter2 = lastVal;
		t_data.counter3 = changeVal;
		t_data.flipFlop = flag;
		t_data.period   = period;
		m_CounterSupplier_p->publishData<COUNTER::statusBlockEvent>(t_data);
		eventCount++;
		ACS_SHORT_LOG((LM_INFO, "Counting ongoing with period %.3fs up to %d, now %d", period,  lastVal, val));
		val++;
		usleep((unsigned long)(period * 1000000.f));
	}

	// Tell consumers this is the last event
	t_data.onOff    = COUNTER::OFF;
	//t_data.onOff    = 0.0;
	t_data.myString = "Last event from C++ supplier";
	t_data.counter1 = val;
	t_data.counter2 = lastVal;
	t_data.counter3 = changeVal;
	t_data.flipFlop = true;
	t_data.period   = period;
	m_CounterSupplier_p->publishData<COUNTER::statusBlockEvent>(t_data);
	eventCount++;
	ACS_SHORT_LOG((LM_INFO, "Counter stopped, last value %d", val));

	
	return (CORBA::Long)eventCount;
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:56,代码来源:CounterSupplierImpl.cpp


示例9: ACS_SHORT_LOG

int
BulkDataSendRecvCb::cbStop()
{
    if(flowNumber_m == 1)
	ACS_SHORT_LOG((LM_INFO, "flow 1 total length: %d", count1_m)); 
    if(flowNumber_m == 2)
	ACS_SHORT_LOG((LM_INFO, "flow 2 total length: %d", count2_m)); 

    // flows 3 and 4 not handled (see bulkDataReceiverCbEx1.cpp)

    return 0;
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:12,代码来源:bulkDataSendRecvCb.cpp


示例10: ACS_TRACE

int
BulkDataReceiverCbDistr1::cbReceive(ACE_Message_Block * frame_p)
{
    ACS_TRACE("BulkDataReceiverCbDistr1::cbReceive"); 

    if(flowNumber_m == 1)
	{
        ACS_SHORT_LOG((LM_DEBUG, "RECEIVER 1 flowname 1: %s", flowname_m.c_str()));
        ACS_SHORT_LOG((LM_DEBUG, "RECEIVER 1 length data flowname 1: %d", frame_p->length()));
	count1_m += frame_p->length();
	}

    return 0;
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:14,代码来源:bulkDataReceiverCbDistr1.cpp


示例11: alarm_raised

  void alarm_raised (ACS::pattern value,
		const ACSErr::Completion & c,
		const ACS::CBDescOut & desc
		 ) 
  {
    ACS_SHORT_LOG ((LM_DEBUG, "(%s::AlarmCBStates::raised) Value: %s (%llu). Completion (type=%d, code=%d)", prop.c_str(), description[value].in(), value, c.type, c.code));
  }
开发者ID:ACS-Community,项目名称:ACS,代码行数:7,代码来源:alarmTestSetFFFM.cpp


示例12: logBatchUsingMacrosGeneralLogger

void logBatchUsingMacrosGeneralLogger()
{
	std::cout << "Log batch for logger [" << "GeneralLogger" << "]. USING ACS MACROS." << std::endl;

	// Test macros
	{
		AUTO_TRACE("TEST_MACROS");
		ACS_LOG(LM_RUNTIME_CONTEXT, __PRETTY_FUNCTION__, (LM_INFO, "LM_RUNTIME_CONTEXT inside TEST_MACROS"));
		ACS_LOG(LM_SOURCE_INFO, __PRETTY_FUNCTION__, (LM_INFO, "LM_SOURCE_INFO inside TEST_MACROS"));
	}

	ACS_LOG(LM_RUNTIME_CONTEXT, __PRETTY_FUNCTION__, (LM_INFO, "LM_RUNTIME_CONTEXT outside TEST_MACROS"));
	ACS_LOG( LM_SOURCE_INFO, __PRETTY_FUNCTION__, (LM_INFO, "LM_SOURCE_INFO outside TEST_MACROS"));

	ACS_TRACE(__PRETTY_FUNCTION__);

    ACS_SHORT_LOG((LM_INFO, "Test ACS_SHORT_LOG with LM_INFO"));

    //ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_SHUTDOWN, "Test of LM_SHUTDOWN log")); // NOT logging a thing
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_TRACE, "Test of LM_TRACE log"));
    //ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_DELOUSE, "Test of LM_DELOUSE log")); // Not logginf a thing
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_DEBUG, "Test of LM_DEBUG log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_INFO, "Test of LM_INFO log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_NOTICE, "Test of LM_NOTICE log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_WARNING, "Test of LM_WARNING log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_ERROR, "Test of LM_ERROR log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_CRITICAL, "Test of LM_CRITICAL log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_ALERT, "Test of LM_ALERT log"));
    ACS_LOG( LM_FULL_INFO, __PRETTY_FUNCTION__, (LM_EMERGENCY, "Test of LM_EMERGENCY log"));

    // Debug messages
    ACS_DEBUG(__PRETTY_FUNCTION__, "Test of ACS_DEBUG macro");
    ACS_DEBUG_PARAM(__PRETTY_FUNCTION__, "Test of ACS_DEBUG_PARAM macro with param: %s", "param1");
} // 17 + 2 messages (entering + exiting)
开发者ID:jjpopski,项目名称:ACS,代码行数:34,代码来源:testLoggerStats.cpp


示例13: CharacteristicComponentImpl

// Implementation skeleton constructor
enumpropTestDeviceImpl::enumpropTestDeviceImpl (
    const ACE_CString& name,
    maci::ContainerServices* containerServices) :
    CharacteristicComponentImpl(name,containerServices),
    m_currentState(0), 
    m_currentStateRW(0)
{
  ACS_TRACE("enumpropTestDeviceImpl::enumpropTestDeviceImpl");
  
  // properties
  m_currentState = new ROEnumImpl<ACS_ENUM_T(ENUMPROP_TEST::States), POA_ENUMPROP_TEST::ROStates> (name+":currentStates", getComponent());
  CHARACTERISTIC_COMPONENT_PROPERTY(currentState,m_currentState)
 
  m_currentStateRW = new RWEnumImpl<ACS_ENUM_T(ENUMPROP_TEST::States), POA_ENUMPROP_TEST::RWStates> (name+":currentStatesRW", getComponent());
  CHARACTERISTIC_COMPONENT_PROPERTY(currentStateRW,m_currentStateRW)
 
  ACS_SHORT_LOG((LM_INFO, "enumprop Test Device: %s created", name.c_str()));

 /*
  * Here we are at the top of the hierarchy and we do not have
  * a container to use for the test.
  * Therefore we call by hand initialize() and execute()
  * to "activate" the component
  */
  __initialize();
  __execute();
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:28,代码来源:enumpropTestDeviceImpl.cpp


示例14: sprintf

// The time negotiation is not yet implemented	
CORBA::Boolean AsyncCBdouble::negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
	{
		char logStr[128];
		sprintf(logStr,"AsyncCBdouble::negotiate property %s",propertyName.c_str());
		ACS_SHORT_LOG((LM_INFO,logStr));
		return true;
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:8,代码来源:acsexmplAsyncCallbacks.cpp


示例15: throw

/**
 * Reads the commanded azimuth from Mount2 telescope.
 *
 */
CORBA::Double Mount2RefAzDevIO::read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
{
	ACS_SHORT_LOG( (LM_INFO, "Mount2RefAzDevIO: read"));
	CORBA::Double ret_val(0.0);
//	char *msg;
//	unsigned long read_alt, read_azm;
//	CORBA::Double azm;

	Communication comm = Communication("/dev/ttyUSB0");
	ret_val = comm.getAzm();
//	SerialRS232 *sp = new SerialRS232("/dev/ttyUSB0");
//	sp->write_RS232("z");
//	msg = sp->read_RS232();
//	sscanf(msg,"%08lX,%08lX#",&read_azm,&read_alt);
//
//#define MAX_PRECISE_ROTATION 4294967296.0
//
//	azm = (double)read_azm / MAX_PRECISE_ROTATION;
//	azm *= 360.0;
//
//	ret_val = azm;
//
//	timestamp=getTimeStamp();
//	delete sp;
	return ret_val;
}
开发者ID:ACS-Community,项目名称:ACS-Workshop,代码行数:30,代码来源:Mount2RefAzDevIO.cpp


示例16: done

    virtual void done (const ACSErr::Completion& c)
    {
	ACS_SHORT_LOG((LM_INFO, "Start ACS request completed:"));
	ACSErr::CompletionImpl comp = c;
	comp.log();
	complete = true;
    }
开发者ID:ACS-Community,项目名称:ACS,代码行数:7,代码来源:acsdaemonStartAcs.cpp


示例17: ACS_SHORT_LOG

void Consumer::setAntennaName(std::string antennaName) {
    //If the antenna name is already set, do nothing
    if (this->antennaName.compare("") != 0)
        return;
    this->antennaName = antennaName;
    if (antennaName.compare("") != 0) {
        std::cout << "Adding filter" << std::endl;
        CosNotifyFilter::FilterFactory_var filter_factory =
                notifyChannel_m->default_filter_factory();
        CosNotifyFilter::Filter_var filter = filter_factory->create_filter(
                "ETCL");
        if (CORBA::is_nil(filter)) {
            ACS_SHORT_LOG(
                    (LM_ERROR,"Consumer::createConsumer failed for the '%s' channel due the filter cannot be created!", channelName_mp));
        }
        CosNotifyFilter::ConstraintExpSeq constraint_list;
        constraint_list.length(1);
        constraint_list[0].event_types.length(0);
        std::string filter_expr = "$antenna_name == '" + antennaName + "'";
        std::cout << filter_expr << std::endl;
        constraint_list[0].constraint_expr = CORBA::string_dup(
                filter_expr.c_str());
        filter->add_constraints(constraint_list);
        proxySupplier_m->add_filter(filter.in());
    }
}
开发者ID:jbarriosc,项目名称:ACS,代码行数:26,代码来源:acsncConsumerImpl.cpp


示例18: ACS_SHORT_LOG

void  enumpropTestDeviceImpl::serverShutdown ()
{
    
#ifndef MAKE_VXWORKS
    ACS_SHORT_LOG((LM_INFO, "enumpropTestDeviceImpl::serverShutdown")); 
    BACI_CORBA::getORB()->shutdown(true);
    //LoggingProxy::done();
#endif
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:9,代码来源:enumpropTestDeviceImpl.cpp


示例19: ACS_TRACE

//-----------------------------------------------------------------------------
void
Supplier::destroyNotificationChannel()
{
    ACS_TRACE("Supplier::destroyNotificationChannel");

    //Sanity check
    if (CORBA::is_nil(notifyChannel_m.in())==true)
	{
	ACS_SHORT_LOG((LM_ERROR, "Supplier::destroyNotificationChannel() error occured for the '%s' channel!",
		       channelName_mp));
	CORBAProblemExImpl err = CORBAProblemExImpl(__FILE__,__LINE__,"nc::Supplier::destroyNotificationChannel");
	throw err.getCORBAProblemEx();
	}

    try
	{
	//Destroy the remote object and dereference it's pointer.
	notifyChannel_m->destroy();
	notifyChannel_m = 0;

	// Unbind notification channel from Naming service
	CosNaming::Name name(1);
	name.length(1);
	name[0].id = CORBA::string_dup(getCombinedChannelAndDomainName().c_str());
	name[0].kind = acscommon::NC_KIND;
	ACE_ASSERT(CORBA::is_nil(namingContext_m.in()) == false);
	namingContext_m->unbind(name);
	}
    catch(CORBAProblemEx)
	{
	ACS_SHORT_LOG((LM_ERROR, "Supplier::destroyNotificationChannel() failed for the '%s' channel with an ACS-based exception!",
		       channelName_mp));
	//exception thrown by us...OK to rethrow
	throw;
	}
    catch(...)
	{
	ACS_SHORT_LOG((LM_ERROR, "Supplier::destroyNotificationChannel() error occured for the '%s' channel!",
		       channelName_mp));
	CORBAProblemExImpl err = CORBAProblemExImpl(__FILE__,__LINE__,"nc::Supplier::destroyNotificationChannel");
	throw err.getCORBAProblemEx();
	}
}
开发者ID:jbarriosc,项目名称:ACS,代码行数:44,代码来源:acsncSupplierImpl.cpp


示例20: working

    virtual void working (
        const char * service,
        const char * host,
        ::CORBA::Short instance_number,
        const ::ACSErr::Completion & c)
    {
	ACS_SHORT_LOG((LM_INFO, "Start %s service status:", service));
        ACSErr::CompletionImpl comp = c;
        comp.log();
    }
开发者ID:ACS-Community,项目名称:ACS,代码行数:10,代码来源:acsdaemonStartAcs.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ACS_TRACE函数代码示例发布时间:2022-05-30
下一篇:
C++ ACRX_T函数代码示例发布时间: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