Package org.jcsp.net
Class NetChannelInputProcess
java.lang.Object
org.jcsp.net.NetChannelInputProcess
- All Implemented Interfaces:
CSProcess
A process for network input (RX).
This is a package-private implementation class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChannelMessage.Ack
private ChannelMessage.Ack
private Alternative
private ChannelID
Our channel ID.private long
Our channel index.private AltingChannelInput
The channel we use for recieving from the demuxes.private SharedChannelOutput
private String
The name of this channel.private RejectableChannel
The channel used for output.private boolean
private Any2OneChannel
-
Constructor Summary
ConstructorsConstructorDescriptionNetChannelInputProcess
(String label, RejectableChannel out) Constructor which takes a label to assign to the channel's VCN and aChannelOutput
object on which to output any data received from over the network. -
Method Summary
-
Field Details
-
channelIndex
private long channelIndexOur channel index. -
channelID
Our channel ID. -
name
The name of this channel. -
fromNetIn
The channel we use for recieving from the demuxes. -
fromNetOut
-
out
The channel used for output. -
stopChannel
-
alt
-
ackA
-
ackB
-
sendAckA
private transient boolean sendAckA
-
-
Constructor Details
-
NetChannelInputProcess
NetChannelInputProcess(String label, RejectableChannel out) Constructor which takes a label to assign to the channel's VCN and aChannelOutput
object on which to output any data received from over the network.- Parameters:
label
- the label to assign to the VCN. If this isnull
then no label will be assigned.out
- theChannelOutput object on which to forward any data received from over the network.
-
-
Method Details
-
breakChannel
void breakChannel() -
getChannelIndex
long getChannelIndex() -
readFromNetChannel
Reads a message from the network communications channel. Acknowledges and ignores LinkLost messages.- Returns:
- The first Message read from the network.
-
run
public void run()Handle this link. Gets data and sends acknowlegements. Runs forever.
-