OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cipassembly.h File Reference
#include "typedefs.h"
#include "ciptypes.h"
Include dependency graph for cipassembly.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

EipStatus CipAssemblyInitialize (void)
 Setup the Assembly object. More...
 
EipStatus NotifyAssemblyConnectedDataReceived (CipInstance *const instance, const EipUint8 *const data, const EipUint16 data_length)
 notify an Assembly object that data has been received for it. More...
 
void ShutdownAssemblies (void)
 clean up the data allocated in the assembly object instances More...
 

Function Documentation

EipStatus CipAssemblyInitialize ( void  )

Setup the Assembly object.

Creates the Assembly Class with zero instances and sets up all services.

Returns
Returns kEipStatusOk if assembly object was successfully created, otherwise kEipStatusError

Setup the Assembly object.

Definition at line 61 of file cipassembly.c.

References CreateAssemblyClass(), kEipStatusError, and kEipStatusOk.

Referenced by CipStackInit().

Here is the call graph for this function:

Here is the caller graph for this function:

EipStatus NotifyAssemblyConnectedDataReceived ( CipInstance *const  instance,
const EipUint8 *const  data,
const EipUint16  data_length 
)

notify an Assembly object that data has been received for it.

The data will be copied into the assembly objects attribute 3 and the application will be informed with the AfterAssemblyDataReceived function.

Parameters
instancethe assembly object instance for which the data was received
datapointer to the data received
data_lengthnumber of bytes received
Returns
  • kEipStatusOk the received data was okay
  • kEipStatusError the received data was wrong

Definition at line 118 of file cipassembly.c.

References AfterAssemblyDataReceived(), cip_instance::attributes, CipByteArray::data, CipAttributeStruct::data, kEipStatusError, CipByteArray::length, and OPENER_TRACE_ERR.

Referenced by HandleConfigData(), and HandleReceivedIoConnectionData().

Here is the call graph for this function:

Here is the caller graph for this function:

void ShutdownAssemblies ( void  )

clean up the data allocated in the assembly object instances

Assembly object instances allocate per instance data to store attribute 3. This will be freed here. The assembly object data given by the application is not freed neither the assembly object instances. These are handled in the main shutdown function.

Definition at line 65 of file cipassembly.c.

References CipFree(), CipAttributeStruct::data, GetCipAttribute(), GetCipClass(), cip_class::instances, and cip_instance::next.

Referenced by ShutdownCipStack().

Here is the call graph for this function:

Here is the caller graph for this function: