本文整理汇总了Java中org.ros.node.ConnectedNode.getLog方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectedNode.getLog方法的具体用法?Java ConnectedNode.getLog怎么用?Java ConnectedNode.getLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ros.node.ConnectedNode
的用法示例。
在下文中一共展示了ConnectedNode.getLog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStart
import org.ros.node.ConnectedNode; //导入方法依赖的package包/类
@Override
public void onStart(ConnectedNode connectedNode) {
mLog = connectedNode.getLog();
super.onStart(connectedNode);
}
示例2: onStart
import org.ros.node.ConnectedNode; //导入方法依赖的package包/类
@Override
public void onStart(ConnectedNode connectedNode) {
// Needs three publishers, one to ack guest science commands, one for
// the guest science state, and one for guest science data
mAckPublisher = connectedNode.newPublisher(
Constants.TOPIC_GUEST_SCIENCE_MANAGER_ACK, AckStamped._TYPE);
mConfigPublisher = connectedNode.newPublisher(
Constants.TOPIC_GUEST_SCIENCE_MANAGER_CONFIG,
GuestScienceConfig._TYPE);
mDataPublisher = connectedNode.newPublisher(
Constants.TOPIC_GUEST_SCIENCE_DATA, GuestScienceData._TYPE);
mStatePublisher = connectedNode.newPublisher(
Constants.TOPIC_GUEST_SCIENCE_MANAGER_STATE,
GuestScienceState._TYPE);
// State and config file topics are latched
mConfigPublisher.setLatchMode(true);
mStatePublisher.setLatchMode(true);
mCommandSubscriber = connectedNode.newSubscriber(
Constants.TOPIC_MANAGEMENT_EXEC_COMMAND, CommandStamped._TYPE);
mCommandSubscriber.addMessageListener(this);
mNodeConfig = NodeConfiguration.newPrivate();
mMessageFactory = mNodeConfig.getTopicMessageFactory();
mConfig = mConfigPublisher.newMessage();
mState = mStatePublisher.newMessage();
mApkStartIntents = new HashMap<>();
mApkStateLocations = new HashMap<>();
mLogger = new Logger(connectedNode.getLog());
getApkInfo();
if (mContext == null) {
mLogger.error(LOG_TAG,
"Context is null so the gs manager cannot start the messenger service.");
return;
}
// Start messenger service so there is only one instance running at all times
Intent startMessengerIntent = new Intent(mContext, MessengerService.class);
mContext.startService(startMessengerIntent);
mCmdInfo = new CmdInfo();
}