Skip to content

Commit d5e67bc

Browse files
committed
Minimal debug, cleaned up handshake
1 parent 9c92ad5 commit d5e67bc

40 files changed

+147
-225
lines changed

src/main/java/org/ros/internal/node/DefaultNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.ros.internal.node.topic.SubscriberFactory;
2828
import org.ros.internal.node.topic.TopicDeclaration;
2929
import org.ros.internal.node.topic.TopicParticipantManager;
30-
import org.ros.internal.transport.tcp.TcpRosServer;
30+
3131
import org.ros.message.MessageFactory;
3232
import org.ros.message.Time;
3333
import org.ros.namespace.GraphName;
@@ -62,7 +62,7 @@
6262
*
6363
*/
6464
public class DefaultNode implements ConnectedNode {
65-
private static final boolean DEBUG = true;
65+
private static final boolean DEBUG = false;
6666
private static final Log log = LogFactory.getLog(DefaultNode.class);
6767
/**
6868
* The maximum delay before shutdown will begin even if all

src/main/java/org/ros/internal/node/client/ParameterClient.java

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/*
2-
* Copyright (C) 2011 Google Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
16-
171
package org.ros.internal.node.client;
182

193

@@ -24,35 +8,30 @@
248
import org.ros.internal.node.response.IntegerResultFactory;
259
import org.ros.internal.node.response.ObjectResultFactory;
2610
import org.ros.internal.node.response.Response;
27-
import org.ros.internal.node.response.ResultFactory;
28-
import org.ros.internal.node.response.StringListResultFactory;
11+
2912
import org.ros.internal.node.response.StringResultFactory;
3013
import org.ros.internal.node.response.VoidResultFactory;
3114
import org.ros.internal.node.rpc.MasterRpcEndpointImpl;
3215
import org.ros.internal.node.rpc.ParameterServerRpcEndpoint;
3316
import org.ros.internal.node.server.NodeIdentifier;
3417
import org.ros.internal.node.server.ParameterServer;
35-
import org.ros.internal.transport.tcp.TcpRosServer;
18+
3619
import org.ros.namespace.GraphName;
3720

3821
import java.io.IOException;
39-
import java.net.InetAddress;
4022
import java.net.InetSocketAddress;
41-
import java.net.URI;
4223
import java.net.UnknownHostException;
43-
import java.util.ArrayList;
4424
import java.util.List;
45-
import java.util.Map;
25+
4626

4727
/**
4828
* Provide access to the RPC API for a ROS {@link ParameterServer}.
29+
* The ParameterServer typically starts one port higher than the master.
4930
*
50-
* @author kwc@willowgarage.com (Ken Conley)
51-
* @author damonkohler@google.com (Damon Kohler)
5231
* @author jg
5332
*/
5433
public class ParameterClient extends Client<ParameterServerRpcEndpoint> {
55-
private static final boolean DEBUG = true;
34+
private static final boolean DEBUG = false;
5635
private static final Log log = LogFactory.getLog(ParameterClient.class);
5736
private final NodeIdentifier nodeIdentifier;
5837
private final String nodeName;

src/main/java/org/ros/internal/node/client/Registrar.java

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/*
2-
* Copyright (C) 2011 Google Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
16-
171
package org.ros.internal.node.client;
182

193
import org.apache.commons.logging.Log;
@@ -34,7 +18,7 @@
3418

3519
import java.net.InetAddress;
3620
import java.net.InetSocketAddress;
37-
import java.net.URI;
21+
3822
import java.util.Collection;
3923
import java.util.List;
4024
import java.util.concurrent.Callable;
@@ -45,12 +29,11 @@
4529
* Manages topic, and service registrations of a {@link SlaveServer} with the
4630
* {@link MasterServer}.
4731
*
48-
* @author kwc@willowgarage.com (Ken Conley)
49-
* @author damonkohler@google.com (Damon Kohler)
32+
* @author jg
5033
*/
5134
public class Registrar implements TopicParticipantManagerListener, ServiceManagerListener {
5235

53-
private static final boolean DEBUG = true;
36+
private static final boolean DEBUG = false;
5437
private static final Log log = LogFactory.getLog(Registrar.class);
5538

5639
private static final int SHUTDOWN_TIMEOUT = 5;

src/main/java/org/ros/internal/node/rpc/SlaveRpcEndpointImpl.java

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/*
2-
* Copyright (C) 2011 Google Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
16-
171
package org.ros.internal.node.rpc;
182

193

@@ -35,16 +19,18 @@
3519
import java.util.Collection;
3620
import java.util.HashSet;
3721
import java.util.List;
38-
import java.util.Map;
22+
3923
import java.util.Set;
40-
import java.util.Vector;
24+
4125

4226
/**
43-
* @author damonkohler@google.com (Damon Kohler)
27+
* Facility for contacting the remote master and issuing commands via the remote invokable methods.
28+
* The transport is accomplished via the RemoteRequestinterface implementors.
29+
* @author jg
4430
*/
4531
public class SlaveRpcEndpointImpl implements SlaveRpcEndpoint {
4632

47-
private static final boolean DEBUG = true;
33+
private static final boolean DEBUG = false;
4834
private static final Log log = LogFactory.getLog(SlaveRpcEndpointImpl.class);
4935

5036
//private final SlaveServer slave;

src/main/java/org/ros/internal/node/server/BaseServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*/
1515
public final class BaseServer extends TCPServer {
16-
private static boolean DEBUG = true;
16+
private static boolean DEBUG = false;
1717
private static final Log log = LogFactory.getLog(BaseServer.class);
1818
public int WORKBOOTPORT = 8090;
1919
public InetAddress address = null;

src/main/java/org/ros/internal/node/server/ParameterServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @author Groff
2727
*/
2828
public class ParameterServer extends RpcServer {
29-
private static final boolean DEBUG = true;
29+
private static final boolean DEBUG = false;
3030
private static final Log log = LogFactory.getLog(ParameterServer.class);
3131

3232
private final Map<String, Object> tree;

src/main/java/org/ros/internal/node/server/RpcServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
public abstract class RpcServer {
2424

25-
private static final boolean DEBUG = true;
25+
private static final boolean DEBUG = false;
2626
private static final Log log = LogFactory.getLog(RpcServer.class);
2727

2828
private final AdvertiseAddress advertiseAddress;

src/main/java/org/ros/internal/node/server/TCPServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* TCPServer is the superclass of all objects using ServerSockets.
1010
*/
1111
public abstract class TCPServer implements Cloneable, Runnable {
12-
private static boolean DEBUG = true;
12+
private static boolean DEBUG = false;
1313
private static final Log log = LogFactory.getLog(TCPServer.class);
1414
ServerSocket server = null;
1515
Socket data = null;

src/main/java/org/ros/internal/node/server/TCPWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
*/
1919
public class TCPWorker implements Runnable {
20-
private static final boolean DEBUG = true;
20+
private static final boolean DEBUG = false;
2121
private static final Log log = LogFactory.getLog(TCPWorker.class);
2222
public boolean shouldRun = true;
2323
private Socket dataSocket;

src/main/java/org/ros/internal/node/server/ThreadPoolManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*/
2828
public class ThreadPoolManager {
29-
private static final boolean DEBUG = true;
29+
private static final boolean DEBUG = false;
3030
private static final Log log = LogFactory.getLog(ThreadPoolManager.class);
3131
private static String DEFAULT_THREAD_POOL = "RPCSERVER";
3232
private int threadNum = 0;

0 commit comments

Comments
 (0)