OpENer - Open Source EtherNet/IP(TM) I/O Target Stack
2.1
|
#include "cipconnectionobject.h"
#include "endianconv.h"
#include "trace.h"
#include "cipconnectionmanager.h"
Go to the source code of this file.
Variables | |
DoublyLinkedList | connection_list |
CipConnectionObject | explicit_connection_object_pool [OPENER_CIP_NUM_EXPLICIT_CONNS] |
Array of the available explicit connections. More... | |
#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 |
Definition at line 31 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerProductionTrigger().
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CHANGE_OF_STATE |
Definition at line 28 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerProductionTrigger().
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CYCLIC |
Definition at line 25 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerProductionTrigger().
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_0 0 |
Definition at line 34 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerTransportClass().
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_1 1 |
Definition at line 35 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerTransportClass().
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_2 2 |
Definition at line 36 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerTransportClass().
#define CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_3 3 |
Definition at line 37 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetTransportClassTriggerTransportClass().
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_DELETE 1 |
Definition at line 40 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetWatchdogTimeoutAction(), and ConnectionObjectSetWatchdogTimeoutAction().
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_RESET 2 |
Definition at line 41 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetWatchdogTimeoutAction(), and ConnectionObjectSetWatchdogTimeoutAction().
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_DEFERRED_DELETE 3 |
Definition at line 42 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetWatchdogTimeoutAction(), and ConnectionObjectSetWatchdogTimeoutAction().
#define CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_TRANSITION_TO_TIMED_OUT 0 |
Definition at line 39 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetWatchdogTimeoutAction(), and ConnectionObjectSetWatchdogTimeoutAction().
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().
void CipConnectionObjectListArrayFree | ( | DoublyLinkedListNode ** | node | ) |
Definition at line 74 of file cipconnectionobject.c.
References OPENER_TRACE_ERR.
Referenced by main().
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().
void ConnectionObjectDeepCopy | ( | CipConnectionObject *RESTRICT | destination, |
const CipConnectionObject *RESTRICT const | source | ||
) |
Copy the given connection data from source to destination.
destination | Destination of the copy operation |
source | Source of the copy operation |
Definition at line 769 of file cipconnectionobject.c.
Referenced by EstablishClass3Connection(), and GetIoConnectionForConnectionData().
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().
void ConnectionObjectGeneralConfiguration | ( | CipConnectionObject *const | connection_object | ) |
Generate the ConnectionIDs and set the general configuration parameter in the given connection object.
connection_object | pointer 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().
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().
CipUdint ConnectionObjectGetCipProducedConnectionID | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 441 of file cipconnectionobject.c.
References cip_connection_object::cip_produced_connection_id.
CipUint ConnectionObjectGetConnectionSerialNumber | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 590 of file cipconnectionobject.c.
References cip_connection_object::connection_serial_number.
size_t ConnectionObjectGetConnectionSize | ( | const CipWord | connection_parameters | ) |
Definition at line 752 of file cipconnectionobject.c.
Referenced by ConnectionObjectGetOToTConnectionSize(), and ConnectionObjectGetTToOConnectionSize().
ConnectionObjectConnectionSizeType ConnectionObjectGetConnectionSizeType | ( | const CipWord | connection_parameters | ) |
Definition at line 730 of file cipconnectionobject.c.
References kConnectionObjectConnectionSizeTypeFixed, and kConnectionObjectConnectionSizeTypeVariable.
Referenced by ConnectionObjectGetOToTConnectionSizeType(), and ConnectionObjectGetTToOConnectionSizeType().
CipUsint ConnectionObjectGetConnectionTimeoutMultiplier | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 623 of file cipconnectionobject.c.
References cip_connection_object::connection_timeout_multiplier.
ConnectionObjectConnectionType ConnectionObjectGetConnectionType | ( | const CipWord | connection_parameters | ) |
Definition at line 671 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_CONNECTION_TYPE_MULTICAST, CIP_CONNECTION_OBJECT_CONNECTION_TYPE_NULL, CIP_CONNECTION_OBJECT_CONNECTION_TYPE_POINT_TO_POINT, kConnectionObjectConnectionTypeInvalid, kConnectionObjectConnectionTypeMulticast, kConnectionObjectConnectionTypeNull, and kConnectionObjectConnectionTypePointToPoint.
Referenced by ConnectionObjectGetOToTConnectionType(), and ConnectionObjectGetTToOConnectionType().
CipUint ConnectionObjectGetConsumedConnectionPathLength | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 529 of file cipconnectionobject.c.
References cip_connection_object::consumed_connection_path_length.
CipUint ConnectionObjectGetConsumedConnectionSize | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 393 of file cipconnectionobject.c.
References cip_connection_object::consumed_connection_size.
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().
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().
CipUsint ConnectionObjectGetInstanceTypeForAttribute | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 268 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_INSTANCE_TYPE_CIP_BRIDGED, CIP_CONNECTION_OBJECT_INSTANCE_TYPE_EXPLICIT_MESSAGING, CIP_CONNECTION_OBJECT_INSTANCE_TYPE_IO, cip_connection_object::instance_type, kConnectionObjectInstanceTypeCipBridged, kConnectionObjectInstanceTypeExplicitMessaging, kConnectionObjectInstanceTypeInvalid, kConnectionObjectInstanceTypeIO, kConnectionObjectInstanceTypeIOExclusiveOwner, kConnectionObjectInstanceTypeIOInputOnly, kConnectionObjectInstanceTypeIOListenOnly, and OPENER_ASSERT.
CipUdint ConnectionObjectGetOriginatorSerialNumber | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 612 of file cipconnectionobject.c.
References cip_connection_object::originator_serial_number.
CipUint ConnectionObjectGetOriginatorVendorId | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 601 of file cipconnectionobject.c.
References cip_connection_object::originator_vendor_id.
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().
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.
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().
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.
CipUdint ConnectionObjectGetOToTRequestedPacketInterval | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 635 of file cipconnectionobject.c.
References cip_connection_object::o_to_t_requested_packet_interval.
ConnectionObjectPriority ConnectionObjectGetPriority | ( | const CipWord | connection_parameters | ) |
Definition at line 697 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_PRIORITY_HIGH, CIP_CONNECTION_OBJECT_PRIORITY_LOW, CIP_CONNECTION_OBJECT_PRIORITY_SCHEDULED, CIP_CONNECTION_OBJECT_PRIORITY_URGENT, kConnectionObjectPriorityHigh, kConnectionObjectPriorityLow, kConnectionObjectPriorityScheduled, kConnectionObjectPriorityUrgent, and OPENER_ASSERT.
Referenced by ConnectionObjectGetOToTPriority(), and ConnectionObjectGetTToOPriority().
CipUint ConnectionObjectGetProducedConnectionPathLength | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 516 of file cipconnectionobject.c.
References cip_connection_object::produced_connection_path_length.
CipUint ConnectionObjectGetProducedConnectionSize | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 381 of file cipconnectionobject.c.
References cip_connection_object::produced_connection_size.
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().
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().
ConnectionObjectState ConnectionObjectGetState | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 175 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_STATE_CLOSING, CIP_CONNECTION_OBJECT_STATE_CONFIGURING, CIP_CONNECTION_OBJECT_STATE_DEFERRED_DELETE, CIP_CONNECTION_OBJECT_STATE_ESTABLISHED, CIP_CONNECTION_OBJECT_STATE_NON_EXISTENT, CIP_CONNECTION_OBJECT_STATE_TIMEOUT, CIP_CONNECTION_OBJECT_STATE_WAITING_FOR_CONNECTION_ID, kConnectionObjectStateClosing, kConnectionObjectStateConfiguring, kConnectionObjectStateDeferredDelete, kConnectionObjectStateEstablished, kConnectionObjectStateInvalid, kConnectionObjectStateNonExistent, kConnectionObjectStateTimedOut, kConnectionObjectStateWaitingForConnectionID, and cip_connection_object::state.
Referenced by CheckForExistingConnection(), CheckForTimedOutConnectionsAndCloseTCPConnections(), ForwardClose(), GetConnectedObject(), GetConnectedOutputAssembly(), GetExclusiveOwnerConnection(), GetFreeExplicitConnection(), GetInputOnlyConnection(), GetListenOnlyConnection(), GetNextNonControlMasterConnection(), and ManageConnections().
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().
ConnectionObjectTransportClassTriggerProductionTrigger ConnectionObjectGetTransportClassTriggerProductionTrigger | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 329 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_APPLICATION_OBJECT, CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CHANGE_OF_STATE, CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_PRODUCTION_TRIGGER_CYCLIC, kConnectionObjectTransportClassTriggerProductionTriggerApplicationObject, kConnectionObjectTransportClassTriggerProductionTriggerChangeOfState, kConnectionObjectTransportClassTriggerProductionTriggerCyclic, kConnectionObjectTransportClassTriggerProductionTriggerInvalid, and cip_connection_object::transport_class_trigger.
Referenced by HandleNonNullNonMatchingForwardOpenRequest(), ManageConnections(), ParseConnectionPath(), ProcessProductionInhibitTime(), SetupIoConnectionTargetToOriginatorConnectionPoint(), and TriggerConnections().
ConnectionObjectTransportClassTriggerTransportClass ConnectionObjectGetTransportClassTriggerTransportClass | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 356 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_0, CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_1, CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_2, CIP_CONNECTION_OBJECT_TRANSPORT_CLASS_TRIGGER_TRANSPORT_CLASS_3, kConnectionObjectTransportClassTriggerTransportClass0, kConnectionObjectTransportClassTriggerTransportClass1, kConnectionObjectTransportClassTriggerTransportClass2, kConnectionObjectTransportClassTriggerTransportClass3, kConnectionObjectTransportClassTriggerTransportClassInvalid, and cip_connection_object::transport_class_trigger.
Referenced by CloseClass3ConnectionBasedOnSession(), CloseConnection(), HandleReceivedIoConnectionData(), ParseConnectionPath(), SendConnectedData(), SetupIoConnectionOriginatorToTargetConnectionPoint(), and SetupIoConnectionTargetToOriginatorConnectionPoint().
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().
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().
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().
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().
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().
ConnectionObjectWatchdogTimeoutAction ConnectionObjectGetWatchdogTimeoutAction | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 465 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_DELETE, CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_RESET, CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_DEFERRED_DELETE, CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_TRANSITION_TO_TIMED_OUT, kConnectionObjectWatchdogTimeoutActionAutoDelete, kConnectionObjectWatchdogTimeoutActionAutoReset, kConnectionObjectWatchdogTimeoutActionDeferredDelete, kConnectionObjectWatchdogTimeoutActionInvalid, kConnectionObjectWatchdogTimeoutActionTransitionToTimedOut, and cip_connection_object::watchdog_timeout_action.
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().
void ConnectionObjectInitializeFromMessage | ( | const CipOctet ** | message, |
CipConnectionObject *const | connection_object | ||
) |
Definition at line 111 of file cipconnectionobject.c.
References cip_connection_object::cip_consumed_connection_id, cip_connection_object::cip_produced_connection_id, cip_connection_object::connection_serial_number, ConnectionObjectSetCipConsumedConnectionID(), ConnectionObjectSetCipProducedConnectionID(), ConnectionObjectSetConnectionSerialNumber(), ConnectionObjectSetConnectionTimeoutMultiplier(), ConnectionObjectSetExpectedPacketRate(), ConnectionObjectSetInitialInactivityWatchdogTimerValue(), ConnectionObjectSetOriginatorSerialNumber(), ConnectionObjectSetOriginatorVendorId(), ConnectionObjectSetOToTRequestedPacketInterval(), ConnectionObjectSetState(), ConnectionObjectSetTToORequestedPacketInterval(), GetDintFromMessage(), GetIntFromMessage(), GetSintFromMessage(), kConnectionObjectStateNonExistent, MoveMessageNOctets(), cip_connection_object::o_to_t_network_connection_parameters, OPENER_TRACE_INFO, cip_connection_object::sequence_count_producing, cip_connection_object::t_to_o_network_connection_parameters, and cip_connection_object::transport_class_trigger.
Referenced by ForwardOpen().
bool ConnectionObjectIsOToTRedundantOwner | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 659 of file cipconnectionobject.c.
References cip_connection_object::o_to_t_network_connection_parameters.
bool ConnectionObjectIsTToORedundantOwner | ( | const CipConnectionObject *const | connection_object | ) |
Definition at line 665 of file cipconnectionobject.c.
References cip_connection_object::t_to_o_network_connection_parameters.
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
void ConnectionObjectSetConsumedConnectionPathLength | ( | CipConnectionObject *const | connection_object, |
const CipUint | consumed_connection_path_length | ||
) |
Definition at line 534 of file cipconnectionobject.c.
References cip_connection_object::consumed_connection_path_length.
void ConnectionObjectSetConsumedConnectionSize | ( | CipConnectionObject *const | connection_object, |
const CipUint | consumed_connection_size | ||
) |
Definition at line 398 of file cipconnectionobject.c.
References cip_connection_object::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().
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().
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().
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().
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().
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().
void ConnectionObjectSetProducedConnectionPathLength | ( | CipConnectionObject *const | connection_object, |
const CipUint | produced_connection_path_length | ||
) |
Definition at line 521 of file cipconnectionobject.c.
References cip_connection_object::produced_connection_path_length.
void ConnectionObjectSetProducedConnectionSize | ( | CipConnectionObject *const | connection_object, |
const CipUint | produced_connection_size | ||
) |
Definition at line 386 of file cipconnectionobject.c.
References cip_connection_object::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().
void ConnectionObjectSetState | ( | CipConnectionObject *const | connection_object, |
const ConnectionObjectState | state | ||
) |
Definition at line 207 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_STATE_CLOSING, CIP_CONNECTION_OBJECT_STATE_CONFIGURING, CIP_CONNECTION_OBJECT_STATE_DEFERRED_DELETE, CIP_CONNECTION_OBJECT_STATE_ESTABLISHED, CIP_CONNECTION_OBJECT_STATE_NON_EXISTENT, CIP_CONNECTION_OBJECT_STATE_TIMEOUT, CIP_CONNECTION_OBJECT_STATE_WAITING_FOR_CONNECTION_ID, kConnectionObjectStateClosing, kConnectionObjectStateConfiguring, kConnectionObjectStateDeferredDelete, kConnectionObjectStateEstablished, kConnectionObjectStateNonExistent, kConnectionObjectStateTimedOut, kConnectionObjectStateWaitingForConnectionID, OPENER_ASSERT, and cip_connection_object::state.
Referenced by AddNewActiveConnection(), AssembleForwardOpenResponse(), CipClass3ConnectionObjectStateEstablishedHandler(), CipClass3ConnectionObjectStateNonExistentHandler(), CloseIoConnection(), ConnectionObjectInitializeEmpty(), ConnectionObjectInitializeFromMessage(), and HandleIoConnectionTimeOut().
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().
void ConnectionObjectSetWatchdogTimeoutAction | ( | CipConnectionObject *const | connection_object, |
const CipUsint | watchdog_timeout_action | ||
) |
Definition at line 488 of file cipconnectionobject.c.
References CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_DELETE, CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_AUTO_RESET, CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_DEFERRED_DELETE, CIP_CONNECTION_OBJECT_WATCHDOG_TIMEOUT_ACTION_TRANSITION_TO_TIMED_OUT, kConnectionObjectWatchdogTimeoutActionAutoDelete, kConnectionObjectWatchdogTimeoutActionAutoReset, kConnectionObjectWatchdogTimeoutActionDeferredDelete, kConnectionObjectWatchdogTimeoutActionInvalid, kConnectionObjectWatchdogTimeoutActionTransitionToTimedOut, and cip_connection_object::watchdog_timeout_action.
Referenced by ConnectionObjectGeneralConfiguration().
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().
DoublyLinkedList connection_list |
Definition at line 53 of file cipconnectionobject.c.
Referenced by CheckAndHandleConsumingUdpSockets(), CloseAllConnections(), CloseAllConnectionsForInputWithSameType(), CloseClass3ConnectionBasedOnSession(), ConnectionWithSameConfigPointExists(), GetExistingProducerMulticastConnection(), GetNextNonControlMasterConnection(), main(), and SetupIoConnectionTargetToOriginatorConnectionPoint().
CipConnectionObject explicit_connection_object_pool[OPENER_CIP_NUM_EXPLICIT_CONNS] |
Array of the available explicit connections.
Definition at line 57 of file cipconnectionobject.c.