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.h File Reference
#include "typedefs.h"
#include "ciptypes.h"
#include "opener_user_conf.h"
#include "opener_api.h"
#include "doublylinkedlist.h"
#include "cipelectronickey.h"
#include "cipepath.h"
Include dependency graph for cipconnectionobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cip_connection_object
 

Macros

#define CIP_CONNECTION_OBJECT_CODE   0x05
 

Typedefs

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

Enumerations

enum  ConnectionObjectConnectionSizeType { kConnectionObjectConnectionSizeTypeFixed, kConnectionObjectConnectionSizeTypeVariable }
 
enum  ConnectionObjectConnectionType { kConnectionObjectConnectionTypeNull = 0, kConnectionObjectConnectionTypeMulticast, kConnectionObjectConnectionTypePointToPoint, kConnectionObjectConnectionTypeInvalid }
 
enum  ConnectionObjectInstanceType {
  kConnectionObjectInstanceTypeInvalid = -1, kConnectionObjectInstanceTypeExplicitMessaging = 0, kConnectionObjectInstanceTypeIO, kConnectionObjectInstanceTypeIOExclusiveOwner,
  kConnectionObjectInstanceTypeIOInputOnly, kConnectionObjectInstanceTypeIOListenOnly, kConnectionObjectInstanceTypeCipBridged
}
 
enum  ConnectionObjectPriority { kConnectionObjectPriorityLow = 0, kConnectionObjectPriorityHigh, kConnectionObjectPriorityScheduled, kConnectionObjectPriorityUrgent }
 
enum  ConnectionObjectSocketType { kConnectionObjectSocketTypeProducing = 0, kConnectionObjectSocketTypeConsuming = 1 }
 
enum  ConnectionObjectState {
  kConnectionObjectStateNonExistent = 0, kConnectionObjectStateConfiguring, kConnectionObjectStateWaitingForConnectionID, kConnectionObjectStateEstablished,
  kConnectionObjectStateTimedOut, kConnectionObjectStateDeferredDelete, kConnectionObjectStateClosing, kConnectionObjectStateInvalid
}
 
enum  ConnectionObjectTransportClassTriggerDirection { kConnectionObjectTransportClassTriggerDirectionClient = 0, kConnectionObjectTransportClassTriggerDirectionServer }
 
enum  ConnectionObjectTransportClassTriggerProductionTrigger { kConnectionObjectTransportClassTriggerProductionTriggerInvalid = -1, kConnectionObjectTransportClassTriggerProductionTriggerCyclic = 0, kConnectionObjectTransportClassTriggerProductionTriggerChangeOfState, kConnectionObjectTransportClassTriggerProductionTriggerApplicationObject }
 
enum  ConnectionObjectTransportClassTriggerTransportClass {
  kConnectionObjectTransportClassTriggerTransportClassInvalid = -1, kConnectionObjectTransportClassTriggerTransportClass0 = 0, kConnectionObjectTransportClassTriggerTransportClass1, kConnectionObjectTransportClassTriggerTransportClass2,
  kConnectionObjectTransportClassTriggerTransportClass3
}
 
enum  ConnectionObjectWatchdogTimeoutAction {
  kConnectionObjectWatchdogTimeoutActionTransitionToTimedOut = 0, kConnectionObjectWatchdogTimeoutActionAutoDelete, kConnectionObjectWatchdogTimeoutActionAutoReset, kConnectionObjectWatchdogTimeoutActionDeferredDelete,
  kConnectionObjectWatchdogTimeoutActionInvalid
}
 Possible values for the watch dog time out action of a connection. More...
 

Functions

CipConnectionObjectCipConnectionObjectCreate (const CipOctet *message)
 Array allocator. More...
 
void CipConnectionObjectDelete (CipConnectionObject **connection_object)
 Array deallocator. More...
 
DoublyLinkedListNodeCipConnectionObjectListArrayAllocator ()
 
void CipConnectionObjectListArrayFree (DoublyLinkedListNode **node)
 
bool CipConnectionObjectOriginatorHasSameIP (const CipConnectionObject *const connection_object, const struct sockaddr *const originator_address)
 
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)
 
CipUsint ConnectionObjectGetConnectionTimeoutMultiplier (const CipConnectionObject *const connection_object)
 
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)
 
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 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 *const connection_object, const 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 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)
 

Macro Definition Documentation

#define CIP_CONNECTION_OBJECT_CODE   0x05

Definition at line 18 of file cipconnectionobject.h.

Typedef Documentation

Definition at line 98 of file cipconnectionobject.h.

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

Definition at line 100 of file cipconnectionobject.h.

Enumeration Type Documentation

Enumerator
kConnectionObjectConnectionSizeTypeFixed 
kConnectionObjectConnectionSizeTypeVariable 

