169 cout <<
"Hello, I am an agent. My name is [" <<
nodename <<
":" <<
agentname <<
"]" << endl << endl;
188 cout <<
"Hello, I am an agent. My name is [null:" <<
agentname <<
"]" << endl << endl;
200 cout<<
"There were "<<n1<<
" entries in namespace 1.0 and "<<
agent->
cinfo->
jmapped<<
" is the value of jmapped."<<endl;
202 cout<<
"\nWould you like to see the names from Namespace 1.0? (y/n) : ";
205 if(see ==
'Y' || see ==
'y') {
210 cout <<
"jmap[" <<
i <<
"]["<<j<<
"] :\t" <<
agent->
cinfo->
jmap[
i][j].name << endl;
244 cout<<
"\nFor my next trick... I will add all the default names supported by Namespace 2.0"<<endl;
248 cout<<
"\nThe size of the namespace for cosmosstruc using namespace 2.0 is "<<
agent->
cinfo->
size()<<
"."<<endl;
250 cout<<
"\nWould you like to see the names from Namespace 2.0? (y/n) : ";
252 if(see ==
'Y' || see ==
'y') {
258 cout<<
"\nWould you like to see the names and types from Namespace 2.0? (y/n) : ";
260 if(see ==
'Y' || see ==
'y') {
266 cout<<
"\nWould you like to see the names, types, and values from Namespace 2.0? (y/n) : ";
268 if(see ==
'Y' || see ==
'y') {
281 cout<<
"\nFor my next trick I will try to implement to concept of equations for Namespace 2.0"<<endl;
296 string test_equation =
"0.5 * (-8) + .6 / 6 - 12 * 2 " ;
303 string str = test_equation;
305 cout<<
"but seriously... let's calculate already"<<endl;
309 cin.ignore(100000,
'\n');
312 while(answer != -1) {
313 cout<<
"Please enter an equation:\t";
317 cout<<
"The answer is "<<std::setprecision(std::numeric_limits<double>::digits10)<<answer<<endl;
FILE * get_debug_fd(double mjd=0.)
Definition: agentclass.cpp:2645
uint16_t jmapped
Whether JSON map has been created.
Definition: jsondef.h:4205
int i
Definition: rw_test.cpp:37
int32_t request_mul(string &request, string &response, Agent *agent)
Definition: agent_calc.cpp:412
string getNode()
Listen for heartbeat.
Definition: agentclass.cpp:2607
void print_all_names() const
Prints every name within Namespace 2.0.
Definition: jsondef.h:4520
int iretn
Definition: rw_test.cpp:37
int32_t wait(State state=State::RUN, double waitsec=10.)
Definition: agentclass.cpp:398
void add_default_names()
Add default names for every accessible memory location within the COSMOS Data Structure (cosmosstruc)...
Definition: jsondef.h:4671
int myagent()
Definition: agent_calc.cpp:378
const string & str
Definition: json11.cpp:360
int32_t request_change_node_name(string &request, string &response, Agent *agent)
Definition: agent_calc.cpp:432
void print_all_names_types_values() const
Prints every name and the associated value and type within Namespace 2.0.
Definition: jsondef.h:4547
string cosmos_error_string(int32_t cosmos_errno)
Definition: cosmos-errno.cpp:45
int32_t request_sub(string &request, string &response, Agent *agent)
Definition: agent_calc.cpp:402
string getAgent()
Definition: agentclass.cpp:2609
int32_t add_request(string token, external_request_function function, string synopsis="", string description="")
Add internal request to Agent request list with description and synopsis.
Definition: agentclass.cpp:312
Definition: agentclass.h:139
void print_all_names_types() const
Prints every name and the associated type within Namespace 2.0.
Definition: jsondef.h:4529
double data_ctime(string path)
Definition: datalib.cpp:1910
double equationator(const string &str)
Evaluate the expression of a python?Matlab? equation.
Definition: jsondef.h:7825
static char nodename[COSMOS_MAX_NAME+1]
Definition: agent_calc.cpp:60
static Agent * agent
Definition: agent_calc.cpp:75
double currentmjd(double offset)
Current UTC in Modified Julian Days.
Definition: timelib.cpp:65
int32_t request_add(string &request, string &response, Agent *agent)
Definition: agent_calc.cpp:390
string utc2iso8601(double utc)
ISO 8601 version of time.
Definition: timelib.cpp:1286
cosmosstruc * cinfo
Definition: agentclass.h:346
size_t size()
Returns the length of the map used to represent Namespace 2.0.
Definition: jsondef.h:4514
vector< vector< jsonentry > > jmap
JSON Namespace Map matrix. first entry hash, second is items with that hash.
Definition: jsondef.h:4208
string mjd2iso8601(double mjd)
Definition: timelib.cpp:1316
int32_t request_div(string &request, string &response, Agent *agent)
Definition: agent_calc.cpp:422
static char agentname[COSMOS_MAX_NAME+1]
Definition: agent_calc.cpp:61