The communication between the MDLC Gateway and the SCADA driver is carried out by the Gateway API routines that send/receive MDLC Buffers that are transferred via the TCP/IP protocol, from the SCADA central (client) to the MDLC Gateway (server) and vice versa. Each one of the MDLC Buffers consists of a Buffer Header and Data Blocks. The Data Blocks have a Data Buffer Header in fixed format and data in various formats.The data unit for SCADA - Gateway communication is buffer (or packet). The buffer consists ofblocks (or messages) that can be requests for operation (Control, Setpoint, Polling request etc.) or raw data which is received from the field (polled data, contention data). The buffer can be contains requests addressed to multiple RTUs or information received from multiple RTUs. To open a session with the MDLC Gateway, the SCADA driver must open a logical link via the Gateway API routine. This is done by using the OPEN ( ) function, which is part of the BSD Socket Library.
Once the connection with the MDLC Gateway is established, each SCADA (client) must notify the MDLC Gateway (server) about the required mode of operation. This part includes the Type Definition of any Gateway dedicated logical channel that is already connected to the MDLC Gateway. The MDLC Gateway receives the configuration from the SCADA via a channel assignment type of formatted buffers. After the SCADA mode of operation is defined in the MDLC Gateway, it is possible to start exchanging data, i.e., sending commands and requests from the SCADA, and also sending realtime, spontaneous and historical data from the MDLC Gateway to the SCADA. Sending and receiving data buffers over the TCP/IP protocol is done by using the SEND( ) and RECV( ) functions, which are part of the BSD Socket Library. To end the session with the MDLC Gateway, the SCADA must disconnect all the logical links that are established with the MDLC Gateway. This is done by using the SCLOSE( ) function, which is part of the BSD Socket Library.
NOTE: Any Channel Assignment Request (Connect Channel, Disconnect Channel and Close Client) which will be initiated by the SCADA driver will be acknowledged by the MDLC Gateway via the same Request Channel (Socket).