2002-01-27 14:45:52 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Hamlib sample C++ program
|
|
|
|
*/
|
|
|
|
|
2003-04-06 18:30:42 +00:00
|
|
|
#include <iostream>
|
2002-01-27 14:45:52 +00:00
|
|
|
#include <hamlib/rigclass.h>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
Rig myRig = Rig(RIG_MODEL_DUMMY);
|
|
|
|
|
|
|
|
try {
|
|
|
|
myRig.open();
|
|
|
|
myRig.setFreq(MHz(144));
|
2003-04-06 18:30:42 +00:00
|
|
|
std::cout << myRig.getLevelI(RIG_LEVEL_STRENGTH) << "dB" << std::endl;
|
|
|
|
std::cout << "Modes for freq 14.332: " << myRig.RngRxModes(MHz(14.332)) << std::endl;
|
2002-01-27 14:45:52 +00:00
|
|
|
myRig.close();
|
|
|
|
}
|
|
|
|
catch (const RigException &Ex) {
|
|
|
|
Ex.print();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|