DTL_CIP_CONNECTION_OPEN parameters

target
is a pointer to a DTSA_AB_CIP_PATH structure. Its type must be cast to DTSA_TYPE when calling this function (see Data Table Structured Address).
To originate a connection, a DTSA_AB_CIP_PATH structure must be used to specify the path to the CIP module containing the target of the connection. The first link in the connection path (for example, the link between RSLinx Classic and the next CIP node) is specified by the
driver_id
in the DTSA_AB_CIP_PATH structure. Any additional links must be specified in the
baPath
portion of the DTSA_AB_CIP_PATH structure. See Understanding CIP Addressing for further details.
ioi
(Internal Object Identifier) identifies the CIP object with which the connection is to be established within the CIP module specified by
target
.
The
ioi
points to a buffer containing an 8-bit size field followed by a sequence of segments, as described in the
Logix 5000
Data Access Programming Manual (publication 1756-PM020). The size field specifies the number of 16-bit words required to hold the address segments (exclusive of the size field itself). Only logical and symbol segment types are allowed, since path segments specify the route to the target CIP module, and this information is provided via the
target
parameter.
If the CIP messaging protocol is to be used over this connection (see DTL_CIP_MESSAGE_SEND), the connection Connections should typically be made with the Message Router in a CIP module. The logical address for the message router is always class 2, instance 1, represented as four bytes (shown here in hexadecimal):
20 Logical Segment, type Class in 8-bit format
02 Class number of Message Router
24 Logical Segment, type Instance in 8-bit format
01 Instance number of Message Router (always = 1)
Thus, the contents of the
ioi
buffer should be 02 20 02 24 01.
If
ioi
is NULL, the connection request will still be sent to the target module, but without identifying any destination object within the module. Different modules may interpret such a request in different ways.
conn_id
is a pointer to a location in which the DTL_CIP_CONNECTION_OPEN function will place a handle for the application to use in subsequent references to the connection.
conn_param
is a value which will be passed back to the application as a parameter in the
packet_proc
and
status_proc
callback functions whenever they are called for the connection. The application may use this to store an index, pointer, or handle. It is uninterpreted by the RSLinx Classic software.
cip_conn
is a pointer to a structure containing the connection parameters for the requested connection (see CIP Connection Parameter Structures). All values in the
cip_conn
structure must be set by the application prior to calling DTL_CIP_CONNECTION_OPEN, except for the
TO.api
and
OT.api
values, which will be set by the target of the connection when the connection establishment completes.
packet_proc
is a function (of type DTL_CIP_CONNECTION_PACKET_PROC) in the calling application which will be called whenever new data becomes available on the connection.
A DTL_CIP_CONNECTION_PACKET_PROC callback function should only be used for connections for which RSLinx Classic is not expected to perform any request/reply matching. Thus, if the application specifies a
packet_proc
, then DTL_CIP_CONNECTION_SEND must be used for sending data on the connection.
status_proc
is a function (of type DTL_CIP_CONNECTION_STATUS_PROC) in the calling application which will be called whenever the state of the connection changes (for example, when the connection closes or fails) and whenever a status event of interest occurred on the connection (see DTL_CIP_CONNECTION_STATUS_PROC and CIP Connection Parameter Structures). After the connection has been successfully established, the
status_proc
function will be called with a status of DTL_CONN_ESTABLISHED.
If the application does not specify a callback function, then it will not be able to track the state of the connection.
timeout
is the maximum time (in milliseconds) to wait for the connection to be established. If this time interval expires, the
status_proc
function will be called with a status of DTL_CONN_ERROR and an I/O completion value of DTL_E_TIME. The
conn_id
will be invalid.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal