OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cipconnectionobject.c File Reference
#include "cipconnectionobject.h"
#include "endianconv.h"
#include "trace.h"
#include "cipconnectionmanager.h"
Include dependency graph for cipconnectionobject.c:

Go to the source code of this file.

Macros

#define CIP_CONNECTION_OBJECT_CONNECTION_TYPE_MULTICAST   (1 << 13)
 
#define CIP_CONNECTION_OBJECT_CONNECTION_TYPE_NULL   0
 
#define CIP_CONNECTION_OBJECT_CONNECTION_TYPE_POINT_TO_POINT   (1 << 14)
 
#define CIP_CONNECTION_OBJECT_INSTANCE_TYPE_CIP_BRIDGED   2
 
#define CIP_CONNECTION_OBJECT_INSTANCE_TYPE_EXPLICIT_MESSAGING   0
 
#define CIP_CONNECTION_OBJECT_INSTANCE_TYPE_IO   1
 
#define CIP_CONNECTION_OBJECT_PRIORITY_HIGH   (1 << 10)
 
#define CIP_CONNECTION_OBJECT_PRIORITY_LOW   0
 
#define CIP_CONNECTION_OBJECT_PRIORITY_SCHEDULED   (1 << 11)
 
#define CIP_CONNECTION_OBJECT_PRIORITY_URGENT   (3 << 10)
 
#define CIP_CONNECTION_OBJECT_STATE_CLOSING   6U
 
#define CIP_CONNECTION_OBJECT_STATE_CONFIGURING   1U
 
#define CIP_CONNECTION_OBJECT_STATE_DEFERRED_DELETE   5U
 
#define CIP_CONNECTION_OBJECT_STATE_ESTABLISHED   3U
 
#define CIP_CONNECTION_OBJECT_STATE_NON_EXISTENT   0U
 
#define CIP_CONNECTION_OBJECT_STATE_TIMEOUT   4U
 
#define CIP_CONNECTION_OBJECT_STATE_WAITING_FOR_CONNECTION_ID   2U
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_APPLICATION_OBJECT
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CHANGE_OF_STATE
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CYCLIC
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_0   0
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_1   1
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_2   2
 
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_3   3
 
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_DELETE   1
 
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_RESET   2
 
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_DEFERRED_DELETE   3
 
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_TRANSITION_TO_TIMED_OUT   0
 

Functions

CipConnectionObjectCipConnectionObjectCreate (const CipOctet *message)
 Array allocator. More...
 
DoublyLinkedListNodeCipConnectionObjectListArrayAllocator ()
 
void CipConnectionObjectListArrayFree (DoublyLinkedListNode **node)
 
bool CipConnectionObjectOriginatorHasSameIP (const CipConnectionObject *const connection_object, const struct sockaddr *const originator_address)
 
uint64_t ConnectionObjectCalculateRegularInactivityWatchdogTimerValue (const CipConnectionObject *const connection_object)
 
void ConnectionObjectDeepCopy (CipConnectionObject *RESTRICT destination, const CipConnectionObject *RESTRICT const source)
 Copy the given connection data from source to destination. More...
 
bool ConnectionObjectEqualOriginator (const CipConnectionObject *const object1, const CipConnectionObject *const object2)
 
void ConnectionObjectGeneralConfiguration (CipConnectionObject *const connection_object)
 Generate the ConnectionIDs and set the general configuration parameter in the given connection object. More...
 
CipUdint ConnectionObjectGetCipConsumedConnectionID (const CipConnectionObject *const connection_object)
 
