MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / main

Function main

c++/testcpp.cc:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <hamlib/rigclass.h>
8
9int main(int argc, char* argv[])
10{
11 Rig myRig {RIG_MODEL_DUMMY};
12
13 try {
14 myRig.setConf("rig_pathname", "/dev/pts/4");
15 myRig.open();
16 myRig.setFreq(MHz(144));
17 std::cout << myRig.getLevelI(RIG_LEVEL_STRENGTH) << "dB" << std::endl;
18 std::cout << "Modes for freq 14.332: " << myRig.RngRxModes(MHz(14.332)) << std::endl;
19 myRig.close();
20 }
21 catch (const RigException &Ex) {
22 Ex.print();
23 return 1;
24 }
25
26 return 0;
27}

Callers

nothing calls this directly

Calls 6

getLevelIMethod · 0.80
RngRxModesMethod · 0.80
setConfMethod · 0.45
openMethod · 0.45
setFreqMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected