NASA Astrobee Robot Software
0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
|
#include <ff_common/init.h>
#include <gflags/gflags.h>
#include <gflags/gflags_completions.h>
#include <eps_driver/eps_driver.h>
#include <algorithm>
#include <cerrno>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
Typedefs | |
typedef std::vector< std::string > | Keywords |
typedef std::pair< std::string, Keywords > | Value |
typedef std::map< uint32_t, Value > | ValueMap |
using | EPS = eps_driver::EPS |
Functions | |
DEFINE_string (device, "/dev/i2c-1", "i2c bus of EPS") | |
DEFINE_int32 (address, 0x40, "i2c address of EPS") | |
DEFINE_int32 (retries, 3, "i2c retries") | |
DEFINE_string (w, "", "Write power state to given file") | |
DEFINE_bool (reboot, false, "Reboot") | |
DEFINE_bool (bootloader, false, "Jump to bootloader") | |
DEFINE_bool (undock, false, "Send an undock command") | |
DEFINE_bool (unterminate, false, "Clear a terminate event") | |
DEFINE_bool (buzz, false, "Ring the buzzer") | |
DEFINE_bool (hk, false, "View housekeeping information") | |
DEFINE_bool (string, false, "View string information") | |
DEFINE_bool (battery, false, "View battery information") | |
DEFINE_bool (temp, false, "View temperatures") | |
DEFINE_bool (fault, false, "View and clear faults") | |
DEFINE_bool (power, false, "View and toggle power channels") | |
DEFINE_bool (charge, false, "View and toggle charge state") | |
DEFINE_bool (led, false, "View and configure LEDs") | |
DEFINE_bool (state, false, "View state information") | |
DEFINE_int32 (freq, 1000, "Buzzer frequency in Hz (1000 - 2000)") | |
DEFINE_string (set, "", "Set a new value for all specified indexes") | |
DEFINE_bool (get, false, "Get the current value for all specified indexes") | |
DEFINE_bool (list, false, "List all indexes and keys for the given command") | |
DEFINE_bool (clear, false, "Send a clear command (only for -fault)") | |
int | Error (std::string const &msg, int code=-1) |
int | Print (std::string const &msg) |
int | Print (std::string const &title, ValueMap const &values, bool ro=false) |
int | HelpView (std::string const &flag, std::string const &desc, bool i=true) |
int | HelpConf (std::string const &flag, std::string const &desc, bool i=true) |
int | HelpBuzz (std::string const &flag, std::string const &desc) |
int | Help () |
bool | Mask (ValueMap const &values, std::vector< std::string > const &idxs, uint32_t &mask, bool allow_all_to_be_selected=true) |
bool | Valid (ValueMap const &values, std::string const &input, uint32_t &val) |
void | Sleep (uint32_t microseconds) |
int | main (int argc, char **argv) |
using EPS = eps_driver::EPS |
typedef std::vector<std::string> Keywords |
DEFINE_bool | ( | battery | , |
false | , | ||
"View battery information" | |||
) |
DEFINE_bool | ( | bootloader | , |
false | , | ||
"Jump to bootloader" | |||
) |
DEFINE_bool | ( | buzz | , |
false | , | ||
"Ring the buzzer" | |||
) |
DEFINE_bool | ( | charge | , |
false | , | ||
"View and toggle charge state" | |||
) |
DEFINE_bool | ( | clear | , |
false | , | ||
"Send a clear command (only for -fault)" | |||
) |
DEFINE_bool | ( | fault | , |
false | , | ||
"View and clear faults" | |||
) |
DEFINE_bool | ( | get | , |
false | , | ||
"Get the current value for all specified indexes" | |||
) |
DEFINE_bool | ( | hk | , |
false | , | ||
"View housekeeping information" | |||
) |
DEFINE_bool | ( | led | , |
false | , | ||
"View and configure LEDs" | |||
) |
DEFINE_bool | ( | list | , |
false | , | ||
"List all indexes and keys for the given command" | |||
) |
DEFINE_bool | ( | power | , |
false | , | ||
"View and toggle power channels" | |||
) |
DEFINE_bool | ( | reboot | , |
false | , | ||
"Reboot" | |||
) |
DEFINE_bool | ( | string | , |
false | , | ||
"View string information" | |||
) |
DEFINE_bool | ( | temp | , |
false | , | ||
"View temperatures" | |||
) |
DEFINE_bool | ( | undock | , |
false | , | ||
"Send an undock command" | |||
) |
DEFINE_bool | ( | unterminate | , |
false | , | ||
"Clear a terminate event" | |||
) |
DEFINE_int32 | ( | address | , |
0x40 | , | ||
"i2c address of EPS" | |||
) |
DEFINE_int32 | ( | freq | , |
1000 | , | ||
"Buzzer frequency in Hz (1000 - 2000)" | |||
) |
DEFINE_int32 | ( | retries | , |
3 | , | ||
"i2c retries" | |||
) |
DEFINE_string | ( | device | , |
"/dev/i2c-1" | , | ||
"i2c bus of EPS" | |||
) |
DEFINE_string | ( | set | , |
"" | , | ||
"Set a new value for all specified indexes" | |||
) |
DEFINE_string | ( | w | , |
"" | , | ||
"Write power state to given file" | |||
) |
int Error | ( | std::string const & | msg, |
int | code = -1 |
||
) |
int Help | ( | ) |
int HelpBuzz | ( | std::string const & | flag, |
std::string const & | desc | ||
) |
int HelpConf | ( | std::string const & | flag, |
std::string const & | desc, | ||
bool | i = true |
||
) |
int HelpView | ( | std::string const & | flag, |
std::string const & | desc, | ||
bool | i = true |
||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
bool Mask | ( | ValueMap const & | values, |
std::vector< std::string > const & | idxs, | ||
uint32_t & | mask, | ||
bool | allow_all_to_be_selected = true |
||
) |
int Print | ( | std::string const & | msg | ) |
int Print | ( | std::string const & | title, |
ValueMap const & | values, | ||
bool | ro = false |
||
) |
void Sleep | ( | uint32_t | microseconds | ) |
bool Valid | ( | ValueMap const & | values, |
std::string const & | input, | ||
uint32_t & | val | ||
) |