COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
rxrstruc Struct Reference

Receiver information. More...

#include <jsondef.h>

Collaboration diagram for rxrstruc:

Public Member Functions

json11::Json to_json () const
 Convert class contents to JSON object. More...
 
void from_json (const string &s)
 Set class contents from JSON string. More...
 

Public Attributes

uint16_t opmode = 0
 Operating mode. More...
 
uint16_t modulation = 0
 Data modulation. More...
 
uint16_t rssi = 0
 RSSI. More...
 
uint16_t pktsize = 0
 Packet Size. More...
 
double freq = 0.
 Input Frequency. More...
 
double maxfreq = 0.
 Maximum frequency allowed. More...
 
double minfreq = 0.
 Minimum frequency allowed. More...
 
float powerin = 0.f
 Current RX Power. More...
 
float powerout = 0.f
 Current TX Power. More...
 
float maxpower = 0.f
 Output Power limit. More...
 
float band = 0.f
 Input Filter bandpass. More...
 
float squelch_tone = 0.f
 repeater squelch tone frequency More...
 
double goodratio = 0.
 Good Packet Percentage. More...
 
double rxutc = 0.
 Last RX time. More...
 
double uptime = 0.
 Connection Uptime. More...
 

Detailed Description

Receiver information.

This structure holds the information concerning receivers.

Member Function Documentation

json11::Json rxrstruc::to_json ( ) const
inline

Convert class contents to JSON object.

Returns a json11 JSON object of the class

Returns
A json11 JSON object containing every member variable within the class
2352  {
2353  return json11::Json::object {
2354  { "opmode" , opmode },
2355  { "modulation" , modulation },
2356  { "rssi" , rssi },
2357  { "pktsize", pktsize },
2358  { "freq" , freq },
2359  { "maxfreq", maxfreq },
2360  { "minfreq", minfreq },
2361  { "powerin", powerin },
2362  { "powerout" , powerout },
2363  { "maxpower" , maxpower },
2364  { "band" , band },
2365  { "squelch_tone", squelch_tone },
2366  { "goodratio", goodratio },
2367  { "rxutc" , rxutc },
2368  { "uptime" , uptime }
2369  };
2370  }
double goodratio
Good Packet Percentage.
Definition: jsondef.h:2342
std::map< std::string, Json > object
Definition: json11.hpp:88
float band
Input Filter bandpass.
Definition: jsondef.h:2338
uint16_t rssi
RSSI.
Definition: jsondef.h:2322
double freq
Input Frequency.
Definition: jsondef.h:2326
uint16_t opmode
Operating mode.
Definition: jsondef.h:2318
float powerout
Current TX Power.
Definition: jsondef.h:2334
double uptime
Connection Uptime.
Definition: jsondef.h:2346
uint16_t pktsize
Packet Size.
Definition: jsondef.h:2324
float squelch_tone
repeater squelch tone frequency
Definition: jsondef.h:2340
float powerin
Current RX Power.
Definition: jsondef.h:2332
float maxpower
Output Power limit.
Definition: jsondef.h:2336
double minfreq
Minimum frequency allowed.
Definition: jsondef.h:2330
double maxfreq
Maximum frequency allowed.
Definition: jsondef.h:2328
double rxutc
Last RX time.
Definition: jsondef.h:2344
uint16_t modulation
Data modulation.
Definition: jsondef.h:2320
void rxrstruc::from_json ( const string &  s)
inline

Set class contents from JSON string.

Parses the provided JSON-formatted string and sets the class data. String should be formatted like the string returned from to_json()

