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


C++ endlog函数代码示例

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


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

示例1: log

bool LoggingAvailability::startHook()
{
    if (logger)
    {
        logger->info(RTT::rt_string("Available in startHook"));
    }
    else
    {
        log(Error) << "Not available in startHook()" << endlog();
    }
    return true;
}
开发者ID:eacousineau,项目名称:ocl,代码行数:12,代码来源:TestLoggingAvailability.cpp

示例2: log

 bool Controller::startHook(){
   if(current_pose_port.read(m_current_pose) == NoData){
     log(Debug) << "No current pose received" << endlog();
     return false;
   }
   else{
     m_goal_pose.x = m_current_pose[0];
     m_goal_pose.y = m_current_pose[1];
     m_goal_pose.theta = m_current_pose[2];
     return true;
   }
 }
开发者ID:bellenss,项目名称:euRobotics_orocos_ws,代码行数:12,代码来源:controller.cpp

示例3: log

 /**
  * OperationCaller objects may be assigned to a part responsible for production
  * of an implementation.
  * This variant is used when a only a remote implementation is available.
  *
  * @param part The part used by the OperationCaller to produce an implementation.
  *
  * @return *this
  */
 OperationCaller& operator=(OperationInterfacePart* part)
 {
     if (part == 0) {
         log(Warning) << "Assigning OperationCaller from null part."<<endlog();
         this->impl.reset();
     }
     if (this->impl && this->impl == part->getLocalOperation() )
         return *this;
     OperationCaller<Signature> tmp(part);
     *this = tmp;
     return *this;
 }
开发者ID:smits,项目名称:rtt,代码行数:21,代码来源:OperationCaller.hpp

示例4: Property

 /**
  * Create a Property \b mirroring another PropertyBase.
  * It copies the name and description, and \b shallow copies
  * the value.
  * @see ready() to inspect if the creation succeeded.
  */
 Property( base::PropertyBase* source)
     : base::PropertyBase(source ? source->getName() : "", source ? source->getDescription() : ""),
       _value( source ? internal::AssignableDataSource<DataSourceType>::narrow(source->getDataSource().get() ) : 0 )
 {
     if ( source && ! _value ) {
         log(Error) <<"Can not initialize Property from "<<source->getName() <<": ";
         if ( source->getDataSource() )
             log() << "incompatible type ( destination type: "<< getType() << ", source type: "<< source->getDataSource()->getTypeName() << ")."<<endlog();
         else
             log() << "source Property was not ready."<<endlog();
     }
 }
开发者ID:cottsay,项目名称:rtt,代码行数:18,代码来源:Property.hpp

示例5: log

 /**
  * A Command objects may be assigned to an implementation.
  * If the implementation is of the wrong type, it is freed.
  *
  * @param implementation An implementation which will be owned
  * by the command. If it is unusable, it is freed.
  */
 Command& operator=(base::DispatchInterface* implementation)
 {
     if ( this->impl && this->impl == implementation)
         return *this;
     delete this->impl;
     this->impl = dynamic_cast< base::CommandBase<CommandT>* >(implementation);
     if (this->impl == 0 && implementation) {
         log(Error) << "Tried to assign Command from incompatible type."<< endlog();
         delete implementation;
     }
     return *this;
 }
开发者ID:jsreng,项目名称:orocos-rtt,代码行数:19,代码来源:Command.hpp

示例6: stopHook

    void stopHook() 
    {
	   
	activate(false,internalNumber); 
	   
	   //To write the .cpf property file
// 	 std::string propertyfile = "configuringXMLSlave" + intToStr(internalNumber)+".cpf"; 
//  	 this->getProvider<Marshalling>("marshalling")->writeProperties(propertyfile);
	   
	   
	 Logger::log(Logger::Info) << soem_slave::getName()<<" executes stopHook !" <<endlog();
	    
    }
开发者ID:joseparnau,项目名称:rosjac,代码行数:13,代码来源:soem_slave.hpp

示例7: configureHook

    bool configureHook() 
    {

      minimumConfigure();
	
	
      PDOmapping();
      setting();

		Logger::log(Logger::Info) << soem_slave::getName()<<" configured !" <<endlog();
	
	return true;
    }
开发者ID:joseparnau,项目名称:rosjac,代码行数:13,代码来源:soem_slave.hpp

示例8: log

//read: read the value of one of the 2 channels in Volts ///////////////////////////
double SoemEL3104::read(unsigned int chan)
{

    if (chan < m_size)
    {
        return m_msg.values[chan];
    }
    else
        log(Error) << "Channel " << chan << " is out of the module's range"
                << endlog();
    return 0.0;

}
开发者ID:drchrislewis,项目名称:industrial_training,代码行数:14,代码来源:soem_el3104.cpp

示例9: defined

    RTT_CORBA_API bool ApplicationServer::InitOrb(int argc, char* argv[], Seconds timeout ) {
      
        if ( !CORBA::is_nil(orb) ){
	  return false;
	}
        try {
            // First initialize the ORB, that will remove some arguments...
            orb =
                CORBA::ORB_init (argc, const_cast<char**>(argv),
                                 "omniORB4");
            if(timeout >= 0.1e-7)
            {
#if defined( CORBA_IS_TAO ) && defined( CORBA_TAO_HAS_MESSAGING )
                // Set the timeout value as a TimeBase::TimeT (100 nanosecond units)
                // and insert it into a CORBA::Any.
                TimeBase::TimeT relative_rt_timeout = timeout * 1.0e7;
                CORBA::Any relative_rt_timeout_as_any;
                relative_rt_timeout_as_any <<= relative_rt_timeout;

                // Create the policy and put it in a policy list.
                CORBA::PolicyList policies;
                policies.length(1);
                policies[0] = 
                orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
                                    relative_rt_timeout_as_any);

                // Apply the policy at the ORB level using the ORBPolicyManager.
                CORBA::Object_var obj = orb->resolve_initial_references ("ORBPolicyManager");
                CORBA::PolicyManager_var policy_manager = CORBA::PolicyManager::_narrow (obj.in());
                policy_manager->set_policy_overrides (policies, CORBA::SET_OVERRIDE);
#else
                log(Error) << "Ignoring ORB timeout setting in non-TAO/Messaging build." <<endlog();
#endif // CORBA_IS_TAO
            }
            // Also activate the POA Manager, since we may get call-backs !
            CORBA::Object_var poa_object =
                orb->resolve_initial_references ("RootPOA");
            rootPOA =
                PortableServer::POA::_narrow (poa_object.in ());
            PortableServer::POAManager_var poa_manager =
                rootPOA->the_POAManager ();
            poa_manager->activate ();
            return true;
        }
        catch (CORBA::Exception &e) {
            log(Error) << "Orb Init : CORBA exception raised!" << Logger::nl;
            Logger::log() << CORBA_EXCEPTION_INFO(e) << endlog();
	    std::cout << "ApplicationServer::InitOrb return false: ORBA exception raised\n";
        }
        return false;
    }
开发者ID:FynnGamadeyo,项目名称:rtt,代码行数:51,代码来源:ApplicationServer.cpp

示例10: serialize

      virtual void serialize(const PropertyBag &v) 
      {
        int retval;

        /**
         * Check if the netcdf file is already in define mode.
         * Increase counter every time serialize function is called and no errors occurs.
         */
        if ( ncopen ) {
          ncopen++;
        }
        else {
          retval = nc_redef(ncid);
           if ( retval )
             log(Error) << "Could not enter define mode in NetcdfHeaderMarshaller, error "<< retval <<endlog();
           else
             ncopen++;
        }
        
        for (
          PropertyBag::const_iterator i = v.getProperties().begin();
          i != v.getProperties().end();
          i++ )
            {                 
              this->serialize(*i);
            }

        /**
         * Decrease counter, if zero enter data mode else stay in define mode 
         */
        if (--ncopen)
          log(Info) << "Serializer still in progress" <<endlog();
        else {
          retval = nc_enddef(ncid);
           if (retval)
             log(Error) << "Could not leave define mode, error" << retval <<endlog();
        }
      }
开发者ID:ptroja,项目名称:orocos-ocl,代码行数:38,代码来源:NetcdfHeaderMarshaller.hpp

示例11: TaskContext

     Calibrator::Calibrator(std::string name)
         : TaskContext(name,PreOperational)
     {
	log(Debug) << "(Calibrator) constructor entered" << endlog();

        // Add properties

        addProperty("boardWidth",boardWidth).doc("number of internal corners in width");
        addProperty("boardHeight",boardHeight).doc("number of internal corners in heigth");
        addProperty("squareSize",squareSize).doc("size of square of the chessboard pattern");
        addProperty("detectorSearchRadius",detectorSearchRadius).doc("radius for checkboard detector");
        addProperty("imageDirectory",imageDirectory).doc("directory containing images for calibration");

	// Add ports

        addPort( "extrinsicCameraParameters",_extrinsicPort );

	// Add operations

        addOperation("batchCalibrate", &Calibrator::batchCalibrate, this).doc("Calibrate with batch images");

	log(Debug) << "(Calibrator) constructor finished" << endlog();
    }
开发者ID:drewm1980,项目名称:planepower,代码行数:23,代码来源:calibration.cpp

示例12: PeriodicActivity

// --------------------------
// Constructor for 3 modules
// --------------------------
EncoderSSI_apci1710_board::EncoderSSI_apci1710_board( unsigned int mNr1, unsigned int mNr2, unsigned int mNr3 )
  : PeriodicActivity( RTT::OS::HighestPriority, 1./ORONUM_DEVICE_DRIVERS_APCI1710_SSI_UPDATE )
  , nr_of_modules(3), moduleNr1( mNr1 ), moduleNr2( mNr2 ), moduleNr3( mNr3 )
{

    buffer1 = new unsigned int[9];
    buffer2 = new unsigned int[9];
    readbuffer  = buffer1;
    writebuffer = buffer2;

    log() << "(EncoderSSI_apci1710) Creating EncoderSSI..." << endlog(Info);
    dev = apci1710_get_device();
    int res = 0;
    if ( 0 != (res = apci1710_ssi_init( dev, moduleNr1,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_PROFILE,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_POSITION_BITS,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_TURN_BITS,
                                        COUNTINGMODE_BINARY,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_FREQ ) ) )      //in Hz (25kHz is ok)
        log() << "\n(EncoderSSI_apci1710) Error "<< res << " : Module " << moduleNr1 << " is not ready for SSI\n" << endlog(Error);

    if ( 0 != (res = apci1710_ssi_init( dev, moduleNr2,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_PROFILE,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_POSITION_BITS,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_TURN_BITS,
                                        COUNTINGMODE_BINARY,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_FREQ ) ) )      //in Hz (25kHz is ok)
        log() << "\n(EncoderSSI_apci1710) Error "<< res << " : Module " << moduleNr2 << " is not ready for SSI\n" << endlog(Error);

    if ( 0 != (res = apci1710_ssi_init( dev, moduleNr3,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_PROFILE2,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_POSITION_BITS,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_TURN_BITS2,
                                        COUNTINGMODE_BINARY,
                                        ORONUM_DEVICE_DRIVERS_APCI1710_SSI_FREQ ) ) )      //in Hz (25kHz is ok)
        log() << "\n(EncoderSSI_apci1710) Error "<< res << " : Module " << moduleNr3 << " is not ready for SSI\n" << endlog(Error);


#ifdef OROPKG_CORELIB_TIMING
    // init one buffer, display some statistics
    TimeService::ticks t=TimeService::Instance()->getTicks();
    readCard( readbuffer );
    t = TimeService::Instance()->ticksSince(t);
    TimeService::nsecs n = TimeService::ticks2nsecs(t);
    log() << "(EncoderSSI_apci1710) Reading SSI modules takes about " << long(n) << " nanoseconds" << endlog(Info);
#endif

    this->start();
}
开发者ID:ptroja,项目名称:orocos-ocl,代码行数:52,代码来源:EncoderSSIapci1710.cpp

示例13: ROS_INFO

bool ArmBridgeRosOrocos::startHook()
{
	m_cartesian_pose_with_impedance_ctrl_as->start();
	m_joint_config_as->start();
	//m_trajectory_as_srv->start();

	//m_arm_has_active_joint_trajectory_goal = false;

	ROS_INFO("arm actions started");

	if (!brics_joint_positions.connected())
	{
		log(Error) << "BRICS joint positions not connected." << endlog();
		return false;
	}

	if (!orocos_joint_positions.connected())
	{
		log(Error) << "Orocos joint positions not connected." << endlog();
		return false;
	}

	if (!orocos_homog_matrix.connected())
	{
		log(Error) << "Orocos homog_matrix not connected." << endlog();
		return false;
	}

	if (!orocos_arm_stiffness.connected())
	{
		log(Error) << "arm stiffness port not connected." << endlog();
		return false;
	}

	return TaskContext::startHook();
}
开发者ID:RC5Group4,项目名称:research-camp-5,代码行数:36,代码来源:arm_bridge_ros_orocos.cpp

示例14: store

      /**
       * Create a variable of data type float
       */
      void store(Property<float> *v)
      {
        int retval;
        int varid;
        std::string sname = composeName(v->getName());

        /**
         * Create a new variable with only one dimension i.e. the unlimited time dimension
         */ 
        retval = nc_def_var(ncid, sname.c_str(), NC_FLOAT, DIMENSION_VAR,
                    &dimsid, &varid);
        if ( retval )
          log(Error) << "Could not create variable " << sname << ", error " << retval <<endlog();
        else
          log(Info) << "Variable "<< sname << " successfully created" <<endlog();
      }
开发者ID:ptroja,项目名称:orocos-ocl,代码行数:19,代码来源:NetcdfHeaderMarshaller.hpp

示例15: log

bool OstreamAppender::configureHook()
{
    // verify valid limits
    int m = maxEventsPerCycle_prop.rvalue();
    if ((0 > m))
    {
        log(Error) << "Invalid maxEventsPerCycle value of "
                   << m << ". Value must be >= 0."
                   << endlog();
        return false;
    }
    maxEventsPerCycle = m;

    if (!appender)
        appender = new log4cpp::OstreamAppender(getName(), &std::cout);

    return configureLayout();
}
开发者ID:orocos-toolchain,项目名称:ocl,代码行数:18,代码来源:OstreamAppender.cpp


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