public class StreamTransmitter extends MessageDecoder
This implementation is limited to sending from a fixed-size input array. The protocol permits continuous transmission, but this class is not intended to implement that.
Connection.ConnectionListener
Modifier and Type | Field and Description |
---|---|
(package private) int |
bufferSize |
(package private) int[] |
bytes |
(package private) Connection |
connection |
(package private) byte |
destStreamID |
(package private) NodeID |
far |
(package private) NodeID |
here |
(package private) int |
nextIndex |
(package private) byte |
sourceStreamID |
Constructor and Description |
---|
StreamTransmitter(NodeID here,
NodeID far,
int bufferSize,
int[] bytes,
Connection c) |
Modifier and Type | Method and Description |
---|---|
void |
handleStreamDataProceed(StreamDataProceedMessage msg,
Connection sender)
Handle "Stream Data Proceed" message
|
void |
handleStreamInitiateReply(StreamInitiateReplyMessage msg,
Connection sender)
Handle "Stream Init Reply" message
|
(package private) void |
sendNext() |
defaultHandler, handleConsumerIdentified, handleDatagram, handleDatagramAcknowledged, handleDatagramRejected, handleIdentifyConsumers, handleIdentifyEvents, handleIdentifyProducers, handleInitializationComplete, handleLearnEvent, handleOptionalIntRejected, handleProducerConsumerEventReport, handleProducerIdentified, handleProtocolIdentificationReply, handleProtocolIdentificationRequest, handleSimpleNodeIdentInfoReply, handleSimpleNodeIdentInfoRequest, handleStreamDataComplete, handleStreamDataSend, handleStreamInitiateRequest, handleTractionControlReply, handleTractionControlRequest, handleTractionProxyReply, handleTractionProxyRequest, handleVerifiedNodeIDNumber, handleVerifyNodeIDNumber, put
registerStartNotification
NodeID here
NodeID far
int bufferSize
int[] bytes
Connection connection
int nextIndex
byte destStreamID
byte sourceStreamID
public StreamTransmitter(NodeID here, NodeID far, int bufferSize, int[] bytes, Connection c)
public void handleStreamInitiateReply(StreamInitiateReplyMessage msg, Connection sender)
handleStreamInitiateReply
in class MessageDecoder
msg
- message to handlesender
- connection where it came fromvoid sendNext()
public void handleStreamDataProceed(StreamDataProceedMessage msg, Connection sender)
handleStreamDataProceed
in class MessageDecoder
msg
- message to handlesender
- connection where it came fromCopyright © 2017 The OpenLCB Group. All rights reserved.