int main() { printf("Starting pid_manager test..\n"); char handle_url[] = "http://hdl.handle.net/api/handles/"; char PID[] = "/11100/0beb6af8-cbe5-11e3-a9da-e41f13eb41b2"; char *URL; int res = manage_pid(handle_url, PID, &URL); if (res == 0) { printf("Returned URL: %s\n", URL); } //free(URL); return 0; }
void Terminal::parse_line(String line) { int spacer = line.indexOf(" "); String command = line.substring(0,spacer); if(command == "pid") { if(line.length() > (spacer + 1)) { String rest = line.substring(spacer+1); manage_pid(rest); } else { get_help(); } } else if(command == "online") { int cur_time = (millis() - global_info.start_time) / 1000; Serial1.print("Time from start : "); Serial1.println(cur_time); } else { get_help(); } }