Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}