-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c92ad5
commit d5e67bc
Showing
40 changed files
with
147 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
/* | ||
* Copyright (C) 2011 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.ros.internal.node.client; | ||
|
||
|
||
|
@@ -24,35 +8,30 @@ | |
import org.ros.internal.node.response.IntegerResultFactory; | ||
import org.ros.internal.node.response.ObjectResultFactory; | ||
import org.ros.internal.node.response.Response; | ||
import org.ros.internal.node.response.ResultFactory; | ||
import org.ros.internal.node.response.StringListResultFactory; | ||
|
||
import org.ros.internal.node.response.StringResultFactory; | ||
import org.ros.internal.node.response.VoidResultFactory; | ||
import org.ros.internal.node.rpc.MasterRpcEndpointImpl; | ||
import org.ros.internal.node.rpc.ParameterServerRpcEndpoint; | ||
import org.ros.internal.node.server.NodeIdentifier; | ||
import org.ros.internal.node.server.ParameterServer; | ||
import org.ros.internal.transport.tcp.TcpRosServer; | ||
|
||
import org.ros.namespace.GraphName; | ||
|
||
import java.io.IOException; | ||
import java.net.InetAddress; | ||
import java.net.InetSocketAddress; | ||
import java.net.URI; | ||
import java.net.UnknownHostException; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
|
||
/** | ||
* Provide access to the RPC API for a ROS {@link ParameterServer}. | ||
* The ParameterServer typically starts one port higher than the master. | ||
* | ||
* @author [email protected] (Ken Conley) | ||
* @author [email protected] (Damon Kohler) | ||
* @author jg | ||
*/ | ||
public class ParameterClient extends Client<ParameterServerRpcEndpoint> { | ||
private static final boolean DEBUG = true; | ||
private static final boolean DEBUG = false; | ||
private static final Log log = LogFactory.getLog(ParameterClient.class); | ||
private final NodeIdentifier nodeIdentifier; | ||
private final String nodeName; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
/* | ||
* Copyright (C) 2011 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.ros.internal.node.client; | ||
|
||
import org.apache.commons.logging.Log; | ||
|
@@ -34,7 +18,7 @@ | |
|
||
import java.net.InetAddress; | ||
import java.net.InetSocketAddress; | ||
import java.net.URI; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.concurrent.Callable; | ||
|
@@ -45,12 +29,11 @@ | |
* Manages topic, and service registrations of a {@link SlaveServer} with the | ||
* {@link MasterServer}. | ||
* | ||
* @author [email protected] (Ken Conley) | ||
* @author [email protected] (Damon Kohler) | ||
* @author jg | ||
*/ | ||
public class Registrar implements TopicParticipantManagerListener, ServiceManagerListener { | ||
|
||
private static final boolean DEBUG = true; | ||
private static final boolean DEBUG = false; | ||
private static final Log log = LogFactory.getLog(Registrar.class); | ||
|
||
private static final int SHUTDOWN_TIMEOUT = 5; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
/* | ||
* Copyright (C) 2011 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.ros.internal.node.rpc; | ||
|
||
|
||
|
@@ -35,16 +19,18 @@ | |
import java.util.Collection; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import java.util.Set; | ||
import java.util.Vector; | ||
|
||
|
||
/** | ||
* @author [email protected] (Damon Kohler) | ||
* Facility for contacting the remote master and issuing commands via the remote invokable methods. | ||
* The transport is accomplished via the RemoteRequestinterface implementors. | ||
* @author jg | ||
*/ | ||
public class SlaveRpcEndpointImpl implements SlaveRpcEndpoint { | ||
|
||
private static final boolean DEBUG = true; | ||
private static final boolean DEBUG = false; | ||
private static final Log log = LogFactory.getLog(SlaveRpcEndpointImpl.class); | ||
|
||
//private final SlaveServer slave; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
/* | ||
* Copyright (C) 2011 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.ros.internal.node.server.master; | ||
|
||
|
||
|
@@ -40,7 +24,7 @@ | |
import java.net.InetAddress; | ||
import java.net.InetSocketAddress; | ||
import java.net.URI; | ||
import java.net.UnknownHostException; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
@@ -55,8 +39,7 @@ | |
* | ||
* @see <a href="http://www.ros.org/wiki/Master">Master documentation</a> | ||
* | ||
* @author [email protected] (Damon Kohler) | ||
* @author [email protected] (Keith M. Hughes) | ||
* @author jg | ||
*/ | ||
public class MasterServer extends RpcServer implements MasterRegistrationListener { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
package org.ros.internal.node.service; | ||
|
||
|
||
|
@@ -27,7 +26,7 @@ | |
/** | ||
* Default implementation of a {@link ServiceClient}. | ||
* | ||
* @author [email protected] (Damon Kohler) | ||
* @author jg | ||
*/ | ||
public class DefaultServiceClient<T, S> implements ServiceClient<T, S> { | ||
|
||
|
@@ -96,7 +95,7 @@ private DefaultServiceClient(GraphName nodeName, ServiceDeclaration serviceDecla | |
// TODO(damonkohler): Support non-persistent connections. | ||
connectionHeader.addField(ConnectionHeaderFields.PERSISTENT, "1"); | ||
connectionHeader.merge(serviceDeclaration.toConnectionHeader()); | ||
tcpClientManager = new TcpClientManager(executorService); | ||
tcpClientManager = TcpClientManager.getInstance(executorService); | ||
ServiceClientHandshakeHandler<T, S> serviceClientHandshakeHandler = | ||
new ServiceClientHandshakeHandler<T, S>(connectionHeader, responseListeners, executorService); | ||
handshakeLatch = new HandshakeLatch(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.