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.Ackprivate ChannelMessage.Ackprivate Alternativeprivate ChannelIDOur channel ID.private longOur channel index.private AltingChannelInputThe channel we use for recieving from the demuxes.private SharedChannelOutputprivate StringThe name of this channel.private RejectableChannelThe channel used for output.private booleanprivate Any2OneChannel -
Constructor Summary
ConstructorsConstructorDescriptionNetChannelInputProcess(String label, RejectableChannel out) Constructor which takes a label to assign to the channel's VCN and aChannelOutputobject 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 aChannelOutputobject on which to output any data received from over the network.- Parameters:
label- the label to assign to the VCN. If this isnullthen 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.
-