vector<Bus *> Device::getBusesByFamily(BusFamily &family) { vector<Bus *>::iterator busIter; vector<Bus *> retval; for(busIter = this->buses.begin(); busIter != this->buses.end(); busIter++) { BusFamily thatFamily = (*busIter)->getBusFamily(); if(thatFamily.equals(family)) { retval.push_back(*busIter); } } return retval; }
ProtocolFamily NIRQuest512::getSupportedProtocol(FeatureFamily family, BusFamily bus) { ProtocolFamilies protocols; BusFamilies busFamilies; if(bus.equals(busFamilies.USB)) { /* This device only supports one protocol over USB. */ return protocols.OOI_PROTOCOL; } /* No other combinations of buses and protocols are supported. */ return protocols.UNDEFINED_PROTOCOL; }