OpENer - Open Source EtherNet/IP(TM) I/O Target Stack
2.1
|
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... | |
EipStatus CipAssemblyInitialize | ( | void | ) |
Setup the Assembly object.
Creates the Assembly Class with zero instances and sets up all services.
Setup the Assembly object.
Definition at line 61 of file cipassembly.c.
References CreateAssemblyClass(), kEipStatusError, and kEipStatusOk.
Referenced by CipStackInit().
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.
instance | the assembly object instance for which the data was received |
data | pointer to the data received |
data_length | number of bytes received |
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().
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().