Parameters
sJSON-formatted string to set class contents to
Returns
n/a
2378  {
2379  string error;
2380  json11::Json parsed = json11::Json::parse(s,error);
2381  if(error.empty()) {
2382  if(!parsed["opmode"].is_null()) { opmode = parsed["opmode"].int_value(); }
2383  if(!parsed["modulation"].is_null()) { modulation = parsed["modulation"].int_value(); }
2384  if(!parsed["rssi"].is_null()) { rssi = parsed["rssi"].int_value(); }
2385  if(!parsed["pktsize"].is_null()) { pktsize = parsed["pktsize"].int_value(); }
2386  if(!parsed["freq"].is_null()) { freq = parsed["freq"].number_value(); }
2387  if(!parsed["maxfreq"].is_null()) { maxfreq = parsed["maxfreq"].number_value(); }
2388  if(!parsed["minfreq"].is_null()) { minfreq = parsed["minfreq"].number_value(); }
2389  if(!parsed["powerin"].is_null()) { powerin = parsed["powerin"].number_value(); }
2390  if(!parsed["powerout"].is_null()) { powerout = parsed["powerout"].number_value(); }
2391  if(!parsed["maxpower"].is_null()) { maxpower = parsed["maxpower"].number_value(); }
2392  if(!parsed["band"].is_null()) { band = parsed["band"].number_value(); }
2393  if(!parsed["squelch_tone"].is_null()) { squelch_tone = parsed["squelch_tone"].number_value(); }
2394  if(!parsed["goodratio"].is_null()) { goodratio = parsed["goodratio"].number_value(); }
2395  if(!parsed["rxutc"].is_null()) { rxutc = parsed["rxutc"].number_value(); }
2396  if(!parsed["uptime"].is_null()) { uptime = parsed["uptime"].number_value(); }
2397  } else {
2398  cerr<<"ERROR: <"<<error<<">"<<endl;
2399  }
2400  return;
2401  }
double goodratio
Good Packet Percentage.
Definition: jsondef.h:2342
Definition: json11.hpp:79
float band
Input Filter bandpass.
Definition: jsondef.h:2338
uint16_t rssi
RSSI.
Definition: jsondef.h:2322
double freq
Input Frequency.
Definition: jsondef.h:2326
uint16_t opmode
Operating mode.
Definition: jsondef.h:2318
float powerout
Current TX Power.
Definition: jsondef.h:2334
double uptime
Connection Uptime.
Definition: jsondef.h:2346
uint16_t pktsize
Packet Size.
Definition: jsondef.h:2324
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
float squelch_tone
repeater squelch tone frequency
Definition: jsondef.h:2340
float powerin
Current RX Power.
Definition: jsondef.h:2332
float maxpower
Output Power limit.
Definition: jsondef.h:2336
double minfreq
Minimum frequency allowed.
Definition: jsondef.h:2330
double maxfreq
Maximum frequency allowed.
Definition: jsondef.h:2328
double rxutc
Last RX time.
Definition: jsondef.h:2344
uint16_t modulation
Data modulation.
Definition: jsondef.h:2320
int int_value() const
Definition: json11.cpp:281
double number_value() const
Definition: json11.cpp:280

Member Data Documentation

uint16_t rxrstruc::opmode = 0

Operating mode.

uint16_t rxrstruc::modulation = 0

Data modulation.

uint16_t rxrstruc::rssi = 0

RSSI.

uint16_t rxrstruc::pktsize = 0

Packet Size.

double rxrstruc::freq = 0.

Input Frequency.

double rxrstruc::maxfreq = 0.

Maximum frequency allowed.

double rxrstruc::minfreq = 0.

Minimum frequency allowed.

float rxrstruc::powerin = 0.f

Current RX Power.

float rxrstruc::powerout = 0.f

Current TX Power.

float rxrstruc::maxpower = 0.f

Output Power limit.

float rxrstruc::band = 0.f

Input Filter bandpass.

float rxrstruc::squelch_tone = 0.f

repeater squelch tone frequency

double rxrstruc::goodratio = 0.

Good Packet Percentage.

double rxrstruc::rxutc = 0.

Last RX time.

double rxrstruc::uptime = 0.

Connection Uptime.


The documentation for this struct was generated from the following file: