Logo Search packages:      
Sourcecode: hamlib version File versions

testcpp.cc

/* 
 * Hamlib sample C++ program
 */

#include <iostream>
#include <hamlib/rigclass.h>

int main(int argc, char* argv[])
{
      Rig myRig = Rig(RIG_MODEL_DUMMY);

      try {
            myRig.open();
            myRig.setFreq(MHz(144));
            std::cout << myRig.getLevelI(RIG_LEVEL_STRENGTH) << "dB" << std::endl;
            std::cout << "Modes for freq 14.332: " << myRig.RngRxModes(MHz(14.332)) << std::endl;
            myRig.close();
      }
      catch (const RigException &Ex) {
            Ex.print();
            return 1;
      }

      return 0;
}

Generated by  Doxygen 1.6.0   Back to index