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

Function GetCipInstance

source/src/cip/cipmessagerouter.c:135–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135CipInstance *GetCipInstance(const CipClass *RESTRICT const cip_class,
136 EipUint32 instance_number) {
137
138 if (instance_number == 0) {
139 return (CipInstance *) cip_class; /* if the instance number is zero, return the class object itself*/
140
141 }
142 /* pointer to linked list of instances from the class object*/
143 for (CipInstance *instance = cip_class->instances; instance; instance =
144 instance->next) /* follow the list*/
145 {
146 if (instance->instance_number == instance_number) {
147 return instance; /* if the number matches, return the instance*/
148 }
149 }
150
151 return NULL;
152}
153
154EipStatus RegisterCipClass(CipClass *cip_class) {
155 CipMessageRouterObject **message_router_object = &g_first_object;

Callers 10

CipIdentityInitFunction · 0.85
CipQoSInitFunction · 0.85
NotifyClassFunction · 0.85
cipcommon.cFile · 0.85
CipTcpIpInterfaceInitFunction · 0.85
HandleConfigDataFunction · 0.85
CipEthernetLinkInitFunction · 0.85
ParseConnectionPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected