CIP connection parameters

ctype
specifies the version of the connection parameter structure. For the current version of the RSLinx Classic SDK, the value in this field must always be DTL_CONN_CIP. Other values may be defined in future versions of the RSLinx Classic SDK to support expanded versions of the structure.
mode
specifies what events on the connection will cause the application's DTL_CIP_CONNECTION_STATUS_PROC and DTL_CIP_CONNECTION_PACKET_PROC callback functions to be called, as well as which functions can be used to send data on the connection. The value in this field should include one of:
  • DTL_CIP_CONN_MODE_IS_CLIENT – the RSLinx Classic end of this CIP connection is expected to take on the role of 'client'. The meaning of this role varies according to the transport class.
  • DTL_CIP_CONN_MODE_IS_SERVER – the RSLinx Classic end of this CIP connection is expected to take on the role of 'server'. The meaning of this role varies according to the transport class.
The default mode is DTL_CIP_CONN_MODE_IS_SERVER. For transport classes 0 and 1, the 'client' receives data packets from the 'server'. For transport classes 2, 3, and 6, the 'client' sends data packets to the 'server', which returns responses. For transport classes 4 and 5, there is no difference between a 'client' and a 'server'. Both ends of the connection may send packets at will, and both ends are expected to return acknowledgments.
A data filter option may also be OR'ed into the
mode
field which will affect when the application's DTL_CIP_CONNECTION_PACKET_PROC callback function for the connection is called, if such a callback function was specified in a DTL_CIP_CONNECTION_OPEN (or DTL_CIP_LARGE_CONNECTION_OPEN) or DTL_CIP_CONNECTION_ACCEPT call. The choices are:
  • DTL_CIP_MODE_FILTER_NONE – All data packets, including duplicate packets (for example, packets with the same sequence number), will be delivered to the application.
  • DTL_CIP_MODE_FILTER_DUPLICATES – All data packets except for duplicate packets (for example, packets with the same sequence number), will be delivered to the application.
  • DTL_CIP_MODE_FILTER_SAME – Only data packets with data different from the previous data packet will be delivered to the application.
The default filter mode is DTL_CIP_MODE_FILTER_DUPLICATES. Note that regardless of the filter mode, a DTL_CIP_CONNECTION_PACKET_PROC callback function will only be called if there is actual data in a packet received on a connection. An acknowledgment packet without any data will never result in a DTL_CIP_CONNECTION_PACKET_PROC call.
There are several event notification options which may be OR'ed into the
mode
field (none of which are turned on by default) which will affect when the application's DTL_CIP_CONNECTION_STATUS_PROC callback function for the connection is called, if such a callback function was specified in the DTL_CIP_CONNECTION_OPEN (or DTL_CIP_LARGE_CONNECTION_OPEN) or DTL_CIP_CONNECTION_ACCEPT call. These options are:
  • DTL_CIP_MODE_NOTIFY_NAKS – The application will be notified whenever a NAK response is received. This applies only to transport classes 4 and 5, and to transport class 6 clients.
  • DTL_CIP_MODE_NOTIFY_ACKS – The application will be notified whenever an ACK response is received. This applies only to transport classes 4 and 5, and to transport class 2 and 6 clients. Note that if data was returned with an ACK, the data will be provided separately using the application's DTL_CIP_CONNECTION_PACKET_PROC callback function for the connection.
  • DTL_CIP_MODE_NOTIFY_DUPLICATES – The application will be notified whenever a duplicate packet is received (for example, one with a duplicate sequence number). The duplicate packet itself will only be provided to the application (via the DTL_CIP_CONNECTION_PACKET_PROC for the connection) if the DTL_CIP_MODE_FILTER_NONE data filter option was selected for the connection.
  • DTL_CIP_MODE_NOTIFY_LOST – The application will be notified whenever it appears that one or more packets may have gotten lost on the connection (for example, when one or more sequence numbers have been skipped).
trigger
specifies the circumstances under which new data should actually be sent across the connection.
Valid values are DTL_CIP_CONN_TRIGGER_CYCLIC, DTL_CIP_CONN_TRIGGER_CHANGE_OF_STATE, and DTL_CIP_CONN_TRIGGER_APPLICATION.
The value of
trigger
is only significant to the 'client' end of the connection. If the application is the 'client' (for example,
mode
= DTL_CIP_CONN_MODE_IS_CLIENT), then the
trigger
affects how RSLinx Classic uses the connection. If the application is requesting that the target be the 'client' (for example,
mode
= DTL_CIP_CONN_MODE_IS_SERVER), then the
trigger
affects how the target behaves. The
trigger
value is not significant for CIP transport classes 4 and 5.
transport
specifies the CIP transport class of the connection. Valid values are 0-6.
tmo_mult
specifies the multiplier applied to
OT.rpi
to obtain the connection timeout value (for example, how long RSLinx Classic will wait to receive a packet on the connection before closing the connection with a DTL_CONN_TIMEOUT status see [DTL_CIP_CONNECTION_STATUS_PROC]). The multiplier must be a value 0-7, interpreted according to the following table:
Value Multiplier
0 x4
1 x8
2 x16
3 x32
4 x64
5 x128
6 x256
7 x512
OT
and
TO
are, respectively, the network connection parameters for the originator-to-target network connection and the target-to-originator network connection:
conn_type
specifies the network connection type. Valid values are DTL_CIP_CONN_TYPE_POINT_TO_POINT, indicating a point-to-point connection, and DTL_CIP_CONN_TYPE_MULTICAST, indicating a multicast connection.
For this version of the RSLinx Classic SDK,
conn_type
must be set to DTL_CIP_CONN_TYPE_POINT_TO_POINT, indicating a point-to-point connection.
priority
specifies the priority of the network connection and must be one of the following:
DTL_CIP_PRIORITY_LOW Low priority connection
DTL_CIP_PRIORITY_HIGH High priority connection
pkt_type
specifies whether data packets sent on this network connection are of fixed or variable length. Valid values are DTL_CIP_CONN_PACKET_SIZE_FIXED, indicating that all data packets must be exactly
pkt_size
bytes long, and DTL_CIP_CONN_PACKET_SIZE_VARIABLE, indicating that data packets may be of any length up to
pkt_size
bytes. For CIP Messaging,
pkt_type
should be set to DTL_CIP_CONN_PACKET_SIZE_VARIABLE.
pkt_size
is the maximum number of bytes that can be sent on this network connection in a single transfer. For fixed-size transfers, this is also the exact number of bytes that must be sent. For DTL_CIP _CONNECTION_OPEN service, the maximum size is 511 bytes, while for DTL_CIP_LARGE_CONNECTION_OPEN service, the maximum size is 65,535 bytes theoretically. But the actual sizes depend on the types of devices and the communication paths oriented to the target devices.
rpi
specifies the RPI (Requested Packet Interval) for this network connection in microseconds.
api
specifies the API (Actual Packet Interval) for this network connection in microseconds. When the application originates a connection (see DTL_CIP_CONNECTION_OPEN and DTL_CIP_LARGE_CONNECTION_OPEN), it does not need to specify values for the
api
fields of the
OT
and the
TO
structures. Once the connection is successfully established, the
api
fields of the
TO
and
OT
structures will contain API values obtained during connection establishment.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal