OpENer - Open Source EtherNet/IP(TM) I/O Target Stack
2.1
|
Go to the source code of this file.
Functions | |
void | CloseCommunicationChannelsAndRemoveFromActiveConnectionsList (CipConnectionObject *connection_object) |
close the communication channels of the given connection and remove it from the active connections list. More... | |
EipStatus | EstablishIoConnection (CipConnectionObject *RESTRICT const connection_object, EipUint16 *const extended_error) |
Setup all data in order to establish an IO connection. More... | |
EipStatus | OpenCommunicationChannels (CipConnectionObject *connection_object) |
Take the data given in the connection object structure and open the necessary communication channels. More... | |
Variables | |
EipUint8 * | g_config_data_buffer |
unsigned int | g_config_data_length |
Definition in file cipioconnection.h.
void CloseCommunicationChannelsAndRemoveFromActiveConnectionsList | ( | CipConnectionObject * | connection_object | ) |
close the communication channels of the given connection and remove it from the active connections list.
connection_object | pointer to the connection object data |
Definition at line 976 of file cipioconnection.c.
References CloseUdpSocket(), ConnectionObjectInitializeEmpty(), kUdpCommuncationDirectionConsuming, kUdpCommuncationDirectionProducing, RemoveFromActiveConnections(), and cip_connection_object::socket.
Referenced by CloseIoConnection().
EipStatus EstablishIoConnection | ( | CipConnectionObject *RESTRICT const | connection_object, |
EipUint16 *const | extended_error | ||
) |
Setup all data in order to establish an IO connection.
This function can be called after all data has been parsed from the forward open request
connection_object | pointer to the connection object structure holding the parsed data from the forward open request |
extended_error | the extended error code in case an error happened |
Setup all data in order to establish an IO connection.
This function needs the guarantee that no Null request will be passed to it. It will generate a new IO connection based on the data parsed in the Forward Open service
connection_object | pointer to the connection object structure holding the parsed data from the forward open request |
extended_error | the extended error code in case an error happened |
Already handled by forward open
Definition at line 275 of file cipioconnection.c.
References AddNewActiveConnection(), CheckIoConnectionEvent(), ConnectionObjectGeneralConfiguration(), ConnectionObjectGetOToTConnectionType(), ConnectionObjectGetTToOConnectionType(), cip_connection_object::consumed_connection_path_length, cip_connection_object::consumed_path, cip_connection_object::consuming_instance, g_config_data_buffer, GetIoConnectionForConnectionData(), HandleConfigData(), connection_path_epath::instance_id, kCipErrorConnectionFailure, kConnectionManagerExtendedStatusCodeSuccess, kConnectionObjectConnectionTypeNull, kEipStatusOk, kIoConnectionEventOpened, OpenCommunicationChannels(), OPENER_ASSERT, ProcessProductionInhibitTime(), cip_connection_object::produced_connection_path_length, cip_connection_object::produced_path, cip_connection_object::producing_instance, SetIoConnectionCallbacks(), SetupIoConnectionOriginatorToTargetConnectionPoint(), and SetupIoConnectionTargetToOriginatorConnectionPoint().
Referenced by ConnectionManagerInit().
EipStatus OpenCommunicationChannels | ( | CipConnectionObject * | connection_object | ) |
Take the data given in the connection object structure and open the necessary communication channels.
This function will use the g_stCPFDataItem!
connection_object | pointer to the connection object data |
Definition at line 919 of file cipioconnection.c.
References ConnectionObjectGetOToTConnectionType(), ConnectionObjectGetTToOConnectionType(), g_common_packet_format_data_item, kCipErrorConnectionFailure, kConnectionObjectConnectionTypeMulticast, kConnectionObjectConnectionTypePointToPoint, kEipStatusError, kEipStatusOk, kUdpCommuncationDirectionConsuming, OpenConsumingPointToPointConnection(), OPENER_TRACE_ERR, OpenMulticastConnection(), OpenProducingMulticastConnection(), and OpenProducingPointToPointConnection().
Referenced by EstablishIoConnection().
EipUint8* g_config_data_buffer |
buffers for the config data coming with a forward open request.
Definition at line 70 of file cipioconnection.c.
Referenced by EstablishIoConnection(), HandleConfigData(), and ParseConnectionPath().
unsigned int g_config_data_length |
length of g_config_data_buffer. Initialized with 0
Definition at line 71 of file cipioconnection.c.
Referenced by HandleConfigData(), and ParseConnectionPath().