MCPcopy Create free account
hub / github.com/EIPStackGroup/OpENer / RegisterCipClass

Function RegisterCipClass

source/src/cip/cipmessagerouter.c:154–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154EipStatus RegisterCipClass(CipClass *cip_class) {
155 CipMessageRouterObject **message_router_object = &g_first_object;
156
157 while (*message_router_object) {
158 message_router_object = &(*message_router_object)->next; /* follow the list until p points to an empty link (list end)*/
159
160 }
161 *message_router_object = (CipMessageRouterObject *) CipCalloc(
162 1, sizeof(CipMessageRouterObject) ); /* create a new node at the end of the list*/
163 if (*message_router_object == 0) {
164 return kEipStatusError; /* check for memory error*/
165
166 }
167 (*message_router_object)->cip_class = cip_class; /* fill in the new node*/
168 (*message_router_object)->next = NULL;
169
170 return kEipStatusOk;
171}
172
173EipStatus NotifyMessageRouter(EipUint8 *data,
174 int data_length,

Callers 1

CreateCipClassFunction · 0.85

Calls 1

CipCallocFunction · 0.50

Tested by

no test coverage detected