| OpENer - Open Source EtherNet/IP(TM)  I/O Target Stack
    2.1
    | 
#include "cipconnectionmanager.h"Go to the source code of this file.
| Functions | |
| void | CloseAllConnections (void) | 
| void | CloseAllConnectionsForInputWithSameType (const EipUint32 input_point, const ConnectionObjectInstanceType instance_type) | 
| Close all connection producing the same input and have the same type (i.e., listen only or input only).  More... | |
| bool | ConnectionWithSameConfigPointExists (const EipUint32 config_point) | 
| Check if there is an established connection that uses the same config point.  More... | |
| CipConnectionObject * | GetExistingProducerMulticastConnection (const EipUint32 input_point) | 
| Check if there exists already an exclusive owner or listen only connection which produces the input assembly.  More... | |
| CipConnectionObject * | GetIoConnectionForConnectionData (CipConnectionObject *const RESTRICT connection_object, EipUint16 *const extended_error) | 
| check if for the given connection data received in a forward_open request a suitable connection is available.  More... | |
| CipConnectionObject * | GetNextNonControlMasterConnection (const EipUint32 input_point) | 
| check if there exists an producing multicast exclusive owner or listen only connection that should produce the same input but is not in charge of the connection.  More... | |
| void | InitializeIoConnectionData (void) | 
| Variables | |
| DoublyLinkedList | connection_list | 
| void CloseAllConnections | ( | void | ) | 
@ brief close all open connections.
For I/O connections the sockets will be freed. The sockets for explicit connections are handled by the encapsulation layer, and freed there.
Definition at line 407 of file appcontype.c.
References cip_connection_object::connection_close_function, connection_list, doubly_linked_list_node::data, and DoublyLinkedList::first.
Referenced by ResetDevice(), and ShutdownCipStack().
| void CloseAllConnectionsForInputWithSameType | ( | const EipUint32 | input_point, | 
| const ConnectionObjectInstanceType | instance_type | ||
| ) | 
Close all connection producing the same input and have the same type (i.e., listen only or input only).
| input_point | the input point | 
| instance_type | the connection application type | 
Definition at line 384 of file appcontype.c.
References CheckIoConnectionEvent(), cip_connection_object::connection_close_function, connection_list, ConnectionObjectGetInstanceType(), cip_connection_object::consumed_path, doubly_linked_list_node::data, DoublyLinkedList::first, connection_path_epath::instance_id, kIoConnectionEventClosed, doubly_linked_list_node::next, OPENER_TRACE_INFO, and cip_connection_object::produced_path.
Referenced by CloseIoConnection(), and HandleIoConnectionTimeOut().
| bool ConnectionWithSameConfigPointExists | ( | const EipUint32 | config_point | ) | 
Check if there is an established connection that uses the same config point.
| config_point | The configuration point | 
Definition at line 417 of file appcontype.c.
References cip_connection_object::configuration_path, connection_list, doubly_linked_list_node::data, DoublyLinkedList::first, connection_path_epath::instance_id, doubly_linked_list_node::next, and OPENER_ASSERT.
Referenced by HandleConfigData().
| CipConnectionObject* GetExistingProducerMulticastConnection | ( | const EipUint32 | input_point | ) | 
Check if there exists already an exclusive owner or listen only connection which produces the input assembly.
| input_point | the Input point to be produced | 
Definition at line 335 of file appcontype.c.
References connection_list, ConnectionObjectGetTToOConnectionType(), ConnectionObjectIsTypeIOConnection(), doubly_linked_list_node::data, DoublyLinkedList::first, connection_path_epath::instance_id, kConnectionObjectConnectionTypeMulticast, kUdpCommuncationDirectionProducing, doubly_linked_list_node::next, cip_connection_object::produced_path, and cip_connection_object::socket.
Referenced by GetListenOnlyConnection(), and OpenProducingMulticastConnection().
| CipConnectionObject* GetIoConnectionForConnectionData | ( | CipConnectionObject *const RESTRICT | connection_object, | 
| EipUint16 *const | extended_error | ||
| ) | 
check if for the given connection data received in a forward_open request a suitable connection is available.
If a suitable connection is found the connection data is transfered the application connection type is set (i.e., EConnType).
| connection_object | connection data to be used | 
| extended_error | pointer to the extended_error variable, if an error occurred this value has the according error code for the response | 
Definition at line 127 of file appcontype.c.
References ConnectionObjectDeepCopy(), ConnectionObjectSetInstanceType(), GetExclusiveOwnerConnection(), GetInputOnlyConnection(), GetListenOnlyConnection(), kCipErrorSuccess, kConnectionManagerExtendedStatusCodeInconsistentApplicationPathCombo, kConnectionManagerExtendedStatusCodeSuccess, kConnectionObjectInstanceTypeIOExclusiveOwner, kConnectionObjectInstanceTypeIOInputOnly, kConnectionObjectInstanceTypeIOListenOnly, and OPENER_TRACE_INFO.
Referenced by EstablishIoConnection().
| CipConnectionObject* GetNextNonControlMasterConnection | ( | const EipUint32 | input_point | ) | 
check if there exists an producing multicast exclusive owner or listen only connection that should produce the same input but is not in charge of the connection.
| input_point | the produced input | 
Definition at line 362 of file appcontype.c.
References connection_list, ConnectionObjectGetState(), ConnectionObjectGetTToOConnectionType(), ConnectionObjectIsTypeNonLOIOConnection(), doubly_linked_list_node::data, DoublyLinkedList::first, connection_path_epath::instance_id, kConnectionObjectConnectionTypeMulticast, kConnectionObjectStateEstablished, kUdpCommuncationDirectionProducing, doubly_linked_list_node::next, cip_connection_object::produced_path, and cip_connection_object::socket.
Referenced by CloseIoConnection(), and HandleIoConnectionTimeOut().
| void InitializeIoConnectionData | ( | void | ) | 
Definition at line 431 of file appcontype.c.
References OPENER_CIP_NUM_EXLUSIVE_OWNER_CONNS, OPENER_CIP_NUM_INPUT_ONLY_CONNS, and OPENER_CIP_NUM_LISTEN_ONLY_CONNS.
Referenced by InitializeConnectionManagerData().
| DoublyLinkedList connection_list | 
Definition at line 53 of file cipconnectionobject.c.
Referenced by CheckAndHandleConsumingUdpSockets(), CloseAllConnections(), CloseAllConnectionsForInputWithSameType(), CloseClass3ConnectionBasedOnSession(), ConnectionWithSameConfigPointExists(), GetExistingProducerMulticastConnection(), GetNextNonControlMasterConnection(), main(), and SetupIoConnectionTargetToOriginatorConnectionPoint().