OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cipclass3connection.h File Reference

CIP Class 3 connection. More...

Include dependency graph for cipclass3connection.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef EipStatus(* CipConnectionStateHandler )(CipConnectionObject *RESTRICT const connection_object, ConnectionObjectState new_state)
 

Functions

EipStatus CipClass3ConnectionObjectStateEstablishedHandler (CipConnectionObject *RESTRICT const connection_object, ConnectionObjectState new_state)
 
EipStatus EstablishClass3Connection (CipConnectionObject *RESTRICT const connection_object, EipUint16 *const extended_error)
 Check if Class3 connection is available and if yes setup all data. More...
 
void InitializeClass3ConnectionData (void)
 Initializes the explicit connections mechanism. More...
 

Detailed Description

CIP Class 3 connection.

* Explicit Connection Object State Transition Diagram

Definition in file cipclass3connection.h.

Typedef Documentation

typedef EipStatus(* CipConnectionStateHandler)(CipConnectionObject *RESTRICT const connection_object, ConnectionObjectState new_state)

Definition at line 35 of file cipclass3connection.h.

Function Documentation

EipStatus CipClass3ConnectionObjectStateEstablishedHandler ( CipConnectionObject *RESTRICT const  connection_object,
ConnectionObjectState  new_state 
)

Definition at line 76 of file cipclass3connection.c.

References ConnectionObjectInitializeEmpty(), ConnectionObjectSetState(), kConnectionObjectStateNonExistent, kEipStatusError, and kEipStatusOk.

Here is the call graph for this function:

EipStatus EstablishClass3Connection ( CipConnectionObject *RESTRICT const  connection_object,
EipUint16 *const  extended_error 
)

Check if Class3 connection is available and if yes setup all data.

This function can be called after all data has been parsed from the forward open request

Parameters
connection_objectpointer to the connection object structure holding the parsed data from the forward open request
extended_errorthe extended error code in case an error happened
Returns
general status on the establishment
  • kEipStatusOk ... on success
  • On an error the general status code to be put into the response

Definition at line 26 of file cipclass3connection.c.

References AddNewActiveConnection(), Class3ConnectionTimeoutHandler(), CloseConnection(), cip_connection_object::connection_close_function, cip_connection_object::connection_timeout_function, ConnectionObjectDeepCopy(), ConnectionObjectGeneralConfiguration(), ConnectionObjectSetInstanceType(), GetFreeExplicitConnection(), kCipErrorConnectionFailure, kConnectionManagerExtendedStatusCodeErrorNoMoreConnectionsAvailable, kConnectionObjectInstanceTypeExplicitMessaging, and kEipStatusOk.

Referenced by ConnectionManagerInit().

Here is the call graph for this function:

Here is the caller graph for this function:

void InitializeClass3ConnectionData ( void  )

Initializes the explicit connections mechanism.

Prepares the available explicit connection slots for use at the start of the OpENer

Definition at line 71 of file cipclass3connection.c.

References OPENER_CIP_NUM_EXPLICIT_CONNS.

Referenced by InitializeConnectionManagerData().

Here is the caller graph for this function: