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

Transceiver information. More...

#include <jsondef.h>

Collaboration diagram for tcvstruc:

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 txutc = 0.
 Last TX time. More...
 
double rxutc = 0.
 Last RX time. More...
 
double uptime = 0.
 Connection Uptime. More...
 

Detailed Description

Transceiver information.

This structure holds the information concerning transceivers.

Member Function Documentation

json11::Json tcvstruc::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
2538  {
2539  return json11::Json::object {
2540  { "opmode" , opmode },
2541  { "modulation" , modulation },
2542  { "rssi" , rssi },
2543  { "pktsize", pktsize },
2544  { "freq" , freq },
2545  { "maxfreq", maxfreq },
2546  { "minfreq", minfreq },
2547  { "powerin", powerin },
2548  { "powerout" , powerout },
2549  { "maxpower" , maxpower },
2550  { "band" , band },
2551  { "squelch_tone", squelch_tone },
2552  { "goodratio", goodratio },
2553  { "txutc" , txutc },
2554  { "rxutc" , rxutc },
2555  { "uptime" , uptime }
2556  };
2557  }
double goodratio
Good Packet Percentage.
Definition: jsondef.h:2526
std::map< std::string, Json > object
Definition: json11.hpp:88
uint16_t pktsize
Packet Size.
Definition: jsondef.h:2508
uint16_t opmode
Operating mode.
Definition: jsondef.h:2502
double txutc
Last TX time.
Definition: jsondef.h:2528
uint16_t modulation
Data modulation.
Definition: jsondef.h:2504
double rxutc
Last RX time.
Definition: jsondef.h:2530
uint16_t rssi
RSSI.
Definition: jsondef.h:2506
double maxfreq
Maximum frequency allowed.
Definition: jsondef.h:2512
float powerin
Current RX Power.
Definition: jsondef.h:2516
double freq
Input Frequency.
Definition: jsondef.h:2510
float squelch_tone
repeater squelch tone frequency
Definition: jsondef.h:2524
float band
Input Filter bandpass.
Definition: jsondef.h:2522
float powerout
Current TX Power.
Definition: jsondef.h:2518
float maxpower
Output Power limit.
Definition: jsondef.h:2520
double minfreq
Minimum frequency allowed.
Definition: jsondef.h:2514
double uptime
Connection Uptime.
Definition: jsondef.h:2532
void tcvstruc::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
2565  {
2566  string error;
2567  json11::Json parsed = json11::Json::parse(s,error);
2568  if(error.empty()) {
2569  if(!parsed["opmode"].is_null()) { opmode = parsed["opmode"].int_value(); }
2570  if(!parsed["modulation"].is_null()) { modulation = parsed["modulation"].int_value(); }
2571  if(!parsed["rssi"].is_null()) { rssi = parsed["rssi"].int_value(); }
2572  if(!parsed["pktsize"].is_null()) { pktsize = parsed["pktsize"].int_value(); }
2573  if(!parsed["freq"].is_null()) { freq = parsed["freq"].number_value(); }
2574  if(!parsed["maxfreq"].is_null()) { maxfreq = parsed["maxfreq"].number_value(); }
2575  if(!parsed["minfreq"].is_null()) { minfreq = parsed["minfreq"].number_value(); }
2576  if(!parsed["powerin"].is_null()) { powerin = parsed["powerin"].number_value(); }
2577  if(!parsed["powerout"].is_null()) { powerout = parsed["powerout"].number_value(); }
2578  if(!parsed["maxpower"].is_null()) { maxpower = parsed["maxpower"].number_value(); }
2579  if(!parsed["band"].is_null()) { band = parsed["band"].number_value(); }
2580  if(!parsed["squelch_tone"].is_null()) { squelch_tone = parsed["squelch_tone"].number_value(); }
2581  if(!parsed["goodratio"].is_null()) { goodratio = parsed["goodratio"].number_value(); }
2582  if(!parsed["txutc"].is_null()) { txutc = parsed["txutc"].number_value(); }
2583  if(!parsed["rxutc"].is_null()) { rxutc = parsed["rxutc"].number_value(); }
2584  if(!parsed["uptime"].is_null()) { uptime = parsed["uptime"].number_value(); }
2585  } else {
2586  cerr<<"ERROR: <"<<error<<">"<<endl;
2587  }
2588  return;
2589  }
double goodratio
Good Packet Percentage.
Definition: jsondef.h:2526
uint16_t pktsize
Packet Size.
Definition: jsondef.h:2508
uint16_t opmode
Operating mode.
Definition: jsondef.h:2502
Definition: json11.hpp:79
double txutc
Last TX time.
Definition: jsondef.h:2528
uint16_t modulation
Data modulation.
Definition: jsondef.h:2504
double rxutc
Last RX time.
Definition: jsondef.h:2530
uint16_t rssi
RSSI.
Definition: jsondef.h:2506
double maxfreq
Maximum frequency allowed.
Definition: jsondef.h:2512
float powerin
Current RX Power.
Definition: jsondef.h:2516
double freq
Input Frequency.
Definition: jsondef.h:2510
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
float squelch_tone
repeater squelch tone frequency
Definition: jsondef.h:2524
float band
Input Filter bandpass.
Definition: jsondef.h:2522
float powerout
Current TX Power.
Definition: jsondef.h:2518
float maxpower
Output Power limit.
Definition: jsondef.h:2520
double minfreq
Minimum frequency allowed.
Definition: jsondef.h:2514
double uptime
Connection Uptime.
Definition: jsondef.h:2532
int int_value() const
Definition: json11.cpp:281
double number_value() const
Definition: json11.cpp:280

Member Data Documentation

uint16_t tcvstruc::opmode = 0

Operating mode.

uint16_t tcvstruc::modulation = 0

Data modulation.

uint16_t tcvstruc::rssi = 0

RSSI.

uint16_t tcvstruc::pktsize = 0

Packet Size.

double tcvstruc::freq = 0.

Input Frequency.

double tcvstruc::maxfreq = 0.

Maximum frequency allowed.

double tcvstruc::minfreq = 0.

Minimum frequency allowed.

float tcvstruc::powerin = 0.f

Current RX Power.

float tcvstruc::powerout = 0.f

Current TX Power.

float tcvstruc::maxpower = 0.f

Output Power limit.

float tcvstruc::band = 0.f

Input Filter bandpass.

float tcvstruc::squelch_tone = 0.f

repeater squelch tone frequency

double tcvstruc::goodratio = 0.

Good Packet Percentage.

double tcvstruc::txutc = 0.

Last TX time.

double tcvstruc::rxutc = 0.

Last RX time.

double tcvstruc::uptime = 0.

Connection Uptime.


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