CipUdint ConnectionObjectGetCipProducedConnectionID (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetConnectionSerialNumber (const CipConnectionObject *const connection_object)
 
size_t ConnectionObjectGetConnectionSize (const CipWord connection_parameters)
 
ConnectionObjectConnectionSizeType ConnectionObjectGetConnectionSizeType (const CipWord connection_parameters)
 
CipUsint ConnectionObjectGetConnectionTimeoutMultiplier (const CipConnectionObject *const connection_object)
 
ConnectionObjectConnectionType ConnectionObjectGetConnectionType (const CipWord connection_parameters)
 
CipUint ConnectionObjectGetConsumedConnectionPathLength (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetConsumedConnectionSize (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetExpectedPacketRate (const CipConnectionObject *const connection_object)
 
ConnectionObjectInstanceType ConnectionObjectGetInstanceType (const CipConnectionObject *const connection_object)
 
CipUsint ConnectionObjectGetInstanceTypeForAttribute (const CipConnectionObject *const connection_object)
 
CipUdint ConnectionObjectGetOriginatorSerialNumber (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetOriginatorVendorId (const CipConnectionObject *const connection_object)
 
size_t ConnectionObjectGetOToTConnectionSize (const CipConnectionObject *const connection_object)
 
ConnectionObjectConnectionSizeType ConnectionObjectGetOToTConnectionSizeType (const CipConnectionObject *const connection_object)
 
ConnectionObjectConnectionType ConnectionObjectGetOToTConnectionType (const CipConnectionObject *const connection_object)
 
ConnectionObjectPriority ConnectionObjectGetOToTPriority (const CipConnectionObject *const connection_object)
 
CipUdint ConnectionObjectGetOToTRequestedPacketInterval (const CipConnectionObject *const connection_object)
 
ConnectionObjectPriority ConnectionObjectGetPriority (const CipWord connection_parameters)
 
CipUint ConnectionObjectGetProducedConnectionPathLength (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetProducedConnectionSize (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetProductionInhibitTime (const CipConnectionObject *const connection_object)
 
CipUint ConnectionObjectGetRequestedPacketInterval (const CipConnectionObject *const connection_object)
 
ConnectionObjectState ConnectionObjectGetState (const CipConnectionObject *const connection_object)
 
ConnectionObjectTransportClassTriggerDirection ConnectionObjectGetTransportClassTriggerDirection (const CipConnectionObject *const connection_object)
 
ConnectionObjectTransportClassTriggerProductionTrigger ConnectionObjectGetTransportClassTriggerProductionTrigger (const CipConnectionObject *const connection_object)
 
ConnectionObjectTransportClassTriggerTransportClass ConnectionObjectGetTransportClassTriggerTransportClass (const CipConnectionObject *const connection_object)
 
size_t ConnectionObjectGetTToOConnectionSize (const CipConnectionObject *const connection_object)
 
ConnectionObjectConnectionSizeType ConnectionObjectGetTToOConnectionSizeType (const CipConnectionObject *const connection_object)
 
ConnectionObjectConnectionType ConnectionObjectGetTToOConnectionType (const CipConnectionObject *const connection_object)
 
ConnectionObjectPriority ConnectionObjectGetTToOPriority (const CipConnectionObject *const connection_object)
 
CipUdint ConnectionObjectGetTToORequestedPacketInterval (const CipConnectionObject *const connection_object)
 
ConnectionObjectWatchdogTimeoutAction ConnectionObjectGetWatchdogTimeoutAction (const CipConnectionObject *const connection_object)
 
void ConnectionObjectInitializeEmpty (CipConnectionObject *const connection_object)
 
void ConnectionObjectInitializeFromMessage (const CipOctet **message, CipConnectionObject *const connection_object)
 
bool ConnectionObjectIsOToTRedundantOwner (const CipConnectionObject *const connection_object)
 
bool ConnectionObjectIsTToORedundantOwner (const CipConnectionObject *const connection_object)
 
bool ConnectionObjectIsTypeIOConnection (const CipConnectionObject *const connection_object)
 
bool ConnectionObjectIsTypeNonLOIOConnection (const CipConnectionObject *const connection_object)
 
void ConnectionObjectResetInactivityWatchdogTimerValue (CipConnectionObject *const connection_object)
 
void ConnectionObjectResetLastPackageInactivityTimerValue (CipConnectionObject *const connection_object)
 
void ConnectionObjectResetProductionInhibitTimer (CipConnectionObject *const connection_object)
 
void ConnectionObjectResetSequenceCounts (CipConnectionObject *const connection_object)
 
void ConnectionObjectSetCipConsumedConnectionID (CipConnectionObject *const connection_object, const CipUdint cip_consumed_connection_id)
 
void ConnectionObjectSetCipProducedConnectionID (CipConnectionObject *const connection_object, const CipUdint cip_produced_connection_id)
 
void ConnectionObjectSetConnectionSerialNumber (CipConnectionObject *connection_object, const CipUint connection_serial_number)
 
void ConnectionObjectSetConnectionTimeoutMultiplier (CipConnectionObject *connection_object, CipUsint connection_timeout_multiplier)
 
void ConnectionObjectSetConsumedConnectionPathLength (CipConnectionObject *const connection_object, const CipUint consumed_connection_path_length)
 
void ConnectionObjectSetConsumedConnectionSize (CipConnectionObject *const connection_object, const CipUint consumed_connection_size)
 
void ConnectionObjectSetExpectedPacketRate (CipConnectionObject *const connection_object)
 Sets the expected packet rate according to the rules of the CIP specification. More...
 
void ConnectionObjectSetInitialInactivityWatchdogTimerValue (CipConnectionObject *const connection_object)
 
void ConnectionObjectSetInstanceType (CipConnectionObject *const connection_object, const ConnectionObjectInstanceType instance_type)
 
void ConnectionObjectSetOriginatorSerialNumber (CipConnectionObject *connection_object, CipUdint originator_serial_number)
 
void ConnectionObjectSetOriginatorVendorId (CipConnectionObject *connection_object, const CipUint vendor_id)
 
void ConnectionObjectSetOToTRequestedPacketInterval (CipConnectionObject *connection_object, const CipUdint requested_packet_interval)
 
void ConnectionObjectSetProducedConnectionPathLength (CipConnectionObject *const connection_object, const CipUint produced_connection_path_length)
 
void ConnectionObjectSetProducedConnectionSize (CipConnectionObject *const connection_object, const CipUint produced_connection_size)
 
void ConnectionObjectSetProductionInhibitTime (CipConnectionObject *const connection_object, const CipUint production_inhibit_time)
 
void ConnectionObjectSetState (CipConnectionObject *const connection_object, const ConnectionObjectState state)
 
void ConnectionObjectSetTToORequestedPacketInterval (CipConnectionObject *connection_object, const CipUdint requested_packet_interval)
 
void ConnectionObjectSetWatchdogTimeoutAction (CipConnectionObject *const connection_object, const CipUsint watchdog_timeout_action)
 
bool EqualConnectionTriad (const CipConnectionObject *const object1, const CipConnectionObject *const object2)
 

Variables

DoublyLinkedList connection_list
 
CipConnectionObject explicit_connection_object_pool [OPENER_CIP_NUM_EXPLICIT_CONNS]
 Array of the available explicit connections. More...
 

Macro Definition Documentation

#define CIP_CONNECTION_OBJECT_CONNECTION_TYPE_MULTICAST   (1 << 13)

Definition at line 45 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetConnectionType().

#define CIP_CONNECTION_OBJECT_CONNECTION_TYPE_NULL   0

Definition at line 44 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetConnectionType().

#define CIP_CONNECTION_OBJECT_CONNECTION_TYPE_POINT_TO_POINT   (1 << 14)

Definition at line 46 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetConnectionType().

#define CIP_CONNECTION_OBJECT_INSTANCE_TYPE_CIP_BRIDGED   2

Definition at line 23 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetInstanceTypeForAttribute().

#define CIP_CONNECTION_OBJECT_INSTANCE_TYPE_EXPLICIT_MESSAGING   0

Definition at line 21 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetInstanceTypeForAttribute().

#define CIP_CONNECTION_OBJECT_INSTANCE_TYPE_IO   1

Definition at line 22 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetInstanceTypeForAttribute().

#define CIP_CONNECTION_OBJECT_PRIORITY_HIGH   (1 << 10)

Definition at line 49 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetPriority().

#define CIP_CONNECTION_OBJECT_PRIORITY_LOW   0

Definition at line 48 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetPriority().

#define CIP_CONNECTION_OBJECT_PRIORITY_SCHEDULED   (1 << 11)

Definition at line 50 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetPriority().

#define CIP_CONNECTION_OBJECT_PRIORITY_URGENT   (3 << 10)

Definition at line 51 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetPriority().

#define CIP_CONNECTION_OBJECT_STATE_CLOSING   6U

Definition at line 19 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_STATE_CONFIGURING   1U

Definition at line 14 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_STATE_DEFERRED_DELETE   5U

Definition at line 18 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_STATE_ESTABLISHED   3U

Definition at line 16 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_STATE_NON_EXISTENT   0U

Definition at line 13 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_STATE_TIMEOUT   4U

Definition at line 17 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_STATE_WAITING_FOR_CONNECTION_ID   2U

Definition at line 15 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetState(), and ConnectionObjectSetState().

#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_APPLICATION_OBJECT
Value:
( \
2 << 4)

Definition at line 31 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetTransportClassTriggerProductionTrigger().

#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CHANGE_OF_STATE
Value:
( \
1 << 4)

Definition at line 28 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetTransportClassTriggerProductionTrigger().

#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CYCLIC
Value:
( \
0 << 4)

Definition at line 25 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetTransportClassTriggerProductionTrigger().

#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_0   0
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_1   1
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_2   2
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_3   3
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_DELETE   1
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_RESET   2
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_DEFERRED_DELETE   3
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_TRANSITION_TO_TIMED_OUT   0

Function Documentation

CipConnectionObject* CipConnectionObjectCreate ( const CipOctet message)

Array allocator.

Definition at line 106 of file cipconnectionobject.c.

DoublyLinkedListNode* CipConnectionObjectListArrayAllocator ( )

Definition at line 59 of file cipconnectionobject.c.

References OPENER_CIP_NUM_EXLUSIVE_OWNER_CONNS, OPENER_CIP_NUM_EXPLICIT_CONNS, OPENER_CIP_NUM_INPUT_ONLY_CONNS, and OPENER_CIP_NUM_LISTEN_ONLY_CONNS.

Referenced by main().

Here is the caller graph for this function:

void CipConnectionObjectListArrayFree ( DoublyLinkedListNode **  node)

Definition at line 74 of file cipconnectionobject.c.

References OPENER_TRACE_ERR.

Referenced by main().

Here is the caller graph for this function:

bool CipConnectionObjectOriginatorHasSameIP ( const CipConnectionObject *const  connection_object,
const struct sockaddr *const  originator_address 
)

Definition at line 848 of file cipconnectionobject.c.

References cip_connection_object::originator_address.

uint64_t ConnectionObjectCalculateRegularInactivityWatchdogTimerValue ( const CipConnectionObject *const  connection_object)

Definition at line 581 of file cipconnectionobject.c.

References cip_connection_object::connection_timeout_multiplier, and cip_connection_object::o_to_t_requested_packet_interval.

Referenced by ConnectionObjectResetInactivityWatchdogTimerValue(), ConnectionObjectResetLastPackageInactivityTimerValue(), and ConnectionObjectSetInitialInactivityWatchdogTimerValue().

Here is the caller graph for this function:

void ConnectionObjectDeepCopy ( CipConnectionObject *RESTRICT  destination,
const CipConnectionObject *RESTRICT const  source 
)

Copy the given connection data from source to destination.

Parameters
destinationDestination of the copy operation
sourceSource of the copy operation

Definition at line 769 of file cipconnectionobject.c.

Referenced by EstablishClass3Connection(), and GetIoConnectionForConnectionData().

Here is the caller graph for this function:

bool ConnectionObjectEqualOriginator ( const CipConnectionObject *const  object1,
const CipConnectionObject *const  object2 
)

Definition at line 824 of file cipconnectionobject.c.

References cip_connection_object::originator_serial_number, and cip_connection_object::originator_vendor_id.

Referenced by CheckForTimedOutConnectionsAndCloseTCPConnections(), GetExclusiveOwnerConnection(), GetInputOnlyConnection(), and GetListenOnlyConnection().

Here is the caller graph for this function:

void ConnectionObjectGeneralConfiguration ( CipConnectionObject *const  connection_object)

Generate the ConnectionIDs and set the general configuration parameter in the given connection object.

Parameters
connection_objectpointer to the connection object that should be set up.

Definition at line 790 of file cipconnectionobject.c.

References ConnectionObjectGetOToTConnectionType(), ConnectionObjectGetTToOConnectionType(), ConnectionObjectResetProductionInhibitTimer(), ConnectionObjectResetSequenceCounts(), ConnectionObjectSetCipConsumedConnectionID(), ConnectionObjectSetCipProducedConnectionID(), ConnectionObjectSetWatchdogTimeoutAction(), GetConnectionId(), kConnectionObjectConnectionTypeMulticast, kConnectionObjectConnectionTypePointToPoint, kConnectionObjectWatchdogTimeoutActionInvalid, cip_connection_object::socket, and cip_connection_object::transmission_trigger_timer.

Referenced by EstablishClass3Connection(), and EstablishIoConnection().

Here is the call graph for this function:

Here is the caller graph for this function:

CipUdint ConnectionObjectGetCipConsumedConnectionID ( const CipConnectionObject *const  connection_object)

Definition at line 453 of file cipconnectionobject.c.

References cip_connection_object::cip_consumed_connection_id.

Referenced by GetConnectedObject().

Here is the caller graph for this function:

CipUdint ConnectionObjectGetCipProducedConnectionID ( const CipConnectionObject *const  connection_object)
CipUint ConnectionObjectGetConnectionSerialNumber ( const CipConnectionObject *const  connection_object)
size_t ConnectionObjectGetConnectionSize ( const CipWord  connection_parameters)

Definition at line 752 of file cipconnectionobject.c.

Referenced by ConnectionObjectGetOToTConnectionSize(), and ConnectionObjectGetTToOConnectionSize().

Here is the caller graph for this function:

ConnectionObjectConnectionSizeType ConnectionObjectGetConnectionSizeType ( const CipWord  connection_parameters)

Definition at line 730 of file cipconnectionobject.c.

References kConnectionObjectConnectionSizeTypeFixed, and kConnectionObjectConnectionSizeTypeVariable.

Referenced by ConnectionObjectGetOToTConnectionSizeType(), and ConnectionObjectGetTToOConnectionSizeType().

Here is the caller graph for this function:

CipUsint ConnectionObjectGetConnectionTimeoutMultiplier ( const CipConnectionObject *const  connection_object)
ConnectionObjectConnectionType ConnectionObjectGetConnectionType ( const CipWord  connection_parameters)
CipUint ConnectionObjectGetConsumedConnectionPathLength ( const CipConnectionObject *const  connection_object)
CipUint ConnectionObjectGetConsumedConnectionSize ( const CipConnectionObject *const  connection_object)
CipUint ConnectionObjectGetExpectedPacketRate ( const CipConnectionObject *const  connection_object)

Definition at line 404 of file cipconnectionobject.c.

References cip_connection_object::expected_packet_rate.

Referenced by ManageConnections().

Here is the caller graph for this function:

ConnectionObjectInstanceType ConnectionObjectGetInstanceType ( const CipConnectionObject *const  connection_object)

Definition at line 244 of file cipconnectionobject.c.

References cip_connection_object::instance_type.

Referenced by CloseAllConnectionsForInputWithSameType(), CloseIoConnection(), GetConnectedOutputAssembly(), and HandleIoConnectionTimeOut().

Here is the caller graph for this function:

CipUdint ConnectionObjectGetOriginatorSerialNumber ( const CipConnectionObject *const  connection_object)
CipUint ConnectionObjectGetOriginatorVendorId ( const CipConnectionObject *const  connection_object)
size_t ConnectionObjectGetOToTConnectionSize ( const CipConnectionObject *const  connection_object)

Definition at line 757 of file cipconnectionobject.c.

References ConnectionObjectGetConnectionSize(), and cip_connection_object::o_to_t_network_connection_parameters.

Referenced by SetupIoConnectionOriginatorToTargetConnectionPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

ConnectionObjectConnectionSizeType ConnectionObjectGetOToTConnectionSizeType ( const CipConnectionObject *const  connection_object)

Definition at line 740 of file cipconnectionobject.c.

References ConnectionObjectGetConnectionSizeType(), and cip_connection_object::o_to_t_network_connection_parameters.

Here is the call graph for this function:

ConnectionObjectConnectionType ConnectionObjectGetOToTConnectionType ( const CipConnectionObject *const  connection_object)

Definition at line 685 of file cipconnectionobject.c.

References ConnectionObjectGetConnectionType(), and cip_connection_object::o_to_t_network_connection_parameters.

Referenced by ConnectionObjectGeneralConfiguration(), EstablishIoConnection(), ForwardOpen(), OpenCommunicationChannels(), and ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

ConnectionObjectPriority ConnectionObjectGetOToTPriority ( const CipConnectionObject *const  connection_object)

Definition at line 717 of file cipconnectionobject.c.

References ConnectionObjectGetPriority(), and cip_connection_object::o_to_t_network_connection_parameters.

Here is the call graph for this function:

CipUdint ConnectionObjectGetOToTRequestedPacketInterval ( const CipConnectionObject *const  connection_object)
ConnectionObjectPriority ConnectionObjectGetPriority ( const CipWord  connection_parameters)
CipUint ConnectionObjectGetProducedConnectionPathLength ( const CipConnectionObject *const  connection_object)
CipUint ConnectionObjectGetProducedConnectionSize ( const CipConnectionObject *const  connection_object)
CipUint ConnectionObjectGetProductionInhibitTime ( const CipConnectionObject *const  connection_object)

Definition at line 542 of file cipconnectionobject.c.

References cip_connection_object::production_inhibit_time.

Referenced by ProcessProductionInhibitTime(), and SetupIoConnectionTargetToOriginatorConnectionPoint().

Here is the caller graph for this function:

CipUint ConnectionObjectGetRequestedPacketInterval ( const CipConnectionObject *const  connection_object)

Definition at line 409 of file cipconnectionobject.c.

References cip_connection_object::t_to_o_requested_packet_interval.

Referenced by ManageConnections().

Here is the caller graph for this function:

ConnectionObjectTransportClassTriggerDirection ConnectionObjectGetTransportClassTriggerDirection ( const CipConnectionObject *const  connection_object)

Definition at line 318 of file cipconnectionobject.c.

References kConnectionObjectTransportClassTriggerDirectionClient, kConnectionObjectTransportClassTriggerDirectionServer, and cip_connection_object::transport_class_trigger.

Referenced by ManageConnections().

Here is the caller graph for this function:

size_t ConnectionObjectGetTToOConnectionSize ( const CipConnectionObject *const  connection_object)

Definition at line 763 of file cipconnectionobject.c.

References ConnectionObjectGetConnectionSize(), and cip_connection_object::t_to_o_network_connection_parameters.

Referenced by SetupIoConnectionTargetToOriginatorConnectionPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

ConnectionObjectConnectionSizeType ConnectionObjectGetTToOConnectionSizeType ( const CipConnectionObject *const  connection_object)

Definition at line 746 of file cipconnectionobject.c.

References ConnectionObjectGetConnectionSizeType(), and cip_connection_object::t_to_o_network_connection_parameters.

Referenced by SetupIoConnectionTargetToOriginatorConnectionPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

ConnectionObjectConnectionType ConnectionObjectGetTToOConnectionType ( const CipConnectionObject *const  connection_object)

Definition at line 691 of file cipconnectionobject.c.

References ConnectionObjectGetConnectionType(), and cip_connection_object::t_to_o_network_connection_parameters.

Referenced by CloseIoConnection(), ConnectionObjectGeneralConfiguration(), EstablishIoConnection(), ForwardOpen(), GetExistingProducerMulticastConnection(), GetNextNonControlMasterConnection(), HandleIoConnectionTimeOut(), OpenCommunicationChannels(), ParseConnectionPath(), and SetupIoConnectionTargetToOriginatorConnectionPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

ConnectionObjectPriority ConnectionObjectGetTToOPriority ( const CipConnectionObject *const  connection_object)

Definition at line 723 of file cipconnectionobject.c.

References ConnectionObjectGetPriority(), and cip_connection_object::t_to_o_network_connection_parameters.

Referenced by OpenConsumingPointToPointConnection(), OpenMulticastConnection(), OpenProducingPointToPointConnection(), and SetupIoConnectionTargetToOriginatorConnectionPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

CipUdint ConnectionObjectGetTToORequestedPacketInterval ( const CipConnectionObject *const  connection_object)

Definition at line 647 of file cipconnectionobject.c.

References cip_connection_object::t_to_o_requested_packet_interval.

Referenced by ProcessProductionInhibitTime(), and SetupIoConnectionTargetToOriginatorConnectionPoint().

Here is the caller graph for this function:

void ConnectionObjectInitializeEmpty ( CipConnectionObject *const  connection_object)

Definition at line 97 of file cipconnectionobject.c.

References ConnectionObjectSetState(), kConnectionObjectStateNonExistent, and cip_connection_object::socket.

Referenced by CipClass3ConnectionObjectStateEstablishedHandler(), CloseCommunicationChannelsAndRemoveFromActiveConnectionsList(), and CloseConnection().

Here is the call graph for this function:

Here is the caller graph for this function:

void ConnectionObjectInitializeFromMessage ( const CipOctet **  message,
CipConnectionObject *const  connection_object 
)
bool ConnectionObjectIsOToTRedundantOwner ( const CipConnectionObject *const  connection_object)
bool ConnectionObjectIsTToORedundantOwner ( const CipConnectionObject *const  connection_object)
bool ConnectionObjectIsTypeIOConnection ( const CipConnectionObject *const  connection_object)

Definition at line 304 of file cipconnectionobject.c.

References cip_connection_object::instance_type, kConnectionObjectInstanceTypeIO, kConnectionObjectInstanceTypeIOExclusiveOwner, kConnectionObjectInstanceTypeIOInputOnly, and kConnectionObjectInstanceTypeIOListenOnly.

Referenced by GetExistingProducerMulticastConnection(), and IsConnectedOutputAssembly().

Here is the caller graph for this function:

bool ConnectionObjectIsTypeNonLOIOConnection ( const CipConnectionObject *const  connection_object)

Definition at line 292 of file cipconnectionobject.c.

References cip_connection_object::instance_type, kConnectionObjectInstanceTypeIO, kConnectionObjectInstanceTypeIOExclusiveOwner, and kConnectionObjectInstanceTypeIOInputOnly.

Referenced by GetNextNonControlMasterConnection().

Here is the caller graph for this function:

void ConnectionObjectResetInactivityWatchdogTimerValue ( CipConnectionObject *const  connection_object)

Definition at line 567 of file cipconnectionobject.c.

References ConnectionObjectCalculateRegularInactivityWatchdogTimerValue(), and cip_connection_object::inactivity_watchdog_timer.

Referenced by HandleReceivedConnectedData(), and NotifyConnectedCommonPacketFormat().

Here is the call graph for this function:

Here is the caller graph for this function:

void ConnectionObjectResetLastPackageInactivityTimerValue ( CipConnectionObject *const  connection_object)

Definition at line 574 of file cipconnectionobject.c.

References ConnectionObjectCalculateRegularInactivityWatchdogTimerValue(), and cip_connection_object::last_package_watchdog_timer.

Referenced by HandleReceivedConnectedData().

Here is the call graph for this function:

Here is the caller graph for this function:

void ConnectionObjectResetProductionInhibitTimer ( CipConnectionObject *const  connection_object)

Definition at line 784 of file cipconnectionobject.c.

References cip_connection_object::production_inhibit_time, and cip_connection_object::production_inhibit_timer.

Referenced by ConnectionObjectGeneralConfiguration(), and ManageConnections().

Here is the caller graph for this function:

void ConnectionObjectResetSequenceCounts ( CipConnectionObject *const  connection_object)

Definition at line 776 of file cipconnectionobject.c.

References cip_connection_object::eip_level_sequence_count_consuming, cip_connection_object::eip_level_sequence_count_producing, cip_connection_object::sequence_count_consuming, and cip_connection_object::sequence_count_producing.

Referenced by ConnectionObjectGeneralConfiguration().

Here is the caller graph for this function:

void ConnectionObjectSetCipConsumedConnectionID ( CipConnectionObject *const  connection_object,
const CipUdint  cip_consumed_connection_id 
)

Definition at line 458 of file cipconnectionobject.c.

References cip_connection_object::cip_consumed_connection_id.

Referenced by ConnectionObjectGeneralConfiguration(), and ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetCipProducedConnectionID ( CipConnectionObject *const  connection_object,
const CipUdint  cip_produced_connection_id 
)

Definition at line 446 of file cipconnectionobject.c.

References cip_connection_object::cip_produced_connection_id.

Referenced by ConnectionObjectGeneralConfiguration(), and ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetConnectionSerialNumber ( CipConnectionObject connection_object,
const CipUint  connection_serial_number 
)

Definition at line 595 of file cipconnectionobject.c.

References cip_connection_object::connection_serial_number.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetConnectionTimeoutMultiplier ( CipConnectionObject connection_object,
CipUsint  connection_timeout_multiplier 
)

Definition at line 628 of file cipconnectionobject.c.

References cip_connection_object::connection_timeout_multiplier.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetConsumedConnectionPathLength ( CipConnectionObject *const  connection_object,
const CipUint  consumed_connection_path_length 
)
void ConnectionObjectSetConsumedConnectionSize ( CipConnectionObject *const  connection_object,
const CipUint  consumed_connection_size 
)
void ConnectionObjectSetExpectedPacketRate ( CipConnectionObject *const  connection_object)

Sets the expected packet rate according to the rules of the CIP specification.

As this function sets the expected packet rate according to the rules of the CIP specification, it is not always the exact value entered, but rounded up to the next serviceable increment, relative to the timer resolution

Definition at line 424 of file cipconnectionobject.c.

References cip_connection_object::expected_packet_rate, and cip_connection_object::t_to_o_requested_packet_interval.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetInitialInactivityWatchdogTimerValue ( CipConnectionObject *const  connection_object)

Definition at line 555 of file cipconnectionobject.c.

References ConnectionObjectCalculateRegularInactivityWatchdogTimerValue(), and cip_connection_object::inactivity_watchdog_timer.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void ConnectionObjectSetInstanceType ( CipConnectionObject *const  connection_object,
const ConnectionObjectInstanceType  instance_type 
)

Definition at line 262 of file cipconnectionobject.c.

References cip_connection_object::instance_type.

Referenced by EstablishClass3Connection(), and GetIoConnectionForConnectionData().

Here is the caller graph for this function:

void ConnectionObjectSetOriginatorSerialNumber ( CipConnectionObject connection_object,
CipUdint  originator_serial_number 
)

Definition at line 617 of file cipconnectionobject.c.

References cip_connection_object::originator_serial_number.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetOriginatorVendorId ( CipConnectionObject connection_object,
const CipUint  vendor_id 
)

Definition at line 606 of file cipconnectionobject.c.

References cip_connection_object::originator_vendor_id.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetOToTRequestedPacketInterval ( CipConnectionObject connection_object,
const CipUdint  requested_packet_interval 
)

Definition at line 640 of file cipconnectionobject.c.

References cip_connection_object::o_to_t_requested_packet_interval.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

void ConnectionObjectSetProducedConnectionPathLength ( CipConnectionObject *const  connection_object,
const CipUint  produced_connection_path_length 
)
void ConnectionObjectSetProducedConnectionSize ( CipConnectionObject *const  connection_object,
const CipUint  produced_connection_size 
)
void ConnectionObjectSetProductionInhibitTime ( CipConnectionObject *const  connection_object,
const CipUint  production_inhibit_time 
)

Definition at line 547 of file cipconnectionobject.c.

References cip_connection_object::production_inhibit_time.

Referenced by ParseConnectionPath(), and ProcessProductionInhibitTime().

Here is the caller graph for this function:

void ConnectionObjectSetTToORequestedPacketInterval ( CipConnectionObject connection_object,
const CipUdint  requested_packet_interval 
)

Definition at line 652 of file cipconnectionobject.c.

References cip_connection_object::t_to_o_requested_packet_interval.

Referenced by ConnectionObjectInitializeFromMessage().

Here is the caller graph for this function:

bool EqualConnectionTriad ( const CipConnectionObject *const  object1,
const CipConnectionObject *const  object2 
)

Definition at line 835 of file cipconnectionobject.c.

References cip_connection_object::connection_serial_number, cip_connection_object::originator_serial_number, and cip_connection_object::originator_vendor_id.

Referenced by CheckForExistingConnection().

Here is the caller graph for this function:

Variable Documentation

CipConnectionObject explicit_connection_object_pool[OPENER_CIP_NUM_EXPLICIT_CONNS]

Array of the available explicit connections.

Definition at line 57 of file cipconnectionobject.c.