Co-Simulation/Veins/veins/src/veins/modules/mac/ieee80211p/Mac1609_4.cc
/* Will change the Service Channel on which the mac layer is listening and sending */
Will change the Service Channel on which the mac layer is listening and sending
Will change the Service Channel on which the mac layer is listening and sending
void Mac1609_4::changeServiceChannel(Channel cN)
{
    ASSERT(useSCH);
    mySCH = static_cast<Channel>(cN);
    if (mySCH != Channel::sch1 && mySCH != Channel::sch2 && mySCH != Channel::sch3 && mySCH != Channel::sch4) {
        throw cRuntimeError("This Service Channel doesnt exit: %d", cN);
    }
    if (activeChannel == ChannelType::service) {
        phy11p->changeListeningChannel(mySCH);
    }
}
void Mac1609_4 :: changeServiceChannel ( Channel cN ) { ASSERT ( useSCH ) ; mySCH = static_cast < Channel > ( cN ) ; if ( mySCH != Channel :: sch1 && mySCH != Channel :: sch2 && mySCH != Channel :: sch3 && mySCH != Channel :: sch4 ) { throw cRuntimeError ( " " , cN ) ; } if ( activeChannel == ChannelType :: service ) { phy11p -> changeListeningChannel ( mySCH ) ; } }
Will change the Service Channel on which the mac layer is listening and sending
Will change the Service Channel on which the mac layer is listening and sending
// change to new chan immediately if we are in a SCH slot, // otherwise it will switch to the new SCH upon next channel switch