Definition at line 88 of file cipconnectionobject.h.

Enumerator
kConnectionObjectConnectionTypeNull 
kConnectionObjectConnectionTypeMulticast 
kConnectionObjectConnectionTypePointToPoint 
kConnectionObjectConnectionTypeInvalid 

Definition at line 74 of file cipconnectionobject.h.

Enumerator
kConnectionObjectInstanceTypeInvalid 

Invalid instance type - shall never occur!

kConnectionObjectInstanceTypeExplicitMessaging 

Connection is an explicit messaging connection

kConnectionObjectInstanceTypeIO 

Connection is an I/O connection

kConnectionObjectInstanceTypeIOExclusiveOwner 

Also I/O connection, only for easy differentiation

kConnectionObjectInstanceTypeIOInputOnly 

Also I/O connection, only for easy differentiation

kConnectionObjectInstanceTypeIOListenOnly 

Also I/O connection, only for easy differentiation

kConnectionObjectInstanceTypeCipBridged 

Connection is a bridged connection

Definition at line 31 of file cipconnectionobject.h.

Enumerator
kConnectionObjectPriorityLow 
kConnectionObjectPriorityHigh 
kConnectionObjectPriorityScheduled 
kConnectionObjectPriorityUrgent 

Definition at line 81 of file cipconnectionobject.h.

Enumerator
kConnectionObjectSocketTypeProducing 
kConnectionObjectSocketTypeConsuming 

Definition at line 93 of file cipconnectionobject.h.

Enumerator
kConnectionObjectStateNonExistent 

Connection is non existent

kConnectionObjectStateConfiguring 

Waiting for both to be configured and to apply the configuration

kConnectionObjectStateWaitingForConnectionID 

Only used for device net

kConnectionObjectStateEstablished 

Connection is established

kConnectionObjectStateTimedOut 

Connection timed out - inactivity or watchdog timer expired

kConnectionObjectStateDeferredDelete 

Only used for device net

kConnectionObjectStateClosing 

For CIP bridged connections - have to wait for a successful forward close

kConnectionObjectStateInvalid 

An invalid state, shall never occur!

Definition at line 20 of file cipconnectionobject.h.

Enumerator
kConnectionObjectTransportClassTriggerDirectionClient 

Endpoint provides client behavior

kConnectionObjectTransportClassTriggerDirectionServer 

Endpoint provides server behavior - production trigger bits are to be ignored

Definition at line 41 of file cipconnectionobject.h.

Enumerator
kConnectionObjectTransportClassTriggerProductionTriggerInvalid 

Invalid Production trigger - shall never occur!

kConnectionObjectTransportClassTriggerProductionTriggerCyclic 

Transmission Trigger Timer trigger data production

kConnectionObjectTransportClassTriggerProductionTriggerChangeOfState 

Production is trigger when change-of-state is detected by the Application Object

kConnectionObjectTransportClassTriggerProductionTriggerApplicationObject 

The Application Object decided when production is triggered

Definition at line 46 of file cipconnectionobject.h.

Enumerator
kConnectionObjectTransportClassTriggerTransportClassInvalid 

Invalid Transport Class - shall never occur!

kConnectionObjectTransportClassTriggerTransportClass0 

Class 0 producing or consuming connection, based on Direction

kConnectionObjectTransportClassTriggerTransportClass1 

Class 1 producing or consuming connection, based on Direction

kConnectionObjectTransportClassTriggerTransportClass2 

Class 2 producing and consuming connection, Client starts producing

kConnectionObjectTransportClassTriggerTransportClass3 

Class 3 producing and consuming connection, Client starts producing

Definition at line 53 of file cipconnectionobject.h.

Possible values for the watch dog time out action of a connection.

Only positive values allowed

Enumerator
kConnectionObjectWatchdogTimeoutActionTransitionToTimedOut 

Default for I/O connections, invalid for Explicit Messaging

kConnectionObjectWatchdogTimeoutActionAutoDelete 

Default for explicit connections

kConnectionObjectWatchdogTimeoutActionAutoReset 

Invalid for explicit connections

kConnectionObjectWatchdogTimeoutActionDeferredDelete 

Only for Device Net, invalid for I/O connections

kConnectionObjectWatchdogTimeoutActionInvalid 

Invalid Watchdog Timeout Action - shall never occur!

Definition at line 66 of file cipconnectionobject.h.

Function Documentation

CipConnectionObject* CipConnectionObjectCreate ( const CipOctet message)

Array allocator.

Definition at line 106 of file cipconnectionobject.c.

void CipConnectionObjectDelete ( CipConnectionObject **  connection_object)

Array deallocator.

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.

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)
CipUsint ConnectionObjectGetConnectionTimeoutMultiplier ( const CipConnectionObject *const  connection_object)
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)
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 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 *const  connection_object,
const 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 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: