-
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.
Netty removal. full fucntionality. Partial message issue.
- Loading branch information
1 parent
9c9d53e
commit 19afda9
Showing
23 changed files
with
292 additions
and
286 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,26 +1,12 @@ | ||
/* | ||
* 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.topic; | ||
|
||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
import org.ros.concurrent.ListenerGroup; | ||
import org.ros.concurrent.SignalRunnable; | ||
import org.ros.internal.message.MessageBuffers; | ||
import org.ros.internal.node.server.NodeIdentifier; | ||
import org.ros.internal.system.Utility; | ||
import org.ros.internal.transport.ChannelHandlerContext; | ||
import org.ros.internal.transport.ConnectionHeader; | ||
import org.ros.internal.transport.ConnectionHeaderFields; | ||
|
@@ -40,8 +26,13 @@ | |
|
||
/** | ||
* Default implementation of a {@link Publisher}. | ||
* An outgoing message queue is constructed to deliver outbound messages. | ||
* A ListenerGroup of PublisherListeners. | ||
* A MessageFactory | ||
* A list of subscribers as ChannelHandlerContexts. | ||
* A DefaultPublisherListener is constructed as a default entry in the list. | ||
* | ||
* @author [email protected] (Damon Kohler) | ||
* @author jg | ||
*/ | ||
public class DefaultPublisher<T> extends DefaultTopicParticipant implements Publisher<T> { | ||
|
||
|
@@ -180,7 +171,9 @@ public ByteBuffer finishHandshake(ConnectionHeader incomingHeader) { | |
// TODO(damonkohler): Force latch mode to be consistent throughout the life | ||
// of the publisher. | ||
outgoingConnectionHeader.addField(ConnectionHeaderFields.LATCHING, getLatchMode() ? "1" : "0"); | ||
return (ByteBuffer) outgoingConnectionHeader.encode(); | ||
ByteBuffer buffer = MessageBuffers.dynamicBuffer(); | ||
Utility.serialize(outgoingConnectionHeader, buffer); | ||
return buffer; | ||
} | ||
|
||
/** | ||
|
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.topic; | ||
|
||
import org.ros.internal.transport.ConnectionHeader; | ||
|
@@ -23,9 +7,13 @@ | |
import java.util.List; | ||
|
||
/** | ||
* Base definition of a {@link TopicSystemState}. | ||
* Abstract class and Base definition of a {@link TopicSystemState}. | ||
* Primarily operates on TopicDeclaration supplied in constructor. | ||
* During handshake, the topic declaration ConnectionHeader and message type are used to set up | ||
* the class of responses to subscriber which is then stored in the ChannelHandlercontext to filter traffic. | ||
* Provides master signaling methods. | ||
* | ||
* @author [email protected] (Damon Kohler) | ||
* @author jg | ||
*/ | ||
public abstract class DefaultTopicParticipant implements TopicParticipant { | ||
|
||
|
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.