Logo Search packages:      
Sourcecode: icomlib version File versions  Download package

bool PCP::PCPSetVolume ( int  volume  ) 

Set the current session's volume.

volume an integer between 0 and 99
sprintf converts (and combines) the cmd PCRVOL with the argument, such that the argument has a minimum field width of two chars. If the field is < 2 chars (ie: arg=5) then it pads the field with one zero.

true or false based on PCPCheckResponse to indicate success or failure
See also:
PCPVolume pcrcmd_t pcrdef.h

Definition at line 263 of file pcp.cpp.

References PCPCheckResponse(), PCPComm, PCPRadio, PCPTemp, PRadInf::PCPVolume, and PComm::PCTell().

    if ((0<=volume)&&(volume<=99)) {
        memset(PCPTemp, '\0', sizeof(PCPTemp));
        sprintf(PCPTemp, "%s%0.2d", PCRVOL, volume);
        if (PCPCheckResponse()) {
            return true;

    return false;

Generated by  Doxygen 1.6.0   Back to index