Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Small change to NativeNodeMain #229

Merged
merged 1 commit into from
Jan 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions rosjava/src/main/java/org/ros/node/NativeNodeMain.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
package org.ros.node;

import org.ros.node.AbstractNodeMain;
import org.ros.node.ConnectedNode;
import org.ros.node.Node;
import org.ros.namespace.GraphName;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.util.List;
import java.util.Map;

/**
* A java wrapper to load and run a native-code ROS node.
*
Expand Down Expand Up @@ -70,16 +62,16 @@ public NativeNodeMain(String libName) {
this(libName, null);
}

// These methods define the execution model interface for this node.
protected abstract void execute(String rosMasterUri, String rosHostName, String rosNodeName, String[] remappingArguments);
protected abstract void shutdown();
// These methods define the execution model interface for this node. Return values are error codes (not used by default).
protected abstract int execute(String rosMasterUri, String rosHostName, String rosNodeName, String[] remappingArguments);
protected abstract int shutdown();

@Override
public void onStart(final ConnectedNode connectedNode) {
// retain important ROS info
masterUri = connectedNode.getMasterUri().toString();
hostName = connectedNode.getUri().getHost();
nodeName = this.libName;
nodeName = getDefaultNodeName().toString();

// create a new thread to execute the native code.
new Thread() {
Expand Down