iCub-main
|
#include <EthMaintainer.h>
Classes | |
struct | progData_t |
Public Member Functions | |
EthMaintainer () | |
~EthMaintainer () | |
bool | open (eOipv4addr_t ipv4=hostIPaddress, eOipv4port_t port=mainIPport) |
bool | close () |
void | verbose (bool on) |
void | debugprint (bool on) |
bool | boards_useinternal (bool on) |
bool | boards_set (EthBoardList &boards) |
EthBoardList & | boards_get (void) |
bool | boards_clr (void) |
bool | boards_select (eOipv4addr_t ipv4, bool on) |
int | boards_add (eOipv4addr_t ipv4, boardInfo2_t &info2, bool force) |
int | boards_rem (eOipv4addr_t ipv4) |
EthBoardList | discover (bool clearbeforediscovery=true, int numberofdiscoveries=1, double waittimeout=1.0) |
EthBoardList | information (eOipv4addr_t ipv4, bool ask2board=true, bool forcemaintenance=true, int numberofrequests=1, double waittimeout=1.0) |
std::string | moreinformation (eOipv4addr_t ipv4, bool forcemaintenance=false) |
bool | go2maintenance (eOipv4addr_t ipv4, bool verify=true, int retries=6, double timegap=1.0) |
bool | go2application (eOipv4addr_t ipv4, bool checkdef2runapplication=true, double bootstraptime=10.0, bool verify=true) |
bool | program (eOipv4addr_t ipv4, eObrd_ethtype_t type, eOuprot_process_t process, eOversion_t targetversion, FILE *fp, bool forcemaintenance=true, void progress(float)=NULL, bool restart2application=true) |
bool | command_supported (eOipv4addr_t ipv4, eOuprot_proc_capabilities_t capability, bool ask2board=false) |
bool | command_def2run (eOipv4addr_t ipv4, eOuprot_process_t process, bool forcemaintenance=true, bool verify=true) |
bool | command_restart (eOipv4addr_t ipv4) |
bool | command_changeaddress (eOipv4addr_t ipv4, eOipv4addr_t ipv4new, bool checkifnewispresent=true, bool forcemaintenance=true, bool restart=false, bool verify=false) |
bool | command_info32_clr (eOipv4addr_t ipv4) |
bool | command_info32_set (eOipv4addr_t ipv4, const string &info32) |
vector< string > | command_info32_get (eOipv4addr_t ipv4) |
bool | command_jump2updater (eOipv4addr_t ipv4) |
bool | command_jump2address (eOipv4addr_t ipv4, uint32_t romaddress) |
bool | command_blink (eOipv4addr_t ipv4) |
bool | command_eeprom_erase (eOipv4addr_t ipv4) |
bool | command_eeprom_read (eOipv4addr_t ipv4, uint16_t from, uint16_t size, uint8_t **value) |
bool | command_program (eOipv4addr_t ipv4, FILE *programFile, eOuprot_partition2prog_t partition, void(*updateProgressBar)(float), EthBoardList *pboardlist, string &stringresult) |
Static Public Attributes | |
static const eOipv4addr_t | hostIPaddress = EO_COMMON_IPV4ADDR(10, 0, 1, 104) |
static const eOipv4port_t | mainIPport = 3333 |
static const eOipv4addr_t | ipv4OfAllSelected = EO_COMMON_IPV4ADDR(0, 0, 0, 0) |
static const eOipv4addr_t | ipv4Broadcast = EO_COMMON_IPV4ADDR(255, 255, 255, 255) |
Protected Member Functions | |
bool | sendCommand (eOipv4addr_t ipv4, void *cmd, uint16_t len, EthBoardList *boardlist=NULL) |
int | sendPROG2 (const uint8_t opc, progData_t &progdata) |
bool | isInMaintenance (eOipv4addr_t ipv4, EthBoardList &boardlist) |
bool | isInApplication (eOipv4addr_t ipv4, EthBoardList &boardlist) |
string | processDiscoveryReplies2 (EthBoardList &boardlist, double waittimeout=1.0) |
std::string | processMoreInfoReplies (EthBoardList &boardlist) |
std::string | prepareMoreInfoText (eOuprot_cmd_DISCOVER_REPLY_t *disc, const char *ipv4string) |
std::string | prepareMoreInfoText (eOuprot_cmd_DISCOVER_REPLY2_t *disc, const char *ipv4string) |
std::string | getMoreInfoText (eOuprot_cmd_MOREINFO_REPLY_t *moreinfo, char *ipv4string) |
Protected Attributes | |
bool | _opened |
bool | _verbose |
bool | _debugprint |
bool | _useofinternalboardlist |
EthBoardList | _internalboardlist |
unsigned char | mRxBuffer [uprot_UDPmaxsize] |
unsigned char | mTxBuffer [uprot_UDPmaxsize] |
eOipv4addr_t | myIPV4addr |
eOipv4port_t | myIPV4port |
DSocket | mSocket |
Definition at line 43 of file EthMaintainer.h.
EthMaintainer::EthMaintainer | ( | ) |
Definition at line 78 of file EthMaintainer.cpp.
EthMaintainer::~EthMaintainer | ( | ) |
Definition at line 87 of file EthMaintainer.cpp.
int EthMaintainer::boards_add | ( | eOipv4addr_t | ipv4, |
boardInfo2_t & | info2, | ||
bool | force | ||
) |
Definition at line 1411 of file EthMaintainer.cpp.
bool EthMaintainer::boards_clr | ( | void | ) |
Definition at line 1399 of file EthMaintainer.cpp.
EthBoardList & EthMaintainer::boards_get | ( | void | ) |
Definition at line 1393 of file EthMaintainer.cpp.
int EthMaintainer::boards_rem | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 1418 of file EthMaintainer.cpp.
bool EthMaintainer::boards_select | ( | eOipv4addr_t | ipv4, |
bool | on | ||
) |
Definition at line 1405 of file EthMaintainer.cpp.
bool EthMaintainer::boards_set | ( | EthBoardList & | boards | ) |
Definition at line 1386 of file EthMaintainer.cpp.
bool EthMaintainer::boards_useinternal | ( | bool | on | ) |
Definition at line 1337 of file EthMaintainer.cpp.
bool EthMaintainer::close | ( | void | ) |
Definition at line 114 of file EthMaintainer.cpp.
bool EthMaintainer::command_blink | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 2470 of file EthMaintainer.cpp.
bool EthMaintainer::command_changeaddress | ( | eOipv4addr_t | ipv4, |
eOipv4addr_t | ipv4new, | ||
bool | checkifnewispresent = true , |
||
bool | forcemaintenance = true , |
||
bool | restart = false , |
||
bool | verify = false |
||
) |
Definition at line 2114 of file EthMaintainer.cpp.
bool EthMaintainer::command_def2run | ( | eOipv4addr_t | ipv4, |
eOuprot_process_t | process, | ||
bool | forcemaintenance = true , |
||
bool | verify = true |
||
) |
Definition at line 2010 of file EthMaintainer.cpp.
bool EthMaintainer::command_eeprom_erase | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 170 of file EthMaintainer.cpp.
bool EthMaintainer::command_eeprom_read | ( | eOipv4addr_t | ipv4, |
uint16_t | from, | ||
uint16_t | size, | ||
uint8_t ** | value | ||
) |
Definition at line 188 of file EthMaintainer.cpp.
bool EthMaintainer::command_info32_clr | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 2282 of file EthMaintainer.cpp.
vector< string > EthMaintainer::command_info32_get | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 2342 of file EthMaintainer.cpp.
bool EthMaintainer::command_info32_set | ( | eOipv4addr_t | ipv4, |
const string & | info32 | ||
) |
Definition at line 2303 of file EthMaintainer.cpp.
bool EthMaintainer::command_jump2address | ( | eOipv4addr_t | ipv4, |
uint32_t | romaddress | ||
) |
Definition at line 2449 of file EthMaintainer.cpp.
bool EthMaintainer::command_jump2updater | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 2428 of file EthMaintainer.cpp.
bool EthMaintainer::command_program | ( | eOipv4addr_t | ipv4, |
FILE * | programFile, | ||
eOuprot_partition2prog_t | partition, | ||
void(*)(float) | updateProgressBar, | ||
EthBoardList * | pboardlist, | ||
string & | stringresult | ||
) |
Definition at line 244 of file EthMaintainer.cpp.
bool EthMaintainer::command_restart | ( | eOipv4addr_t | ipv4 | ) |
Definition at line 2090 of file EthMaintainer.cpp.
bool EthMaintainer::command_supported | ( | eOipv4addr_t | ipv4, |
eOuprot_proc_capabilities_t | capability, | ||
bool | ask2board = false |
||
) |
Definition at line 1425 of file EthMaintainer.cpp.
void EthMaintainer::debugprint | ( | bool | on | ) |
Definition at line 133 of file EthMaintainer.cpp.
EthBoardList EthMaintainer::discover | ( | bool | clearbeforediscovery = true , |
int | numberofdiscoveries = 1 , |
||
double | waittimeout = 1.0 |
||
) |
Definition at line 1344 of file EthMaintainer.cpp.
|
protected |
Definition at line 1226 of file EthMaintainer.cpp.
bool EthMaintainer::go2application | ( | eOipv4addr_t | ipv4, |
bool | checkdef2runapplication = true , |
||
double | bootstraptime = 10.0 , |
||
bool | verify = true |
||
) |
Definition at line 1620 of file EthMaintainer.cpp.
bool EthMaintainer::go2maintenance | ( | eOipv4addr_t | ipv4, |
bool | verify = true , |
||
int | retries = 6 , |
||
double | timegap = 1.0 |
||
) |
Definition at line 1552 of file EthMaintainer.cpp.
EthBoardList EthMaintainer::information | ( | eOipv4addr_t | ipv4, |
bool | ask2board = true , |
||
bool | forcemaintenance = true , |
||
int | numberofrequests = 1 , |
||
double | waittimeout = 1.0 |
||
) |
Definition at line 1459 of file EthMaintainer.cpp.
|
protected |
Definition at line 641 of file EthMaintainer.cpp.
|
protected |
Definition at line 620 of file EthMaintainer.cpp.
std::string EthMaintainer::moreinformation | ( | eOipv4addr_t | ipv4, |
bool | forcemaintenance = false |
||
) |
Definition at line 1509 of file EthMaintainer.cpp.
bool EthMaintainer::open | ( | eOipv4addr_t | ipv4 = hostIPaddress , |
eOipv4port_t | port = mainIPport |
||
) |
Definition at line 94 of file EthMaintainer.cpp.
|
protected |
Definition at line 1118 of file EthMaintainer.cpp.
|
protected |
Definition at line 1016 of file EthMaintainer.cpp.
|
protected |
Definition at line 662 of file EthMaintainer.cpp.
|
protected |
Definition at line 860 of file EthMaintainer.cpp.
bool EthMaintainer::program | ( | eOipv4addr_t | ipv4, |
eObrd_ethtype_t | type, | ||
eOuprot_process_t | process, | ||
eOversion_t | targetversion, | ||
FILE * | fp, | ||
bool | forcemaintenance = true , |
||
void | progressfloat = NULL , |
||
bool | restart2application = true |
||
) |
Definition at line 1727 of file EthMaintainer.cpp.
|
protected |
Definition at line 589 of file EthMaintainer.cpp.
|
protected |
Definition at line 1247 of file EthMaintainer.cpp.
void EthMaintainer::verbose | ( | bool | on | ) |
Definition at line 127 of file EthMaintainer.cpp.
|
protected |
Definition at line 258 of file EthMaintainer.h.
|
protected |
Definition at line 261 of file EthMaintainer.h.
|
protected |
Definition at line 256 of file EthMaintainer.h.
|
protected |
Definition at line 260 of file EthMaintainer.h.
|
protected |
Definition at line 257 of file EthMaintainer.h.
|
static |
Definition at line 56 of file EthMaintainer.h.
|
static |
Definition at line 60 of file EthMaintainer.h.
|
static |
Definition at line 59 of file EthMaintainer.h.
|
static |
Definition at line 57 of file EthMaintainer.h.
|
protected |
Definition at line 264 of file EthMaintainer.h.
|
protected |
Definition at line 270 of file EthMaintainer.h.
|
protected |
Definition at line 265 of file EthMaintainer.h.
|
protected |
Definition at line 267 of file EthMaintainer.h.
|
protected |
Definition at line 268 of file EthMaintainer.h.