Ejemplo n.º 1
0
void CEspConfig::loadProtocols()
{
    map<string, protocol_cfg*>::iterator iter = m_protocols.begin();
    while (iter!=m_protocols.end())
    {
        loadProtocol(*(iter->second));
        iter++;
    }
}
Ejemplo n.º 2
0
/**
 * Loads the given \a protocol type.
 *
 * \note You can use this function directly with the index values given by the
 *       \c protocols() function
 */
void DriverStation::setProtocol (const Protocol protocol)
{
    switch ((Protocol) protocol) {
    case Protocol2014:
        loadProtocol (DS_GetProtocolFRC_2014());
        LOG << "Switched to FRC 2014 Protocol";
        break;
    case Protocol2015:
        loadProtocol (DS_GetProtocolFRC_2015());
        LOG << "Switched to FRC 2015 Protocol";
        break;
    case Protocol2016:
        loadProtocol (DS_GetProtocolFRC_2016());
        LOG << "Switched to FRC 2016 Protocol";
        break;
    case Protocol2018:
        loadProtocol (DS_GetProtocolFRC_2018());
        LOG << "Switched to FRC 2018 Protocol";
        break;
    default:
        break;
    }
}