@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 */
| 109 | * NULL .. Class not registered |
| 110 | */ |
| 111 | CipMessageRouterObject *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 | |
| 125 | CipClass *GetCipClass(const EipUint32 class_id) { |
| 126 | CipMessageRouterObject *message_router_object = GetRegisteredObject(class_id); |
no outgoing calls
no test coverage detected