1 #ifndef FIRMWAREUPDATERCORE_H
2 #define FIRMWAREUPDATERCORE_H
6 #include <yarp/os/all.h>
10 #include <yarp/dev/all.h>
13 using namespace yarp::os;
15 #define DEFAULT_IP_ADDRESS "10.0.1.104"
16 #define DEFAULT_IP_PORT 3333
24 bool init(Searchable& config,
int port, QString address,
int VerbositY);
25 bool setVerbosity(
int verb);
26 QStringList getDevicesName();
27 QList<QPair<QString,QVariant> > getDevices();
28 int connectTo(QString device, QString
id);
29 bool isBoardInMaintenanceMode(QString ip);
30 void disconnectFrom(QString device, QString
id);
32 void setSelectedEthBoard(
int index,
bool selected);
33 void setSelectedEthBoard(QString boardIp,
bool selected);
34 void setSelectedCanBoard(
int index,
bool selected, QString ethAddress =
"",
int deviceId = -1);
35 void setSelectedCanBoards(QList <sBoard> selectedBoards, QString address,
int deviceId = -1);
38 QList<sBoard> getCanBoardsFromDriver(QString driver,
int networkId, QString *retString,
bool force =
false);
39 void blinkEthBoards();
40 QString getEthBoardInfo(
int index);
41 QString getEthBoardAddress(
int index);
42 bool setEthBoardInfo(
int index, QString newInfo);
43 void setCanBoardInfo(
int bus,
int id, QString newInfo, QString ethAddress =
"",
int deviceId = -1, QString *resultString = NULL);
44 bool setEthBoardAddress(
int index, QString newAddress);
45 bool setCanBoardAddress(
int bus,
int id,
int canType, QString newAddress, QString ethAddress =
"",
int deviceId = -1, QString *resultString = NULL);
46 void restartEthBoards();
47 void bootFromApplication();
48 void bootFromUpdater();
49 bool uploadEthApplication(QString filename, QString *resultString);
50 bool uploadCanApplication(QString filename, QString *resultString,
bool ee, QString address =
"",
int deviceId = -1, QList<sBoard> *resultCanBoards = NULL);
51 bool uploadLoader(QString filename, QString *resultString);
52 bool uploadUpdater(QString filename, QString *resultString);
55 bool goToApplication();
56 bool goToMaintenance();
59 QString getProcessFromUint(uint8_t
id,
bool isMultiCore =
false);
66 bool isValidIpAddress(QString addr);
69 QList < QPair<QString,QVariant> > devices;
74 QString currentAddress;
75 QString currentDriver;
77 QList <sBoard> canBoards;
79 eOipv4addr_t hostIPaddress;
static const eOipv4addr_t ipv4OfAllSelected
void updateProgress(float)
static bool compile_ip_addresses(const char *addr)