mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-25 04:17:28 +00:00
01b565d2b3
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@913 7ae35d74-ebe9-4afe-98af-79ac388436b8
27 lines
450 B
C++
27 lines
450 B
C++
|
|
/*
|
|
* Hamlib sample C++ program
|
|
*/
|
|
|
|
#include <iostream.h>
|
|
#include <hamlib/rigclass.h>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
Rig myRig = Rig(RIG_MODEL_DUMMY);
|
|
|
|
try {
|
|
myRig.open();
|
|
myRig.setFreq(MHz(144));
|
|
cout << myRig.getLevelI(RIG_LEVEL_STRENGTH) << "dB" << endl;
|
|
cout << "Modes for freq 14.332: " << myRig.RngRxModes(MHz(14.332)) << endl;
|
|
myRig.close();
|
|
}
|
|
catch (const RigException &Ex) {
|
|
Ex.print();
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|