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


C++ DiagnosticStatusWrapper::summaryf方法代码示例

本文整理汇总了C++中diagnostic_updater::DiagnosticStatusWrapper::summaryf方法的典型用法代码示例。如果您正苦于以下问题:C++ DiagnosticStatusWrapper::summaryf方法的具体用法?C++ DiagnosticStatusWrapper::summaryf怎么用?C++ DiagnosticStatusWrapper::summaryf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在diagnostic_updater::DiagnosticStatusWrapper的用法示例。


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

示例1: diagnoseConnections

void diagnoseConnections(diagnostic_updater::DiagnosticStatusWrapper &status) {
  if (!fadeToColorClient)
    status.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR,
      "Not all required services are connected.");
  else
    status.summaryf(diagnostic_msgs::DiagnosticStatus::OK,
      "All required services are connected.");
}
开发者ID:Yvaine,项目名称:naro,代码行数:8,代码来源:led_controller.cpp

示例2: diagnoseCANConnection

 void CANPriusNode::diagnoseCANConnection(
     diagnostic_updater::DiagnosticStatusWrapper& status) {
   if (_canConnection && _canConnection->isOpen())
     status.summaryf(diagnostic_msgs::DiagnosticStatus::OK,
       "CAN connection opened on %s.",
       _canConnection->getDevicePathStr().c_str());
   else
    status.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR,
     "CAN connection closed on %s.", _canDeviceStr.c_str());
 }
开发者ID:jmaye,项目名称:can_prius_ros,代码行数:10,代码来源:CANPriusNode.cpp

示例3: phidget_spatial_diagnostic

void phidget_spatial_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
 * Function that will report the status of the hardware to the diagnostic topic
 */
{
	if (!spatialError)  
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
	else
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "IMU cannot be initialized");
		stat.addf("Recommendation", PhidgetIMU_INIT_ERROR);
	}
}
开发者ID:mBusaleh,项目名称:corobot,代码行数:13,代码来源:corobot_phidget.cpp

示例4: phidget_spatial_diagnostic

void phidget_spatial_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
 * Function that will report the status of the hardware to the diagnostic topic
 */
{
	if (!spatialError)  
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
	else
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot be attached");
		stat.addf("Recommendation", "Please verify that the robot has a Phidget Spatial board. If present, please unplug and replug the Phidget Spatial Board USB cable from the Motherboard.");
	}
}
开发者ID:Aharobot,项目名称:roscorobot,代码行数:13,代码来源:corobot_phidget.cpp

示例5: phidget_ik_diagnostic

void phidget_ik_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
 * Function that will report the status of the hardware to the diagnostic topic
 */
{
	if (!interfaceKitError)  
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
	else
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot be attached");
		stat.addf("Recommendation", "Please unplug and replug the Phidget Interface Kit Board USB cable from the Motherboard.");
	}
}
开发者ID:Aharobot,项目名称:roscorobot,代码行数:13,代码来源:corobot_phidget.cpp

示例6: ssc32_diagnostic

/**
 * Function that will report the status of the hardware to the diagnostic topic
 */
void ssc32_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
{
	if (!ssc32Error)  
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "initialized");
	else if (ssc32Error == 1)
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "ssc32 cannot be initialized");
		stat.addf("Recommendation",SSC32_ERROR_CONNECTION);
	}
	else if (ssc32Error == 2)
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot move arm");
		stat.addf("Recommendation", ERROR_MOVING_ARM);
	}
}
开发者ID:mBusaleh,项目名称:corobot,代码行数:18,代码来源:motor.cpp

示例7: run

	void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
	{
		if (boost::shared_ptr<MAVConnInterface> link = weak_link.lock()) {
			mavlink_status_t mav_status = link->get_status();

			stat.addf("Received packets:", "%u", mav_status.packet_rx_success_count);
			stat.addf("Dropped packets:", "%u", mav_status.packet_rx_drop_count);
			stat.addf("Buffer overruns:", "%u", mav_status.buffer_overrun);
			stat.addf("Parse errors:", "%u", mav_status.parse_error);
			stat.addf("Rx sequence number:", "%u", mav_status.current_rx_seq);
			stat.addf("Tx sequence number:", "%u", mav_status.current_tx_seq);

			if (mav_status.packet_rx_drop_count > last_drop_count)
				stat.summaryf(1, "%d packeges dropped since last report",
						mav_status.packet_rx_drop_count - last_drop_count);
			else if (is_connected)
				stat.summary(0, "connected");
			else
				// link operational, but not connected
				stat.summary(1, "not connected");

			last_drop_count = mav_status.packet_rx_drop_count;
		} else {
			stat.summary(2, "not connected");
		}
	}
开发者ID:BeaglePilot,项目名称:mavros,代码行数:26,代码来源:mavros_node.cpp

示例8: gps_diagnostic

    void gps_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
    /**
     * Function that will report the status of the hardware to the diagnostic topic
     */
    {
	if (gps_state == 0)  
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "The gps is working");
	else if (gps_state == 1)
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "Can't intialize");
		stat.addf("Recommendation", "The gps could not be initialized. Please make sure the gps is connected to the motherboard and is configured. You can follow points 1.3 and after in the following tutorial for the configuration: http://ros.org/wiki/gpsd_client/Tutorials/Getting started with gpsd_client");
	}
	else if (gps_state == 2)
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "wrong lib gpsd version");
		stat.addf("Recommendation", "Please make sure that gpsd is installed and that you have at least the api major version 3 or after installed.");
	}
    }
开发者ID:Aharobot,项目名称:roscorobot,代码行数:18,代码来源:client.cpp

示例9: phidget_encoder_diagnostic

void phidget_encoder_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
/**
 * Function that will report the status of the hardware to the diagnostic topic
 */
{
	if (!encoderError)  
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "intialized");
	else if(encoderError == 1)
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot be attached");
		stat.addf("Recommendation", "Please verify that the robot has a Phidget Encoder board. If present, please unplug and replug the Phidget Spatial Board USB cable from the Motherboard.");
	}
	else if(encoderError == 2)
	{
		stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "cannot read");
		stat.addf("Recommendation", "Please verify that the two encoders are connected to the Phidget Encoder Board.");
	}

}
开发者ID:Aharobot,项目名称:roscorobot,代码行数:19,代码来源:corobot_phidget.cpp

示例10: run

void AnalogInputTask::run(diagnostic_updater::DiagnosticStatusWrapper &stat) {
  stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "[%d, %d, %d, %d]",
                values[0], values[1], values[2], values[3]);
}
开发者ID:wmeeusse,项目名称:kobuki,代码行数:4,代码来源:diagnostics.cpp


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