38 if (static_cast<string>(
"ic9100") == argv[3])
45 else if (static_cast<string>(
"astrodev") == argv[3])
50 else if (static_cast<string>(
"usrp") == argv[3])
57 else if (static_cast<string>(
"direct") == argv[3])
64 if (static_cast<string>(
"txr") == argv[4])
68 else if (static_cast<string>(
"rxr") == argv[4])
72 else if (static_cast<string>(
"tcv") == argv[4])
78 if (static_cast<string>(
"am") == argv[7])
82 else if (static_cast<string>(
"amd") == argv[7])
86 else if (static_cast<string>(
"fm") == argv[7])
90 else if (static_cast<string>(
"fmd") == argv[7])
94 else if (static_cast<string>(
"lsb") == argv[7])
98 else if (static_cast<string>(
"lsbd") == argv[7])
102 else if (static_cast<string>(
"usb") == argv[7])
106 else if (static_cast<string>(
"usbd") == argv[7])
110 else if (static_cast<string>(
"dv") == argv[7])
114 else if (static_cast<string>(
"dvd") == argv[7])
118 else if (static_cast<string>(
"cw") == argv[7])
122 else if (static_cast<string>(
"cwr") == argv[7])
126 else if (static_cast<string>(
"rtty") == argv[7])
130 else if (static_cast<string>(
"rttyr") == argv[7])
138 printf(
"Usage: add_radio radioname [nodename [ic9100/astrodev txr/rxr/tcv frequency bandwidth mode {device:addr}]]\n");
Radio Receiver.
Definition: jsondef.h:508
Definition: jsondef.h:575
Definition: jsondef.h:561
FILE * get_debug_fd(double mjd=0.)
Definition: agentclass.cpp:2645
Definition: jsondef.h:585
Definition: jsondef.h:584
static float band
Definition: add_radio.cpp:22
string getNode()
Listen for heartbeat.
Definition: agentclass.cpp:2607
static std::string radioname
Definition: add_radio.cpp:8
Definition: jsondef.h:581
static Agent * agent
Definition: add_radio.cpp:6
Definition: jsondef.h:574
static uint16_t nodetype
Definition: add_radio.cpp:18
int iretn
Definition: rw_test.cpp:37
Definition: jsondef.h:576
int32_t wait(State state=State::RUN, double waitsec=10.)
Definition: agentclass.cpp:398
Definition: jsondef.h:567
Definition: jsondef.h:579
static size_t deviceindex
Definition: add_radio.cpp:9
Definition: cosmos-defs.h:91
int32_t json_dump_node(cosmosstruc *cinfo)
Save Node entries to disk.
Definition: jsonlib.cpp:7233
vector< devicestruc > device
Vector of all general (common) information for devices (components) in node.
Definition: jsondef.h:4238
nodestruc node
Structure for summary information in node.
Definition: jsondef.h:4220
string cosmos_error_string(int32_t cosmos_errno)
Definition: cosmos-errno.cpp:45
Definition: jsondef.h:651
Definition: jsondef.h:572
Radio Transceiver.
Definition: jsondef.h:512
Definition: jsondef.h:583
static uint16_t model
Definition: add_radio.cpp:19
string getAgent()
Definition: agentclass.cpp:2609
Definition: agentclass.h:139
static uint16_t radioaddr
Definition: add_radio.cpp:12
static float freq
Definition: add_radio.cpp:21
Definition: jsondef.h:580
static string radiodevice
Definition: add_radio.cpp:11
double data_ctime(string path)
Definition: datalib.cpp:1910
static uint8_t opmode
Definition: add_radio.cpp:23
double currentmjd(double offset)
Current UTC in Modified Julian Days.
Definition: timelib.cpp:65
static uint16_t radiotype
Definition: add_radio.cpp:20
Definition: jsondef.h:582
string utc2iso8601(double utc)
ISO 8601 version of time.
Definition: timelib.cpp:1286
Definition: jsondef.h:573
vector< piecestruc > pieces
Vector of all pieces in node.
Definition: jsondef.h:4232
Definition: jsondef.h:645
int32_t json_createpiece(cosmosstruc *cinfo, string name, DeviceType ctype, double emi, double abs, double hcap, double hcon, double density)
Create new piece.
Definition: jsonlib.cpp:722
cosmosstruc * cinfo
Definition: agentclass.h:346
Definition: jsondef.h:568
static size_t radioindex
Definition: add_radio.cpp:10
Definition: jsondef.h:560
string mjd2iso8601(double mjd)
Definition: timelib.cpp:1316
uint16_t type
Node Type as listed in NODE_TYPE.
Definition: jsondef.h:3562
Radio Transmitter.
Definition: jsondef.h:510
Definition: jsondef.h:578
static std::string nodename
Definition: add_radio.cpp:7
Definition: jsondef.h:562
Definition: jsondef.h:577
int32_t json_createport(cosmosstruc *cinfo, string name, PORT_TYPE type)
Definition: jsonlib.cpp:1086