Next: Gui to Server Messages
Up: The DCS Protocol
Previous: The binary section
Contents
The connection protocol has been simplified from the first two releases of DCS.
The GUI and hardware clients connection to DCSS on different ports.
For hardware servers (DHS):
- The new DHS opens a socket connection to the
hardware listening port on DCSS.
- DHS begins reading and handling messages
sent from DCSS.
- DCSS will send a
stoc_send_client_type
to the DHS.
- The DHS has 1 second to respond with the following message:
htos_client_is_hardware dhsName as
discussed in Client is hardware message .
At this point DCSS will disconnect a DHS for the following reasons:
- The DHS does not respond within 1 second.
- The DHS does not respond with the name of a DHS
listed within the
database.dat
file.
- There is already a DHS connected with the same
name as the DHS that is currently trying to connect.
For GUI clients (BLU-ICE):
- The new BLU-ICE opens a socket connection to the
GUI client listening port on DCSS.
- DCSS will send a
stoc_send_client_type
to the BLU-ICE.
- The BLU-ICE has 1 second to respond with the following message:
htos_client_is_gui userName hostname display
Where userName is the unix account name of a the
user that initiated the BLU-ICE.
At this point DCSS has the option to disconnect the BLU-ICE for the
following reasons:
- The BLU-ICE does not send the response within 1 second.
- The BLU-ICE responds with a userName
that is not listed within the mysql database
Users
table.
- After DCSS confirms that the userName is listed in the mysql
database, DCSS will send the following message to BLU-ICE
with 200 bytes of trailing binary data:
stog_respond_to_challenge
- BLU-ICE must read the 200 bytes of binary data and respond to DCSS
appropriately.
At this point DCSS will disconnect the BLU-ICE for the following reasons:
- The BLU-ICE client does not respond within 1 second.
- The BLU-ICE does not send the appropriate response.
- DCSS sends an message
stog_login_complete
- DCSS sends another message
stog_set_permission_level permissionLevel
where permissionsLevel is a number obtained from the
mysql's Users table that can be used by the GUI to disable or enable
certain buttons and tabs. DCSS will also use this value to prevent
the user from doing what they are not allowed to do.
- DCSS will then proceed to update the BLU-ICE client with the
complete state of the beam line. This will include every motor position.
- DCSS will then begin processing message from BLU-ICE as they come in, and
will send messages to the BLU-ICE client to keep the BLU-ICE up-to-date with
the latest status of motor positions or operation activity.
- DCSS will disconnect the BLU-ICE under the following circumstances:
- The BLU-ICE is too slow in processing the message in its
TCP/IP input buffer and DCSS's TCP/IP output buffer becomes full.
- The BLU-ICE socket has an error.
Next: Gui to Server Messages
Up: The DCS Protocol
Previous: The binary section
Contents
Scott McPhillips
2011-07-06