There are three windows that are important to visualizing channel activities: the main window, History Graph window and Channel window. We shall cover the visualization of asynchronous channels on this page.
Click on the Channel button to display all channels created so far. The display area is divided into three columns. Column Channel Name displays channel names, column Type displays the type of each channel (i.e., Asyn for an asynchronous channel and Syn for a synchronous channel), and Status displays the current status of each channel (i.e., Sending - the channel is used for sending message, Received - the message sent to the channel has been received be a thread, and Empty - the channel has no message passing activity). In the following screen shot, we see two channels Channel0-1 and Channel1-2. Both are asynchronous channels. The second channel Channel1-2 is being used for sending a message, while the message sent to channel Channel0-1 has been received by a thread.
Click on the channel name shown in the display area to bring up the Channel window for the message passing details of that channel. In a Channel window, the window title is the name of the channel. See the screen shots below. The staus of a channel is displayed in the middle part near the top of the window. If a message has been received by a thread, the status Last Message Received and the mailbox icon are shown. If a channel is used to send a message, the status Sending Message and the envelope icon are shown. The status of a channel may also be Empty, which means the channel has no message passing activity. This only occurs when a channel is just created and no message is sent or received.
channel received a message |
channel sending a message |
The left display area shows the un-received message of each sender. Note that since this is an asynchronous one-to-one channel, the senders are likely the same thread and there may be more than one messages on the channel. Since the visualization system only recognizes messages of prime types (i.e., char, int, long, float and double), the content of a message that is an array or a structure will not be displayed properly. In the first window above, the channel has a message that has not been received. This message was sent by thread Master, and message content is an integer 7. In the second window, this channel has a message sent by thread Sort1 and the message content is an integer 4.
The right display area is the channel history. It shows the most recent message passing activities with the most recent one being on the top. This area is divided into three columns: Receiver Name shows the thread name of the receiver, Sender Name shows the thread name of the sender, and Message shows the message content. The number of history entries, by default, is five; however, it can be changed using the buttons in the lower right corner of the window. The first window shows the five recently received messages by thread Sort1 through channel Channel0-1. These messages are 4, 6, 9, 3 and 2 in this order with 2 being the most recent one.
The activities of an asynchronous channel are shown with two tags: CS and CR. See the screen shot below. Tag CS indicates a thread sent a message to a channel, and tag CR indicates a thread received a message from a channel. To see the corresponding sender and receiver, click on the Channel button. Once this is done, segments in black are added between a send (i.e., a CS tag) and a receive (i.e., a CR tag). These segments are referred to as send-receive links. Note that if a message has been sent but not yet received, no send-receive link will be connect to the corresponding CS tag. A link is shown only if the message has been received. Note also that because sending message is non-blocking with asynchronous channels, after a CS tag, the history bar of a thread is still in color green (i.e., running).
The CS and CR tags and the send-receive links do not provide the channel information and the content of messages. To learn more about the details, you may use the Channel window, or click on the tag to bring up the source window to see the actual statement.