iCub-main
Enumerations | Functions | Variables
main.cpp File Reference
#include "mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QFileInfo>
#include <qdebug.h>
#include <QDir>
#include "firmwareupdatercore.h"
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Enumerations

enum  action_t {
  action_impossible = -1 ,
  action_none = 0 ,
  action_discover = 1 ,
  action_verify = 2 ,
  action_program = 3 ,
  action_forcemaintenance = 4 ,
  action_forceapplication = 5 ,
  action_query = 6 ,
  action_loaddatfile = 7 ,
  action_setstrainsn = 8 ,
  action_setstraingainsoffsets = 9 ,
  action_getcanboardversion = 10 ,
  action_savedatfile = 11 ,
  action_changeCanId = 12 ,
  action_changeBoardIp = 13 ,
  action_setstrainft45gainsoffsets = 14 ,
  action_setstrainft58gainsoffsets = 15 ,
  action_setstraingainsspecificoffsets = 16
}
 
enum class  SensorModel {
  ft45 ,
  ft58
}
 

Functions

bool checkApplicationLock ()
 
void removeApplicationLock ()
 
void printCanDevices (QList< sBoard > canBoards, QString onIPboard, bool slimprint)
 
int printSecondLevelDevices (FirmwareUpdaterCore *, QString device, QString id, bool slimprint)
 
int printThirdLevelDevices (FirmwareUpdaterCore *, QString device, QString id, QString board, bool forceMaintenance, bool forceApplication, bool slimprint)
 
int programEthDevice (FirmwareUpdaterCore *, QString device, QString id, QString board, QString file)
 
int programCanDevice (FirmwareUpdaterCore *, QString device, QString id, QString board, QString canLine, QString canId, QString file, bool eraseEEprom)
 
int setBoardToApplication (FirmwareUpdaterCore *core, QString device, QString id, QString board)
 
int setBoardToMaintenance (FirmwareUpdaterCore *core, QString device, QString id, QString board)
 
int verifyOnSecondLevel (FirmwareUpdaterCore *core, QString device, QString id, const QString &targetIPaddr, const QString &targetCANline, const QString &targetCANaddr, const QString &targetFWvers)
 
int verifyOnSecondLevel_ETHboard (FirmwareUpdaterCore *core, QString device, QString id, const QString &targetIPaddr, const QString &targetFWvers)
 
int verifyOnSecondLevel_CANboard (FirmwareUpdaterCore *core, QString device, QString id, const QString &targetCANline, const QString &targetCANaddr, const QString &targetFWvers)
 
int verifyCanDevices (QList< sBoard > canBoards, const QString &targetCANline, const QString &targetCANaddr, const QString &targetFWvers)
 
int verifyOnThirdLevel_CANunderETH (FirmwareUpdaterCore *core, QString device, QString id, QString board, const QString &targetCANline, const QString &targetCANaddr, const QString &targetFWvers)
 
int queryOnSecondLevel_ETHboard (FirmwareUpdaterCore *core, QString device, QString id, const QString &targetIPaddr)
 
int queryOnSecondLevel_CANboard (FirmwareUpdaterCore *core, QString device, QString id, const QString &targetCANline, const QString &targetCANaddr)
 
int queryCanDevices (QList< sBoard > canBoards, const QString onIPboard, const QString &targetCANline, const QString &targetCANaddr)
 
int queryOnThirdLevel_CANunderETH (FirmwareUpdaterCore *core, QString device, QString id, const QString board, const QString &targetCANline, const QString &targetCANaddr)
 
int loadDatFileStrain2 (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString canLine, QString canId, QString file, bool eraseEEprom)
 
int saveDatFileStrain2 (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString canLine, QString canId, bool eraseEEprom)
 
int setStrainSn (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString canLine, QString canId, QString serialNumber)
 
int setStrainGainsOffsets (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString canLine, QString canId, SensorModel model)
 
int getCanBoardVersion (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString canLine, QString canId, bool save)
 
int changeCanId (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString canLine, QString canId, QString canIdNew)
 
int changeBoardIp (FirmwareUpdaterCore *core, QString device, QString id, QString board, QString newipaddr)
 
void checkForAction (bool &actionIsValid, action_t const &actionValue, action_t &actionResult)
 
int main (int argc, char *argv[])
 

Variables

int verbosity = 1
 

Enumeration Type Documentation

◆ action_t

enum action_t
Enumerator
action_impossible 
action_none 
action_discover 
action_verify 
action_program 
action_forcemaintenance 
action_forceapplication 
action_query 
action_loaddatfile 
action_setstrainsn 
action_setstraingainsoffsets 
action_getcanboardversion 
action_savedatfile 
action_changeCanId 
action_changeBoardIp 
action_setstrainft45gainsoffsets 
action_setstrainft58gainsoffsets 
action_setstraingainsspecificoffsets 

Definition at line 21 of file main.cpp.

◆ SensorModel

enum SensorModel
strong
Enumerator
ft45 
ft58 

Definition at line 43 of file main.cpp.

Function Documentation

◆ changeBoardIp()

int changeBoardIp ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  newipaddr 
)

Definition at line 779 of file main.cpp.

◆ changeCanId()

int changeCanId ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
QString  canIdNew 
)

Definition at line 807 of file main.cpp.

◆ checkApplicationLock()

bool checkApplicationLock ( )

Definition at line 1840 of file main.cpp.

◆ checkForAction()

void checkForAction ( bool &  actionIsValid,
action_t const &  actionValue,
action_t actionResult 
)

Definition at line 732 of file main.cpp.

◆ getCanBoardVersion()

int getCanBoardVersion ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
bool  save 
)

Definition at line 863 of file main.cpp.

◆ loadDatFileStrain2()

int loadDatFileStrain2 ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
QString  file,
bool  eraseEEprom 
)

Definition at line 1099 of file main.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 82 of file main.cpp.

◆ printCanDevices()

void printCanDevices ( QList< sBoard canBoards,
QString  onIPboard,
bool  slimprint 
)

Definition at line 1735 of file main.cpp.

◆ printSecondLevelDevices()

int printSecondLevelDevices ( FirmwareUpdaterCore core,
QString  device,
QString  id,
bool  slimprint 
)

Definition at line 1597 of file main.cpp.

◆ printThirdLevelDevices()

int printThirdLevelDevices ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
bool  forceMaintenance,
bool  forceApplication,
bool  slimprint 
)

Definition at line 1694 of file main.cpp.

◆ programCanDevice()

int programCanDevice ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
QString  file,
bool  eraseEEprom 
)

Definition at line 1489 of file main.cpp.

◆ programEthDevice()

int programEthDevice ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  file 
)

Definition at line 1564 of file main.cpp.

◆ queryCanDevices()

int queryCanDevices ( QList< sBoard canBoards,
const QString  onIPboard,
const QString &  targetCANline,
const QString &  targetCANaddr 
)

Definition at line 2281 of file main.cpp.

◆ queryOnSecondLevel_CANboard()

int queryOnSecondLevel_CANboard ( FirmwareUpdaterCore core,
QString  device,
QString  id,
const QString &  targetCANline,
const QString &  targetCANaddr 
)

Definition at line 2360 of file main.cpp.

◆ queryOnSecondLevel_ETHboard()

int queryOnSecondLevel_ETHboard ( FirmwareUpdaterCore core,
QString  device,
QString  id,
const QString &  targetIPaddr 
)

Definition at line 2167 of file main.cpp.

◆ queryOnThirdLevel_CANunderETH()

int queryOnThirdLevel_CANunderETH ( FirmwareUpdaterCore core,
QString  device,
QString  id,
const QString  board,
const QString &  targetCANline,
const QString &  targetCANaddr 
)

Definition at line 2227 of file main.cpp.

◆ removeApplicationLock()

void removeApplicationLock ( )

Definition at line 1870 of file main.cpp.

◆ saveDatFileStrain2()

int saveDatFileStrain2 ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
bool  eraseEEprom 
)

Definition at line 1300 of file main.cpp.

◆ setBoardToApplication()

int setBoardToApplication ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board 
)

Definition at line 1463 of file main.cpp.

◆ setBoardToMaintenance()

int setBoardToMaintenance ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board 
)

Definition at line 1475 of file main.cpp.

◆ setStrainGainsOffsets()

int setStrainGainsOffsets ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
SensorModel  model 
)

Definition at line 934 of file main.cpp.

◆ setStrainSn()

int setStrainSn ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
QString  canLine,
QString  canId,
QString  serialNumber 
)

Definition at line 1038 of file main.cpp.

◆ verifyCanDevices()

int verifyCanDevices ( QList< sBoard canBoards,
const QString &  targetCANline,
const QString &  targetCANaddr,
const QString &  targetFWvers 
)

Definition at line 2066 of file main.cpp.

◆ verifyOnSecondLevel()

int verifyOnSecondLevel ( FirmwareUpdaterCore core,
QString  device,
QString  id,
const QString &  targetIPaddr,
const QString &  targetCANline,
const QString &  targetCANaddr,
const QString &  targetFWvers 
)

Definition at line 1889 of file main.cpp.

◆ verifyOnSecondLevel_CANboard()

int verifyOnSecondLevel_CANboard ( FirmwareUpdaterCore core,
QString  device,
QString  id,
const QString &  targetCANline,
const QString &  targetCANaddr,
const QString &  targetFWvers 
)

Definition at line 2046 of file main.cpp.

◆ verifyOnSecondLevel_ETHboard()

int verifyOnSecondLevel_ETHboard ( FirmwareUpdaterCore core,
QString  device,
QString  id,
const QString &  targetIPaddr,
const QString &  targetFWvers 
)

Definition at line 1967 of file main.cpp.

◆ verifyOnThirdLevel_CANunderETH()

int verifyOnThirdLevel_CANunderETH ( FirmwareUpdaterCore core,
QString  device,
QString  id,
QString  board,
const QString &  targetCANline,
const QString &  targetCANaddr,
const QString &  targetFWvers 
)

Definition at line 2119 of file main.cpp.

Variable Documentation

◆ verbosity

int verbosity = 1

Definition at line 17 of file main.cpp.