OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
appcontype.h File Reference
Include dependency graph for appcontype.h:
This graph shows which files directly or indirectly include this file:

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...
 
CipConnectionObjectGetExistingProducerMulticastConnection (const EipUint32 input_point)
 Check if there exists already an exclusive owner or listen only connection which produces the input assembly. More...
 
CipConnectionObjectGetIoConnectionForConnectionData (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...
 
CipConnectionObjectGetNextNonControlMasterConnection (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
 

Function Documentation

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().

Here is the caller graph for this function:

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).

Parameters
input_pointthe input point
instance_typethe 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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool ConnectionWithSameConfigPointExists ( const EipUint32  config_point)

Check if there is an established connection that uses the same config point.

Parameters
config_pointThe configuration point
Returns
true if connection was found, otherwise false

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().

Here is the caller graph for this function:

CipConnectionObject* GetExistingProducerMulticastConnection ( const EipUint32  input_point)

Check if there exists already an exclusive owner or listen only connection which produces the input assembly.

Parameters
input_pointthe Input point to be produced
Returns
if a connection could be found a pointer to this connection if not NULL

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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).

Parameters
connection_objectconnection data to be used
extended_errorpointer to the extended_error variable, if an error occurred this value has the according error code for the response
Returns
  • on success: A pointer to the connection object already containing the connection data given in connection_object.
  • on error: NULL

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
input_pointthe produced input
Returns
if a connection could be found the pointer to this connection otherwise NULL.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

Variable Documentation