Torque Rod Control Unit.
More...
#include <jsondef.h>
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
3041 vector<uint16_t> v_mcidx = vector<uint16_t>(
mcidx, mcidx+
sizeof(
mcidx)/
sizeof(mcidx[0]));
3044 {
"mcidx", v_mcidx }
std::map< std::string, Json > object
Definition: json11.hpp:88
uint16_t mcidx[3]
Torque Rod Component indices.
Definition: jsondef.h:3034
uint16_t mcnt
Torque Rod count.
Definition: jsondef.h:3032
void tcustruc::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
-
s | JSON-formatted string to set class contents to |
- Returns
- n/a
3058 if(!parsed[
"mcnt"].is_null()) {
mcnt = parsed[
"mcnt"].
int_value(); }
3059 if(!parsed[
"mcidx"].is_null()) {
3061 for(
size_t i = 0;
i != p_mcidx.size(); ++
i) {
3062 if(!p_mcidx[
i].is_null()) {
mcidx[
i] = p_mcidx[
i].int_value(); }
3066 cerr<<
"ERROR: <"<<error<<
">"<<endl;
Definition: json11.hpp:79
int i
Definition: rw_test.cpp:37
uint16_t mcidx[3]
Torque Rod Component indices.
Definition: jsondef.h:3034
uint16_t mcnt
Torque Rod count.
Definition: jsondef.h:3032
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
const array & array_items() const
Definition: json11.cpp:284
int int_value() const
Definition: json11.cpp:281
uint16_t tcustruc::mcnt = 0 |
uint16_t tcustruc::mcidx[3] = {0} |
Torque Rod Component indices.
The documentation for this struct was generated from the following file: