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;
|
2001-12-17 22:58:54 +00:00
|
|
|
cout << "Modes for freq 14.332: " << myRig.RngRxModes(MHz(14.332)) << endl;
|
2001-06-18 20:17:20 +00:00
|
|
|
myRig.close();
|
|
|
|
}
|
|
|
|
catch (const RigException &Ex) {
|
|
|
|
Ex.print();
|
|
|
|
return 1;
|
|
|
|
}
|
2001-06-15 07:05:34 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|