COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Functions | |
void | json_init_unit (cosmosstruc *cinfo) |
void | json_init_device_type_string () |
void | json_init_node (cosmosstruc *cinfo) |
void | json_init_reserve (cosmosstruc *cinfo) |
cosmosstruc * | json_init () |
Initialize JSON pointer map. More... | |
void | json_destroy (cosmosstruc *cinfo) |
Remove JSON pointer map. More... | |
uint16_t | json_hash (string hstring) |
Calculate JSON HASH. More... | |
int32_t | json_create_node (cosmosstruc *cinfo, string &node_name, uint16_t node_type) |
int32_t | json_create_cpu (string &node_name) |
int32_t | json_create_mcc (string &node_name) |
int32_t | json_createpiece (cosmosstruc *cinfo, string name, DeviceType ctype, double emi, double abs, double hcap, double hcon, double density) |
Create new piece. More... | |
int32_t | json_finddev (cosmosstruc *cinfo, string name) |
int32_t | json_findcomp (cosmosstruc *cinfo, string name) |
int32_t | json_findpiece (cosmosstruc *cinfo, string name) |
int32_t | json_addpiece (cosmosstruc *cinfo, string name, DeviceType ctype, double emi, double abs, double hcap, double hcon, double density) |
Add new piece. More... | |
int32_t | json_createport (cosmosstruc *cinfo, string name, PORT_TYPE type) |
int32_t | json_addentry (jsonentry entry, cosmosstruc *cinfo) |
Enter an entry into the JSON Namespace. More... | |
int32_t | json_addentry (string name, uint16_t d1, uint16_t d2, ptrdiff_t offset, uint16_t type, uint16_t group, cosmosstruc *cinfo, uint16_t unit) |
Add an entry to the JSON Namespace map with units. More... | |
int32_t | json_addentry (string name, uint16_t d1, uint16_t d2, uint8_t *ptr, uint16_t type, cosmosstruc *cinfo, uint16_t unit) |
int32_t | json_toggleentry (string name, uint16_t d1, uint16_t d2, cosmosstruc *cinfo, bool state) |
Toggle the enable state of an entry in the JSON Namespace map. More... | |
bool | json_checkentry (string name, uint16_t d1, uint16_t d2, cosmosstruc *cinfo) |
Check the enable state of an entry in the JSON Namespace map. More... | |
size_t | json_count_hash (uint16_t hash, cosmosstruc *cinfo) |
Number of items in current JSON map with a specific hash. More... | |
size_t | json_count_total (cosmosstruc *cinfo) |
Number of items in the current JSON map. More... | |
int32_t | json_out_handle (string &jstring, jsonhandle handle, cosmosstruc *cinfo) |
Perform JSON output for a JSON item by handle. More... | |
int32_t | json_out_entry (string &jstring, const jsonentry &entry, cosmosstruc *cinfo) |
Perform JSON output for a single JSON entry. More... | |
int32_t | json_out_value (string &jstring, string name, uint8_t *data, uint16_t type, cosmosstruc *cinfo) |
Output JSON Pair. More... | |
int32_t | json_out_type (string &jstring, uint8_t *data, uint16_t type, cosmosstruc *cinfo) |
Output JSON Value. More... | |
int32_t | json_append (string &jstring, const char *tstring) |
Extend JSON stream. More... | |
int32_t | json_out_character (string &jstring, char character) |
Single character to JSON. More... | |
int32_t | json_out_name (string &jstring, string name) |
Object name to JSON. More... | |
int32_t | json_out_bool (string &jstring, bool value) |
Boolean to JSON. More... | |
int32_t | json_out_int8 (string &jstring, int8_t value) |
Signed 8 bit integer to JSON. More... | |
int32_t | json_out_int16 (string &jstring, int16_t value) |
Signed 16 bit integer to JSON. More... | |
int32_t | json_out_int32 (string &jstring, int32_t value) |
Signed 32 bit integer to JSON. More... | |
int32_t | json_out_uint8 (string &jstring, uint8_t value) |
Unsigned 8 bit integer to JSON. More... | |
int32_t | json_out_uint16 (string &jstring, uint16_t value) |
Unsigned 16 bit integer to JSON. More... | |
int32_t | json_out_uint32 (string &jstring, uint32_t value) |
Unsigned 32 bit integer to JSON. More... | |
int32_t | json_out_float (string &jstring, float value) |
Single precision floating vertex32_t to JSON. More... | |
int32_t | json_out_double (string &jstring, double value) |
Perform JSON output for a single nonindexed double. More... | |
int32_t | json_out_string (string &jstring, string ostring, uint16_t len) |
String to JSON. More... | |
int32_t | json_out_gvector (string &jstring, gvector value) |
gvector to JSON More... | |
int32_t | json_out_svector (string &jstring, svector value) |
svector to JSON More... | |
int32_t | json_out_avector (string &jstring, avector value) |
avector to JSON More... | |
int32_t | json_out_vector (string &jstring, Vector value) |
::Vector to JSON More... | |
int32_t | json_out_rvector (string &jstring, rvector value) |
rvector to JSON More... | |
int32_t | json_out_quaternion (string &jstring, quaternion value) |
quaternion to JSON More... | |
int32_t | json_out_cvector (string &jstring, cvector value) |
cvector to JSON More... | |
int32_t | json_out_cartpos (string &jstring, cartpos value) |
cartpos to JSON More... | |
int32_t | json_out_geoidpos (string &jstring, geoidpos value) |
geoidpos to JSON More... | |
int32_t | json_out_spherpos (string &jstring, spherpos value) |
spherpos to JSON More... | |
int32_t | json_out_node (string &jstring, string value) |
Node name to JSON. More... | |
int32_t | json_out_utcstart (string &jstring, double value) |
UTC Start to JSON. More... | |
int32_t | json_out_ecipos (string &jstring, cartpos value) |
ECI position to JSON. More... | |
int32_t | json_out_posstruc (string &jstring, posstruc value) |
posstruc to JSON More... | |
int32_t | json_out_attstruc (string &jstring, attstruc value) |
attstruc to JSON More... | |
int32_t | json_out_locstruc (string &jstring, locstruc value) |
locstruc to JSON More... | |
int32_t | json_out_commandevent (string &jstring, eventstruc value) |
Command event to JSON. More... | |
int32_t | json_out_dcmatt (string &jstring, dcmatt value) |
int32_t | json_out_qatt (string &jstring, qatt value) |
qatt to JSON More... | |
int32_t | json_out_dcm (string &jstring, rmatrix value) |
rmatrix to JSON More... | |
int32_t | json_out_rmatrix (string &jstring, rmatrix value) |
rmatrix to JSON More... | |
int32_t | json_out_beatstruc (string &jstring, beatstruc value) |
beatstruc to JSON More... | |
int32_t | json_out_1d (string &jstring, const char *token, uint16_t index, cosmosstruc *cinfo) |
Perform JSON output for a single element of a 1D named JSON item. More... | |
int32_t | json_out_2d (string &jstring, const char *token, uint16_t row, uint16_t col, cosmosstruc *cinfo) |
Perform JSON output for a single element of a 2D named JSON item. More... | |
int32_t | json_out (string &jstring, string token, cosmosstruc *cinfo) |
Perform JSON output for a single named JSON item. More... | |
int32_t | json_out_list (string &jstring, string tokens, cosmosstruc *cinfo) |
Output a list of named JSON items. More... | |
int32_t | json_out_wildcard (string &jstring, string wildcard, cosmosstruc *cinfo) |
Output JSON items from wildcard. More... | |
uint8_t * | json_ptr_of_entry (const jsonentry &entry, cosmosstruc *cinfo) |
Address from entry. More... | |
uint8_t * | json_ptr_of_offset (ptrdiff_t offset, uint16_t group, cosmosstruc *cinfo) |
Address from offset. More... | |
int32_t | json_table_of_list (vector< jsonentry * > &table, string tokens, cosmosstruc *cinfo) |
Output a vector of JSON entries. More... | |
jsonentry * | json_entry_of (uint8_t *ptr, cosmosstruc *cinfo) |
Info on Namespace address. More... | |
jsonentry * | json_entry_of (string token, cosmosstruc *cinfo) |
Info on Namespace name. More... | |
jsonequation * | json_equation_of (jsonhandle handle, cosmosstruc *cinfo) |
Info on Namespace equation. More... | |
jsonentry * | json_entry_of (jsonhandle handle, cosmosstruc *cinfo) |
Info on Namespace name. More... | |
uint16_t | json_type_of_name (string token, cosmosstruc *cinfo) |
Type of namespace name. More... | |
uint8_t * | json_ptrto (string token, cosmosstruc *cinfo) |
Return the data pointer that matches a JSON name. More... | |
uint8_t * | json_ptrto_1d (string token, uint16_t index1, cosmosstruc *cinfo) |
Return the data pointer that matches a singly indexed JSON name. More... | |
uint8_t * | json_ptrto_2d (string token, uint16_t index1, uint16_t index2, cosmosstruc *cinfo) |
Return the data pointer that matches a doubly indexed JSON name. More... | |
int32_t | json_get_int (jsonhandle &handle, cosmosstruc *cinfo) |
Return integer from handle. More... | |
int32_t | json_get_int (const jsonentry &entry, cosmosstruc *cinfo) |
Return integer from entry. More... | |
int32_t | json_get_int (string token, cosmosstruc *cinfo) |
Return integer from name. More... | |
int32_t | json_get_int (string token, uint16_t index1, cosmosstruc *cinfo) |
Return integer from 1d name. More... | |
int32_t | json_get_int (string token, uint16_t index1, uint16_t index2, cosmosstruc *cinfo) |
Return integer from 2d name. More... | |
uint32_t | json_get_uint (jsonhandle &handle, cosmosstruc *cinfo) |
Return unsigned integer from handle. More... | |
uint32_t | json_get_uint (const jsonentry &entry, cosmosstruc *cinfo) |
Return unsigned integer from entry. More... | |
uint32_t | json_get_uint (string token, cosmosstruc *cinfo) |
Return unsigned integer from name. More... | |
uint32_t | json_get_uint (string token, uint16_t index1, cosmosstruc *cinfo) |
Return unsigned integer from 1d name. More... | |
uint32_t | json_get_uint (string token, uint16_t index1, uint16_t index2, cosmosstruc *cinfo) |
Return unsigned integer from 2d name. More... | |
double | json_get_double (jsonhandle &handle, cosmosstruc *cinfo) |
Return double from handle. More... | |
double | json_get_double (string token, cosmosstruc *cinfo) |
Return double from name. More... | |
double | json_get_double (const jsonentry &entry, cosmosstruc *cinfo) |
Return double from entry. More... | |
rvector | json_get_rvector (const jsonentry &entry, cosmosstruc *cinfo) |
Return rvector from entry. More... | |
quaternion | json_get_quaternion (const jsonentry &entry, cosmosstruc *cinfo) |
Return quaternion from entry. More... | |
double | json_get_double (string token, uint16_t index1, cosmosstruc *cinfo) |
Return double from 1d name. More... | |
double | json_get_double (string token, uint16_t index1, uint16_t index2, cosmosstruc *cinfo) |
Return double from 2d name. More... | |
string | json_get_string (string token, cosmosstruc *cinfo) |
Return string from name. More... | |
string | json_get_string (const jsonentry &entry, cosmosstruc *cinfo) |
Return string from entry. More... | |
posstruc | json_get_posstruc (const jsonentry &entry, cosmosstruc *cinfo) |
Return posstruc from entry. More... | |
int32_t | json_set_double_name (double value, char *token, cosmosstruc *cinfo) |
Set name from double. More... | |
double | json_equation (const char *&ptr, cosmosstruc *cinfo) |
Return the results of a JSON equation. More... | |
double | json_equation (jsonhandle *handle, cosmosstruc *cinfo) |
Return the results of a known JSON equation handle. More... | |
double | json_equation (jsonequation *ptr, cosmosstruc *cinfo) |
Return the results of a known JSON equation entry. More... | |
string | json_extract_namedmember (string json, string token) |
Extract JSON value matching name. More... | |
int32_t | json_extract_value (const char *&ptr, string &value) |
Extract next JSON value. More... | |
string | json_convert_string (string object) |
Convert JSON to string. More... | |
double | json_convert_double (string object) |
Convert JSON to double. More... | |
int32_t | json_tokenize (string jstring, cosmosstruc *cinfo, vector< jsontoken > &tokens) |
Tokenize using JSON Name Space. More... | |
int32_t | json_tokenize_namedmember (const char *&ptr, cosmosstruc *cinfo, jsontoken &token) |
Tokenize next JSON Named Pair. More... | |
int32_t | json_parse (string jstring, cosmosstruc *cinfo) |
Parse JSON using Name Space. More... | |
int32_t | json_parse_namedmember (const char *&ptr, cosmosstruc *cinfo) |
Parse next JSON Named Pair. More... | |
int32_t | json_skip_character (const char *&ptr, const char character) |
Skip over a specific character in a JSON stream. More... | |
int32_t | json_extract_name (const char *&ptr, string &ostring) |
Parse the next variable name out of a JSON stream. More... | |
int32_t | json_parse_equation (const char *&ptr, string &equation) |
Parse the next JSON equation out of a JSON stream. More... | |
int32_t | json_parse_operand (const char *&ptr, jsonoperand *operand, cosmosstruc *cinfo) |
Parse the next JSON equation operand out of a JSON stream. More... | |
int32_t | json_extract_string (const char *&ptr, string &ostring) |
Parse the next JSON string out of a JSON stream. More... | |
int32_t | json_parse_number (const char *&ptr, double *number) |
Parse the next number out of a JSON stream. More... | |
int32_t | json_skip_white (const char *&ptr) |
Skip white space in JSON string. More... | |
int32_t | json_skip_to_next_member (const char *&ptr) |
Skip to next COSMOS name in JSON string. More... | |
int32_t | json_set_string (string val, const jsonentry &entry, cosmosstruc *cinfo) |
int32_t | json_set_number (double val, const jsonentry &entry, cosmosstruc *cinfo) |
int32_t | json_parse_value (const char *&ptr, const jsonentry &entry, cosmosstruc *cinfo) |
int32_t | json_parse_value (const char *&ptr, uint16_t type, ptrdiff_t offset, uint16_t group, cosmosstruc *cinfo) |
int32_t | json_parse_value (const char *&ptr, uint16_t type, uint8_t *data, cosmosstruc *cinfo) |
int32_t | json_clear_cosmosstruc (int32_t type, cosmosstruc *cinfo) |
Clear global data structure. More... | |
int32_t | json_load_node (string node, jsonnode &json) |
Map Name Space to global data structure components and pieces. More... | |
int32_t | json_recenter_node (cosmosstruc *cinfo) |
int32_t | json_pushdevspec (uint16_t cidx, cosmosstruc *cinfo) |
int32_t | json_setup_node (jsonnode json, cosmosstruc *cinfo, bool create_flag) |
Setup JSON Namespace using Node description JSON. More... | |
int32_t | json_setup_node (string &node, cosmosstruc *cinfo) |
Setup JSON Namespace using file. More... | |
int32_t | json_dump_node (cosmosstruc *cinfo) |
Save Node entries to disk. More... | |
int32_t | json_mapentries (cosmosstruc *cinfo) |
int32_t | json_mapbaseentries (cosmosstruc *cinfo) |
Add base entries to JMAP. More... | |
int32_t | json_mapvertexentry (uint16_t vidx, cosmosstruc *cinfo) |
Add vertex entry. More... | |
int32_t | json_mapfaceentry (uint16_t fidx, cosmosstruc *cinfo) |
Add face entry. More... | |
int32_t | json_mappieceentry (uint16_t pidx, cosmosstruc *cinfo) |
Add piece entry. More... | |
int32_t | json_togglepieceentry (uint16_t pidx, cosmosstruc *cinfo, bool state) |
Toggle piece entry. More... | |
int32_t | json_mapcompentry (uint16_t cidx, cosmosstruc *cinfo) |
Add component entry. More... | |
int32_t | json_togglecompentry (uint16_t cidx, cosmosstruc *cinfo, bool state) |
Toggle component entry. More... | |
uint16_t | json_mapdeviceentry (const devicestruc &device, cosmosstruc *cinfo) |
Add device entry. More... | |
int32_t | json_toggledeviceentry (uint16_t didx, DeviceType type, cosmosstruc *cinfo, bool state) |
Toggle device entry. More... | |
uint16_t | json_mapportentry (uint16_t portidx, cosmosstruc *cinfo) |
Add port entry. More... | |
int32_t | json_toggleportentry (uint16_t portidx, cosmosstruc *cinfo, bool state) |
Toggle port entry. More... | |
const char * | json_of_wildcard (string &jstring, string wildcard, cosmosstruc *cinfo) |
Create JSON stream from wildcard. More... | |
const char * | json_of_list (string &jstring, string list, cosmosstruc *cinfo) |
Create JSON stream from list. More... | |
const char * | json_of_table (string &jstring, vector< jsonentry * > table, cosmosstruc *cinfo) |
Create JSON stream from entries. More... | |
const char * | json_of_target (string &jstring, cosmosstruc *cinfo, uint16_t num) |
Create JSON Track string. More... | |
const char * | json_of_node (string &jstring, cosmosstruc *cinfo) |
Create JSON Node string. More... | |
const char * | json_of_agent (string &jstring, cosmosstruc *cinfo) |
Create JSON Agent string. More... | |
const char * | json_of_time (string &jstring, cosmosstruc *cinfo) |
Create JSON Time string. More... | |
const char * | json_of_beat (string &jstring, cosmosstruc *cinfo) |
Create JSON Heart Beat string. More... | |
const char * | json_of_beacon (string &jstring, cosmosstruc *cinfo) |
Create JSON Beacon string. More... | |
const char * | json_of_imu (string &jstring, uint16_t num, cosmosstruc *cinfo) |
Create JSON IMU string. More... | |
const char * | json_of_ephemeris (string &jstring, cosmosstruc *cinfo) |
const char * | json_of_utc (string &jstring, cosmosstruc *cinfo) |
string | json_list_of_all (cosmosstruc *cinfo) |
Get list of all Namespace names. More... | |
string | json_list_of_soh (cosmosstruc *cinfo) |
string | json_list_of_fullsoh (cosmosstruc *cinfo) |
const char * | json_of_soh (string &jstring, cosmosstruc *cinfo) |
const char * | json_of_event (string &jstring, cosmosstruc *cinfo) |
Create JSON for an event. More... | |
const char * | json_of_groundcontact (string &jstring, cosmosstruc *cinfo) |
const char * | json_of_mtr (string &jstring, uint16_t index, cosmosstruc *cinfo) |
const char * | json_of_rw (string &jstring, uint16_t index, cosmosstruc *cinfo) |
const char * | json_of_state_eci (string &jstring, cosmosstruc *cinfo) |
const char * | json_of_state_geoc (string &jstring, cosmosstruc *cinfo) |
const char * | json_node (string &jstring, cosmosstruc *cinfo) |
Dump Node description. More... | |
const char * | json_vertices (string &jstring, cosmosstruc *cinfo) |
Dump Vertex description. More... | |
const char * | json_faces (string &jstring, cosmosstruc *cinfo) |
Dump Face description. More... | |
const char * | json_pieces (string &jstring, cosmosstruc *cinfo) |
Dump Piece description. More... | |
const char * | json_devices_general (string &jstring, cosmosstruc *cinfo) |
Dump General Device description. More... | |
const char * | json_devices_specific (string &jstring, cosmosstruc *cinfo) |
Dump Specific Device description. More... | |
const char * | json_ports (string &jstring, cosmosstruc *cinfo) |
Dump Port description. More... | |
void | json_test (cosmosstruc *cinfo) |
int32_t | json_name_map (string name, cosmosstruc *cinfo, jsonhandle &handle) |
Get hash and index in JSON Namespace map. More... | |
int32_t | json_equation_map (string equation, cosmosstruc *cinfo, jsonhandle *handle) |
Get hash and index in JSON Equation map. More... | |
int32_t | json_clone (cosmosstruc *cinfo1, cosmosstruc *cinfo2) |
Clone cosmosstruc data areas, direct. More... | |
uint32_t | json_get_name_list_count (cosmosstruc *cinfo) |
int32_t | node_init (string node, cosmosstruc *cinfo) |
Initialize Node configuration. More... | |
int32_t | node_calc (cosmosstruc *cinfo) |
Calculate Satellite configuration values. More... | |
void | create_databases (cosmosstruc *cinfo) |
Dump tab delimited database files. More... | |
int32_t | load_target (cosmosstruc *cinfo) |
Load Track list. More... | |
int32_t | update_target (cosmosstruc *cinfo) |
Update Track list. More... | |
int32_t | update_target (locstruc source, targetstruc &target) |
size_t | load_dictionary (vector< eventstruc > &dict, cosmosstruc *cinfo, const char *file) |
Load Event Dictionary. More... | |
size_t | calc_events (vector< eventstruc > &dictionary, cosmosstruc *cinfo, vector< eventstruc > &events) |
Calculate current Events. More... | |
uint16_t | device_type_index (string name) |
string | device_type_name (uint32_t type) |
std::ostream & | operator<< (std::ostream &out, const beatstruc &b) |
int32_t | json_clone (cosmosstruc *cinfo) |
int32_t | json_repoint (cosmosstruc *cinfo) |
int32_t | json_addentry (string name, string value, cosmosstruc *cinfo) |
int32_t | json_out_tvector (string &jstring, rvector value) |
uint8_t * | json_ptrto_1d (const char *token, uint16_t index1, cosmosstruc *cinfo) |
uint8_t * | json_ptrto_2d (const char *token, uint16_t index1, uint16_t index2, cosmosstruc *cinfo) |
int32_t | json_scan (char *istring) |
int32_t | json_convert_int32 (string object) |
uint32_t | json_convert_uint32 (string object) |
int16_t | json_convert_int16 (string object) |
uint16_t | json_convert_uint16 (string object) |
float | json_convert_float (string object) |
const char * | json_of_groundcontact (cosmosstruc *cinfo) |
const char * | json_of_groundstation (string &jstring, cosmosstruc *cinfo) |
const char * | json_of_log (string &jstring, cosmosstruc *cinfo) |
bool | json_static (char *json_extended_name) |
bool | json_dynamic (char *json_extended_name) |
string | port_type_name (uint32_t type) |
void json_init_unit | ( | cosmosstruc * | cinfo | ) |
void json_init_device_type_string | ( | ) |
void json_init_node | ( | cosmosstruc * | cinfo | ) |
void json_init_reserve | ( | cosmosstruc * | cinfo | ) |
cosmosstruc * json_init | ( | ) |
Initialize JSON pointer map.
Create a cosmosstruc and use it to assign storage for each of the groups and entries for each of the non Node based elements to the JSON Name Map.
void json_destroy | ( | cosmosstruc * | cinfo | ) |
Remove JSON pointer map.
Frees up all space assigned to JSON pointer map. Includes any space allocated through json_addentry.
uint16_t json_hash | ( | string | hstring | ) |
Calculate JSON HASH.
Simple hash function (TCPL Section 6.6 Table Lookup)
hstring | String to calculate the hash for. |
int32_t json_create_node | ( | cosmosstruc * | cinfo, |
string & | node_name, | ||
uint16_t | node_type | ||
) |
int32_t json_create_cpu | ( | string & | node_name | ) |
int32_t json_create_mcc | ( | string & | node_name | ) |
int32_t json_createpiece | ( | cosmosstruc * | cinfo, |
string | name, | ||
DeviceType | ctype, | ||
double | emi, | ||
double | abs, | ||
double | hcap, | ||
double | hcon, | ||
double | density | ||
) |
Create new piece.
Use json_addpiece to add a new piecestruc and its attendant device information and then map it.
type | JSON PIECE_TYPE |
emi | Emissivity |
abs | Absorbtivity |
hcap | Heat capacity |
hcon | Heat conductivity |
density | Density |
int32_t json_finddev | ( | cosmosstruc * | cinfo, |
string | name | ||
) |
int32_t json_findcomp | ( | cosmosstruc * | cinfo, |
string | name | ||
) |
int32_t json_findpiece | ( | cosmosstruc * | cinfo, |
string | name | ||
) |
int32_t json_addpiece | ( | cosmosstruc * | cinfo, |
string | name, | ||
DeviceType | ctype, | ||
double | emi, | ||
double | abs, | ||
double | hcap, | ||
double | hcon, | ||
double | density | ||
) |
Add new piece.
Take an empty piecestruc and fill it with the provided information, generating the vertexs for the indicated type.
type | JSON PIECE_TYPE |
emi | Emissivity |
abs | Absorbtivity |
hcap | Heat capacity |
hcon | Heat conductivity |
density | Density |
Antennae
Battery
Bud
Camera
Processing Unit
Disk
GPS Unit
Heater
Inertial Measurement Unit
Motion Capture Camera
Motor
Magnetic Torque Rod
Payload
Propellant Tank
Pressure Sensor
BCREG
Rotor
Reaction Wheel
Radio Receiver
Elevation and Azimuth Sun Sensor
Photo Voltaic String
Star Tracker
SUCHI
Switch
Texas Christian University
Radio Transceiver
Telemetry
Thruster
Temperature Sensor
TNC
Radio Transmitter
int32_t json_createport | ( | cosmosstruc * | cinfo, |
string | name, | ||
PORT_TYPE | type | ||
) |
Add new port entry Extend the existing port list with an entry for the given name and piece
cinfo | Pointer to cosmosstruc |
name | Name information for port |
type | Port type listed in PORT_TYPE. |
int32_t json_addentry | ( | jsonentry | entry, |
cosmosstruc * | cinfo | ||
) |
Enter an entry into the JSON Namespace.
Enters a jsonentry in the JSON Data Name Space.
entry | The entry to be entered. |
int32_t json_addentry | ( | string | name, |
uint16_t | d1, | ||
uint16_t | d2, | ||
ptrdiff_t | offset, | ||
uint16_t | type, | ||
uint16_t | group, | ||
cosmosstruc * | cinfo, | ||
uint16_t | unit | ||
) |
Add an entry to the JSON Namespace map with units.
Allocates the space for a new jsonentry and then enters the information associating a pointer with an entry in the name table. The name will be of form "name" if it is a scalar, "name_iii" if it is a first level array, "name_iii_iii" if it is second level, where "iii" is the zero filled index for the appropriate level.
name | variable name from the JSON Data Name Space |
d1 | array index for first level, otherwise -1 |
d2 | array index for second level, otherwise -1 |
offset | Offset to the data from the beginning of its group. |
size | Number of bytes jsonentry take up. |
type | COSMOS JSON Data Type. |
group | COSMOS JSON Data Group. |
unit | Index into JMAP unit table. |
int32_t json_addentry | ( | string | name, |
uint16_t | d1, | ||
uint16_t | d2, | ||
uint8_t * | ptr, | ||
uint16_t | type, | ||
cosmosstruc * | cinfo, | ||
uint16_t | unit | ||
) |
int32_t json_toggleentry | ( | string | name, |
uint16_t | d1, | ||
uint16_t | d2, | ||
cosmosstruc * | cinfo, | ||
bool | state | ||
) |
Toggle the enable state of an entry in the JSON Namespace map.
Sets or clears the enabled flag for an entry in the name table. The name will be of form "name" if it is a scalar, "name_iii" if it is a first level array, "name_iii_iii" if it is second level, where "iii" is the zero filled index for the appropriate level.
name | variable name from the JSON Data Name Space |
d1 | array index for first level, otherwise -1 |
d2 | array index for second level, otherwise -1 |
state | Enable state to toggle to. |
bool json_checkentry | ( | string | name, |
uint16_t | d1, | ||
uint16_t | d2, | ||
cosmosstruc * | cinfo | ||
) |
Check the enable state of an entry in the JSON Namespace map.
Returns the enabled flag for an entry in the name table. The name will be of form "name" if it is a scalar, "name_iii" if it is a first level array, "name_iii_iii" if it is second level, where "iii" is the zero filled index for the appropriate level.
name | variable name from the JSON Data Name Space |
d1 | array index for first level, otherwise -1 |
d2 | array index for second level, otherwise -1 |
size_t json_count_hash | ( | uint16_t | hash, |
cosmosstruc * | cinfo | ||
) |
Number of items in current JSON map with a specific hash.
Returns the number of JSON items currently mapped.
hash | JSON HASH value. |
size_t json_count_total | ( | cosmosstruc * | cinfo | ) |
Number of items in the current JSON map.
Returns the number of JSON items currently mapped.
int32_t json_out_handle | ( | string & | jstring, |
jsonhandle | handle, | ||
cosmosstruc * | cinfo | ||
) |
Perform JSON output for a JSON item by handle.
Appends the indicated JSON object to the supplied JSON Stream.
jstring | Reference to JSON stream. |
handle | The jsonhandle of the desired object. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out_entry | ( | string & | jstring, |
const jsonentry & | entry, | ||
cosmosstruc * | cinfo | ||
) |
Perform JSON output for a single JSON entry.
Populates the jstring for the indicated ::jsonmap by jsonentry.
jstring | Reference to JSON stream. |
entry | The jsonentry of the desired variable. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out_value | ( | string & | jstring, |
string | name, | ||
uint8_t * | data, | ||
uint16_t | type, | ||
cosmosstruc * | cinfo | ||
) |
Output JSON Pair.
Append a name:value pair to the provided JSON String for a variable in the JSON Namespace, based on the provided data and type.
jstring | Reference to JSON String to append to. |
name | Namespace name of variable. |
data | Pointer to location in cosmosstruc of variable. |
type | Type of variable. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out_type | ( | string & | jstring, |
uint8_t * | data, | ||
uint16_t | type, | ||
cosmosstruc * | cinfo | ||
) |
Output JSON Value.
Append the value of a name:value pair to the provided JSON String for a variable in the JSON Namespace, based on the provided data and type.
jstring | Reference to JSON String to append to. |
data | Pointer to location of variable. |
type | Type of variable. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_append | ( | string & | jstring, |
const char * | tstring | ||
) |
int32_t json_out_character | ( | string & | jstring, |
char | character | ||
) |
Single character to JSON.
Appends an entry for the single character to the current JSON stream.
jstring | Reference to JSON stream. |
character | Character to be added to string in the raw. |
int32_t json_out_name | ( | string & | jstring, |
string | name | ||
) |
Object name to JSON.
Appends an entry for the name piece of a JSON object (including ":") to the current JSON string.
jstring | Reference to JSON stream. |
name | The Object Name |
int32_t json_out_bool | ( | string & | jstring, |
bool | value | ||
) |
Boolean to JSON.
Appends a JSON entry to the current JSON stream for the indicated 8 bit boolean.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_int8 | ( | string & | jstring, |
int8_t | value | ||
) |
Signed 8 bit integer to JSON.
Appends a JSON entry to the current JSON stream for the indicated 8 bit signed integer.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_int16 | ( | string & | jstring, |
int16_t | value | ||
) |
Signed 16 bit integer to JSON.
Appends a JSON entry to the current JSON stream for the indicated 16 bit signed integer.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_int32 | ( | string & | jstring, |
int32_t | value | ||
) |
Signed 32 bit integer to JSON.
Appends a JSON entry to the current JSON stream for the indicated 32 bit signed integer.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_uint8 | ( | string & | jstring, |
uint8_t | value | ||
) |
Unsigned 8 bit integer to JSON.
Appends a JSON entry to the current JSON stream for the indicated 8 bit unsigned integer.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_uint16 | ( | string & | jstring, |
uint16_t | value | ||
) |
Unsigned 16 bit integer to JSON.
Appends a JSON entry to the current JSON stream for the indicated 16 bit unsigned integer.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_uint32 | ( | string & | jstring, |
uint32_t | value | ||
) |
Unsigned 32 bit integer to JSON.
Appends a JSON entry to the current JSON stream for the indicated 32 bit unsigned integer.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_float | ( | string & | jstring, |
float | value | ||
) |
Single precision floating vertex32_t to JSON.
Appends a JSON entry to the current JSON stream for the indicated float.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_double | ( | string & | jstring, |
double | value | ||
) |
Perform JSON output for a single nonindexed double.
Appends a JSON entry to the current JSON stream for the indicated double.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_string | ( | string & | jstring, |
string | ostring, | ||
uint16_t | len | ||
) |
String to JSON.
Appends a JSON entry to the current JSON stream for the string variable.
jstring | Reference to JSON stream. |
ostring | String to append. |
len | Maximum allowed size. |
int32_t json_out_gvector | ( | string & | jstring, |
gvector | value | ||
) |
gvector to JSON
Appends a JSON entry to the current JSON stream for the indicated gvector.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_svector | ( | string & | jstring, |
svector | value | ||
) |
svector to JSON
Appends a JSON entry to the current JSON stream for the indicated svector.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_avector | ( | string & | jstring, |
avector | value | ||
) |
avector to JSON
Appends a JSON entry to the current JSON stream for the indicated avector.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_vector | ( | string & | jstring, |
Vector | value | ||
) |
::Vector to JSON
Appends a JSON entry to the current JSON stream for the indicated ::Vector.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_rvector | ( | string & | jstring, |
rvector | value | ||
) |
rvector to JSON
Appends a JSON entry to the current JSON stream for the indicated rvector.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_quaternion | ( | string & | jstring, |
quaternion | value | ||
) |
quaternion to JSON
Appends a JSON entry to the current JSON stream for the indicated quaternion.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_cvector | ( | string & | jstring, |
cvector | value | ||
) |
cvector to JSON
Appends a JSON entry to the current JSON stream for the indicated cvector.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_cartpos | ( | string & | jstring, |
cartpos | value | ||
) |
cartpos to JSON
Appends a JSON entry to the current JSON stream for the indicated cartpos.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_geoidpos | ( | string & | jstring, |
geoidpos | value | ||
) |
geoidpos to JSON
Appends a JSON entry to the current JSON stream for the indicated geoidpos.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_spherpos | ( | string & | jstring, |
spherpos | value | ||
) |
spherpos to JSON
Appends a JSON entry to the current JSON stream for the indicated spherpos.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_node | ( | string & | jstring, |
string | value | ||
) |
Node name to JSON.
Appends a JSON entry to the current JSON stream for the indicated Node name.
jstring | JSON stream to append to |
value | The JSON data of the desired variable |
int32_t json_out_utcstart | ( | string & | jstring, |
double | value | ||
) |
UTC Start to JSON.
Appends a JSON entry to the current JSON stream for the indicated UTC start.
jstring | JSON stream to append to |
value | The JSON data of the desired variable |
int32_t json_out_ecipos | ( | string & | jstring, |
cartpos | value | ||
) |
ECI position to JSON.
Appends a JSON entry to the current JSON stream for the indicated ECI based position.
jstring | JSON stream to append to |
value | The JSON data of the desired variable |
int32_t json_out_posstruc | ( | string & | jstring, |
posstruc | value | ||
) |
posstruc to JSON
Appends a JSON entry to the current JSON stream for the indicated posstruc.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_attstruc | ( | string & | jstring, |
attstruc | value | ||
) |
attstruc to JSON
Appends a JSON entry to the current JSON stream for the indicated attstruc.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_locstruc | ( | string & | jstring, |
locstruc | value | ||
) |
locstruc to JSON
Appends a JSON entry to the current JSON stream for the indicated locstruc.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_commandevent | ( | string & | jstring, |
eventstruc | value | ||
) |
Command event to JSON.
Appends a JSON entry to the current JSON stream for the indicated eventstruc specific to a command event.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_dcmatt | ( | string & | jstring, |
dcmatt | value | ||
) |
Appends a JSON entry to the current JSON stream for the indicated dcmatt.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_qatt | ( | string & | jstring, |
qatt | value | ||
) |
qatt to JSON
Appends a JSON entry to the current JSON stream for the indicated qatt.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_dcm | ( | string & | jstring, |
rmatrix | value | ||
) |
rmatrix to JSON
Appends a JSON entry to the current JSON stream for the indicated rmatrix.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_rmatrix | ( | string & | jstring, |
rmatrix | value | ||
) |
rmatrix to JSON
Appends a JSON entry to the current JSON stream for the indicated rmatrix.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_beatstruc | ( | string & | jstring, |
beatstruc | value | ||
) |
beatstruc to JSON
Appends a JSON entry to the current JSON stream for the indicated beatstruc.
jstring | Reference to JSON stream. |
value | The JSON data of the desired variable |
int32_t json_out_1d | ( | string & | jstring, |
const char * | token, | ||
uint16_t | index, | ||
cosmosstruc * | cinfo | ||
) |
Perform JSON output for a single element of a 1D named JSON item.
Calls json_out for the indexed element of the named JSON vector.
jstring | Reference to JSON stream. |
token | The JSON name for the desired variable |
index | The desired element number |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out_2d | ( | string & | jstring, |
const char * | token, | ||
uint16_t | row, | ||
uint16_t | col, | ||
cosmosstruc * | cinfo | ||
) |
Perform JSON output for a single element of a 2D named JSON item.
Calls json_out for the indexed element of the named JSON matrix.
jstring | Reference to JSON stream. |
token | The JSON name for the desired variable |
row | The desired row number |
col | The desired column number |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out | ( | string & | jstring, |
string | token, | ||
cosmosstruc * | cinfo | ||
) |
Perform JSON output for a single named JSON item.
Populates the jstring for the indicated ::jsonmap through reference to JSON name.
jstring | The jstring into which to store the result. |
token | The JSON name for the desired variable. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out_list | ( | string & | jstring, |
string | tokens, | ||
cosmosstruc * | cinfo | ||
) |
Output a list of named JSON items.
Populates the jstring for the indicated ::jsonmap through reference to a list of JSON names.
jstring | The jstring into which to store the result. |
tokens | The comma separated list of JSON names for the desired variables. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_out_wildcard | ( | string & | jstring, |
string | wildcard, | ||
cosmosstruc * | cinfo | ||
) |
Output JSON items from wildcard.
Populates the jstring for the indicated ::jsonmap through reference to a regular expression matching of JSON names.
jstring | The jstring into which to store the result. |
wildcard | The regular expression to match against. |
cinfo | Reference to cosmosstruc to use. |
uint8_t * json_ptr_of_entry | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Address from entry.
Calculate the actual address of a value from its entry in the ::jmap.
entry | A jsonentry |
cinfo | Reference to cosmosstruc to use. |
uint8_t * json_ptr_of_offset | ( | ptrdiff_t | offset, |
uint16_t | group, | ||
cosmosstruc * | cinfo | ||
) |
Address from offset.
Calculate the actual address of an offset into either static or dynamic space, using the provide cdata static and dynamic addresses.
offset | An offset taken from a jsonentry |
group | The structure group from which the offset is measured. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_table_of_list | ( | vector< jsonentry * > & | table, |
string | tokens, | ||
cosmosstruc * | cinfo | ||
) |
Output a vector of JSON entries.
Populates the provided vector for the indicated ::jsonmap through reference to a list of JSON names.
table | The vector of jsonentry into which to store the result. |
tokens | The comma separated list of JSON names for the desired variables. |
jsonentry * json_entry_of | ( | uint8_t * | ptr, |
cosmosstruc * | cinfo | ||
) |
Info on Namespace address.
Return a pointer to the Namespace Entry structure containing the information for a the namespace value that matches a given memory address.
ptr | Address of a variable that may match a namespace name. |
cinfo | Reference to cosmosstruc to use. |
jsonentry * json_entry_of | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Info on Namespace name.
Return a pointer to the Namespace Entry structure containing the information for a given name.
token | Namespace name to look up |
jsonequation * json_equation_of | ( | jsonhandle | handle, |
cosmosstruc * | cinfo | ||
) |
Info on Namespace equation.
Return a pointer to the Namespace Equation structure containing the information for a given equation.
handle | jsonhandle for the entry in the global emap |
jsonentry * json_entry_of | ( | jsonhandle | handle, |
cosmosstruc * | cinfo | ||
) |
Info on Namespace name.
Return a pointer to the Namespace Entry structure containing the information for a given name.
handle | jsonhandle for the entry in the global jmap |
uint16_t json_type_of_name | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Type of namespace name.
Return the JSON Name Space variable type constants of the token in the ::jsonmap.
token | the JSON name for the desired variable |
uint8_t * json_ptrto | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Return the data pointer that matches a JSON name.
Look up the provided JSON data name in the indicated ::jsonmap and return the associated data pointer.
token | the JSON name for the desired variable |
cinfo | Reference to cosmosstruc to use. |
uint8_t* json_ptrto_1d | ( | string | token, |
uint16_t | index1, | ||
cosmosstruc * | cinfo | ||
) |
Return the data pointer that matches a singly indexed JSON name.
Look up the provided JSON data name with the indicated index in the current ::jsonmap and return the associated data pointer.
token | the JSON name for the desired variable |
index1 | Primary index. |
cinfo | Reference to cosmosstruc to use. |
uint8_t* json_ptrto_2d | ( | string | token, |
uint16_t | index1, | ||
uint16_t | index2, | ||
cosmosstruc * | cinfo | ||
) |
Return the data pointer that matches a doubly indexed JSON name.
Look up the provided JSON data name with the indicated indices in the current ::jsonmap and return the associated data pointer.
token | the JSON name for the desired variable |
index1 | Primary index. |
index2 | Secondary index. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_get_int | ( | jsonhandle & | handle, |
cosmosstruc * | cinfo | ||
) |
Return integer from handle.
If the value at this jsonhandle can in any way be interepreted as a number, return it as an int32_t.
handle | jsonhandle for a valid COSMOS Namespace entry. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_get_int | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return integer from entry.
If the value stored in this jsonentry can in any way be interepreted as a number, return it as an int32_t.
entry | A valid COSMOS Namespace entry. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_get_int | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Return integer from name.
If the named value can in any way be interepreted as a number, return it as a signed 32 bit integer.
token | Valid COSMOS Namespace name. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_get_int | ( | string | token, |
uint16_t | index1, | ||
cosmosstruc * | cinfo | ||
) |
Return integer from 1d name.
If the named 1d indexed value can in any way be interepreted as a number, return it as a signed 32 bit integer.
token | Valid COSMOS Namespace name. |
index1 | 1d index. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_get_int | ( | string | token, |
uint16_t | index1, | ||
uint16_t | index2, | ||
cosmosstruc * | cinfo | ||
) |
Return integer from 2d name.
If the named 2d indexed value can in any way be interepreted as a number, return it as a signed 32 bit integer.
token | Valid COSMOS Namespace name. |
index1 | 1d index. |
index2 | 2d index. |
cinfo | Reference to cosmosstruc to use. |
uint32_t json_get_uint | ( | jsonhandle & | handle, |
cosmosstruc * | cinfo | ||
) |
Return unsigned integer from handle.
If the value at this jsonhandle can in any way be interepreted as a number, return it as an uint32_t.
handle | jsonhandle for a valid COSMOS Namespace entry. |
cinfo | Reference to cosmosstruc to use. |
uint32_t json_get_uint | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return unsigned integer from entry.
If the value stored in this jsonentry can in any way be interepreted as a number, return it as an uint32_t.
entry | A valid COSMOS Namespace entry. |
cinfo | Reference to cosmosstruc to use. |
uint32_t json_get_uint | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Return unsigned integer from name.
If the named value can in any way be interepreted as a number, return it as a signed 32 bit unsigned integer.
token | Valid COSMOS Namespace name. |
cinfo | Reference to cosmosstruc to use. |
uint32_t json_get_uint | ( | string | token, |
uint16_t | index1, | ||
cosmosstruc * | cinfo | ||
) |
Return unsigned integer from 1d name.
If the named 1d indexed value can in any way be interepreted as a number, return it as a signed 32 bit unsigned integer.
token | Valid COSMOS Namespace name. |
index1 | 1d index. |
cinfo | Reference to cosmosstruc to use. |
uint32_t json_get_uint | ( | string | token, |
uint16_t | index1, | ||
uint16_t | index2, | ||
cosmosstruc * | cinfo | ||
) |
Return unsigned integer from 2d name.
If the named 2d indexed value can in any way be interepreted as a number, return it as a signed 32 bit unsigned integer.
token | Valid COSMOS Namespace name. |
index1 | 1d index. |
index2 | 2d index. |
cinfo | Reference to cosmosstruc to use. |
double json_get_double | ( | jsonhandle & | handle, |
cosmosstruc * | cinfo | ||
) |
Return double from handle.
If the value at this jsonhandle can in any way be interepreted as a number, return it as a double.
handle | jsonhandle for a valid COSMOS Namespace entry. |
cinfo | Reference to cosmosstruc to use. |
double json_get_double | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Return double from name.
If the named value can in any way be interepreted as a number, return it as a double.
token | Valid COSMOS Namespace name. |
cinfo | Reference to cosmosstruc to use. |
double json_get_double | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return double from entry.
If the named value can in any way be interepreted as a number, return it as a double.
entry | Pointer to a valid jsonentry. |
cinfo | Reference to cosmosstruc to use. |
rvector json_get_rvector | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return rvector from entry.
If the named value can in any way be interepreted as three numbers, return it as an rvector.
entry | Pointer to a valid jsonentry.. |
cinfo | Reference to cosmosstruc to use. |
quaternion json_get_quaternion | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return quaternion from entry.
If the named value can in any way be interepreted as three numbers, return it as an quaternion.
entry | Pointer to a valid jsonentry. |
cinfo | Reference to cosmosstruc to use. |
double json_get_double | ( | string | token, |
uint16_t | index1, | ||
cosmosstruc * | cinfo | ||
) |
Return double from 1d name.
If the named 1d indexed value can in any way be interepreted as a number, return it as a double.
token | Valid COSMOS Namespace name. |
index1 | 1d index. |
cinfo | Reference to cosmosstruc to use. |
double json_get_double | ( | string | token, |
uint16_t | index1, | ||
uint16_t | index2, | ||
cosmosstruc * | cinfo | ||
) |
Return double from 2d name.
If the named 2d indexed value can in any way be interepreted as a number, return it as a double.
token | Valid COSMOS Namespace name. |
index1 | 1d index. |
index2 | 2d index. |
cinfo | Reference to cosmosstruc to use. |
string json_get_string | ( | string | token, |
cosmosstruc * | cinfo | ||
) |
Return string from name.
If the named value is a string, just copy it. Otherwise, print whatever numerical value as a string. Return a pointer to an internal storage buffer for the string. Note: this value is changed each time you call this function.
token | Valid COSMOS Namespace name. |
cinfo | Reference to cosmosstruc to use. |
string json_get_string | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return string from entry.
If the named value is a string, just copy it. Otherwise, print whatever numerical value as a string. Return a pointer to an internal storage buffer for the string. Note: this value is changed each time you call this function.
ptr | Pointer to a valid jsonentry.. |
cinfo | Reference to cosmosstruc to use. |
posstruc json_get_posstruc | ( | const jsonentry & | entry, |
cosmosstruc * | cinfo | ||
) |
Return posstruc from entry.
If the named value can in any way be interepreted as a posstruc, return it as a posstruc.
entry | Pointer to a valid jsonentry.. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_set_double_name | ( | double | value, |
char * | token, | ||
cosmosstruc * | cinfo | ||
) |
Set name from double.
If the provided double can in any way be placed in the name it will.
value | Double precision value to be stored in the name space. |
token | Valid COSMOS Namespace name. |
cinfo | Reference to cosmosstruc to use. |
double json_equation | ( | const char *& | ptr, |
cosmosstruc * | cinfo | ||
) |
Return the results of a JSON equation.
At its minimum, a JSON equation will be defined as any two JSON names separated by an operation. Equations bracketed by '()' will be treated as names in their own right and will therefore require a matching operation, and name or bracketed equation. The result will always be assumed to be double precision, even in the case of booleans. Valid operations are:
ptr | Pointer to a pointer to a JSON stream. |
cinfo | Reference to cosmosstruc to use. |
double json_equation | ( | jsonhandle * | handle, |
cosmosstruc * | cinfo | ||
) |
Return the results of a known JSON equation handle.
Calculate a json_equation using already looked up values for the hash and index.
handle | Values for hash and index that point to an entry in the map. |
cinfo | Reference to cosmosstruc to use. |
double json_equation | ( | jsonequation * | ptr, |
cosmosstruc * | cinfo | ||
) |
Return the results of a known JSON equation entry.
Calculate a json_equation using already looked up entry from the map.
ptr | Pointer to a jsonequation from the map. |
cinfo | Reference to cosmosstruc to use. |
string json_extract_namedmember | ( | string | json, |
string | token | ||
) |
Extract JSON value matching name.
Scan through the provided JSON stream looking for the supplied Namespace name. If it is found, return its value as a character string.
json | A string of JSON data |
token | The Namespace name to be extracted. |
int32_t json_extract_value | ( | const char *& | ptr, |
string & | value | ||
) |
Extract next JSON value.
Extract the next JSON value from the provided string. If it is found, return its value as a string.
ptr | Pointer to a pointer to a JSON stream. |
value | Reference to extracted string. |
string json_convert_string | ( | string | object | ) |
Convert JSON to string.
Convert the supplied JSON Object to a string representation. If the supplied Object does not have the proper format for a JSON string, an empty string will be returned.
object | Fully formed JSON object. |
double json_convert_double | ( | string | object | ) |
Convert JSON to double.
Convert the supplied JSON Object to a double representation. If the supplied Object does not have the proper format for a double, zero be returned.
object | Fully formed JSON object. |
int32_t json_tokenize | ( | string | jstring, |
cosmosstruc * | cinfo, | ||
vector< jsontoken > & | tokens | ||
) |
Tokenize using JSON Name Space.
Scan through the provided JSON stream, matching names to the ::jsonmap. for each match that is found, create a jsontoken entry and add it to a vector of tokens.
jstring | string containing JSON stream. |
tokens | vector of jsontoken. |
int32_t json_tokenize_namedmember | ( | const char *& | ptr, |
cosmosstruc * | cinfo, | ||
jsontoken & | token | ||
) |
Tokenize next JSON Named Pair.
Extract the next Named Pair from the provided JSON stream and place it in a jsontoken. Leave pointer at the next Object in the string.
ptr | Pointer to a pointer to a JSON stream. |
token | jsontoken to return. |
int32_t json_parse | ( | string | jstring, |
cosmosstruc * | cinfo | ||
) |
Parse JSON using Name Space.
Scan through the provided JSON stream, matching names to the ::jsonmap. For each match that is found, load the associated data item with the accompanying data. This function supports complex data types.
jstring | A string of JSON data |
cinfo | Reference to cosmosstruc to use. |
int32_t json_parse_namedmember | ( | const char *& | ptr, |
cosmosstruc * | cinfo | ||
) |
Parse next JSON Named Pair.
Extract the next Named Pair from the provided JSON stream. Return a pointer to the next Object in the string, and an error flag.
ptr | Pointer to a pointer to a JSON stream. |
cinfo | Reference to cosmosstruc to use. |
Skip over a specific character in a JSON stream.
Look for the specified character in the provided JSON stream and flag an error if it's not there. Otherwise, increment the pointer to the next byte in the string.
ptr | Pointer to a pointer to a JSON stream. |
character | The character to look for. |
int32_t json_extract_name | ( | const char *& | ptr, |
string & | ostring | ||
) |
Parse the next variable name out of a JSON stream.
Look for a valid JSON string, followed by a ':' and copy that name to the provided buffer, otherwise flag an error.
ptr | Pointer to a pointer to a JSON stream. |
ostring | Pointer to a location to copy the string. |
int32_t json_parse_equation | ( | const char *& | ptr, |
string & | equation | ||
) |
Parse the next JSON equation out of a JSON stream.
Look for a valid JSON equation in the provided JSON stream and copy it to the provided buffer. Otherwise flag an error.
ptr | Pointer to a pointer to a JSON stream. |
equation | Reference to a location to copy the equation. |
int32_t json_parse_operand | ( | const char *& | ptr, |
jsonoperand * | operand, | ||
cosmosstruc * | cinfo | ||
) |
Parse the next JSON equation operand out of a JSON stream.
Look for a valid JSON equation operand in the provided JSON stream and copy it to a jsonoperand.
ptr | Pointer to a pointer to a JSON stream. |
operand | Pointer to a jsonoperand. |
int32_t json_extract_string | ( | const char *& | ptr, |
string & | ostring | ||
) |
Parse the next JSON string out of a JSON stream.
Look for a valid JSON string in the provided JSON stream and copy it to the provided buffer. Otherwise flag an error.
ptr | Pointer to a pointer to a JSON stream. |
ostring | Pointer to a location to copy the string. |
int32_t json_parse_number | ( | const char *& | ptr, |
double * | number | ||
) |
Parse the next number out of a JSON stream.
Extract a valid number out of the provided JSON stream, otherwise flag an error.
ptr | Pointer to a pointer to a JSON stream. |
number | Extracted number in double precission. |
int32_t json_skip_white | ( | const char *& | ptr | ) |
Skip white space in JSON string.
Skip over any white space characters, leaving pointer at next non white space.
ptr | Double pointer to the JSON string |
int32_t json_skip_to_next_member | ( | const char *& | ptr | ) |
Skip to next COSMOS name in JSON string.
Skip over characters until you reach the next COSMOS Namespace name in a JSON string.
ptr | Double pointer to the JSON string |
int32_t json_set_string | ( | string | val, |
const jsonentry & | entry, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_set_number | ( | double | val, |
const jsonentry & | entry, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_parse_value | ( | const char *& | ptr, |
const jsonentry & | entry, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_parse_value | ( | const char *& | ptr, |
uint16_t | type, | ||
ptrdiff_t | offset, | ||
uint16_t | group, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_parse_value | ( | const char *& | ptr, |
uint16_t | type, | ||
uint8_t * | data, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_clear_cosmosstruc | ( | int32_t | type, |
cosmosstruc * | cinfo | ||
) |
Clear global data structure.
Zero out elements of the cosmosstruc. The entire structure can be cleared, or the clearing can be confined to either the Dynamic or Static piece. This allows you to remove the effects of previous calls to json_parse.
type | Instance of JSON_STRUCT_* enumeration. |
cinfo | Reference to cosmosstruc to use. |
int32_t json_load_node | ( | string | node, |
jsonnode & | json | ||
) |
Map Name Space to global data structure components and pieces.
Create an entry in the JSON mapping tables between each name in the Name Space and the cosmosstruc.
node | Name and/or path of node directory. If name, then a path will be created based on nodedir setting. If path, then name will be extracted from the end. |
json | jsonnode for storing JSON. |
int32_t json_recenter_node | ( | cosmosstruc * | cinfo | ) |
int32_t json_pushdevspec | ( | uint16_t | cidx, |
cosmosstruc * | cinfo | ||
) |
Antenna
Battery
Camera
Processing Unit
GPS Unit
Heater
Inertial Measurement Unit
Motor
Magnetic Torque Rod
Propellant Tank
Pressure Sensor
Rotor
Reaction Wheel
Radio Receiver
Elevation and Azimuth Sun Sensor
Photo Voltaic String
Star Tracker
Switch
Radio Transceiver
Thruster
Temperature Sensor
Radio Transmitter
int32_t json_setup_node | ( | jsonnode | json, |
cosmosstruc * | cinfo, | ||
bool | create_flag | ||
) |
Setup JSON Namespace using Node description JSON.
Create an entry in the JSON mapping tables between each name in the Name Space and the cosmosstruc. Load descriptive information from a structure of JSON descriptions.
json | Structure containing JSON descriptions. |
cinfo | Pointer to cinfo cosmosstruc. |
create_flag | Whether or not to create node directory if it doesn't already exist. |
Load targeting information
int32_t json_setup_node | ( | string & | node, |
cosmosstruc * | cinfo | ||
) |
Setup JSON Namespace using file.
Create an entry in the JSON mapping tables between each name in the Name Space and the cosmosstruc. Load descriptive information from files in a Node directory of the goven name.
node | Name and/or path of node directory. If name, then a path will be created based on nodedir setting. If path, then name will be extracted from the end. |
cinfo | Pointer to cinfo cosmosstruc. |
int32_t json_dump_node | ( | cosmosstruc * | cinfo | ) |
Save Node entries to disk.
Create all of the initialization files that represent the Node in the provided cosmosstruc.
cinfo | Reference to cosmosstruc to use. |
int32_t json_mapentries | ( | cosmosstruc * | cinfo | ) |
Map all entries in JMAP Add or update all possible entries in the Namespace map.
cinfo | Reference to cosmosstruc to use. |
int32_t json_mapbaseentries | ( | cosmosstruc * | cinfo | ) |
Add base entries to JMAP.
Add all of the base entries to the Namespace map.
cinfo | Reference to cosmosstruc to use. |
int32_t json_mapvertexentry | ( | uint16_t | vidx, |
cosmosstruc * | cinfo | ||
) |
Add vertex entry.
Add an entry for vertex number vidx to the JSON Namespace map.
vidx | Piece number. |
cmeta | Reference to cosmosstruc to use. |
int32_t json_mapfaceentry | ( | uint16_t | fidx, |
cosmosstruc * | cinfo | ||
) |
Add face entry.
Add an entry for face number fidx to the JSON Namespace map.
fidx | Piece number. |
cmeta | Reference to cosmosstruc to use. |
int32_t json_mappieceentry | ( | uint16_t | pidx, |
cosmosstruc * | cinfo | ||
) |
Add piece entry.
Add an entry for piece number pidx to the JSON Namespace map.
pidx | Piece number. |
cmeta | Reference to cosmosstruc to use. |
int32_t json_togglepieceentry | ( | uint16_t | pidx, |
cosmosstruc * | cinfo, | ||
bool | state | ||
) |
Toggle piece entry.
Toggle the enable state of an entry for piece number pidx in the JSON Namespace map.
pidx | Piece number. |
cmeta | Reference to cosmosstruc to use. |
state | Desired enable state. |
int32_t json_mapcompentry | ( | uint16_t | cidx, |
cosmosstruc * | cinfo | ||
) |
Add component entry.
Add an entry for component number cidx to the JSON Namespace map.
cidx | Component number. |
cmeta | Reference to cosmosstruc to use. |
int32_t json_togglecompentry | ( | uint16_t | cidx, |
cosmosstruc * | cinfo, | ||
bool | state | ||
) |
Toggle component entry.
Toggle the enable state of an entry for component number cidx in the JSON Namespace map.
cidx | Component number. |
cmeta | Reference to cosmosstruc to use. |
state | Desired enable state. |
uint16_t json_mapdeviceentry | ( | const devicestruc & | device, |
cosmosstruc * | cinfo | ||
) |
Add device entry.
Add entries specific to device number i to the JSON Namespace map.
cidx | Component number. |
didx | Device number. |
type | Device type number taken from DeviceType. |
Antenna
Battery
Camera
Processing Unit
GPS Unit
Heater
Inertial Measurement Unit
Motor
Magnetic Torque Rod
Propellant Tank
Pressure Sensor
Photo Voltaic String
Rotor
Reaction Wheel
Radio Receiver
Elevation and Azimuth Sun Sensor
Star Tracker
SUCHI
Switch
Radio Transceiver
Thruster
Temperature Sensor
Radio Transmitter
int32_t json_toggledeviceentry | ( | uint16_t | didx, |
DeviceType | type, | ||
cosmosstruc * | cinfo, | ||
bool | state | ||
) |
Toggle device entry.
Toggle the enable state of the entries specific to device number i in the JSON Namespace map.
type | Device type number taken from DeviceType. |
didx | Device number. |
state | Desired enable state. |
Elevation and Azimuth Sun Sensor
Inertial Measurement Unit
Reaction Wheel
Magnetic Torque Rod
Camera
Processing Unit
GPS Unit
Antenna
Radio Receiver
Radio Transmitter
Radio Transceiver
Photo Voltaic String
Battery
Heater
Motor
Pressure Sensor
Temperature Sensor
Thruster
Propellant Tank
Switch
Rotor
Star Tracker
Star Tracker
uint16_t json_mapportentry | ( | uint16_t | portidx, |
cosmosstruc * | cinfo | ||
) |
Add port entry.
Add entries specific to port number portidx to the JSON Namespace map.
portidx | Port number. |
int32_t json_toggleportentry | ( | uint16_t | portidx, |
cosmosstruc * | cinfo, | ||
bool | state | ||
) |
Toggle port entry.
Toggle enable state of entries specific to port number i in the JSON Namespace map.
portidx | Port number. |
state | Enable state. |
const char * json_of_wildcard | ( | string & | jstring, |
string | wildcard, | ||
cosmosstruc * | cinfo | ||
) |
Create JSON stream from wildcard.
Generate a JSON stream based on a character string representing all the JSON Name Space names you wish to match.
jstring | Pointer to a string large enough to hold the end result. |
wildcard | Character string representing a regular expression to be matched to all names in the JSON Name Space. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_list | ( | string & | jstring, |
string | list, | ||
cosmosstruc * | cinfo | ||
) |
Create JSON stream from list.
Generate a JSON stream based on a comma separated list of JSON Name Space names.
jstring | Pointer to a string large enough to hold the end result. |
list | List to convert. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_table | ( | string & | jstring, |
vector< jsonentry * > | table, | ||
cosmosstruc * | cinfo | ||
) |
Create JSON stream from entries.
Generate a JSON stream based on a vector of entries of JSON Name Space names.
jstring | Pointer to a string large enough to hold the end result. |
table | Vector of pointers to entries from ::jsonmap. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_target | ( | string & | jstring, |
cosmosstruc * | cinfo, | ||
uint16_t | num | ||
) |
Create JSON Track string.
Generate a JSON stream showing the variables stored in an nodestruc.
jstring | Pointer to a string large enough to hold the end result. |
cinfo | Reference to cosmosstruc to use. |
num | Target index. |
const char * json_of_node | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Create JSON Node string.
Generate a JSON stream showing the variables stored in an nodestruc.
jstring | Pointer to a string large enough to hold the end result. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_agent | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Create JSON Agent string.
Generate a JSON stream showing the variables stored in an agentstruc.
jstring | Pointer to a string large enough to hold the end result. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_time | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Create JSON Time string.
Generate a JSON stream showing the various internal times stored in the global COSMOS data structure.
jstring | Pointer to a string large enough to hold the end result. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_beat | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Create JSON Heart Beat string.
Create a complete JSON formatted Heartbeat string using the data currently in the global COSMOS structure.
jstring | Reference to a string structure to be used to build out the JSON string. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_beacon | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Create JSON Beacon string.
Create a complete JSON formatted Beacon string using the data currently in the global COSMOS structure.
jstring | Reference to a string structure to be used to build out the JSON string. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_imu | ( | string & | jstring, |
uint16_t | num, | ||
cosmosstruc * | cinfo | ||
) |
Create JSON IMU string.
Create a complete JSON formatted IMU string for the indicated IMU using the data currently in the global COSMOS structure.
jstring | Reference to a string structure to be used to build out the JSON string. |
num | Number of the IMU. |
cinfo | Reference to cosmosstruc to use. |
const char * json_of_ephemeris | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
const char * json_of_utc | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
string json_list_of_all | ( | cosmosstruc * | cinfo | ) |
Get list of all Namespace names.
Go through the Namespace map, extracting each valid Namespace name. Return this as a JSON like list.
string json_list_of_soh | ( | cosmosstruc * | cinfo | ) |
string json_list_of_fullsoh | ( | cosmosstruc * | cinfo | ) |
const char * json_of_soh | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
const char * json_of_event | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Create JSON for an event.
Generate a JSON stream that represents the current state of the eventstruc in cosmosstruc.
jstring | User provided string for creating the JSON stream |
cinfo | Reference to cosmosstruc to use. |
const char* json_of_groundcontact | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
const char * json_of_mtr | ( | string & | jstring, |
uint16_t | index, | ||
cosmosstruc * | cinfo | ||
) |
const char * json_of_rw | ( | string & | jstring, |
uint16_t | index, | ||
cosmosstruc * | cinfo | ||
) |
const char * json_of_state_eci | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
const char * json_of_state_geoc | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
const char * json_node | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump Node description.
Create a JSON stream for general Node variables. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
const char * json_vertices | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump Vertex description.
Create a JSON stream for variables specific to the Vertices of the Node. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
const char * json_faces | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump Face description.
Create a JSON stream for variables specific to the cinfo->faces of the Node. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
const char * json_pieces | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump Piece description.
Create a JSON stream for variables specific to the Pieces of the Node. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
const char * json_devices_general | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump General Device description.
Create a JSON stream for variables common to all Devices in the Node. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
const char * json_devices_specific | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump Specific Device description.
Create a JSON stream for variables specific to particular Devices in the Node. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
const char * json_ports | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
Dump Port description.
Create a JSON stream for the Port information of the Node. Does not include any derivative data (eg. area).
jstring | Reference to a string to build the JSON stream in. |
cinfo | Reference to cosmosstruc to use. |
void json_test | ( | cosmosstruc * | cinfo | ) |
int32_t json_name_map | ( | string | name, |
cosmosstruc * | cinfo, | ||
jsonhandle & | handle | ||
) |
Get hash and index in JSON Namespace map.
Using the provided name, find it's location in the provided Namespace map and set the values for the hash and index.
name | Namespace name. |
handle | Pointer to jsonhandle of name. |
int32_t json_equation_map | ( | string | equation, |
cosmosstruc * | cinfo, | ||
jsonhandle * | handle | ||
) |
Get hash and index in JSON Equation map.
Using the provided text, find it's location in the provided Equation map and set the values for the hash and index. If the equation is not already in the table, add it.
equation | Equation text. |
handle | Pointer to jsonhandle of name. |
int32_t json_clone | ( | cosmosstruc * | cinfo1, |
cosmosstruc * | cinfo2 | ||
) |
Clone cosmosstruc data areas, direct.
Copy one cosmosstruc to another.
cinfo1 | Source cosmosstruc. |
cinfo2 | Target cosmosstruc. |
uint32_t json_get_name_list_count | ( | cosmosstruc * | cinfo | ) |
int32_t node_init | ( | string | node, |
cosmosstruc * | cinfo | ||
) |
Initialize Node configuration.
Load initial Node configuration file. Then calculate all derivative values (eg. COM)
node | Node to be initialized using node.ini. Node must be a directory in nodedir. If NULL, node.ini must be in current directory. |
cinfo | Reference to cosmosstruc to use. |
Load targeting information
int32_t node_calc | ( | cosmosstruc * | cinfo | ) |
Calculate Satellite configuration values.
Using the provided satellite structure, populate the derivative static quantities and initialize any reasonable dynamic quantities.
cinfo | Reference to cosmosstruc to use. |
void create_databases | ( | cosmosstruc * | cinfo | ) |
Dump tab delimited database files.
Create files that can be read in to a relational database representing the various elements of the satellite. Tables are created for Parts, Components, Devices, Temperature Sensors and Power Buses.
int32_t load_target | ( | cosmosstruc * | cinfo | ) |
Load Track list.
Load the file target.ini into an array of targetstruc. Space for the array is automatically allocated and the number of items returned.
cinfo | Reference to cosmosstruc to use. |
int32_t update_target | ( | cosmosstruc * | cinfo | ) |
Update Track list.
For each entry in the Track list, calculate the azimuth, elevation and range to and from the current base location.
cinfo | Reference to cosmosstruc to use. |
int32_t update_target | ( | locstruc | source, |
targetstruc & | target | ||
) |
size_t load_dictionary | ( | vector< eventstruc > & | dict, |
cosmosstruc * | cinfo, | ||
const char * | file | ||
) |
Load Event Dictionary.
Read a specific event dictionary for a specific node. The dictionary is stored as multiple condition based JSON event strings in a file of the specified name, in the cinfo directory of the specified node. The result is a vector of event structures.
dict | Reference to vector of eventstruc. |
cinfo | Reference to cosmosstruc to use. |
file | Name of dictionary file. |
size_t calc_events | ( | vector< eventstruc > & | dictionary, |
cosmosstruc * | cinfo, | ||
vector< eventstruc > & | events | ||
) |
Calculate current Events.
Using the provided Event Dictionary, calculate all the Events for current state of the provided Node. The Event Dictionary will be updated with any new values so that repeating Events can be properly assessed.
dictionary | Reference to vector of eventstruc representing event dictionary. |
cmeta | Reference to cosmosstruc to use. |
cinfo | Reference to cosmosstruc to use. |
events | Reference to vector of eventstruc representing events. |
uint16_t device_type_index | ( | string | name | ) |
string device_type_name | ( | uint32_t | type | ) |
int32_t json_clone | ( | cosmosstruc * | cinfo | ) |
int32_t json_repoint | ( | cosmosstruc * | cinfo | ) |
int32_t json_addentry | ( | string | name, |
string | value, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_out_tvector | ( | string & | jstring, |
rvector | value | ||
) |
uint8_t* json_ptrto_1d | ( | const char * | token, |
uint16_t | index1, | ||
cosmosstruc * | cinfo | ||
) |
uint8_t* json_ptrto_2d | ( | const char * | token, |
uint16_t | index1, | ||
uint16_t | index2, | ||
cosmosstruc * | cinfo | ||
) |
int32_t json_scan | ( | char * | istring | ) |
int32_t json_convert_int32 | ( | string | object | ) |
uint32_t json_convert_uint32 | ( | string | object | ) |
int16_t json_convert_int16 | ( | string | object | ) |
uint16_t json_convert_uint16 | ( | string | object | ) |
float json_convert_float | ( | string | object | ) |
const char* json_of_groundcontact | ( | cosmosstruc * | cinfo | ) |
const char* json_of_groundstation | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
const char* json_of_log | ( | string & | jstring, |
cosmosstruc * | cinfo | ||
) |
bool json_static | ( | char * | json_extended_name | ) |
bool json_dynamic | ( | char * | json_extended_name | ) |
string port_type_name | ( | uint32_t | type | ) |