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 <smart_dock/smart_dock.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 | SD = smart_dock::SmartDock |
using | EPS = eps_driver::EPS |
Functions | |
DEFINE_string (device, "/dev/i2c-2", "i2c bus of smart dock") | |
DEFINE_int32 (address, 0x42, "i2c address of smart dock") | |
DEFINE_int32 (retries, 3, "i2c retries") | |
DEFINE_bool (state, false, "Get the state of the dock") | |
DEFINE_bool (reboot, false, "Reboot") | |
DEFINE_bool (hk, false, "View housekeeping information") | |
DEFINE_bool (string, false, "View string information") | |
DEFINE_bool (fault, false, "View and clear faults") | |
DEFINE_bool (power, false, "View and toggle power channels") | |
DEFINE_bool (berth, false, "View berth information") | |
DEFINE_bool (command, false, "Send a command to a berth") | |
DEFINE_bool (led, false, "Configure LEDs") | |
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 | 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) |
int | main (int argc, char **argv) |
using EPS = eps_driver::EPS |
typedef std::vector<std::string> Keywords |
using SD = smart_dock::SmartDock |
DEFINE_bool | ( | berth | , |
false | , | ||
"View berth information" | |||
) |
DEFINE_bool | ( | clear | , |
false | , | ||
"Send a clear command (only for -fault)" | |||
) |
DEFINE_bool | ( | command | , |
false | , | ||
"Send a command to a berth" | |||
) |
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 | , | ||
"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_int32 | ( | address | , |
0x42 | , | ||
"i2c address of smart dock" | |||
) |
DEFINE_int32 | ( | retries | , |
3 | , | ||
"i2c retries" | |||
) |
DEFINE_string | ( | device | , |
"/dev/i2c-2" | , | ||
"i2c bus of smart dock" | |||
) |
DEFINE_string | ( | set | , |
"" | , | ||
"Set a new value for all specified indexes" | |||
) |
int Error | ( | std::string const & | msg, |
int | code = -1 |
||
) |
int Help | ( | ) |
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 |
||
) |
bool Valid | ( | ValueMap const & | values, |
std::string const & | input, | ||
uint32_t & | val | ||
) |