2001-06-15 07:05:34 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Hamlib sample C++ program
|
|
|
|
*/
|
|
|
|
|
2001-06-18 20:17:20 +00:00
|
|
|
#include <iostream.h>
|
2001-06-15 07:05:34 +00:00
|
|
|
#include <hamlib/rigclass.h>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
Rig myRig = Rig(RIG_MODEL_DUMMY);
|
|
|
|
|
2001-06-18 20:17:20 +00:00
|
|
|
try {
|
|
|
|
myRig.open();
|
|
|
|
myRig.setFreq(MHz(144));
|
|
|
|
cout << myRig.getLevelI(RIG_LEVEL_STRENGTH) << "dB" << endl;
|
|
|
|
myRig.close();
|
|
|
|
}
|
|
|
|
catch (const RigException &Ex) {
|
|
|
|
Ex.print();
|
|
|
|
return 1;
|
|
|
|
}
|
2001-06-15 07:05:34 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|