start portlet menu bar

HCLSoftware: Fueling the Digital+ Economy

Display portlet menu
end portlet menu bar
Close
Select Page

Protocols in an RTist model are often binary, meaning that there are two connected ports typed by the protocol. The out-events for one of the ports are the in-events for the other port.

This is expressed by making one of the ports conjugated (denoted by ~). Hence, for a conjugated port the direction of protocol events is swapped so that the out-events can be sent in and the in-events sent out from it.

Conjugated Ports

A binary protocol MyProtocol typing two connected ports p1 and p2. The event that can be sent out from p1 (OutEvent1) can be sent in to p2, and the event that can be sent in to p1 (InEvent1) can be sent out from p2. The port p2 is therefore conjugated to swap the event directions specified in the protocol.

In the above example, it doesn’t matter which of the ports that are conjugated. However, when you are modeling a client-server design, a useful recommendation is to conjugate the server ports rather than the client ports.

Even if the opposite also works, you get two benefits by following this recommendation:

  1. All events that are sent from the client to the server are out-events, and all events that are sent from the server to the client are in-events. This makes send- and invoke-statements in the client capsule easy to read. Communication in client-server designs is usually initiated by clients rather than the server.
  2. There are typically more client ports than server ports, so by choosing to conjugate the server ports you save some clicking in the Properties view.

 

Client Server Design

A client-server design with 1 server port and 2 client ports. The client ports are named according to the server to make send- and invoke-statements in the client capsules easy to read.

If you want to change which ports that are conjugated, you also need to swap the directions of all events in the protocol of those ports. RTist provides a handy command for doing this. Select all events in the protocol, right-click and choose the command Change Event Direction. All in-events will become out-events and vice versa.

Comment wrap

Start a Conversation with Us

We’re here to help you find the right solutions and support you in achieving your business goals.

  |  October 4, 2024
End of Support for HCL DevOps Model RealTime (formerly HCL RTist) 11.3 (all versions 2023.04 - 2023.49); 12.0.0; 12.0.1; and 12.0.2
HCL DevOps Model RealTime 11.3 and 12.0.x versions will reach End of Support on June 30, 2025. Upgrade to newer versions to continue receiving support and access the latest features.
  |  September 27, 2024
Future-Proof Your Real-Time Application Development: Introducing Model RealTime 12.1
Upgrade your real-time development workflow with Model RealTime 12.1 and 12.0.3! Enjoy new features like support for Art files, isolated trace sessions, and improved TargetRTS for enhanced performance.
  |  March 26, 2024
Unlocking the Potential of Real-Time Development with HCL DevOpsCode RealTime 1.0.1
HCL DevOps Code RealTime 1.0.1 streamlines development with enhanced validation and clearer error reporting. New guide simplifies building & customizing real-time applications.