vicinityManager/server/services/items/registration.js
/*
Find main item type (device/service) based on the semantic repository types
*/
Find main item type (device/service) based on the semantic repository types
Find main item type ( device / service ) based on the semantic repository types
function findType(objType, types){
  if(types.devices.indexOf(objType) !== -1){
    return("device");
  } else if(types.services.indexOf(objType) !== -1){
    return("service");
  } else {
    return("unknown");
  }
}
function findType ( objType , types ) { if ( types . devices . indexOf ( objType ) !== - 1 ) { return ( "device" ) ; } else if ( types . services . indexOf ( objType ) !== - 1 ) { return ( "service" ) ; } else { return ( "unknown" ) ; } }
Find main item type (device/service) based on the semantic repository types
Find main item type ( device / service ) based on the semantic repository types