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

Function GetRegisteredObject

source/src/cip/cipmessagerouter.c:111–123  ·  view source on GitHub ↗

@brief Get the registered MessageRouter object corresponding to ClassID. * given a class ID, return a pointer to the registration node for that object * * @param class_id Class code to be searched for. * @return Pointer to registered message router object * NULL .. Class not registered */

Source from the content-addressed store, hash-verified

109 * NULL .. Class not registered
110 */
111CipMessageRouterObject *GetRegisteredObject(EipUint32 class_id) {
112 CipMessageRouterObject *object = g_first_object; /* get pointer to head of class registration list */
113
114 while (NULL != object) /* for each entry in list*/
115 {
116 OPENER_ASSERT(NULL != object->cip_class)
117 if (object->cip_class->class_id == class_id) {
118 return object; /* return registration node if it matches class ID*/
119 }
120 object = object->next;
121 }
122 return NULL;
123}
124
125CipClass *GetCipClass(const EipUint32 class_id) {
126 CipMessageRouterObject *message_router_object = GetRegisteredObject(class_id);

Callers 2

GetCipClassFunction · 0.85
NotifyMessageRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected