Register, accept a connection, and transfer data

This is similar to connecting to an CIP object and transferring data, except that the method of establishing the connection is different. Instead of the application calling DTL_CIP_CONNECTION_OPEN (or DTL_CIP_LARGE_CONNECTION_OPEN) directly, it registers with RSLinx Classic in the same way as in the previous case for receiving CIP messages (using DTL_CIP_APPLICATION_REGISTER) and waits for a device in the CIP system to originate a connection request.
Complete the following steps:
  1. Specify a Link Address and an International String symbol for the application.
    This is the same as for registering for receiving CIP messages. The same DTL_CIP_APPLICATION_REGISTER call can and should be used both for enabling the reception of CIP messages and enabling the reception of CIP connection requests.
  2. Call DTL_CIP_APPLICATION_REGISTER to register the application with RSLinx Classic.
    In addition to the parameters discussed under the previous case of registering to receive CIP messages, the application must specify a pointer to a callback function (of type DTL_CIP_APPLICATION_CONNECT_PROC) which RSLinx Classic can call when a connection request is received for the application.
  3. Wait for a connection request.
    • When a connection request is received, RSLinx Classic will call the DTL_CIP_APPLICATION_CONNECT_PROC callback function specified by the application in its DTL_CIP_APPLICATION_REGISTER call.
    • One of the parameters of the callback function is a connection ID for the application to use in its response. Another parameter is a pointer to a DTL_CIP_TRANSPORT_CONNECTION structure that describes the type of connection requested.
  4. Call DTL_CIP_CONNECTION_OPEN (or DTL_CIP_LARGE_CONNECTION_OPEN) to send a response.
    • Depending on the type of connection requested, the application may or may not want to allow the connection to be established. The application must call either DTL_CIP_CONNECTION_REJECT to reject the connection or DTL_CIP_CONNECTION_ACCEPT to accept the connection.
    • The application can call DTL_CIP_CONNECTION_REJECT or DTL_CIP_CONNECTION_ACCEPT either from within the DTL_CIP_APPLICATION_CONNECT_PROC callback function or at some later time. In either case, the connection ID provided with the DTL_CIP_APPLICATION_CONNECT_PROC call must be used to match the response to the original message.
    • Once the application has accepted the connection, it can proceed to transfer data in exactly the same way as described for the case in which the application originates the connection itself.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal