| 116 | } |
| 117 | |
| 118 | EipStatus NotifyAssemblyConnectedDataReceived(CipInstance *const instance, |
| 119 | const EipUint8 *const data, |
| 120 | const EipUint16 data_length) { |
| 121 | /* empty path (path size = 0) need to be checked and taken care of in future */ |
| 122 | /* copy received data to Attribute 3 */ |
| 123 | CipByteArray *assembly_byte_array = |
| 124 | (CipByteArray *) instance->attributes->data; |
| 125 | if(assembly_byte_array->length != data_length) { |
| 126 | OPENER_TRACE_ERR("wrong amount of data arrived for assembly object\n"); |
| 127 | return kEipStatusError; /*TODO question should we notify the application that wrong data has been received???*/ |
| 128 | } |
| 129 | else{ |
| 130 | memcpy(assembly_byte_array->data, data, data_length); |
| 131 | /* call the application that new data arrived */ |
| 132 | } |
| 133 | |
| 134 | return AfterAssemblyDataReceived(instance); |
| 135 | } |
| 136 | |
| 137 | EipStatus SetAssemblyAttributeSingle(CipInstance *const instance, |
| 138 | CipMessageRouterRequest *const message_router_request, |
no test coverage detected