71 printf(
"Usage: arduino_agent node comport\n");
78 printf(
"Error starting server\n");
87 char arduino_soh[2000] =
"{\"device_imu_utc_000\",\"device_imu_accel_000\",\"device_imu_omega_000\",\"device_imu_mag_000\",\"device_imu_temp_000\"}";
101 uint32_t counter = 0;
113 printf(
"%u: %s\n", ++counter,
buffer);
int32_t request_run_program(string &request, string &response, Agent *)
Definition: agent_arduino.cpp:124
int32_t json_parse(string jstring, cosmosstruc *cinfo)
Parse JSON using Name Space.
Definition: jsonlib.cpp:4799
int iretn
Definition: rw_test.cpp:37
int32_t set_sohstring(string list)
Set Limited SOH string.
Definition: agentclass.cpp:641
int32_t cssl_start()
Definition: cssl_lib.cpp:73
uint16_t running()
Check if we're supposed to be running.
Definition: agentclass.cpp:391
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
uint8_t message[300]
Definition: kpc9612p_send.cpp:36
Definition: agentclass.h:139
std::string agentname
Definition: agent_arduino.cpp:42
double currentmjd(double offset)
Current UTC in Modified Julian Days.
Definition: timelib.cpp:65
Agent * agent
Definition: agent_arduino.cpp:48
vector< agentstruc > agent
Single entry vector for agent information.
Definition: jsondef.h:4247
cssl_t * cssl_open(const char *fname, int baud, int bits, int parity, int stop)
Definition: cssl_lib.cpp:108
cosmosstruc * cinfo
Definition: agentclass.h:346
uint8_t buffer[400]
Definition: agent_arduino.cpp:58
#define AGENT_ERROR_JSON_CREATE
Definition: cosmos-errno.h:105
int32_t cssl_getdata(cssl_t *serial, uint8_t *buffer, int size)
Definition: cssl_lib.cpp:738
std::string comport
Definition: agent_arduino.cpp:44
#define MAXBUFFERSIZE
Definition: agent_arduino.cpp:50
int32_t cssl_settimeout(cssl_t *serial, int, double timeout)
Set read timeout.
Definition: cssl_lib.cpp:469
cssl_t * serial
Definition: arduino_lib.cpp:63
Definition: cssl_lib.h:34
std::string node
Definition: agent_arduino.cpp:43