100 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
104 if(index>=maxEthBoards)
109 if(NULL == LUT[index].resource)
114 return(LUT[index].numberofinterfaces);
127 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
130 if(index>=maxEthBoards)
136 if(NULL != LUT[index].resource)
141 LUT[index].resource = res;
142 LUT[index].ipv4 = ipv4;
143 LUT[index].boardnumber = index;
145 LUT[index].numberofinterfaces = 0;
148 LUT[index].interfaces[i] = NULL;
159 if((NULL == res) || (NULL == interface))
174 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
176 if(index>=maxEthBoards)
181 if(res != LUT[index].resource)
186 if(NULL != LUT[index].interfaces[type])
192 LUT[index].interfaces[type] = interface;
193 LUT[index].numberofinterfaces ++;
210 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
212 if(index>=maxEthBoards)
217 if(res != LUT[index].resource)
222 auto& l = LUT[index];
241 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
243 if(index>=maxEthBoards)
248 if(res != LUT[index].resource)
253 if(NULL != LUT[index].interfaces[type])
255 LUT[index].interfaces[type] = NULL;
256 LUT[index].numberofinterfaces --;
268 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
270 if(index<maxEthBoards)
272 ret = LUT[index].resource;
278 bool eth::EthBoards::get_LUTindex(eOipv4addr_t ipv4, uint8_t &index)
281 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
284 if(index>=maxEthBoards)
289 if(NULL == LUT[index].resource)
301 if(!get_LUTindex(ipv4, index))
311 dev = LUT[index].interfaces[type];
323 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
325 if(index>=maxEthBoards)
330 if(NULL == LUT[index].resource)
336 eOprotEndpoint_t ep = eoprot_ID2endpoint(id32);
339 case eoprot_endpoint_management:
344 case eoprot_endpoint_motioncontrol:
349 case eoprot_endpoint_skin:
354 case eoprot_endpoint_analogsensors:
356 eOprotEntity_t en = eoprot_ID2entity(id32);
357 if(eoprot_entity_as_strain == en)
359 else if(eoprot_entity_as_mais == en)
361 else if(eoprot_entity_as_inertial3 == en)
363 else if(eoprot_entity_as_temperature == en)
365 else if(eoprot_entity_as_psc == en)
367 else if(eoprot_entity_as_pos == en)
369 else if(eoprot_entity_as_ft == en)
371 else if(eoprot_entity_as_battery == en)
385 dev = LUT[index].interfaces[type];
396 const string & ret =
"none";
399 eo_common_ipv4addr_to_decimal(ipv4, NULL, NULL, NULL, &index);
401 if(index<maxEthBoards)
403 return LUT[index].name;
422 for(
int i=0; i<maxEthBoards; i++)
virtual const Properties & getProperties()=0
size_t number_of_interfaces(eth::AbstractEthResource *res)
const string & name(eOipv4addr_t ipv4)
eth::IethResource * get_interface(eOipv4addr_t ipv4, eOprotID32_t id32)
bool execute(void(*action)(eth::AbstractEthResource *res, void *p), void *par)
bool add(eth::AbstractEthResource *res)
bool rem(eth::AbstractEthResource *res)
size_t number_of_resources(void)
eth::AbstractEthResource * get_resource(eOipv4addr_t ipv4)
virtual iethresType_t type()=0
@ iethres_analoginertial3