|
BOLT Dash (C++)
|
A class to represent the C++ backend of the dash which can be included in QML to give the frontend access. More...
#include <backend.h>
Public Member Functions | |
| Backend (QObject *parent=nullptr) | |
| Create Backend class which can be included in QML. | |
| double | motorTemp () const |
| Get the motor temperature. | |
| double | auxVoltage () const |
| Get the voltage of the aux pack. | |
| double | auxPercent () const |
| Get the percent charge of the aux pack. | |
| double | packSOC () const |
| Get the state of charge of the main battery. | |
| double | packVoltage () const |
| Get the voltage of the main battery. | |
| double | highCellTemp () const |
| Get the highest cell temperature in the pack. | |
| double | lowCellTemp () const |
| Get the lowest cell temperature in the pack. | |
| double | bmsTemp () const |
| Get the temeprature of the BMS. | |
| double | motorSpeed () const |
| Get the speed of the motor. | |
| double | bikeSpeed () const |
| Get the speed of the bike. | |
| double | mcTemp () const |
| Get the temperature of the motor controller. | |
| bool | bmsFault () const |
| Get whether or not there is a BMS fault. | |
| bool | mcFault () const |
| Get whether or not there is a motor controller fault. | |
| bool | motorOn () const |
| Get whether or not the motor is currently active. | |
| int | bikeStatus () const |
| Get the current status of the bike. | |
| double | packCurrent () const |
| Get the current flowing from the main pack. | |
| bool | bmsError () const |
| Get whether or not there is a BMS error. | |
| bool | bmsWarning () const |
| Get whether or not there is a BMS warning. | |
| uint32_t | bmsErrorCodes () const |
| Get the BMS error codes as a bitfield. | |
| std::vector< QString > | bmsErrorCodesString () const |
| Get the BMS error codes as a vector of strings. | |
| double | lat () const |
| Get the latitude of the bike. | |
| double | lon () const |
| Get the longitude of the bike. | |
| void | setMotorTemp (const double temp) |
| Set the Motor Temperature parameter, will get overwritten internally. | |
| void | setAuxVoltage (const double cap) |
| Set the Aux Voltage parameter, will get overwritten internally. | |
| void | setAuxPercent (const double cap) |
| Set the Aux Percent parameter, will get overwritten internally. | |
| void | setPackSOC (const double soc) |
| Set the Pack SOC parameter, will get overwritten internally. | |
| void | setPackVoltage (const double voltage) |
| Set the Pack Voltage parameter, will get overwritten internally. | |
| void | setHighCellTemp (const double temp) |
| Set the High Cell Temp parameter, will get overwritten internally. | |
| void | setLowCellTemp (const double temp) |
| Set the Low Cell Temp parameter, will get overwritten internally. | |
| void | setBmsTemp (const double temp) |
| Set the BMS Temp parameter, will get overwritten internally. | |
| void | setMotorSpeed (const double speed) |
| Set the Motor Speed parameter, will get overwritten internally. | |
| void | setBikeSpeed (const double speed) |
| Set the Bike Speed parameter, will get overwritten internally. | |
| void | setMcTemp (const double temp) |
| Set the MC Temp parameter, will get overwritten internally. | |
| void | setBmsFault (const bool fault) |
| Set the BMS Fault parameter, will get overwritten internally. | |
| void | setMcFault (const bool fault) |
| Set the MC Fault parameter, will get overwritten internally. | |
| void | setMotorOn (const bool on) |
| Set the Motor On parameter, will get overwritten internally. | |
| void | setBikeStatus (const int status) |
| Set the Bike Status parameter, will get overwritten internally. | |
| void | setPackCurrent (const double current) |
| Set the Pack Current parameter, will get overwritten internally. | |
| void | setBmsError (const bool error) |
| Set the BMS Error parameter, will get overwritten internally. | |
| void | setBmsWarning (const bool warning) |
| Set the BMS Warning parameter, will get overwritten internally. | |
| void | setBmsErrorCodes (const uint32_t warnings) |
| Set the BMS Error Codes parameter, will get overwritten internally. | |
| void | setBmsErrorCodesString (const std::vector< QString > warnings) |
| Set the BMS Error Codes String parameter, will get overwritten internally. | |
| void | setLat (const double lat) |
| Set the Latitude parameter, will get overwritten internally. | |
| void | setLon (const double lon) |
| Set the Longitude parameter, will get overwritten internally. | |
A class to represent the C++ backend of the dash which can be included in QML to give the frontend access.
|
explicit |
| double Backend::auxPercent | ( | ) | const |
Get the percent charge of the aux pack.
| double Backend::auxVoltage | ( | ) | const |
Get the voltage of the aux pack.
| double Backend::bikeSpeed | ( | ) | const |
Get the speed of the bike.
| int Backend::bikeStatus | ( | ) | const |
Get the current status of the bike.
| bool Backend::bmsError | ( | ) | const |
Get whether or not there is a BMS error.
| uint32_t Backend::bmsErrorCodes | ( | ) | const |
Get the BMS error codes as a bitfield.
| std::vector< QString > Backend::bmsErrorCodesString | ( | ) | const |
Get the BMS error codes as a vector of strings.
| bool Backend::bmsFault | ( | ) | const |
Get whether or not there is a BMS fault.
| double Backend::bmsTemp | ( | ) | const |
Get the temeprature of the BMS.
| bool Backend::bmsWarning | ( | ) | const |
Get whether or not there is a BMS warning.
| double Backend::highCellTemp | ( | ) | const |
Get the highest cell temperature in the pack.
| double Backend::lat | ( | ) | const |
Get the latitude of the bike.
| double Backend::lon | ( | ) | const |
Get the longitude of the bike.
| double Backend::lowCellTemp | ( | ) | const |
Get the lowest cell temperature in the pack.
| bool Backend::mcFault | ( | ) | const |
Get whether or not there is a motor controller fault.
| double Backend::mcTemp | ( | ) | const |
Get the temperature of the motor controller.
| bool Backend::motorOn | ( | ) | const |
Get whether or not the motor is currently active.
| double Backend::motorSpeed | ( | ) | const |
Get the speed of the motor.
| double Backend::motorTemp | ( | ) | const |
Get the motor temperature.
| double Backend::packCurrent | ( | ) | const |
Get the current flowing from the main pack.
| double Backend::packSOC | ( | ) | const |
Get the state of charge of the main battery.
| double Backend::packVoltage | ( | ) | const |
Get the voltage of the main battery.
| void Backend::setAuxPercent | ( | const double | cap | ) |
Set the Aux Percent parameter, will get overwritten internally.
| cap | The percent to set |
| void Backend::setAuxVoltage | ( | const double | cap | ) |
Set the Aux Voltage parameter, will get overwritten internally.
| cap | The temperature to set in degrees Celsius |
| void Backend::setBikeSpeed | ( | const double | speed | ) |
Set the Bike Speed parameter, will get overwritten internally.
| speed | The speed to set in mph |
| void Backend::setBikeStatus | ( | const int | status | ) |
Set the Bike Status parameter, will get overwritten internally.
| status | The status of the bike |
| void Backend::setBmsError | ( | const bool | error | ) |
Set the BMS Error parameter, will get overwritten internally.
| error | Whether or not there is an error |
| void Backend::setBmsErrorCodes | ( | const uint32_t | warnings | ) |
Set the BMS Error Codes parameter, will get overwritten internally.
| warnings | The error codes to set |
| void Backend::setBmsErrorCodesString | ( | const std::vector< QString > | warnings | ) |
Set the BMS Error Codes String parameter, will get overwritten internally.
| warnings | The error codes to set |
| void Backend::setBmsFault | ( | const bool | fault | ) |
Set the BMS Fault parameter, will get overwritten internally.
| fault | Whether or not there is a fault |
| void Backend::setBmsTemp | ( | const double | temp | ) |
Set the BMS Temp parameter, will get overwritten internally.
| temp | The temperature to set in degrees Celsius |
| void Backend::setBmsWarning | ( | const bool | warning | ) |
Set the BMS Warning parameter, will get overwritten internally.
| warning | Whether or not there is a warning |
| void Backend::setHighCellTemp | ( | const double | temp | ) |
Set the High Cell Temp parameter, will get overwritten internally.
| temp | The temperature to set in degrees Celsius |
| void Backend::setLat | ( | const double | lat | ) |
Set the Latitude parameter, will get overwritten internally.
| lat | The latitude to set in degrees |
| void Backend::setLon | ( | const double | lon | ) |
Set the Longitude parameter, will get overwritten internally.
| lon | The longitude to set in degrees |
| void Backend::setLowCellTemp | ( | const double | temp | ) |
Set the Low Cell Temp parameter, will get overwritten internally.
| temp | The temperature to set in degrees Celsius |
| void Backend::setMcFault | ( | const bool | fault | ) |
Set the MC Fault parameter, will get overwritten internally.
| fault | Whether or not there is a fault |
| void Backend::setMcTemp | ( | const double | temp | ) |
Set the MC Temp parameter, will get overwritten internally.
| temp | The temperature to set in degrees Celsius |
| void Backend::setMotorOn | ( | const bool | on | ) |
Set the Motor On parameter, will get overwritten internally.
| on | Whether or not the motor is on |
| void Backend::setMotorSpeed | ( | const double | speed | ) |
Set the Motor Speed parameter, will get overwritten internally.
| speed | The speed to set in RPM |
| void Backend::setMotorTemp | ( | const double | temp | ) |
Set the Motor Temperature parameter, will get overwritten internally.
| temp | The temperature to set in degrees Celsius |
| void Backend::setPackCurrent | ( | const double | current | ) |
Set the Pack Current parameter, will get overwritten internally.
| current | The current to set in amps |
| void Backend::setPackSOC | ( | const double | soc | ) |
Set the Pack SOC parameter, will get overwritten internally.
| soc | The percent to set |
| void Backend::setPackVoltage | ( | const double | voltage | ) |
Set the Pack Voltage parameter, will get overwritten internally.
| voltage | The voltage to set in volts |