diff --git a/.appveyor.yml b/.appveyor.yml index d401d09f7..175ae464e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,7 +35,7 @@ build_script: set PATH=C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH% - cmake .. -G %GENERATOR% -DCMAKE_PREFIX_PATH=%QT_PATH% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% + cmake .. -G %GENERATOR% -DCMAKE_PREFIX_PATH=%QT_PATH% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBOOST_INCLUDEDIR=C:\Libraries\boost_1_67_0 cmake --build . --config %BUILD_TYPE% diff --git a/.gitignore b/.gitignore index 0fff6379f..7b7d85c3b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ build *.user .vimrc .ycm_extra_conf.py - +.*.un~ diff --git a/.gitmodules b/.gitmodules index 38c4d59f0..6186a5d4c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,6 +19,9 @@ [submodule "3rdParty/cxxopts"] path = 3rdParty/cxxopts url = https://github.com/jarro2783/cxxopts.git +[submodule "3rdParty/CANdb"] + path = 3rdParty/CANdb + url = https://github.com/GENIVI/CANdb.git [submodule "3rdParty/catch"] path = 3rdParty/catch url = https://github.com/catchorg/Catch2 diff --git a/3rdParty/CANdb b/3rdParty/CANdb new file mode 160000 index 000000000..5ec36c93b --- /dev/null +++ b/3rdParty/CANdb @@ -0,0 +1 @@ +Subproject commit 5ec36c93b36b1ec07974ec3877e5ef4ae3a18ec3 diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index c5c0c5d24..3ed6f696e 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -12,6 +12,9 @@ target_include_directories(rwqueue INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/readerw add_subdirectory(nodeeditor) + +add_subdirectory(CANdb) + if(LINUX) add_subdirectory(3rdParty/qtCannelloniCanBus) diff --git a/CMakeLists.txt b/CMakeLists.txt index a813ed102..10be3b42c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,10 +54,11 @@ message(STATUS "Qt Version found: ${Qt5Core_VERSION}") set_property(TARGET Qt5::SerialBus PROPERTY INTERFACE_COMPILE_FEATURES "") set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES "") +# Limit TYPESTRING to 128 (i.e. 2^7). 64 causes VS2015 internal error. if(NOT MSVC) - add_definitions(-Wall -Wextra) + add_definitions(-Wall -Wextra -DUSE_TYPESTRING=7) else() - add_definitions( /bigobj) + add_definitions( /bigobj /D USE_TYPESTRING=7) endif() include(CompilerVersion) @@ -69,7 +70,9 @@ if(WITH_COVERAGE) setup_target_for_coverage(NAME coverage EXECUTABLE ctest DEPENDENCIES candevice_test) endif() -set(CMAKE_CXX_FLAGS_RELEASE "-O3") +if(UNIX) + set(CMAKE_CXX_FLAGS_RELEASE "-O3") +endif() set(SPDLOG_BUILD_TESTING OFF CACHE BOOL "") set(BUILD_EXAMPLES OFF CACHE BOOL "") diff --git a/codecov.yml b/codecov.yml index 64689b3ca..07d4e3a27 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,6 +3,7 @@ coverage: - "src/components/canrawsender/gui" - "src/components/canrawview/gui" - "src/components/canrawfilter/gui" + - "src/components/cansignaldata/gui" - "src/components/canload/canloadpainter.h" - "src/common/guiinterface" - "src/common/nodepainter.h" diff --git a/files/css/darkStyle.css b/files/css/darkStyle.css index 1ac0df3fb..5e1fea35f 100644 --- a/files/css/darkStyle.css +++ b/files/css/darkStyle.css @@ -131,7 +131,7 @@ QPushButton#pbStartNew, #pbStartOpen, #close { border: 0px; } -QWidget#CanRawSenderPrivate, #CanRawViewPrivate, #CanRawFilterPrivate { +QWidget#CanRawSenderPrivate, #CanRawViewPrivate, #CanRawFilterPrivate, #CanSignalDataPrivate { background-color: #616161; } @@ -139,6 +139,12 @@ QToolButton#toolSwitch { image: url(:/images/files/images/light/CANbus_icon_Switch_dark.svg); } +QLineEdit#searchLine { + background-color: #3a3a3a; + border : 1px solid #adadad; + padding: 2px; +} + QCheckBox[type=sectionHeader] { spacing: 43px; color: #767676; diff --git a/files/css/lightStyle.css b/files/css/lightStyle.css index 5f0658e8c..2fbe2d1b6 100644 --- a/files/css/lightStyle.css +++ b/files/css/lightStyle.css @@ -129,11 +129,13 @@ QPushButton[flat="true"] { margin: 0px; padding: 0px; background-color: #ffffff; + color: #a6a6a6; } QPushButton[flat="true"]:pressed { border: 2px solid #adadad; background-color: #eeeeee; + color: #a6a6a6; } QPushButton[flat="true"]:checked { @@ -145,6 +147,11 @@ QToolButton#toolSwitch { image: url(:/images/files/images/light/CANbus_icon_Switch.svg); } +QLineEdit#searchLine { + border : 1px solid #adadad; + padding: 2px; +} + QCheckBox[type=sectionHeader] { background: #dcdcdc; spacing: 43px; @@ -199,7 +206,19 @@ QPushButton[type="recentProjectFile"] { font-size: 12px; } -QPushButton:pressed[type="recentProjectName"], QPushButton:pressed[type="recentProjectFile"], #pbStartNew, #pbStartOpen, #close { +QPushButton:pressed[type="recentProjectFile"] { + border: 0px; + background: #ffffff; + color: #919191; +} + +QPushButton:pressed[type="recentProjectName"] { + border: 0px; + background: #ffffff; + color: #0d6188; +} + +QPushButton:pressed#pbStartNew, #pbStartOpen, #close { border: 0px; } diff --git a/src/common/datamodeltypes/candbdata.h b/src/common/datamodeltypes/candbdata.h new file mode 100644 index 000000000..eabe69f7b --- /dev/null +++ b/src/common/datamodeltypes/candbdata.h @@ -0,0 +1,31 @@ +#ifndef __CANDBDATA_H +#define __CANDBDATA_H + +#include +#include + +using DbData_t = std::map>; + +class CanDbData : public NodeData { +public: + CanDbData(){}; + CanDbData(const DbData_t& messages) + : _messages(messages) + { + } + + NodeDataType type() const override + { + return NodeDataType{ "DbData", "DB" }; + } + + DbData_t messages() const + { + return _messages; + } + +private: + DbData_t _messages; +}; + +#endif /* !__CANDBDATA_H */ diff --git a/src/components/cansignaldata/CMakeLists.txt b/src/components/cansignaldata/CMakeLists.txt new file mode 100644 index 000000000..042723754 --- /dev/null +++ b/src/components/cansignaldata/CMakeLists.txt @@ -0,0 +1,32 @@ +set(COMPONENT_NAME cansignaldata) + +set(SRC + gui/cansignaldata.ui + gui/cansignaldataguiimpl.h + cansignaldata.cpp + cansignaldata_p.cpp + cansignaldatamodel.cpp + searchmodel.cpp +) + +add_library(${COMPONENT_NAME} ${SRC}) +target_link_libraries(${COMPONENT_NAME} cds-common CANdb) +target_include_directories(${COMPONENT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + +if(WITH_TESTS) + add_executable(${COMPONENT_NAME}_test tests/${COMPONENT_NAME}_test.cpp) + target_link_libraries(${COMPONENT_NAME}_test ${COMPONENT_NAME} Qt5::Test fakeit) + add_test(NAME ${COMPONENT_NAME}_test COMMAND ${COMPONENT_NAME}_test) + + add_executable(${COMPONENT_NAME}model_test tests/${COMPONENT_NAME}model_test.cpp) + target_link_libraries(${COMPONENT_NAME}model_test ${COMPONENT_NAME} Qt5::Test fakeit) + add_test(NAME ${COMPONENT_NAME}model_test COMMAND ${COMPONENT_NAME}model_test) + + set(DBC_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/tests/dbc) + set(DBC_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/dbc) + add_custom_command(TARGET ${COMPONENT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory ${DBC_SOURCE} ${DBC_DESTINATION}) + + target_compile_definitions(${COMPONENT_NAME}_test PRIVATE DBC_PATH="${DBC_DESTINATION}") + target_compile_definitions(${COMPONENT_NAME}model_test PRIVATE DBC_PATH="${DBC_DESTINATION}") +endif() diff --git a/src/components/cansignaldata/cansignaldata.cpp b/src/components/cansignaldata/cansignaldata.cpp new file mode 100644 index 000000000..9d012eaab --- /dev/null +++ b/src/components/cansignaldata/cansignaldata.cpp @@ -0,0 +1,82 @@ +#include "cansignaldata.h" +#include "cansignaldata_p.h" +#include +#include + +CanSignalData::CanSignalData() + : d_ptr(new CanSignalDataPrivate(this)) +{ +} + +CanSignalData::CanSignalData(CanSignalDataCtx&& ctx) + : d_ptr(new CanSignalDataPrivate(this, std::move(ctx))) +{ +} + +CanSignalData::~CanSignalData() +{ +} + +QWidget* CanSignalData::mainWidget() +{ + Q_D(CanSignalData); + + return d->_ui.mainWidget(); +} + +void CanSignalData::setConfig(const QJsonObject& json) +{ + d_ptr->setSettings(json); +} + +void CanSignalData::setConfig(const QWidget& qobject) +{ + Q_D(CanSignalData); + + configHelpers::setQConfig(qobject, getSupportedProperties(), d->_props); +} + +QJsonObject CanSignalData::getConfig() const +{ + return d_ptr->getSettings(); +} + +std::shared_ptr CanSignalData::getQConfig() const +{ + const Q_D(CanSignalData); + + return configHelpers::getQConfig(getSupportedProperties(), d->_props); +} + +void CanSignalData::configChanged() +{ + QString fileName = getQConfig()->property("file").toString(); + + cds_info("File to open: '{}'", fileName.toStdString()); + + d_ptr->loadDbc(fileName.toStdString()); +} + +bool CanSignalData::mainWidgetDocked() const +{ + return d_ptr->_docked; +} + +ComponentInterface::ComponentProperties CanSignalData::getSupportedProperties() const +{ + return d_ptr->getSupportedProperties(); +} + +void CanSignalData::stopSimulation() +{ + Q_D(CanSignalData); + + d->_simStarted = false; +} + +void CanSignalData::startSimulation() +{ + Q_D(CanSignalData); + + d->_simStarted = true; +} diff --git a/src/components/cansignaldata/cansignaldata.h b/src/components/cansignaldata/cansignaldata.h new file mode 100644 index 000000000..4f778bdeb --- /dev/null +++ b/src/components/cansignaldata/cansignaldata.h @@ -0,0 +1,48 @@ +#ifndef CANSIGNALDATA_H +#define CANSIGNALDATA_H + +#include +#include +#include +#include +#include +#include + +class CanSignalDataPrivate; +class QWidget; +struct CanSignalDataGuiInt; +typedef Context CanSignalDataCtx; + +Q_DECLARE_METATYPE(CANmessages_t); + +class CanSignalData : public QObject, public ComponentInterface { + Q_OBJECT + Q_DECLARE_PRIVATE(CanSignalData) + +public: + CanSignalData(); + explicit CanSignalData(CanSignalDataCtx&& ctx); + ~CanSignalData(); + + QWidget* mainWidget() override; + void setConfig(const QJsonObject& json) override; + void setConfig(const QWidget& qobject) override; + QJsonObject getConfig() const override; + std::shared_ptr getQConfig() const override; + void configChanged() override; + bool mainWidgetDocked() const override; + ComponentInterface::ComponentProperties getSupportedProperties() const override; + +signals: + void mainWidgetDockToggled(QWidget* widget) override; + void canDbUpdated(const CANmessages_t& messages); + +public slots: + void stopSimulation() override; + void startSimulation() override; + +private: + QScopedPointer d_ptr; +}; + +#endif // CANSIGNALDATA_H diff --git a/src/components/cansignaldata/cansignaldata_p.cpp b/src/components/cansignaldata/cansignaldata_p.cpp new file mode 100644 index 000000000..d627c6c2e --- /dev/null +++ b/src/components/cansignaldata/cansignaldata_p.cpp @@ -0,0 +1,282 @@ +#include "cansignaldata_p.h" +#include +#include +#include +#include + +CanSignalDataPrivate::CanSignalDataPrivate(CanSignalData* q, CanSignalDataCtx&& ctx) + : _ctx(std::move(ctx)) + , _ui(_ctx.get()) + , _columnsSig({ "id", "name", "start", "length", "type", "order", "factor", "offset", "min", "max" }) + , _columnsMsg({ "id", "name", "dlc", "ecu", "cycle", "initial value" }) + , q_ptr(q) +{ + initProps(); + + _tvModelSig.setHorizontalHeaderLabels(_columnsSig); + _tvModelSigFilter.setSourceModel(&_tvModelSig); + _ui.initSearch(_tvModelSigFilter); + + _tvModelMsg.setHorizontalHeaderLabels(_columnsMsg); + _tvModelMsgFilter.setSourceModel(&_tvModelMsg); + _ui.initSearch(_tvModelMsgFilter); + + _ui.setMsgView(_tvModelMsgFilter); + + _ui.setMsgViewCbk([this] { + _msgView = !_msgView; + + if (_msgView) { + _ui.setMsgView(_tvModelMsgFilter); + } else { + _ui.setSigView(_tvModelSigFilter); + } + }); + + _ui.setDockUndockCbk([this] { + _docked = !_docked; + emit q_ptr->mainWidgetDockToggled(_ui.mainWidget()); + }); + + _ui.setMsgSettingsUpdatedCbk([this] { + setMsgSettings(getMsgSettings()); + emit q_ptr->canDbUpdated(_messages); + }); +} + +void CanSignalDataPrivate::initProps() +{ + for (const auto& p : _supportedProps) { + QString propName = ComponentInterface::propertyName(p); + _props[propName]; + } +} + +ComponentInterface::ComponentProperties CanSignalDataPrivate::getSupportedProperties() const +{ + return _supportedProps; +} + +CanSignalDataPrivate::msgSettings_t CanSignalDataPrivate::getMsgSettings() +{ + msgSettings_t msgSettings; + + for (int i = 0; i < _tvModelMsg.rowCount(); ++i) { + uint32_t id = _tvModelMsg.item(i, 0)->data(Qt::DisplayRole).toString().toUInt(nullptr, 16); + auto cyclePtr = _tvModelMsg.item(i, 4); + auto initValPtr = _tvModelMsg.item(i, 5); + QVariant cycle; + QVariant initVal; + + if (cyclePtr) { + cycle = cyclePtr->data(Qt::DisplayRole); + } + + if (initValPtr) { + initVal = initValPtr->data(Qt::DisplayRole); + } + + if (cycle.toString().length() > 0 || initVal.toString().length() > 0) { + msgSettings[id] = std::make_pair(cycle.toString(), initVal.toString()); + } + } + + return msgSettings; +} + +void CanSignalDataPrivate::setMsgSettings(const msgSettings_t& msgSettings) +{ + // Clear current settings + for (std::pair>&& msg : _messages) { + msg.first.updateCycle = 0; + msg.first.initValue = ""; + } + + for (const auto& msg : msgSettings) { + auto msgDb = findInDb(msg.first); + if (msgDb) { + msgDb->first.updateCycle = msg.second.first.toUInt(); + msgDb->first.initValue = msg.second.second.toStdString(); + } + } + + _msgSettings = msgSettings; +} + +QJsonObject CanSignalDataPrivate::getSettings() +{ + QJsonObject json; + + for (const auto& p : _props) { + json[p.first] = QJsonValue::fromVariant(p.second); + } + + QJsonArray array; + + for (const auto& msg : _msgSettings) { + QJsonObject obj; + obj["id"] = QString::number(msg.first, 16); + obj["cycle"] = msg.second.first; + obj["initVal"] = msg.second.second; + + array.append(obj); + } + + json["msgSettings"] = array; + + return json; +} + +void CanSignalDataPrivate::setSettings(const QJsonObject& json) +{ + for (const auto& p : _supportedProps) { + QString propName = ComponentInterface::propertyName(p); + if (json.contains(propName)) + _props[propName] = json[propName].toVariant(); + } + + _msgSettings.clear(); + if (json.contains("msgSettings")) { + if (json["msgSettings"].type() == QJsonValue::Array) { + auto rowArray = json["msgSettings"].toArray(); + + for (int i = 0; i < rowArray.size(); ++i) { + if (rowArray[i].type() == QJsonValue::Object) { + auto row = rowArray[i].toObject(); + QString id, cycle, initVal; + + if (row.contains("id")) { + id = row["id"].toString(); + } + + if (row.contains("cycle")) { + cycle = row["cycle"].toString(); + } + + if (row.contains("initVal")) { + initVal = row["initVal"].toString(); + } + + if (id.length() && (cycle.length() || initVal.length())) { + _msgSettings[id.toUInt(nullptr, 16)] = std::make_pair(cycle, initVal); + } + } else { + cds_warn("rows array element expected to be object!"); + } + } + } else { + cds_warn("rows expected to be array!"); + } + } else { + cds_info("Rows to restore not found"); + } + + setMsgSettings(_msgSettings); +} + +std::string CanSignalDataPrivate::loadFile(const std::string& filename) +{ + const std::string path = filename; + + std::fstream file{ path.c_str() }; + + if (!file.good()) { + cds_error("File {} does not exists", filename); + } + + std::string buff; + std::copy(std::istreambuf_iterator(file), std::istreambuf_iterator(), std::back_inserter(buff)); + + file.close(); + return buff; +} + +void CanSignalDataPrivate::loadDbc(const std::string& filename) +{ + if (_currentDbcFile == filename) { + cds_info("DBC filename not changed. Loading aborted"); + return; + } + + _currentDbcFile = filename; + _messages.clear(); + + CANdb::DBCParser parser; + bool success = parser.parse(loadFile(filename)); + + if (!success) { + cds_error("Failed to load CAN DB from '{}' file", filename); + // send empty messages to indicate problem + emit q_ptr->canDbUpdated(_messages); + return; + } + + _messages = parser.getDb().messages; + + cds_info("CAN DB load successful. {} records found", _messages.size()); + + setMsgSettings(_msgSettings); + + _tvModelSig.removeRows(0, _tvModelSig.rowCount()); + _tvModelMsg.removeRows(0, _tvModelMsg.rowCount()); + + for (auto& message : _messages) { + QList settingsList; + uint32_t id = message.first.id; + QString frameID = QString("0x" + QString::number(id, 16)); + + settingsList.append(new QStandardItem(frameID)); + settingsList.append(new QStandardItem(message.first.name.c_str())); + settingsList.append(new QStandardItem(QString::number(message.first.dlc))); + settingsList.append(new QStandardItem(message.first.ecu.c_str())); + + for (auto& i : settingsList) { + i->setEditable(false); + } + + if (message.first.updateCycle > 0) { + settingsList.append(new QStandardItem(QString::number(message.first.updateCycle))); + } else { + settingsList.append(new QStandardItem()); + } + + settingsList.append(new QStandardItem(message.first.initValue.c_str())); + + _tvModelMsg.appendRow(settingsList); + + for (auto& signal : message.second) { + QList list; + + list.append(new QStandardItem(frameID)); + list.append(new QStandardItem(signal.signal_name.c_str())); + list.append(new QStandardItem(QString::number(signal.startBit))); + list.append(new QStandardItem(QString::number(signal.signalSize))); + list.append(new QStandardItem(signal.valueSigned ? "signed" : "unsigned")); + list.append(new QStandardItem(QString::number(signal.byteOrder))); + list.append(new QStandardItem(QString::number(signal.factor))); + list.append(new QStandardItem(QString::number(signal.offset))); + list.append(new QStandardItem(QString::number(signal.min))); + list.append(new QStandardItem(QString::number(signal.max))); + + for (auto& i : list) { + i->setEditable(false); + } + + _tvModelSig.appendRow(list); + } + } + + emit q_ptr->canDbUpdated(_messages); +} + +std::pair>* CanSignalDataPrivate::findInDb(uint32_t id) +{ + CANmessage key(id); + auto msg = _messages.find(key); + + if (msg != std::end(_messages)) { + return (std::pair>*) &(*msg); + } + + return nullptr; +} diff --git a/src/components/cansignaldata/cansignaldata_p.h b/src/components/cansignaldata/cansignaldata_p.h new file mode 100644 index 000000000..7d1518f3f --- /dev/null +++ b/src/components/cansignaldata/cansignaldata_p.h @@ -0,0 +1,66 @@ +#ifndef CANSIGNALDATA_P_H +#define CANSIGNALDATA_P_H + +#include "cansignaldata.h" +#include "gui/cansignaldataguiimpl.h" +#include "searchmodel.h" +#include +#include +#include +#include + +class CanSignalData; + +class CanSignalDataPrivate : public QObject { + Q_OBJECT + Q_DECLARE_PUBLIC(CanSignalData) + +public: + CanSignalDataPrivate(CanSignalData* q, CanSignalDataCtx&& ctx = CanSignalDataCtx(new CanSignalDataGuiImpl)); + ComponentInterface::ComponentProperties getSupportedProperties() const; + QJsonObject getSettings(); + void setSettings(const QJsonObject& json); + void loadDbc(const std::string& filename); + std::pair>* findInDb(uint32_t id); + +private: + void initProps(); + std::string loadFile(const std::string& filename); + using msgSettings_t = std::map>; + msgSettings_t getMsgSettings(); + void setMsgSettings(const msgSettings_t& msgSettings); + +public: + bool _simStarted{ false }; + CanSignalDataCtx _ctx; + CanSignalDataGuiInt& _ui; + bool _docked{ true }; + bool _msgView{ true }; + std::map _props; + QStringList _columnsSig; + QStringList _columnsMsg; + QStandardItemModel _tvModelSig; + SearchModel _tvModelSigFilter; + QStandardItemModel _tvModelMsg; + SearchModel _tvModelMsgFilter; + CANmessages_t _messages; + +private: + CanSignalData* q_ptr; + const QString _fileProperty = "file"; + const QString _nameProperty = "name"; + // workaround for clang 3.5 + using cf = ComponentInterface::CustomEditFieldCbk; + + // clang-format off + ComponentInterface::ComponentProperties _supportedProps = { + std::make_tuple(_nameProperty, QVariant::String, true, cf(nullptr)), + std::make_tuple(_fileProperty, QVariant::String, true, cf([] { return new PropertyFieldPath; } )) + }; + // clang-format on + + std::string _currentDbcFile; + msgSettings_t _msgSettings; +}; + +#endif // CANSIGNALDATA_P_H diff --git a/src/components/cansignaldata/cansignaldatamodel.cpp b/src/components/cansignaldata/cansignaldatamodel.cpp new file mode 100644 index 000000000..6015a3091 --- /dev/null +++ b/src/components/cansignaldata/cansignaldatamodel.cpp @@ -0,0 +1,62 @@ +#include "cansignaldatamodel.h" +#include "cansignaldataplugin.h" +#include +#include + +namespace { + +// clang-format off +const std::map> portMappings = { + { PortType::In, { } + }, + { PortType::Out, + { + { CanDbData{}.type() } + } + } +}; +// clang-format on + +} // namespace + +CanSignalDataModel::CanSignalDataModel() + : ComponentModel("CanSignalData") + , _painter(std::make_unique(CanSignalDataPlugin::PluginType::sectionColor())) +{ + _label->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + _label->setFixedSize(75, 25); + _label->setAttribute(Qt::WA_TranslucentBackground); + + connect(&_component, &CanSignalData::canDbUpdated, this, &CanSignalDataModel::canDbUpdated); +} + +QtNodes::NodePainterDelegate* CanSignalDataModel::painterDelegate() const +{ + return _painter.get(); +} + +unsigned int CanSignalDataModel::nPorts(PortType portType) const +{ + return portMappings.at(portType).size(); +} + +NodeDataType CanSignalDataModel::dataType(PortType portType, PortIndex ndx) const +{ + if (portMappings.at(portType).size() > static_cast(ndx)) { + return portMappings.at(portType)[ndx]; + } + + cds_error("No port mapping for ndx: {}", ndx); + return {}; +} + +std::shared_ptr CanSignalDataModel::outData(PortIndex) +{ + return std::make_shared(_messages); +} + +void CanSignalDataModel::canDbUpdated(const CANmessages_t& messages) +{ + _messages = messages; + emit dataUpdated(0); // Data ready on port 0 +} diff --git a/src/components/cansignaldata/cansignaldatamodel.h b/src/components/cansignaldata/cansignaldatamodel.h new file mode 100644 index 000000000..39276fabe --- /dev/null +++ b/src/components/cansignaldata/cansignaldatamodel.h @@ -0,0 +1,39 @@ +#ifndef CANSIGNALDATAMODEL_H +#define CANSIGNALDATAMODEL_H + +#include "componentmodel.h" +#include "nodepainter.h" +#include +#include + +using QtNodes::NodeData; +using QtNodes::NodeDataType; +using QtNodes::PortIndex; +using QtNodes::PortType; + +enum class Direction; + +class CanSignalDataModel : public ComponentModel { + Q_OBJECT + +public: + CanSignalDataModel(); + + unsigned int nPorts(PortType portType) const override; + NodeDataType dataType(PortType portType, PortIndex portIndex) const override; + std::shared_ptr outData(PortIndex port) override; + void setInData(std::shared_ptr, PortIndex) override{}; + QtNodes::NodePainterDelegate* painterDelegate() const override; + +public slots: + void canDbUpdated(const CANmessages_t& messages); + +signals: + void requestRedraw(); + +private: + std::unique_ptr _painter; + CANmessages_t _messages; +}; + +#endif // CANSIGNALDATAMODEL_H diff --git a/src/components/cansignaldata/cansignaldataplugin.h b/src/components/cansignaldata/cansignaldataplugin.h new file mode 100644 index 000000000..680cd311d --- /dev/null +++ b/src/components/cansignaldata/cansignaldataplugin.h @@ -0,0 +1,15 @@ +#ifndef CANSIGNALDATAPLUGIN_H +#define CANSIGNALDATAPLUGIN_H + +#include "plugin_type.h" +#include "cansignaldatamodel.h" + +using SignalPlugin = PluginBase; + +struct CanSignalDataPlugin { + using Model = CanSignalDataModel; + static constexpr const char* name = "CanSignalData"; + using PluginType = SignalPlugin; +}; + +#endif // CANSIGNALDATAPLUGIN_H diff --git a/src/components/cansignaldata/gui/cansignaldata.ui b/src/components/cansignaldata/gui/cansignaldata.ui new file mode 100644 index 000000000..29b479c82 --- /dev/null +++ b/src/components/cansignaldata/gui/cansignaldata.ui @@ -0,0 +1,161 @@ + + + CanSignalDataPrivate + + + + 0 + 0 + 400 + 300 + + + + CanSignalDataPrivate + + + + + + + + + 32 + 32 + + + + + 32 + 32 + + + + + Tahoma + 14 + 75 + true + + + + Messages View + + + + + + M + + + + 32 + 32 + + + + true + + + true + + + true + + + + + + + + 32 + 32 + + + + + 32 + 32 + + + + + Tahoma + 14 + 75 + true + + + + Signals View + + + S + + + true + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Undock + + + + + + + :/images/files/images/light/CANbus_icon_Undock.svg:/images/files/images/light/CANbus_icon_Undock.svg + + + + 32 + 32 + + + + true + + + true + + + + + + + + + + + + Qt::NoFocus + + + QAbstractItemView::NoSelection + + + + + + + + diff --git a/src/components/cansignaldata/gui/cansignaldataguiimpl.h b/src/components/cansignaldata/gui/cansignaldataguiimpl.h new file mode 100644 index 000000000..e1bb8ac5e --- /dev/null +++ b/src/components/cansignaldata/gui/cansignaldataguiimpl.h @@ -0,0 +1,157 @@ +#ifndef CANSIGNALDATAGUIIMPL_H +#define CANSIGNALDATAGUIIMPL_H + +#include "cansignaldataguiint.h" +#include "searchmodel.h" +#include "ui_cansignaldata.h" +#include +#include +#include +#include +#include +#include + +class IntervalLE : public QLineEdit { +public: + IntervalLE(uint32_t, QWidget* parent) + : QLineEdit(parent) + { + QRegExp qRegExp("[0-9]*"); + auto v = new QRegExpValidator(qRegExp, this); + setValidator(v); + } +}; + +class ValueLE : public QLineEdit { +public: + ValueLE(uint32_t len, QWidget* parent) + : QLineEdit(parent) + { + QRegExp qRegExp("[0-9A-Fa-f]{" + QString::number(len * 2) + "}"); + auto v = new QRegExpValidator(qRegExp, this); + setValidator(v); + setPlaceholderText(QString(" %1 hex digits expected").arg(len*2)); + } +}; + +template class MyDelegate : public QStyledItemDelegate { +public: + MyDelegate(QAbstractItemModel* model, QObject* parent = nullptr) + : QStyledItemDelegate(parent) + , _model(model) + { + } + + virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem&, const QModelIndex& index) const override + { + uint32_t dlc = _model->data(_model->index(index.row(), 2)).toUInt(); + + return new T(dlc, parent); + } + +private: + QAbstractItemModel* _model; +}; + +struct CanSignalDataGuiImpl : public CanSignalDataGuiInt { + CanSignalDataGuiImpl() + : _ui(new Ui::CanSignalDataPrivate) + , _widget(new QWidget) + { + _ui->setupUi(_widget); + _widget->setMinimumSize(_ui->tv->minimumSize()); + + QButtonGroup* bg = new QButtonGroup(_widget); + bg->addButton(_ui->pbMsg); + bg->addButton(_ui->pbSig); + } + + virtual void setDockUndockCbk(const dockUndock_t& cb) override + { + QObject::connect(_ui->pbDockUndock, &QPushButton::toggled, cb); + } + + virtual void setMsgViewCbk(const msgView_t& cb) override + { + QObject::connect(_ui->pbMsg, &QPushButton::toggled, cb); + } + + virtual void setMsgSettingsUpdatedCbk(const msgSettingsUpdated_t& cb) override + { + _msgSettingsUpdatedCbk = cb; + } + + virtual QWidget* mainWidget() override + { + return _widget; + } + + virtual void setMsgView(QAbstractItemModel& tvModel) override + { + if (_settingsState.size() > 0) { + _ui->tv->horizontalHeader()->restoreState(_settingsState); + } + + _ui->tv->setModel(&tvModel); + _ui->tv->horizontalHeader()->setSectionsMovable(true); + _ui->tv->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); + _ui->tv->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents); + _ui->tv->horizontalHeader()->setSectionResizeMode(4, QHeaderView::Stretch); + _ui->tv->horizontalHeader()->setSectionResizeMode(5, QHeaderView::Stretch); + _ui->tv->setColumnHidden(0, false); + + _settingsState = _ui->tv->horizontalHeader()->saveState(); + + _cycleDelegate = new MyDelegate(&tvModel, _ui->tv); + _ui->tv->setItemDelegateForColumn(4, _cycleDelegate); + QObject::connect(_cycleDelegate, &QAbstractItemDelegate::closeEditor, + std::bind(&CanSignalDataGuiImpl::msgSettingUpdated, this)); + + _initValDelegate = new MyDelegate(&tvModel, _ui->tv); + _ui->tv->setItemDelegateForColumn(5, _initValDelegate); + QObject::connect(_initValDelegate, &QAbstractItemDelegate::closeEditor, + std::bind(&CanSignalDataGuiImpl::msgSettingUpdated, this)); + } + + void msgSettingUpdated() + { + if (_msgSettingsUpdatedCbk) { + _msgSettingsUpdatedCbk(); + } + } + + virtual void setSigView(QAbstractItemModel& tvModel) override + { + if (_tableState.size() > 0) { + _ui->tv->horizontalHeader()->restoreState(_tableState); + } + + _ui->tv->setModel(&tvModel); + _ui->tv->horizontalHeader()->setSectionsMovable(true); + _ui->tv->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Interactive); + _ui->tv->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); + _ui->tv->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents); + _ui->tv->horizontalHeader()->setSectionResizeMode(3, QHeaderView::ResizeToContents); + _ui->tv->horizontalHeader()->setSectionResizeMode(4, QHeaderView::ResizeToContents); + _ui->tv->horizontalHeader()->setSectionResizeMode(5, QHeaderView::ResizeToContents); + _ui->tv->horizontalHeader()->setSectionResizeMode(6, QHeaderView::ResizeToContents); + + _tableState = _ui->tv->horizontalHeader()->saveState(); + } + + void initSearch(SearchModel& model) override + { + QObject::connect(_ui->searchLine, &QLineEdit::textChanged, &model, &SearchModel::updateFilter); + } + +private: + Ui::CanSignalDataPrivate* _ui; + QWidget* _widget; + QByteArray _settingsState; + QByteArray _tableState; + MyDelegate* _cycleDelegate; + MyDelegate* _initValDelegate; + msgSettingsUpdated_t _msgSettingsUpdatedCbk{ nullptr }; +}; + +#endif // CANSIGNALDATAGUIIMPL_H diff --git a/src/components/cansignaldata/gui/cansignaldataguiint.h b/src/components/cansignaldata/gui/cansignaldataguiint.h new file mode 100644 index 000000000..b13c23182 --- /dev/null +++ b/src/components/cansignaldata/gui/cansignaldataguiint.h @@ -0,0 +1,29 @@ +#ifndef CANSIGNALDATAGUIINT_H +#define CANSIGNALDATAGUIINT_H + +#include +#include + +class QWidget; +class QAbstractItemModel; +class SearchModel; + +struct CanSignalDataGuiInt { + typedef std::function msgView_t; + typedef std::function dockUndock_t; + typedef std::function msgSettingsUpdated_t; + + virtual ~CanSignalDataGuiInt() + { + } + + virtual QWidget* mainWidget() = 0; + virtual void setMsgView(QAbstractItemModel& tvModel) = 0; + virtual void setSigView(QAbstractItemModel& tvModel) = 0; + virtual void setMsgViewCbk(const msgView_t& cb) = 0; + virtual void setMsgSettingsUpdatedCbk(const msgSettingsUpdated_t& cb) = 0; + virtual void setDockUndockCbk(const dockUndock_t& cb) = 0; + virtual void initSearch(SearchModel& model) = 0; +}; + +#endif // CANSIGNALDATAGUIINT_H diff --git a/src/components/cansignaldata/searchmodel.cpp b/src/components/cansignaldata/searchmodel.cpp new file mode 100644 index 000000000..ae713401c --- /dev/null +++ b/src/components/cansignaldata/searchmodel.cpp @@ -0,0 +1,25 @@ +#include "searchmodel.h" + +bool SearchModel::isFilterActive() const +{ + return _filter.length() > 0; +} + +bool SearchModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const +{ + bool result = false; + + for(int i = 0; i < sourceModel()->columnCount(); ++i) { + QString str = sourceModel()->index(sourceRow, i, sourceParent).data().toString().toLower(); + + result |= str.contains(_filter); + } + + return result; +} + +void SearchModel::updateFilter(const QString& filter) +{ + _filter = filter.toLower(); + invalidate(); +} diff --git a/src/components/cansignaldata/searchmodel.h b/src/components/cansignaldata/searchmodel.h new file mode 100644 index 000000000..3e20d16da --- /dev/null +++ b/src/components/cansignaldata/searchmodel.h @@ -0,0 +1,21 @@ +#ifndef __SEARCHMODEL_H +#define __SEARCHMODEL_H + +#include + +class SearchModel : public QSortFilterProxyModel { + Q_OBJECT +public: + bool isFilterActive() const; + +protected: + bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override; + +public slots: + void updateFilter(const QString& filter); + +private: + QString _filter; +}; + +#endif /* !__SEARCHMODEL_H */ diff --git a/src/components/cansignaldata/tests/cansignaldata_test.cpp b/src/components/cansignaldata/tests/cansignaldata_test.cpp new file mode 100644 index 000000000..2d0d71e5d --- /dev/null +++ b/src/components/cansignaldata/tests/cansignaldata_test.cpp @@ -0,0 +1,474 @@ +#include +#include +#define CATCH_CONFIG_RUNNER +#include "log.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +std::shared_ptr kDefaultLogger; +// needed for QSignalSpy cause according to qtbug 49623 comments +// automatic detection of types is "flawed" in moc +Q_DECLARE_METATYPE(QCanBusFrame); + +TEST_CASE("Stubbed methods", "[cansignaldata]") +{ + CanSignalData c; + REQUIRE(c.mainWidget() != nullptr); + REQUIRE(c.mainWidgetDocked() == true); + + using namespace fakeit; + Mock guiInt; + Fake(Method(guiInt, initSearch)); + Fake(Method(guiInt, setMsgView)); + Fake(Method(guiInt, setMsgViewCbk)); + Fake(Method(guiInt, setDockUndockCbk)); + Fake(Method(guiInt, setMsgSettingsUpdatedCbk)); + + CanSignalDataCtx ctx(&guiInt.get()); + CanSignalData c2(std::move(ctx)); +} + +TEST_CASE("setConfig - qobj", "[cansignaldata]") +{ + CanSignalData c; + QWidget obj; + + obj.setProperty("name", "Test Name"); + + c.setConfig(obj); +} + +TEST_CASE("setConfig - json", "[cansignaldata]") +{ + CanSignalData c; + QJsonObject obj; + QJsonArray arr; + + obj["name"] = "Test Name"; + + obj["msgSettings"] = "abc"; + c.setConfig(obj); + + arr.append("dsds"); + arr.append("bbb"); + obj["msgSettings"] = arr; + c.setConfig(obj); +} + +TEST_CASE("getConfig", "[cansignaldata]") +{ + CanSignalData c; + + auto abc = c.getConfig(); +} + +TEST_CASE("getQConfig", "[cansignaldata]") +{ + CanSignalData c; + + auto abc = c.getQConfig(); +} + +TEST_CASE("start/stop", "[cansignaldata]") +{ + CanSignalData c; + + c.startSimulation(); + c.stopSimulation(); +} + +TEST_CASE("getSupportedProperties", "[cansignaldata]") +{ + CanSignalData c; + + auto props = c.getSupportedProperties(); + + REQUIRE(props.size() == 2); + + REQUIRE(ComponentInterface::propertyName(props[0]) == "name"); + REQUIRE(ComponentInterface::propertyType(props[0]) == QVariant::String); + REQUIRE(ComponentInterface::propertyEditability(props[0]) == true); + REQUIRE(ComponentInterface::propertyField(props[0]) == nullptr); + + REQUIRE(ComponentInterface::propertyName(props[1]) == "file"); + REQUIRE(ComponentInterface::propertyType(props[1]) == QVariant::String); + REQUIRE(ComponentInterface::propertyEditability(props[1]) == true); + REQUIRE(ComponentInterface::propertyField(props[1]) != nullptr); +} + +TEST_CASE("loadDbc", "[cansignaldata]") +{ + CanSignalData c; + QJsonObject obj; + CANmessages_t msgs; + + QSignalSpy updateSpy(&c, &CanSignalData::canDbUpdated); + + obj["name"] = "Test Name"; + + obj["file"] = QString(DBC_PATH) + "/tesla_can.dbc"; + c.setConfig(obj); + c.configChanged(); + + // Load again (this should not trigger another signal) + c.setConfig(obj); + c.configChanged(); + + REQUIRE(updateSpy.count() == 1); + msgs = qvariant_cast(updateSpy.takeFirst().at(0)); + REQUIRE(msgs.size() == 17); + + // File does not exist + obj["file"] = QString(DBC_PATH) + "/tesla_can"; + c.setConfig(obj); + c.configChanged(); + + REQUIRE(updateSpy.count() == 1); + msgs = qvariant_cast(updateSpy.takeFirst().at(0)); + REQUIRE(msgs.size() == 0); + + // Wrong file + obj["file"] = QString(DBC_PATH) + "/project.cds"; + c.setConfig(obj); + c.configChanged(); + + REQUIRE(updateSpy.count() == 1); + msgs = qvariant_cast(updateSpy.takeFirst().at(0)); + REQUIRE(msgs.size() == 0); +} + +QString testJson = R"( +{ + "msgSettings": [ + { + "cycle": "123", + "id": "3", + "initVal": "" + }, + { + "cycle": "", + "id": "e", + "initVal": "1122334455667788" + }, + { + "cycle": "1234567890", + "id": "45", + "initVal": "aabbccddeeff0099" + }, + { + "cycle": "", + "id": "6d", + "initVal": "AABBCCDD" + }, + { + "cycle": "1", + "id": "101", + "initVal": "EEFF00" + } + ], + "name": "CanSignalData" +} +)"; + +TEST_CASE("loadDbc with settings", "[cansignaldata]") +{ + CanSignalData c; + QJsonObject obj = QJsonDocument::fromJson(testJson.toUtf8()).object(); + QSignalSpy updateSpy(&c, &CanSignalData::canDbUpdated); + + obj["file"] = QString(DBC_PATH) + "/tesla_can.dbc"; + c.setConfig(obj); + c.configChanged(); + + REQUIRE(updateSpy.count() == 1); + auto msgs = qvariant_cast(updateSpy.takeFirst().at(0)); + REQUIRE(msgs.size() == 17); + + auto msg = msgs.find({ 0x3 }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 123); + REQUIRE(msg->first.initValue == ""); + + msg = msgs.find({ 0xe }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 0); + REQUIRE(msg->first.initValue == "1122334455667788"); + + msg = msgs.find({ 0x45 }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 1234567890); + REQUIRE(msg->first.initValue == "aabbccddeeff0099"); + + msg = msgs.find({ 0x6d }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 0); + REQUIRE(msg->first.initValue == "AABBCCDD"); + + msg = msgs.find({ 0x101 }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 1); + REQUIRE(msg->first.initValue == "EEFF00"); +} + +TEST_CASE("dock/undock", "[cansignaldata]") +{ + CanSignalDataGuiInt::dockUndock_t dockUndock; + + using namespace fakeit; + Mock guiInt; + Fake(Method(guiInt, initSearch)); + Fake(Method(guiInt, setMsgView)); + Fake(Method(guiInt, setMsgViewCbk)); + When(Method(guiInt, setDockUndockCbk)).Do([&](auto&& fn) { dockUndock = fn; }); + Fake(Method(guiInt, setMsgSettingsUpdatedCbk)); + Fake(Method(guiInt, mainWidget)); + + CanSignalDataCtx ctx(&guiInt.get()); + CanSignalData c(std::move(ctx)); + QSignalSpy dockSpy(&c, &CanSignalData::mainWidgetDockToggled); + + dockUndock(); + dockUndock(); + dockUndock(); + + REQUIRE(dockSpy.count() == 3); + + Verify(Method(guiInt, mainWidget)).Exactly(3); +} + +TEST_CASE("View switch test", "[cansignaldata]") +{ + CanSignalDataGuiInt::dockUndock_t dockUndock; + CanSignalDataGuiInt::msgView_t msgView; + CanSignalDataGuiInt::msgSettingsUpdated_t settingsUpdated; + + QAbstractItemModel* msgModel = nullptr; + QAbstractItemModel* sigModel = nullptr; + + using namespace fakeit; + Mock guiInt; + Fake(Method(guiInt, initSearch)); + When(Method(guiInt, setMsgView)).AlwaysDo([&](auto&& model) { msgModel = &model; }); + When(Method(guiInt, setSigView)).AlwaysDo([&](auto&& model) { sigModel = &model; }); + When(Method(guiInt, setMsgViewCbk)).Do([&](auto&& fn) { msgView = fn; }); + When(Method(guiInt, setDockUndockCbk)).Do([&](auto&& fn) { dockUndock = fn; }); + When(Method(guiInt, setMsgSettingsUpdatedCbk)).Do([&](auto&& fn) { settingsUpdated = fn; }); + + CanSignalDataCtx ctx(&guiInt.get()); + CanSignalData c2(std::move(ctx)); + + REQUIRE(msgModel != nullptr); + REQUIRE(sigModel == nullptr); + + msgView(); + + REQUIRE(msgModel != nullptr); + REQUIRE(sigModel != nullptr); + REQUIRE(sigModel != msgModel); + + msgView(); + msgView(); + + Verify( + Method(guiInt, setMsgView), Method(guiInt, setSigView), Method(guiInt, setMsgView), Method(guiInt, setSigView)); +} + +TEST_CASE("settings callback", "[cansignaldata]") +{ + CanSignalDataGuiInt::msgSettingsUpdated_t settingsUpdated; + QStandardItemModel* msgModel = nullptr; + + using namespace fakeit; + Mock guiInt; + Fake(Method(guiInt, initSearch)); + When(Method(guiInt, setMsgView)).AlwaysDo([&](auto&& model) { + auto proxy = dynamic_cast(&model); + msgModel = dynamic_cast(proxy->sourceModel()); + }); + Fake(Method(guiInt, setMsgViewCbk)); + Fake(Method(guiInt, setDockUndockCbk)); + When(Method(guiInt, setMsgSettingsUpdatedCbk)).Do([&](auto&& fn) { settingsUpdated = fn; }); + + CanSignalDataCtx ctx(&guiInt.get()); + CanSignalData c(std::move(ctx)); + QSignalSpy settingsSpy(&c, &CanSignalData::canDbUpdated); + QJsonObject obj; + + obj["file"] = QString(DBC_PATH) + "/tesla_can.dbc"; + c.setConfig(obj); + c.configChanged(); + + REQUIRE(settingsSpy.count() == 1); + auto msgs = qvariant_cast(settingsSpy.takeFirst().at(0)); + REQUIRE(msgs.size() == 17); + + auto msg = msgs.find({ 0x45 }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 0); + REQUIRE(msg->first.initValue == ""); + + msgModel->setItem(2, 4, new QStandardItem("123")); + msgModel->setItem(2, 5, new QStandardItem("456")); + + settingsUpdated(); + + REQUIRE(settingsSpy.count() == 1); + msgs = qvariant_cast(settingsSpy.takeFirst().at(0)); + REQUIRE(msgs.size() == 17); + + msg = msgs.find({ 0x45 }); + REQUIRE(msg != std::end(msgs)); + REQUIRE(msg->first.updateCycle == 123); + REQUIRE(msg->first.initValue == "456"); + + QJsonObject settings = c.getConfig(); + REQUIRE(settings["msgSettings"].toArray()[0].toObject()["id"].toString() == "45"); + REQUIRE(settings["msgSettings"].toArray()[0].toObject()["cycle"].toString() == "123"); + REQUIRE(settings["msgSettings"].toArray()[0].toObject()["initVal"].toString() == "456"); +} + +TEST_CASE("Filter test", "[cansignaldata]") +{ + CanSignalDataGuiInt::dockUndock_t dockUndock; + CanSignalDataGuiInt::msgView_t msgView; + CanSignalDataGuiInt::msgSettingsUpdated_t settingsUpdated; + + SearchModel* msgModel = nullptr; + SearchModel* sigModel = nullptr; + + using namespace fakeit; + Mock guiInt; + Fake(Method(guiInt, initSearch)); + When(Method(guiInt, setMsgView)).AlwaysDo([&](auto&& model) { msgModel = dynamic_cast(&model); }); + When(Method(guiInt, setSigView)).AlwaysDo([&](auto&& model) { sigModel = dynamic_cast(&model); }); + When(Method(guiInt, setMsgViewCbk)).Do([&](auto&& fn) { msgView = fn; }); + When(Method(guiInt, setDockUndockCbk)).Do([&](auto&& fn) { dockUndock = fn; }); + When(Method(guiInt, setMsgSettingsUpdatedCbk)).Do([&](auto&& fn) { settingsUpdated = fn; }); + + CanSignalDataCtx ctx(&guiInt.get()); + CanSignalData c(std::move(ctx)); + QSignalSpy settingsSpy(&c, &CanSignalData::canDbUpdated); + QJsonObject obj = QJsonDocument::fromJson(testJson.toUtf8()).object(); + + obj["file"] = QString(DBC_PATH) + "/tesla_can.dbc"; + c.setConfig(obj); + c.configChanged(); + + REQUIRE(msgModel != nullptr); + REQUIRE(sigModel == nullptr); + + REQUIRE(msgModel->rowCount() == 17); + + msgView(); + + REQUIRE(msgModel != nullptr); + REQUIRE(sigModel != nullptr); + REQUIRE(sigModel != msgModel); + + REQUIRE(msgModel->rowCount() == 17); + REQUIRE(msgModel->isFilterActive() == false); + + // filter msg by Id + msgModel->updateFilter("0x45"); + REQUIRE(msgModel->rowCount() == 1); + REQUIRE(msgModel->isFilterActive() == true); + + // filter msg by name + msgModel->updateFilter("STW_"); + REQUIRE(msgModel->rowCount() == 3); + REQUIRE(msgModel->isFilterActive() == true); + + // filter msg by id, dlc and cycle + msgModel->updateFilter("5"); + REQUIRE(msgModel->rowCount() == 3); + REQUIRE(msgModel->isFilterActive() == true); + + // filter msg by ecu + msgModel->updateFilter("DI"); + REQUIRE(msgModel->rowCount() == 3); + REQUIRE(msgModel->isFilterActive() == true); + + // filter msg by cycle + msgModel->updateFilter("123456789"); + REQUIRE(msgModel->rowCount() == 1); + REQUIRE(msgModel->isFilterActive() == true); + + // filter msg by initVal + msgModel->updateFilter("aabbccddeeff0099"); + REQUIRE(msgModel->rowCount() == 1); + REQUIRE(msgModel->isFilterActive() == true); + + // cancel msg filter + msgModel->updateFilter(""); + REQUIRE(msgModel->rowCount() == 17); + REQUIRE(msgModel->isFilterActive() == false); + + REQUIRE(sigModel->rowCount() == 199); + REQUIRE(sigModel->isFilterActive() == false); + + // filter sig by Id + sigModel->updateFilter("0x45"); + REQUIRE(sigModel->rowCount() == 31); + REQUIRE(sigModel->isFilterActive() == true); + + // filter sig by name + sigModel->updateFilter("DTR_"); + REQUIRE(sigModel->rowCount() == 1); + REQUIRE(sigModel->isFilterActive() == true); + sigModel->updateFilter(""); + + // filter sig by start bit + sigModel->updateFilter("22"); + REQUIRE(sigModel->rowCount() == 1); + REQUIRE(sigModel->isFilterActive() == true); + + // filter sig by length + sigModel->updateFilter("14"); + REQUIRE(sigModel->rowCount() == 10); + REQUIRE(sigModel->isFilterActive() == true); + + // filter sig by type + sigModel->updateFilter("unsigned"); + REQUIRE(sigModel->rowCount() == 136); + REQUIRE(sigModel->isFilterActive() == true); + + // filter sig by offset and min + sigModel->updateFilter("-4096"); + REQUIRE(sigModel->rowCount() == 1); + REQUIRE(sigModel->isFilterActive() == true); + + // filter sig by max + sigModel->updateFilter("4095"); + REQUIRE(sigModel->rowCount() == 1); + REQUIRE(sigModel->isFilterActive() == true); + // filter sig by offset and min + sigModel->updateFilter("-4096"); + REQUIRE(sigModel->rowCount() == 1); + REQUIRE(sigModel->isFilterActive() == true); + + sigModel->updateFilter(""); + REQUIRE(sigModel->rowCount() == 199); + REQUIRE(sigModel->isFilterActive() == false); +} + +int main(int argc, char* argv[]) +{ + bool haveDebug = std::getenv("CDS_DEBUG") != nullptr; + kDefaultLogger = spdlog::stdout_color_mt("cds"); + if (haveDebug) { + kDefaultLogger->set_level(spdlog::level::debug); + } + cds_debug("Staring unit tests"); + qRegisterMetaType(); // required by QSignalSpy + QApplication a(argc, argv); // QApplication must exist when contructing QWidgets TODO check QTest + return Catch::Session().run(argc, argv); +} diff --git a/src/components/cansignaldata/tests/cansignaldatamodel_test.cpp b/src/components/cansignaldata/tests/cansignaldatamodel_test.cpp new file mode 100644 index 000000000..7bc946eb5 --- /dev/null +++ b/src/components/cansignaldata/tests/cansignaldatamodel_test.cpp @@ -0,0 +1,98 @@ +#include +#include +#define CATCH_CONFIG_RUNNER +#include "log.h" +#include +#include +#include +#include + +std::shared_ptr kDefaultLogger; +// needed for QSignalSpy cause according to qtbug 49623 comments +// automatic detection of types is "flawed" in moc +Q_DECLARE_METATYPE(QCanBusFrame); + +TEST_CASE("Test basic functionality", "[cansignaldataModel]") +{ + using namespace fakeit; + CanSignalDataModel cm; + REQUIRE(cm.caption() == "CanSignalData"); + REQUIRE(cm.name() == "CanSignalData"); + REQUIRE(cm.resizable() == false); + REQUIRE(cm.hasSeparateThread() == false); + REQUIRE(dynamic_cast(cm.clone().get()) != nullptr); + REQUIRE(dynamic_cast(cm.embeddedWidget()) != nullptr); +} + +TEST_CASE("painterDelegate", "[cansignaldataModel]") +{ + CanSignalDataModel cm; + REQUIRE(cm.painterDelegate() != nullptr); +} + +TEST_CASE("nPorts", "[cansignaldataModel]") +{ + CanSignalDataModel cm; + + REQUIRE(cm.nPorts(QtNodes::PortType::Out) == 1); + REQUIRE(cm.nPorts(QtNodes::PortType::In) == 0); +} + +TEST_CASE("dataType", "[cansignaldataModel]") +{ + CanSignalDataModel cm; + + NodeDataType ndt; + + ndt = cm.dataType(QtNodes::PortType::Out, 0); + REQUIRE(ndt.id == "DbData"); + REQUIRE(ndt.name == "DB"); + + ndt = cm.dataType(QtNodes::PortType::Out, 1); + REQUIRE(ndt.id == ""); + REQUIRE(ndt.name == ""); + + ndt = cm.dataType(QtNodes::PortType::In, 0); + REQUIRE(ndt.id == ""); + REQUIRE(ndt.name == ""); +} + +TEST_CASE("outData", "[cansignaldataModel]") +{ + CanSignalDataModel cm; + + auto nd = cm.outData(0); + REQUIRE(nd); +} + +TEST_CASE("setInData", "[cansignaldataModel]") +{ + CanSignalDataModel cm; + + cm.setInData({}, 1); +} + +TEST_CASE("canDbUpdated", "[cansignaldataModel]") +{ + CanSignalDataModel cm; + CANmessages_t msgs; + QSignalSpy dbSpy(&cm, &CanSignalDataModel::dataUpdated); + + cm.canDbUpdated(msgs); + REQUIRE(dbSpy.count() == 1); + REQUIRE(dbSpy.takeFirst().at(0).toUInt() == 0); +} + +int main(int argc, char* argv[]) +{ + bool haveDebug = std::getenv("CDS_DEBUG") != nullptr; + kDefaultLogger = spdlog::stdout_color_mt("cds"); + if (haveDebug) { + kDefaultLogger->set_level(spdlog::level::debug); + } + cds_debug("Staring unit tests"); + qRegisterMetaType(); // required by QSignalSpy + QApplication a(argc, argv); // QApplication must exist when contructing QWidgets TODO check QTest + return Catch::Session().run(argc, argv); +} + diff --git a/src/components/cansignaldata/tests/dbc/project.cds b/src/components/cansignaldata/tests/dbc/project.cds new file mode 100644 index 000000000..5bfdb8af3 --- /dev/null +++ b/src/components/cansignaldata/tests/dbc/project.cds @@ -0,0 +1,45 @@ +{ + "connections": [ + ], + "nodes": [ + { + "id": "{e6f3edfa-ce27-4741-bac7-2940a84c2133}", + "model": { + "caption": "CanSignalData #1", + "file": "/home/remol/Projects/CANdevStudio/build/src/components/cansignaldata/dbc/tesla_can.dbc", + "msgSettings": [ + { + "cycle": "123", + "id": "3", + "initVal": "" + }, + { + "cycle": "", + "id": "e", + "initVal": "1122334455667788" + }, + { + "cycle": "1234567890", + "id": "45", + "initVal": "aabbccddeeff0099" + }, + { + "cycle": "", + "id": "6d", + "initVal": "AABBCCDD" + }, + { + "cycle": "1", + "id": "101", + "initVal": "EEFF00" + } + ], + "name": "CanSignalData" + }, + "position": { + "x": 245, + "y": 472 + } + } + ] +} diff --git a/src/components/cansignaldata/tests/dbc/tesla_can.dbc b/src/components/cansignaldata/tests/dbc/tesla_can.dbc new file mode 100644 index 000000000..84e8d7b24 --- /dev/null +++ b/src/components/cansignaldata/tests/dbc/tesla_can.dbc @@ -0,0 +1,405 @@ +VERSION "" + + +NS_ : + NS_DESC_ + CM_ + BA_DEF_ + BA_ + VAL_ + CAT_DEF_ + CAT_ + FILTER + BA_DEF_DEF_ + EV_DATA_ + ENVVAR_DATA_ + SGTYPE_ + SGTYPE_VAL_ + BA_DEF_SGTYPE_ + BA_SGTYPE_ + SIG_TYPE_REF_ + VAL_TABLE_ + SIG_GROUP_ + SIG_VALTYPE_ + SIGTYPE_VALTYPE_ + BO_TX_BU_ + BA_DEF_REL_ + BA_REL_ + BA_DEF_DEF_REL_ + BU_SG_REL_ + BU_EV_REL_ + BU_BO_REL_ + SG_MUL_VAL_ + +BS_: + +BU_: + NEO + MCU + GTW + EPAS + DI + ESP + SBW + STW + +VAL_TABLE_ StW_AnglHP_Spd 16383 "SNA" ; +VAL_TABLE_ DI_aebFaultReason 15 "DI_AEB_FAULT_DAS_REQ_DI_UNAVAIL" 14 "DI_AEB_FAULT_ACCEL_REQ_INVALID" 13 "DI_AEB_FAULT_MIN_TIME_BTWN_EVENTS" 12 "DI_AEB_FAULT_ESP_MIA" 11 "DI_AEB_FAULT_ESP_FAULT" 10 "DI_AEB_FAULT_EPB_NOT_PARKED" 9 "DI_AEB_FAULT_ACCEL_OUT_OF_BOUNDS" 8 "DI_AEB_FAULT_PM_REQUEST" 7 "DI_AEB_FAULT_VEL_EST_ABNORMAL" 6 "DI_AEB_FAULT_DAS_SNA" 5 "DI_AEB_FAULT_DAS_CONTROL_MIA" 4 "DI_AEB_FAULT_SPEED_DELTA" 3 "DI_AEB_FAULT_EBR_FAULT" 2 "DI_AEB_FAULT_PM_MIA" 1 "DI_AEB_FAULT_EPB_MIA" 0 "DI_AEB_FAULT_NONE" ; +VAL_TABLE_ DI_aebLockState 3 "AEB_LOCK_STATE_SNA" 2 "AEB_LOCK_STATE_UNUSED" 1 "AEB_LOCK_STATE_UNLOCKED" 0 "AEB_LOCK_STATE_LOCKED" ; +VAL_TABLE_ DI_aebSmState 7 "DI_AEB_STATE_FAULT" 6 "DI_AEB_STATE_EXIT" 5 "DI_AEB_STATE_STANDSTILL" 4 "DI_AEB_STATE_STOPPING" 3 "DI_AEB_STATE_ENABLE" 2 "DI_AEB_STATE_ENABLE_INIT" 1 "DI_AEB_STATE_STANDBY" 0 "DI_AEB_STATE_UNAVAILABLE" ; +VAL_TABLE_ DI_aebState 7 "AEB_CAN_STATE_SNA" 4 "AEB_CAN_STATE_FAULT" 3 "AEB_CAN_STATE_STANDSTILL" 2 "AEB_CAN_STATE_ENABLED" 1 "AEB_CAN_STATE_STANDBY" 0 "AEB_CAN_STATE_UNAVAILABLE" ; +VAL_TABLE_ DI_epbInterfaceReady 1 "EPB_INTERFACE_READY" 0 "EPB_INTERFACE_NOT_READY" ; +VAL_TABLE_ DI_gear 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ; +VAL_TABLE_ DI_gpoReason 8 "DI_GPO_NUMREASONS" 7 "DI_GPO_CAPACITOR_OVERTEMP" 6 "DI_GPO_NOT_ENOUGH_12V" 5 "DI_GPO_NO_BATTERY_POWER" 4 "DI_GPO_AMBIENT_OVERTEMP" 3 "DI_GPO_FLUID_DELTAT" 2 "DI_GPO_STATOR_OVERTEMP" 1 "DI_GPO_HEATSINK_OVERTEMP" 0 "DI_GPO_OUTLET_OVERTEMP" ; +VAL_TABLE_ DI_immobilizerCondition 1 "DI_IMM_CONDITION_LEARNED" 0 "DI_IMM_CONDITION_VIRGIN_SNA" ; +VAL_TABLE_ DI_immobilizerState 7 "DI_IMM_STATE_FAULT" 6 "DI_IMM_STATE_FAULTRETRY" 5 "DI_IMM_STATE_RESET" 4 "DI_IMM_STATE_LEARN" 3 "DI_IMM_STATE_DISARMED" 2 "DI_IMM_STATE_AUTHENTICATING" 1 "DI_IMM_STATE_REQUEST" 0 "DI_IMM_STATE_INIT_SNA" ; +VAL_TABLE_ DI_limpReason 24 "DI_LIMP_NUMREASONS" 23 "DI_LIMP_CAPACITOR_OVERTEMP" 22 "DI_LIMP_GTW_MIA" 21 "DI_LIMP_TRQCMD_VALIDITY_UNKNOWN" 20 "DI_LIMP_DI_MIA" 19 "DI_LIMP_CONFIG_MISMATCH" 18 "DI_LIMP_HEATSINK_TEMP" 17 "DI_LIMP_PMREQUEST" 16 "DI_LIMP_PMHEARTBEAT" 15 "DI_LIMP_TRQ_CROSS_CHECK" 14 "DI_LIMP_EXTERNAL_COMMAND" 13 "DI_LIMP_WRONG_CS_CALIBRATION" 12 "DI_LIMP_STATOR_TEMP" 11 "DI_LIMP_DELTAT_TOO_NEGATIVE" 10 "DI_LIMP_DELTAT_TOO_POSITIVE" 9 "DI_LIMP_AMBIENT_TEMP" 8 "DI_LIMP_OUTLET_TEMP" 7 "DI_LIMP_LOW_FLOW" 6 "DI_LIMP_BMS_MIA" 5 "DI_LIMP_12V_SUPPLY_UNDERVOLTAGE" 4 "DI_LIMP_NO_FLUID" 3 "DI_LIMP_NO_FUNC_HEATSINK_SENSOR" 2 "DI_LIMP_NO_FUNC_STATORT_SENSOR" 1 "DI_LIMP_BUSV_SENSOR_IRRATIONAL" 0 "DI_LIMP_PHASE_IMBALANCE" ; +VAL_TABLE_ DI_mode 2 "DI_MODE_DYNO" 1 "DI_MODE_DRIVE" 0 "DI_MODE_UNDEF" ; +VAL_TABLE_ DI_motorType 14 "DI_MOTOR_F2AE" 13 "DI_MOTOR_F2AD" 12 "DI_MOTOR_F2AC" 11 "DI_MOTOR_F2AB" 10 "DI_MOTOR_F1AC" 9 "DI_MOTOR_SSR1A" 8 "DI_MOTOR_F1A" 7 "DI_MOTOR_M7M6" 6 "DI_MOTOR_M8A" 5 "DI_MOTOR_M7M5" 4 "DI_MOTOR_M7M4" 3 "DI_MOTOR_M7M3" 2 "DI_MOTOR_ROADSTER_SPORT" 1 "DI_MOTOR_ROADSTER_BASE" 0 "DI_MOTOR_SNA" ; +VAL_TABLE_ DI_speedUnits 1 "DI_SPEED_KPH" 0 "DI_SPEED_MPH" ; +VAL_TABLE_ DI_state 4 "DI_STATE_ENABLE" 3 "DI_STATE_FAULT" 2 "DI_STATE_CLEAR_FAULT" 1 "DI_STATE_STANDBY" 0 "DI_STATE_PREAUTH" ; +VAL_TABLE_ DI_velocityEstimatorState 4 "VE_STATE_BACKUP_MOTOR" 3 "VE_STATE_BACKUP_WHEELS_B" 2 "VE_STATE_BACKUP_WHEELS_A" 1 "VE_STATE_WHEELS_NORMAL" 0 "VE_STATE_NOT_INITIALIZED" ; + + +BO_ 1160 DAS_steeringControl: 4 NEO + SG_ DAS_steeringControlType : 23|2@0+ (1,0) [0|0] "" EPAS + SG_ DAS_steeringControlChecksum : 31|8@0+ (1,0) [0|0] "" EPAS + SG_ DAS_steeringControlCounter : 19|4@0+ (1,0) [0|0] "" EPAS + SG_ DAS_steeringAngleRequest : 6|15@0+ (0.1,-1638.35) [-1638.35|1638.35] "deg" EPAS + SG_ DAS_steeringHapticRequest : 7|1@0+ (1,0) [0|0] "" EPAS + +BO_ 257 GTW_epasControl: 3 NEO + SG_ GTW_epasControlChecksum : 16|8@1+ (1,0) [0|255] "" NEO + SG_ GTW_epasControlCounter : 12|4@1+ (1,0) [0|15] "" NEO + SG_ GTW_epasControlType : 8|2@1+ (1,0) [4|-1] "" NEO + SG_ GTW_epasEmergencyOn : 0|1@1+ (1,0) [2|-1] "" NEO + SG_ GTW_epasLDWEnabled : 11|1@1+ (1,0) [2|-1] "" NEO + SG_ GTW_epasPowerMode : 1|4@1+ (1,0) [4|14] "" NEO + SG_ GTW_epasTuneRequest : 5|3@1+ (1,0) [8|-1] "" NEO + +BO_ 880 EPAS_sysStatus: 8 EPAS + SG_ EPAS_currentTuneMode : 0|4@1+ (1,0) [8|15] "" NEO + SG_ EPAS_eacErrorCode : 16|4@1+ (1,0) [16|-1] "" NEO + SG_ EPAS_eacStatus : 48|3@1+ (1,0) [5|7] "" NEO + SG_ EPAS_handsOnLevel : 32|2@1+ (1,0) [4|-1] "" NEO + SG_ EPAS_internalSAS : 37|14@0+ (0.10,-819.200010) [0|0] "deg" NEO + SG_ EPAS_steeringFault : 5|1@1+ (1,0) [2|-1] "" NEO + SG_ EPAS_steeringRackForce : 1|10@0+ (50,-25575) [0|0] "N" NEO + SG_ EPAS_steeringReduced : 4|1@1+ (1,0) [2|-1] "" NEO + SG_ EPAS_sysStatusChecksum : 56|8@1+ (1,0) [0|255] "" NEO + SG_ EPAS_sysStatusCounter : 52|4@1+ (1,0) [0|15] "" NEO + SG_ EPAS_torsionBarTorque : 19|12@0+ (0.010,-20.50) [0|0] "Nm" NEO + +BO_ 3 STW_ANGL_STAT: 8 STW + SG_ CRC_STW_ANGL_STAT : 56|8@1+ (1,0) [0|255] "" NEO + SG_ MC_STW_ANGL_STAT : 52|4@1+ (1,0) [0|15] "" NEO + SG_ StW_Angl : 5|14@0+ (0.50,-2048) [0|0] "deg" NEO + SG_ StW_AnglSens_Id : 36|2@1+ (1,0) [3|3] "" NEO + SG_ StW_AnglSens_Stat : 38|2@1+ (1,0) [4|-1] "" NEO + SG_ StW_AnglSpd : 21|14@0+ (0.50,-2048) [0|0] "/s" NEO + +BO_ 14 STW_ANGLHP_STAT: 8 GTW + SG_ StW_AnglHP : 5|14@0+ (0.1,-819.2) [-819.2|819] "deg" NEO + SG_ StW_AnglHP_Spd : 21|14@0+ (0.5,-4096) [-4096|4095.5] "deg/s" NEO + SG_ StW_AnglHP_Sens_Stat : 33|2@0+ (1,0) [0|0] "" NEO + SG_ StW_AnglHP_Sens_Id : 35|2@0+ (1,0) [0|0] "" NEO + SG_ MC_STW_ANGLHP_STAT : 55|4@0+ (1,0) [0|15] "" NEO + SG_ CRC_STW_ANGLHP_STAT : 63|8@0+ (1,0) [0|0] "" NEO + +BO_ 264 DI_torque1: 8 DI + SG_ DI_torqueDriver : 0|13@1- (0.25,0) [-750|750] "Nm" NEO + SG_ DI_torque1Counter : 13|3@1+ (1,0) [0|0] "" NEO + SG_ DI_torqueMotor : 16|13@1- (0.25,0) [-750|750] "Nm" NEO + SG_ DI_soptState : 29|3@1+ (1,0) [0|0] "" NEO + SG_ DI_motorRPM : 32|16@1- (1,0) [-17000|17000] "RPM" NEO + SG_ DI_pedalPos : 48|8@1+ (0.4,0) [0|100] "%" NEO + SG_ DI_torque1Checksum : 56|8@1+ (1,0) [0|0] "" NEO + +BO_ 280 DI_torque2: 6 DI + SG_ DI_torqueEstimate : 0|12@1- (0.5,0) [-750|750] "Nm" NEO + SG_ DI_gear : 12|3@1+ (1,0) [0|0] "" NEO + SG_ DI_brakePedal : 15|1@1+ (1,0) [0|0] "" NEO + SG_ DI_vehicleSpeed : 16|12@1+ (0.05,-25) [-25|179.75] "MPH" NEO + SG_ DI_gearRequest : 28|3@1+ (1,0) [0|0] "" NEO + SG_ DI_torqueInterfaceFailure : 31|1@1+ (1,0) [0|0] "" NEO + SG_ DI_torque2Counter : 32|4@1+ (1,0) [0|0] "" NEO + SG_ DI_brakePedalState : 36|2@1+ (1,0) [0|0] "" NEO + SG_ DI_epbParkRequest : 38|1@1+ (1,0) [0|0] "" NEO + SG_ DI_epbInterfaceReady : 39|1@1+ (1,0) [0|0] "" NEO + SG_ DI_torque2Checksum : 40|8@1+ (1,0) [0|0] "" NEO + +BO_ 309 ESP_135h: 5 ESP + SG_ ESP_135hChecksum : 16|8@1+ (1,0) [0|255] "" NEO + SG_ ESP_135hCounter : 12|4@1+ (1,0) [0|15] "" NEO + SG_ ESP_absBrakeEvent : 5|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_brakeDiscWipingActive : 3|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_brakeLamp : 4|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_espFaultLamp : 1|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_espLampFlash : 0|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_hillStartAssistActive : 6|2@1+ (1,0) [4|-1] "" NEO + SG_ ESP_messagePumpService : 31|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_messagePumpFailure : 30|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_messageEBDFailure : 29|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_absFaultLamp : 28|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_tcDisabledByFault : 27|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_messageDynoModeActive : 26|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_hydraulicBoostEnabled : 25|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_espOffLamp : 24|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_stabilityControlSts : 9|3@1+ (1,0) [6|7] "" NEO + SG_ ESP_tcLampFlash : 2|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_tcOffLamp : 8|1@1+ (1,0) [0|1] "" NEO + +BO_ 792 GTW_carState: 8 GTW + SG_ BOOT_STATE : 40|2@1+ (1,0) [4|-1] "" NEO + SG_ CERRD : 0|1@1+ (1,0) [2|-1] "" NEO + SG_ DAY : 35|5@1+ (1,0) [2|31] "" NEO + SG_ DOOR_STATE_FL : 10|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_FR : 8|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_FrontTrunk : 52|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_RL : 16|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_RR : 25|2@1+ (1,0) [4|-1] "" NEO + SG_ GTW_updateInProgress : 54|2@1+ (1,0) [4|-1] "" NEO + SG_ Hour : 27|5@1+ (1,0) [0|29] "h" NEO + SG_ MCU_factoryMode : 51|1@1+ (1,0) [2|-1] "" NEO + SG_ MCU_transportModeOn : 50|1@1+ (1,0) [1|1] "" NEO + SG_ MINUTE : 42|6@1+ (1,0) [0|61] "min" NEO + SG_ MONTH : 12|4@1+ (1,0) [0|14] "Month" NEO + SG_ SECOND : 18|6@1+ (1,0) [0|61] "s" NEO + SG_ YEAR : 1|7@1+ (1,2000) [2000|2125] "Year" NEO + +BO_ 872 DI_state: 8 DI + SG_ DI_aebState : 44|3@1+ (1,0) [5|6] "" NEO + SG_ DI_analogSpeed : 20|12@1+ (0.10,0) [0|409.40] "speed" NEO + SG_ DI_cruiseSet : 39|9@1+ (0.50,0) [0|255.50] "speed" NEO + SG_ DI_cruiseState : 8|4@1+ (1,0) [8|15] "" NEO + SG_ DI_digitalSpeed : 48|8@1+ (1,0) [0|254] "" NEO + SG_ DI_driveReady : 0|1@1+ (1,0) [0|1] "" NEO + SG_ DI_immobilizerState : 25|3@1+ (1,0) [7|7] "" NEO + SG_ DI_proximity : 1|1@1+ (1,0) [0|1] "" NEO + SG_ DI_regenLight : 15|1@1+ (1,0) [0|1] "" NEO + SG_ DI_speedUnits : 24|1@1+ (1,0) [2|-1] "" NEO + SG_ DI_state : 12|3@1+ (1,0) [5|7] "" NEO + SG_ DI_stateChecksum : 56|8@1+ (1,0) [0|255] "" NEO + SG_ DI_stateCounter : 40|4@1+ (1,0) [0|15] "" NEO + SG_ DI_systemState : 5|3@1+ (1,0) [5|7] "" NEO + SG_ DI_vehicleHoldState : 2|3@1+ (1,0) [8|-1] "" NEO + +BO_ 109 SBW_RQ_SCCM: 4 STW + SG_ StW_Sw_Stat3 : 0|3@1+ (1,0) [0|0] "" NEO + SG_ MsgTxmtId : 6|2@1+ (1,0) [0|0] "" NEO + SG_ TSL_RND_Posn_StW : 8|4@1+ (1,0) [0|0] "" NEO + SG_ TSL_P_Psd_StW : 12|2@1+ (1,0) [0|0] "" NEO + SG_ MC_SBW_RQ_SCCM : 20|4@1+ (1,0) [0|15] "" NEO + SG_ CRC_SBW_RQ_SCCM : 24|8@1+ (1,0) [0|0] "" NEO + +BO_ 69 STW_ACTN_RQ: 8 STW + SG_ SpdCtrlLvr_Stat : 0|6@1+ (1,0) [0|0] "" NEO + SG_ VSL_Enbl_Rq : 6|1@1+ (1,0) [0|0] "" NEO + SG_ SpdCtrlLvrStat_Inv : 7|1@1+ (1,0) [0|0] "" NEO + SG_ DTR_Dist_Rq : 8|8@1+ (1,0) [0|200] "" NEO + SG_ TurnIndLvr_Stat : 16|2@1+ (1,0) [0|0] "" NEO + SG_ HiBmLvr_Stat : 18|2@1+ (1,0) [0|0] "" NEO + SG_ WprWashSw_Psd : 20|2@1+ (1,0) [0|0] "" NEO + SG_ WprWash_R_Sw_Posn_V2 : 22|2@1+ (1,0) [0|0] "" NEO + SG_ StW_Lvr_Stat : 24|3@1+ (1,0) [0|0] "" NEO + SG_ StW_Cond_Flt : 27|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Cond_Psd : 28|2@1+ (1,0) [0|0] "" NEO + SG_ HrnSw_Psd : 30|2@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw00_Psd : 32|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw01_Psd : 33|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw02_Psd : 34|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw03_Psd : 35|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw04_Psd : 36|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw05_Psd : 37|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw06_Psd : 38|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw07_Psd : 39|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw08_Psd : 40|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw09_Psd : 41|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw10_Psd : 42|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw11_Psd : 43|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw12_Psd : 44|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw13_Psd : 45|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw14_Psd : 46|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw15_Psd : 47|1@1+ (1,0) [0|0] "" NEO + SG_ WprSw6Posn : 48|3@1+ (1,0) [0|0] "" NEO + SG_ MC_STW_ACTN_RQ : 52|4@1+ (1,0) [0|15] "" NEO + SG_ CRC_STW_ACTN_RQ : 56|8@1+ (1,0) [0|0] "" NEO + +BO_ 643 BODY_R1: 8 GTW + SG_ AirTemp_Insd : 40|8@1+ (0.25,0) [0|63.5] "C" NEO + SG_ AirTemp_Outsd : 56|8@1+ (0.5,-40) [-40|86.5] "C" NEO + SG_ Bckl_Sw_RL_Stat_SAM_R : 54|2@1+ (1,0) [4|-1] "" NEO + SG_ Bckl_Sw_RM_Stat_SAM_R : 50|2@1+ (1,0) [4|-1] "" NEO + SG_ Bckl_Sw_RR_Stat_SAM_R : 52|2@1+ (1,0) [4|-1] "" NEO + SG_ DL_RLtch_Stat : 14|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_FL_Stat : 6|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_FR_Stat : 4|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_RL_Stat : 2|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_RR_Stat : 0|2@1+ (1,0) [4|-1] "" NEO + SG_ EngHd_Stat : 12|2@1+ (1,0) [4|-1] "" NEO + SG_ LoBm_On_Rq : 39|1@1+ (1,0) [0|1] "" NEO + SG_ HiBm_On : 38|1@1+ (1,0) [0|1] "" NEO + SG_ Hrn_On : 29|1@1+ (1,0) [0|1] "" NEO + SG_ IrLmp_D_Lt_Flt : 37|1@1+ (1,0) [0|1] "" NEO + SG_ IrLmp_P_Rt_Flt : 36|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Twlgt : 21|3@1+ (1,0) [0|7] "Steps" NEO + SG_ LgtSens_SNA : 20|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Tunnel : 19|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Flt : 18|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Night : 17|1@1+ (1,0) [2|-1] "" NEO + SG_ ADL_LoBm_On_Rq : 16|1@1+ (1,0) [0|1] "" NEO + SG_ LoBm_D_Lt_Flt : 35|1@1+ (1,0) [0|1] "" NEO + SG_ LoBm_P_Rt_Flt : 34|1@1+ (1,0) [0|1] "" NEO + SG_ MPkBrk_Stat : 27|1@1+ (1,0) [2|-1] "" NEO + SG_ RevGr_Engg : 32|2@1+ (1,0) [4|-1] "" NEO + SG_ StW_Cond_Stat : 48|2@1+ (1,0) [4|-1] "" NEO + SG_ Term54_Actv : 28|1@1+ (1,0) [0|1] "" NEO + SG_ Trlr_Stat : 30|2@1+ (1,0) [4|-1] "" NEO + SG_ VTA_Alm_Actv : 10|1@1+ (1,0) [0|1] "" NEO + SG_ WprOutsdPkPosn : 26|1@1+ (1,0) [0|1] "" NEO + +BO_ 760 MCU_gpsVehicleSpeed: 8 MCU + SG_ MCU_gpsHDOP : 0|8@1+ (0.10,0) [0|25.50] "1" NEO + SG_ MCU_gpsVehicleHeading : 8|16@1+ (0.007810,0) [0|511.828350] "deg" NEO + SG_ MCU_gpsVehicleSpeed : 24|16@1+ (0.003910,0) [0|256.241850] "km/hr" NEO + SG_ MCU_mppSpeedLimit : 51|5@1+ (5,0) [0|155] "kph/mph" NEO + SG_ MCU_speedLimitUnits : 41|1@1+ (1,0) [2|-1] "" NEO + SG_ MCU_userSpeedOffset : 42|6@1+ (1,-30) [-30|33] "kph/mph" NEO + SG_ MCU_userSpeedOffsetUnits : 40|1@1+ (1,0) [2|-1] "" NEO + +BO_ 904 MCU_clusterBacklightRequest: 3 NEO + SG_ MCU_clusterBacklightOn : 7|1@1+ (1,0) [0|1] "" NEO + SG_ MCU_clusterBrightnessLevel : 8|8@1+ (0.5,0) [0|127.5] "%" NEO + SG_ MCU_clusterReadyForDrive : 6|1@1+ (1,0) [2|-1] "" NEO + SG_ MCU_clusterReadyForPowerOff : 5|1@1+ (1,0) [0|1] "" NEO + +BO_ 984 MCU_locationStatus: 8 MCU + SG_ MCU_gpsAccuracy : 56|7@1+ (0.200000003,0) [0|25.200000378] "m" NEO + SG_ MCU_latitude : 0|28@1- (0.000001,0) [-134.21772759734682|134.21772659734683] "deg" NEO + SG_ MCU_longitude : 28|28@1- (0.000001,0) [-268.43545519469365|268.43545419469365] "deg" NEO + +BO_ 840 GTW_status: 8 GTW + SG_ GTW_accGoingDown : 1|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_accRailReq : 15|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_brakePressed : 6|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driveGoingDown : 0|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driveRailReq : 7|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driverIsLeaving : 2|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driverPresent : 5|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_hvacGoingDown : 12|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_hvacRailReq : 14|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_icPowerOff : 3|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_notEnough12VForDrive : 4|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_preconditionRequest : 13|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_statusChecksum : 56|8@1+ (1,0) [0|255] "" NEO + SG_ GTW_statusCounter : 52|4@1+ (1,0) [0|15] "" NEO + +VAL_ 3 StW_Angl 16383 "SNA" ; +VAL_ 3 StW_AnglSens_Id 2 "MUST" 0 "PSBL" 1 "SELF" ; +VAL_ 3 StW_AnglSens_Stat 2 "ERR" 3 "ERR_INI" 1 "INI" 0 "OK" ; +VAL_ 3 StW_AnglSpd 16383 "SNA" ; +VAL_ 14 StW_AnglHP 16383 "SNA" ; +VAL_ 14 StW_AnglHP_Spd 16383 "SNA" ; +VAL_ 14 StW_AnglHP_Sens_Stat 3 "SNA" 2 "ERR" 1 "INI" 0 "OK" ; +VAL_ 14 StW_AnglHP_Sens_Id 3 "SNA" 2 "KOSTAL" 1 "DELPHI" 0 "TEST" ; +VAL_ 69 SpdCtrlLvr_Stat 32 "DN_1ST" 16 "UP_1ST" 8 "DN_2ND" 4 "UP_2ND" 2 "RWD" 1 "FWD" 0 "IDLE" ; +VAL_ 69 DTR_Dist_Rq 255 "SNA" 200 "ACC_DIST_7" 166 "ACC_DIST_6" 133 "ACC_DIST_5" 100 "ACC_DIST_4" 66 "ACC_DIST_3" 33 "ACC_DIST_2" 0 "ACC_DIST_1" ; +VAL_ 69 TurnIndLvr_Stat 3 "SNA" 2 "RIGHT" 1 "LEFT" 0 "IDLE" ; +VAL_ 69 HiBmLvr_Stat 3 "SNA" 2 "HIBM_FLSH_ON_PSD" 1 "HIBM_ON_PSD" 0 "IDLE" ; +VAL_ 69 WprWashSw_Psd 3 "SNA" 2 "WASH" 1 "TIPWIPE" 0 "NPSD" ; +VAL_ 69 WprWash_R_Sw_Posn_V2 3 "SNA" 2 "WASH" 1 "INTERVAL" 0 "OFF" ; +VAL_ 69 StW_Lvr_Stat 4 "STW_BACK" 3 "STW_FWD" 2 "STW_DOWN" 1 "STW_UP" 0 "NPSD" ; +VAL_ 69 StW_Cond_Psd 3 "SNA" 2 "DOWN" 1 "UP" 0 "NPSD" ; +VAL_ 69 HrnSw_Psd 3 "SNA" 2 "NDEF2" 1 "PSD" 0 "NPSD" ; +VAL_ 69 StW_Sw00_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 StW_Sw01_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 StW_Sw03_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 StW_Sw04_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 WprSw6Posn 7 "SNA" 6 "STAGE2" 5 "STAGE1" 4 "INTERVAL4" 3 "INTERVAL3" 2 "INTERVAL2" 1 "INTERVAL1" 0 "OFF" ;VAL_ 257 GTW_epasControlType 0 "WITHOUT" 1 "WITH_ANGLE" 3 "WITH_BOTH" 2 "WITH_TORQUE" ; +VAL_ 109 StW_Sw_Stat3 7 "SNA" 6 "NDEF6" 5 "NDEF5" 4 "NDEF4" 3 "PLUS_MINUS" 2 "MINUS" 1 "PLUS" 0 "NPSD" ; +VAL_ 109 MsgTxmtId 3 "NDEF3" 2 "NDEF2" 1 "SCCM" 0 "EWM" ; +VAL_ 109 TSL_RND_Posn_StW 15 "SNA" 8 "D" 6 "INI" 4 "N_DOWN" 2 "N_UP" 1 "R" 0 "IDLE" ; +VAL_ 109 TSL_P_Psd_StW 3 "SNA" 2 "INI" 1 "PSD" 0 "IDLE" ; +VAL_ 257 GTW_epasEmergencyOn 1 "EMERGENCY_POWER" 0 "NONE" ; +VAL_ 257 GTW_epasLDWEnabled 1 "ALLOWED" 0 "INHIBITED" ; +VAL_ 257 GTW_epasPowerMode 0 "DRIVE_OFF" 1 "DRIVE_ON" 3 "LOAD_SHED" 2 "SHUTTING_DOWN" 15 "SNA" ; +VAL_ 257 GTW_epasTuneRequest 1 "DM_COMFORT" 3 "DM_SPORT" 2 "DM_STANDARD" 0 "FAIL_SAFE_DEFAULT" 4 "RWD_COMFORT" 6 "RWD_SPORT" 5 "RWD_STANDARD" 7 "SNA" ; +VAL_ 264 DI_torqueDriver -4096 "SNA" ; +VAL_ 264 DI_torqueMotor -4096 "SNA" ; +VAL_ 264 DI_soptState 7 "SOPT_TEST_SNA" 4 "SOPT_TEST_NOT_RUN" 3 "SOPT_TEST_PASSED" 2 "SOPT_TEST_FAILED" 1 "SOPT_TEST_IN_PROGRESS" 0 "SOPT_PRE_TEST" ; +VAL_ 264 DI_motorRPM -32768 "SNA" ; +VAL_ 264 DI_pedalPos 255 "SNA" ; +VAL_ 280 DI_torqueEstimate -2048 "SNA" ; +VAL_ 280 DI_gear 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ; +VAL_ 280 DI_brakePedal 1 "Applied" 0 "Not_applied" ; +VAL_ 280 DI_vehicleSpeed 4095 "SNA" ; +VAL_ 280 DI_gearRequest 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ; +VAL_ 280 DI_torqueInterfaceFailure 1 "TORQUE_INTERFACE_FAILED" 0 "TORQUE_INTERFACE_NORMAL" ; +VAL_ 280 DI_brakePedalState 3 "SNA" 2 "INVALID" 1 "ON" 0 "OFF" ; +VAL_ 280 DI_epbParkRequest 1 "Park_requested" 0 "No_request" ; +VAL_ 280 DI_epbInterfaceReady 1 "EPB_INTERFACE_READY" 0 "EPB_INTERFACE_NOT_READY" ; +VAL_ 309 ESP_absBrakeEvent 1 "ACTIVE" 0 "NOT_ACTIVE" ; +VAL_ 309 ESP_brakeDiscWipingActive 1 "ACTIVE" 0 "INACTIVE" ; +VAL_ 309 ESP_brakeLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_espFaultLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_espLampFlash 1 "FLASH" 0 "OFF" ; +VAL_ 309 ESP_hillStartAssistActive 1 "ACTIVE" 0 "INACTIVE" 2 "NOT_AVAILABLE" 3 "SNA" ; +VAL_ 309 ESP_absFaultLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_espOffLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_stabilityControlSts 2 "ENGAGED" 3 "FAULTED" 5 "INIT" 4 "NOT_CONFIGURED" 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_tcLampFlash 1 "FLASH" 0 "OFF" ; +VAL_ 760 MCU_speedLimitUnits 1 "KPH" 0 "MPH" ; +VAL_ 760 MCU_userSpeedOffsetUnits 1 "KPH" 0 "MPH" ; +VAL_ 643 AirTemp_Insd 255 "SNA" ; +VAL_ 643 AirTemp_Outsd 254 "INIT" 255 "SNA" ; +VAL_ 643 Bckl_Sw_RL_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ; +VAL_ 643 Bckl_Sw_RM_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ; +VAL_ 643 Bckl_Sw_RR_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ; +VAL_ 643 DL_RLtch_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_FL_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_FR_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_RL_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_RR_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 EngHd_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 LgtSens_Night 0 "DAY" 1 "NIGHT" ; +VAL_ 643 MPkBrk_Stat 1 "ENGG" 0 "RELS" ; +VAL_ 643 RevGr_Engg 0 "DISENGG" 1 "ENGG" 2 "NDEF2" 3 "SNA" ; +VAL_ 643 StW_Cond_Stat 3 "BLINK" 1 "NDEF1" 0 "OFF" 2 "ON" ; +VAL_ 643 Trlr_Stat 2 "NDEF2" 0 "NONE" 1 "OK" 3 "SNA" ; +VAL_ 792 BOOT_STATE 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 CERRD 1 "CAN error detect" 0 "no Can error detected" ; +VAL_ 792 DAY 1 "Init" 0 "SNA" ; +VAL_ 792 DOOR_STATE_FL 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_FR 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_FrontTrunk 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_RL 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_RR 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 GTW_updateInProgress 1 "IN_PROGRESS" 2 "IN_PROGRESS_NOT_USED" 3 "IN_PROGRESS_SNA" 0 "NOT_IN_PROGRESS" ; +VAL_ 792 Hour 30 "Init" 31 "SNA" ; +VAL_ 792 MCU_factoryMode 1 "FACTORY_MODE" 0 "NORMAL_MODE" ; +VAL_ 792 MCU_transportModeOn 0 "NORMAL_MODE" ; +VAL_ 792 MINUTE 62 "Init" 63 "SNA" ; +VAL_ 792 MONTH 1 "Init" 15 "SNA" ; +VAL_ 792 SECOND 62 "Init" 63 "SNA" ; +VAL_ 792 YEAR 126 "Init" 127 "SNA" ; +VAL_ 872 DI_aebState 2 "ENABLED" 4 "FAULT" 7 "SNA" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ; +VAL_ 872 DI_analogSpeed 4095 "SNA" ; +VAL_ 872 DI_cruiseState 2 "ENABLED" 5 "FAULT" 0 "OFF" 4 "OVERRIDE" 7 "PRE_CANCEL" 6 "PRE_FAULT" 1 "STANDBY" 3 "STANDSTILL" ; +VAL_ 872 DI_digitalSpeed 255 "SNA" ; +VAL_ 872 DI_immobilizerState 2 "AUTHENTICATING" 3 "DISARMED" 6 "FAULT" 4 "IDLE" 0 "INIT_SNA" 1 "REQUEST" 5 "RESET" ; +VAL_ 872 DI_speedUnits 1 "KPH" 0 "MPH" ; +VAL_ 872 DI_state 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ; +VAL_ 872 DI_systemState 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ; +VAL_ 872 DI_vehicleHoldState 2 "BLEND_IN" 4 "BLEND_OUT" 6 "FAULT" 7 "INIT" 5 "PARK" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ; +VAL_ 880 EPAS_currentTuneMode 1 "DM_COMFORT" 3 "DM_SPORT" 2 "DM_STANDARD" 0 "FAIL_SAFE_DEFAULT" 4 "RWD_COMFORT" 6 "RWD_SPORT" 5 "RWD_STANDARD" 7 "UNAVAILABLE" ; +VAL_ 880 EPAS_eacErrorCode 14 "EAC_ERROR_EPB_INHIBIT" 3 "EAC_ERROR_HANDS_ON" 7 "EAC_ERROR_HIGH_ANGLE_RATE_REQ" 9 "EAC_ERROR_HIGH_ANGLE_RATE_SAFETY" 6 "EAC_ERROR_HIGH_ANGLE_REQ" 8 "EAC_ERROR_HIGH_ANGLE_SAFETY" 10 "EAC_ERROR_HIGH_MMOT_SAFETY" 11 "EAC_ERROR_HIGH_TORSION_SAFETY" 0 "EAC_ERROR_IDLE" 12 "EAC_ERROR_LOW_ASSIST" 2 "EAC_ERROR_MAX_SPEED" 1 "EAC_ERROR_MIN_SPEED" 13 "EAC_ERROR_PINION_VEL_DIFF" 4 "EAC_ERROR_TMP_FAULT" 5 "EAR_ERROR_MAX_STEER_DELTA" 15 "SNA" ; +VAL_ 880 EPAS_eacStatus 2 "EAC_ACTIVE" 1 "EAC_AVAILABLE" 3 "EAC_FAULT" 0 "EAC_INHIBITED" 4 "SNA" ; +VAL_ 880 EPAS_handsOnLevel 0 "0" 1 "1" 2 "2" 3 "3" ; +VAL_ 880 EPAS_steeringFault 1 "FAULT" 0 "NO_FAULT" ; +VAL_ 880 EPAS_steeringRackForce 1022 "NOT_IN_SPEC" 1023 "SNA" ; +VAL_ 880 EPAS_steeringReduced 0 "NORMAL_ASSIST" 1 "REDUCED_ASSIST" ; +VAL_ 880 EPAS_torsionBarTorque 0 "SEE_SPECIFICATION" 4095 "SNA" 4094 "UNDEFINABLE_DATA" ; +VAL_ 904 MCU_clusterReadyForDrive 0 "NO_SNA" 1 "YES" ; +VAL_ 1160 DAS_steeringAngleRequest 16384 "ZERO_ANGLE" ; +VAL_ 1160 DAS_steeringControlType 1 "ANGLE_CONTROL" 3 "DISABLED" 0 "NONE" 2 "RESERVED" ; +VAL_ 1160 DAS_steeringHapticRequest 1 "ACTIVE" 0 "IDLE" ; diff --git a/src/components/cansignaldata/tests/tesla_can.dbc b/src/components/cansignaldata/tests/tesla_can.dbc new file mode 100644 index 000000000..84e8d7b24 --- /dev/null +++ b/src/components/cansignaldata/tests/tesla_can.dbc @@ -0,0 +1,405 @@ +VERSION "" + + +NS_ : + NS_DESC_ + CM_ + BA_DEF_ + BA_ + VAL_ + CAT_DEF_ + CAT_ + FILTER + BA_DEF_DEF_ + EV_DATA_ + ENVVAR_DATA_ + SGTYPE_ + SGTYPE_VAL_ + BA_DEF_SGTYPE_ + BA_SGTYPE_ + SIG_TYPE_REF_ + VAL_TABLE_ + SIG_GROUP_ + SIG_VALTYPE_ + SIGTYPE_VALTYPE_ + BO_TX_BU_ + BA_DEF_REL_ + BA_REL_ + BA_DEF_DEF_REL_ + BU_SG_REL_ + BU_EV_REL_ + BU_BO_REL_ + SG_MUL_VAL_ + +BS_: + +BU_: + NEO + MCU + GTW + EPAS + DI + ESP + SBW + STW + +VAL_TABLE_ StW_AnglHP_Spd 16383 "SNA" ; +VAL_TABLE_ DI_aebFaultReason 15 "DI_AEB_FAULT_DAS_REQ_DI_UNAVAIL" 14 "DI_AEB_FAULT_ACCEL_REQ_INVALID" 13 "DI_AEB_FAULT_MIN_TIME_BTWN_EVENTS" 12 "DI_AEB_FAULT_ESP_MIA" 11 "DI_AEB_FAULT_ESP_FAULT" 10 "DI_AEB_FAULT_EPB_NOT_PARKED" 9 "DI_AEB_FAULT_ACCEL_OUT_OF_BOUNDS" 8 "DI_AEB_FAULT_PM_REQUEST" 7 "DI_AEB_FAULT_VEL_EST_ABNORMAL" 6 "DI_AEB_FAULT_DAS_SNA" 5 "DI_AEB_FAULT_DAS_CONTROL_MIA" 4 "DI_AEB_FAULT_SPEED_DELTA" 3 "DI_AEB_FAULT_EBR_FAULT" 2 "DI_AEB_FAULT_PM_MIA" 1 "DI_AEB_FAULT_EPB_MIA" 0 "DI_AEB_FAULT_NONE" ; +VAL_TABLE_ DI_aebLockState 3 "AEB_LOCK_STATE_SNA" 2 "AEB_LOCK_STATE_UNUSED" 1 "AEB_LOCK_STATE_UNLOCKED" 0 "AEB_LOCK_STATE_LOCKED" ; +VAL_TABLE_ DI_aebSmState 7 "DI_AEB_STATE_FAULT" 6 "DI_AEB_STATE_EXIT" 5 "DI_AEB_STATE_STANDSTILL" 4 "DI_AEB_STATE_STOPPING" 3 "DI_AEB_STATE_ENABLE" 2 "DI_AEB_STATE_ENABLE_INIT" 1 "DI_AEB_STATE_STANDBY" 0 "DI_AEB_STATE_UNAVAILABLE" ; +VAL_TABLE_ DI_aebState 7 "AEB_CAN_STATE_SNA" 4 "AEB_CAN_STATE_FAULT" 3 "AEB_CAN_STATE_STANDSTILL" 2 "AEB_CAN_STATE_ENABLED" 1 "AEB_CAN_STATE_STANDBY" 0 "AEB_CAN_STATE_UNAVAILABLE" ; +VAL_TABLE_ DI_epbInterfaceReady 1 "EPB_INTERFACE_READY" 0 "EPB_INTERFACE_NOT_READY" ; +VAL_TABLE_ DI_gear 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ; +VAL_TABLE_ DI_gpoReason 8 "DI_GPO_NUMREASONS" 7 "DI_GPO_CAPACITOR_OVERTEMP" 6 "DI_GPO_NOT_ENOUGH_12V" 5 "DI_GPO_NO_BATTERY_POWER" 4 "DI_GPO_AMBIENT_OVERTEMP" 3 "DI_GPO_FLUID_DELTAT" 2 "DI_GPO_STATOR_OVERTEMP" 1 "DI_GPO_HEATSINK_OVERTEMP" 0 "DI_GPO_OUTLET_OVERTEMP" ; +VAL_TABLE_ DI_immobilizerCondition 1 "DI_IMM_CONDITION_LEARNED" 0 "DI_IMM_CONDITION_VIRGIN_SNA" ; +VAL_TABLE_ DI_immobilizerState 7 "DI_IMM_STATE_FAULT" 6 "DI_IMM_STATE_FAULTRETRY" 5 "DI_IMM_STATE_RESET" 4 "DI_IMM_STATE_LEARN" 3 "DI_IMM_STATE_DISARMED" 2 "DI_IMM_STATE_AUTHENTICATING" 1 "DI_IMM_STATE_REQUEST" 0 "DI_IMM_STATE_INIT_SNA" ; +VAL_TABLE_ DI_limpReason 24 "DI_LIMP_NUMREASONS" 23 "DI_LIMP_CAPACITOR_OVERTEMP" 22 "DI_LIMP_GTW_MIA" 21 "DI_LIMP_TRQCMD_VALIDITY_UNKNOWN" 20 "DI_LIMP_DI_MIA" 19 "DI_LIMP_CONFIG_MISMATCH" 18 "DI_LIMP_HEATSINK_TEMP" 17 "DI_LIMP_PMREQUEST" 16 "DI_LIMP_PMHEARTBEAT" 15 "DI_LIMP_TRQ_CROSS_CHECK" 14 "DI_LIMP_EXTERNAL_COMMAND" 13 "DI_LIMP_WRONG_CS_CALIBRATION" 12 "DI_LIMP_STATOR_TEMP" 11 "DI_LIMP_DELTAT_TOO_NEGATIVE" 10 "DI_LIMP_DELTAT_TOO_POSITIVE" 9 "DI_LIMP_AMBIENT_TEMP" 8 "DI_LIMP_OUTLET_TEMP" 7 "DI_LIMP_LOW_FLOW" 6 "DI_LIMP_BMS_MIA" 5 "DI_LIMP_12V_SUPPLY_UNDERVOLTAGE" 4 "DI_LIMP_NO_FLUID" 3 "DI_LIMP_NO_FUNC_HEATSINK_SENSOR" 2 "DI_LIMP_NO_FUNC_STATORT_SENSOR" 1 "DI_LIMP_BUSV_SENSOR_IRRATIONAL" 0 "DI_LIMP_PHASE_IMBALANCE" ; +VAL_TABLE_ DI_mode 2 "DI_MODE_DYNO" 1 "DI_MODE_DRIVE" 0 "DI_MODE_UNDEF" ; +VAL_TABLE_ DI_motorType 14 "DI_MOTOR_F2AE" 13 "DI_MOTOR_F2AD" 12 "DI_MOTOR_F2AC" 11 "DI_MOTOR_F2AB" 10 "DI_MOTOR_F1AC" 9 "DI_MOTOR_SSR1A" 8 "DI_MOTOR_F1A" 7 "DI_MOTOR_M7M6" 6 "DI_MOTOR_M8A" 5 "DI_MOTOR_M7M5" 4 "DI_MOTOR_M7M4" 3 "DI_MOTOR_M7M3" 2 "DI_MOTOR_ROADSTER_SPORT" 1 "DI_MOTOR_ROADSTER_BASE" 0 "DI_MOTOR_SNA" ; +VAL_TABLE_ DI_speedUnits 1 "DI_SPEED_KPH" 0 "DI_SPEED_MPH" ; +VAL_TABLE_ DI_state 4 "DI_STATE_ENABLE" 3 "DI_STATE_FAULT" 2 "DI_STATE_CLEAR_FAULT" 1 "DI_STATE_STANDBY" 0 "DI_STATE_PREAUTH" ; +VAL_TABLE_ DI_velocityEstimatorState 4 "VE_STATE_BACKUP_MOTOR" 3 "VE_STATE_BACKUP_WHEELS_B" 2 "VE_STATE_BACKUP_WHEELS_A" 1 "VE_STATE_WHEELS_NORMAL" 0 "VE_STATE_NOT_INITIALIZED" ; + + +BO_ 1160 DAS_steeringControl: 4 NEO + SG_ DAS_steeringControlType : 23|2@0+ (1,0) [0|0] "" EPAS + SG_ DAS_steeringControlChecksum : 31|8@0+ (1,0) [0|0] "" EPAS + SG_ DAS_steeringControlCounter : 19|4@0+ (1,0) [0|0] "" EPAS + SG_ DAS_steeringAngleRequest : 6|15@0+ (0.1,-1638.35) [-1638.35|1638.35] "deg" EPAS + SG_ DAS_steeringHapticRequest : 7|1@0+ (1,0) [0|0] "" EPAS + +BO_ 257 GTW_epasControl: 3 NEO + SG_ GTW_epasControlChecksum : 16|8@1+ (1,0) [0|255] "" NEO + SG_ GTW_epasControlCounter : 12|4@1+ (1,0) [0|15] "" NEO + SG_ GTW_epasControlType : 8|2@1+ (1,0) [4|-1] "" NEO + SG_ GTW_epasEmergencyOn : 0|1@1+ (1,0) [2|-1] "" NEO + SG_ GTW_epasLDWEnabled : 11|1@1+ (1,0) [2|-1] "" NEO + SG_ GTW_epasPowerMode : 1|4@1+ (1,0) [4|14] "" NEO + SG_ GTW_epasTuneRequest : 5|3@1+ (1,0) [8|-1] "" NEO + +BO_ 880 EPAS_sysStatus: 8 EPAS + SG_ EPAS_currentTuneMode : 0|4@1+ (1,0) [8|15] "" NEO + SG_ EPAS_eacErrorCode : 16|4@1+ (1,0) [16|-1] "" NEO + SG_ EPAS_eacStatus : 48|3@1+ (1,0) [5|7] "" NEO + SG_ EPAS_handsOnLevel : 32|2@1+ (1,0) [4|-1] "" NEO + SG_ EPAS_internalSAS : 37|14@0+ (0.10,-819.200010) [0|0] "deg" NEO + SG_ EPAS_steeringFault : 5|1@1+ (1,0) [2|-1] "" NEO + SG_ EPAS_steeringRackForce : 1|10@0+ (50,-25575) [0|0] "N" NEO + SG_ EPAS_steeringReduced : 4|1@1+ (1,0) [2|-1] "" NEO + SG_ EPAS_sysStatusChecksum : 56|8@1+ (1,0) [0|255] "" NEO + SG_ EPAS_sysStatusCounter : 52|4@1+ (1,0) [0|15] "" NEO + SG_ EPAS_torsionBarTorque : 19|12@0+ (0.010,-20.50) [0|0] "Nm" NEO + +BO_ 3 STW_ANGL_STAT: 8 STW + SG_ CRC_STW_ANGL_STAT : 56|8@1+ (1,0) [0|255] "" NEO + SG_ MC_STW_ANGL_STAT : 52|4@1+ (1,0) [0|15] "" NEO + SG_ StW_Angl : 5|14@0+ (0.50,-2048) [0|0] "deg" NEO + SG_ StW_AnglSens_Id : 36|2@1+ (1,0) [3|3] "" NEO + SG_ StW_AnglSens_Stat : 38|2@1+ (1,0) [4|-1] "" NEO + SG_ StW_AnglSpd : 21|14@0+ (0.50,-2048) [0|0] "/s" NEO + +BO_ 14 STW_ANGLHP_STAT: 8 GTW + SG_ StW_AnglHP : 5|14@0+ (0.1,-819.2) [-819.2|819] "deg" NEO + SG_ StW_AnglHP_Spd : 21|14@0+ (0.5,-4096) [-4096|4095.5] "deg/s" NEO + SG_ StW_AnglHP_Sens_Stat : 33|2@0+ (1,0) [0|0] "" NEO + SG_ StW_AnglHP_Sens_Id : 35|2@0+ (1,0) [0|0] "" NEO + SG_ MC_STW_ANGLHP_STAT : 55|4@0+ (1,0) [0|15] "" NEO + SG_ CRC_STW_ANGLHP_STAT : 63|8@0+ (1,0) [0|0] "" NEO + +BO_ 264 DI_torque1: 8 DI + SG_ DI_torqueDriver : 0|13@1- (0.25,0) [-750|750] "Nm" NEO + SG_ DI_torque1Counter : 13|3@1+ (1,0) [0|0] "" NEO + SG_ DI_torqueMotor : 16|13@1- (0.25,0) [-750|750] "Nm" NEO + SG_ DI_soptState : 29|3@1+ (1,0) [0|0] "" NEO + SG_ DI_motorRPM : 32|16@1- (1,0) [-17000|17000] "RPM" NEO + SG_ DI_pedalPos : 48|8@1+ (0.4,0) [0|100] "%" NEO + SG_ DI_torque1Checksum : 56|8@1+ (1,0) [0|0] "" NEO + +BO_ 280 DI_torque2: 6 DI + SG_ DI_torqueEstimate : 0|12@1- (0.5,0) [-750|750] "Nm" NEO + SG_ DI_gear : 12|3@1+ (1,0) [0|0] "" NEO + SG_ DI_brakePedal : 15|1@1+ (1,0) [0|0] "" NEO + SG_ DI_vehicleSpeed : 16|12@1+ (0.05,-25) [-25|179.75] "MPH" NEO + SG_ DI_gearRequest : 28|3@1+ (1,0) [0|0] "" NEO + SG_ DI_torqueInterfaceFailure : 31|1@1+ (1,0) [0|0] "" NEO + SG_ DI_torque2Counter : 32|4@1+ (1,0) [0|0] "" NEO + SG_ DI_brakePedalState : 36|2@1+ (1,0) [0|0] "" NEO + SG_ DI_epbParkRequest : 38|1@1+ (1,0) [0|0] "" NEO + SG_ DI_epbInterfaceReady : 39|1@1+ (1,0) [0|0] "" NEO + SG_ DI_torque2Checksum : 40|8@1+ (1,0) [0|0] "" NEO + +BO_ 309 ESP_135h: 5 ESP + SG_ ESP_135hChecksum : 16|8@1+ (1,0) [0|255] "" NEO + SG_ ESP_135hCounter : 12|4@1+ (1,0) [0|15] "" NEO + SG_ ESP_absBrakeEvent : 5|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_brakeDiscWipingActive : 3|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_brakeLamp : 4|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_espFaultLamp : 1|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_espLampFlash : 0|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_hillStartAssistActive : 6|2@1+ (1,0) [4|-1] "" NEO + SG_ ESP_messagePumpService : 31|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_messagePumpFailure : 30|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_messageEBDFailure : 29|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_absFaultLamp : 28|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_tcDisabledByFault : 27|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_messageDynoModeActive : 26|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_hydraulicBoostEnabled : 25|1@1+ (1,0) [0|1] "" NEO + SG_ ESP_espOffLamp : 24|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_stabilityControlSts : 9|3@1+ (1,0) [6|7] "" NEO + SG_ ESP_tcLampFlash : 2|1@1+ (1,0) [2|-1] "" NEO + SG_ ESP_tcOffLamp : 8|1@1+ (1,0) [0|1] "" NEO + +BO_ 792 GTW_carState: 8 GTW + SG_ BOOT_STATE : 40|2@1+ (1,0) [4|-1] "" NEO + SG_ CERRD : 0|1@1+ (1,0) [2|-1] "" NEO + SG_ DAY : 35|5@1+ (1,0) [2|31] "" NEO + SG_ DOOR_STATE_FL : 10|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_FR : 8|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_FrontTrunk : 52|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_RL : 16|2@1+ (1,0) [4|-1] "" NEO + SG_ DOOR_STATE_RR : 25|2@1+ (1,0) [4|-1] "" NEO + SG_ GTW_updateInProgress : 54|2@1+ (1,0) [4|-1] "" NEO + SG_ Hour : 27|5@1+ (1,0) [0|29] "h" NEO + SG_ MCU_factoryMode : 51|1@1+ (1,0) [2|-1] "" NEO + SG_ MCU_transportModeOn : 50|1@1+ (1,0) [1|1] "" NEO + SG_ MINUTE : 42|6@1+ (1,0) [0|61] "min" NEO + SG_ MONTH : 12|4@1+ (1,0) [0|14] "Month" NEO + SG_ SECOND : 18|6@1+ (1,0) [0|61] "s" NEO + SG_ YEAR : 1|7@1+ (1,2000) [2000|2125] "Year" NEO + +BO_ 872 DI_state: 8 DI + SG_ DI_aebState : 44|3@1+ (1,0) [5|6] "" NEO + SG_ DI_analogSpeed : 20|12@1+ (0.10,0) [0|409.40] "speed" NEO + SG_ DI_cruiseSet : 39|9@1+ (0.50,0) [0|255.50] "speed" NEO + SG_ DI_cruiseState : 8|4@1+ (1,0) [8|15] "" NEO + SG_ DI_digitalSpeed : 48|8@1+ (1,0) [0|254] "" NEO + SG_ DI_driveReady : 0|1@1+ (1,0) [0|1] "" NEO + SG_ DI_immobilizerState : 25|3@1+ (1,0) [7|7] "" NEO + SG_ DI_proximity : 1|1@1+ (1,0) [0|1] "" NEO + SG_ DI_regenLight : 15|1@1+ (1,0) [0|1] "" NEO + SG_ DI_speedUnits : 24|1@1+ (1,0) [2|-1] "" NEO + SG_ DI_state : 12|3@1+ (1,0) [5|7] "" NEO + SG_ DI_stateChecksum : 56|8@1+ (1,0) [0|255] "" NEO + SG_ DI_stateCounter : 40|4@1+ (1,0) [0|15] "" NEO + SG_ DI_systemState : 5|3@1+ (1,0) [5|7] "" NEO + SG_ DI_vehicleHoldState : 2|3@1+ (1,0) [8|-1] "" NEO + +BO_ 109 SBW_RQ_SCCM: 4 STW + SG_ StW_Sw_Stat3 : 0|3@1+ (1,0) [0|0] "" NEO + SG_ MsgTxmtId : 6|2@1+ (1,0) [0|0] "" NEO + SG_ TSL_RND_Posn_StW : 8|4@1+ (1,0) [0|0] "" NEO + SG_ TSL_P_Psd_StW : 12|2@1+ (1,0) [0|0] "" NEO + SG_ MC_SBW_RQ_SCCM : 20|4@1+ (1,0) [0|15] "" NEO + SG_ CRC_SBW_RQ_SCCM : 24|8@1+ (1,0) [0|0] "" NEO + +BO_ 69 STW_ACTN_RQ: 8 STW + SG_ SpdCtrlLvr_Stat : 0|6@1+ (1,0) [0|0] "" NEO + SG_ VSL_Enbl_Rq : 6|1@1+ (1,0) [0|0] "" NEO + SG_ SpdCtrlLvrStat_Inv : 7|1@1+ (1,0) [0|0] "" NEO + SG_ DTR_Dist_Rq : 8|8@1+ (1,0) [0|200] "" NEO + SG_ TurnIndLvr_Stat : 16|2@1+ (1,0) [0|0] "" NEO + SG_ HiBmLvr_Stat : 18|2@1+ (1,0) [0|0] "" NEO + SG_ WprWashSw_Psd : 20|2@1+ (1,0) [0|0] "" NEO + SG_ WprWash_R_Sw_Posn_V2 : 22|2@1+ (1,0) [0|0] "" NEO + SG_ StW_Lvr_Stat : 24|3@1+ (1,0) [0|0] "" NEO + SG_ StW_Cond_Flt : 27|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Cond_Psd : 28|2@1+ (1,0) [0|0] "" NEO + SG_ HrnSw_Psd : 30|2@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw00_Psd : 32|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw01_Psd : 33|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw02_Psd : 34|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw03_Psd : 35|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw04_Psd : 36|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw05_Psd : 37|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw06_Psd : 38|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw07_Psd : 39|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw08_Psd : 40|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw09_Psd : 41|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw10_Psd : 42|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw11_Psd : 43|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw12_Psd : 44|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw13_Psd : 45|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw14_Psd : 46|1@1+ (1,0) [0|0] "" NEO + SG_ StW_Sw15_Psd : 47|1@1+ (1,0) [0|0] "" NEO + SG_ WprSw6Posn : 48|3@1+ (1,0) [0|0] "" NEO + SG_ MC_STW_ACTN_RQ : 52|4@1+ (1,0) [0|15] "" NEO + SG_ CRC_STW_ACTN_RQ : 56|8@1+ (1,0) [0|0] "" NEO + +BO_ 643 BODY_R1: 8 GTW + SG_ AirTemp_Insd : 40|8@1+ (0.25,0) [0|63.5] "C" NEO + SG_ AirTemp_Outsd : 56|8@1+ (0.5,-40) [-40|86.5] "C" NEO + SG_ Bckl_Sw_RL_Stat_SAM_R : 54|2@1+ (1,0) [4|-1] "" NEO + SG_ Bckl_Sw_RM_Stat_SAM_R : 50|2@1+ (1,0) [4|-1] "" NEO + SG_ Bckl_Sw_RR_Stat_SAM_R : 52|2@1+ (1,0) [4|-1] "" NEO + SG_ DL_RLtch_Stat : 14|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_FL_Stat : 6|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_FR_Stat : 4|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_RL_Stat : 2|2@1+ (1,0) [4|-1] "" NEO + SG_ DrRLtch_RR_Stat : 0|2@1+ (1,0) [4|-1] "" NEO + SG_ EngHd_Stat : 12|2@1+ (1,0) [4|-1] "" NEO + SG_ LoBm_On_Rq : 39|1@1+ (1,0) [0|1] "" NEO + SG_ HiBm_On : 38|1@1+ (1,0) [0|1] "" NEO + SG_ Hrn_On : 29|1@1+ (1,0) [0|1] "" NEO + SG_ IrLmp_D_Lt_Flt : 37|1@1+ (1,0) [0|1] "" NEO + SG_ IrLmp_P_Rt_Flt : 36|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Twlgt : 21|3@1+ (1,0) [0|7] "Steps" NEO + SG_ LgtSens_SNA : 20|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Tunnel : 19|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Flt : 18|1@1+ (1,0) [0|1] "" NEO + SG_ LgtSens_Night : 17|1@1+ (1,0) [2|-1] "" NEO + SG_ ADL_LoBm_On_Rq : 16|1@1+ (1,0) [0|1] "" NEO + SG_ LoBm_D_Lt_Flt : 35|1@1+ (1,0) [0|1] "" NEO + SG_ LoBm_P_Rt_Flt : 34|1@1+ (1,0) [0|1] "" NEO + SG_ MPkBrk_Stat : 27|1@1+ (1,0) [2|-1] "" NEO + SG_ RevGr_Engg : 32|2@1+ (1,0) [4|-1] "" NEO + SG_ StW_Cond_Stat : 48|2@1+ (1,0) [4|-1] "" NEO + SG_ Term54_Actv : 28|1@1+ (1,0) [0|1] "" NEO + SG_ Trlr_Stat : 30|2@1+ (1,0) [4|-1] "" NEO + SG_ VTA_Alm_Actv : 10|1@1+ (1,0) [0|1] "" NEO + SG_ WprOutsdPkPosn : 26|1@1+ (1,0) [0|1] "" NEO + +BO_ 760 MCU_gpsVehicleSpeed: 8 MCU + SG_ MCU_gpsHDOP : 0|8@1+ (0.10,0) [0|25.50] "1" NEO + SG_ MCU_gpsVehicleHeading : 8|16@1+ (0.007810,0) [0|511.828350] "deg" NEO + SG_ MCU_gpsVehicleSpeed : 24|16@1+ (0.003910,0) [0|256.241850] "km/hr" NEO + SG_ MCU_mppSpeedLimit : 51|5@1+ (5,0) [0|155] "kph/mph" NEO + SG_ MCU_speedLimitUnits : 41|1@1+ (1,0) [2|-1] "" NEO + SG_ MCU_userSpeedOffset : 42|6@1+ (1,-30) [-30|33] "kph/mph" NEO + SG_ MCU_userSpeedOffsetUnits : 40|1@1+ (1,0) [2|-1] "" NEO + +BO_ 904 MCU_clusterBacklightRequest: 3 NEO + SG_ MCU_clusterBacklightOn : 7|1@1+ (1,0) [0|1] "" NEO + SG_ MCU_clusterBrightnessLevel : 8|8@1+ (0.5,0) [0|127.5] "%" NEO + SG_ MCU_clusterReadyForDrive : 6|1@1+ (1,0) [2|-1] "" NEO + SG_ MCU_clusterReadyForPowerOff : 5|1@1+ (1,0) [0|1] "" NEO + +BO_ 984 MCU_locationStatus: 8 MCU + SG_ MCU_gpsAccuracy : 56|7@1+ (0.200000003,0) [0|25.200000378] "m" NEO + SG_ MCU_latitude : 0|28@1- (0.000001,0) [-134.21772759734682|134.21772659734683] "deg" NEO + SG_ MCU_longitude : 28|28@1- (0.000001,0) [-268.43545519469365|268.43545419469365] "deg" NEO + +BO_ 840 GTW_status: 8 GTW + SG_ GTW_accGoingDown : 1|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_accRailReq : 15|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_brakePressed : 6|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driveGoingDown : 0|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driveRailReq : 7|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driverIsLeaving : 2|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_driverPresent : 5|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_hvacGoingDown : 12|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_hvacRailReq : 14|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_icPowerOff : 3|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_notEnough12VForDrive : 4|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_preconditionRequest : 13|1@1+ (1,0) [0|1] "" NEO + SG_ GTW_statusChecksum : 56|8@1+ (1,0) [0|255] "" NEO + SG_ GTW_statusCounter : 52|4@1+ (1,0) [0|15] "" NEO + +VAL_ 3 StW_Angl 16383 "SNA" ; +VAL_ 3 StW_AnglSens_Id 2 "MUST" 0 "PSBL" 1 "SELF" ; +VAL_ 3 StW_AnglSens_Stat 2 "ERR" 3 "ERR_INI" 1 "INI" 0 "OK" ; +VAL_ 3 StW_AnglSpd 16383 "SNA" ; +VAL_ 14 StW_AnglHP 16383 "SNA" ; +VAL_ 14 StW_AnglHP_Spd 16383 "SNA" ; +VAL_ 14 StW_AnglHP_Sens_Stat 3 "SNA" 2 "ERR" 1 "INI" 0 "OK" ; +VAL_ 14 StW_AnglHP_Sens_Id 3 "SNA" 2 "KOSTAL" 1 "DELPHI" 0 "TEST" ; +VAL_ 69 SpdCtrlLvr_Stat 32 "DN_1ST" 16 "UP_1ST" 8 "DN_2ND" 4 "UP_2ND" 2 "RWD" 1 "FWD" 0 "IDLE" ; +VAL_ 69 DTR_Dist_Rq 255 "SNA" 200 "ACC_DIST_7" 166 "ACC_DIST_6" 133 "ACC_DIST_5" 100 "ACC_DIST_4" 66 "ACC_DIST_3" 33 "ACC_DIST_2" 0 "ACC_DIST_1" ; +VAL_ 69 TurnIndLvr_Stat 3 "SNA" 2 "RIGHT" 1 "LEFT" 0 "IDLE" ; +VAL_ 69 HiBmLvr_Stat 3 "SNA" 2 "HIBM_FLSH_ON_PSD" 1 "HIBM_ON_PSD" 0 "IDLE" ; +VAL_ 69 WprWashSw_Psd 3 "SNA" 2 "WASH" 1 "TIPWIPE" 0 "NPSD" ; +VAL_ 69 WprWash_R_Sw_Posn_V2 3 "SNA" 2 "WASH" 1 "INTERVAL" 0 "OFF" ; +VAL_ 69 StW_Lvr_Stat 4 "STW_BACK" 3 "STW_FWD" 2 "STW_DOWN" 1 "STW_UP" 0 "NPSD" ; +VAL_ 69 StW_Cond_Psd 3 "SNA" 2 "DOWN" 1 "UP" 0 "NPSD" ; +VAL_ 69 HrnSw_Psd 3 "SNA" 2 "NDEF2" 1 "PSD" 0 "NPSD" ; +VAL_ 69 StW_Sw00_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 StW_Sw01_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 StW_Sw03_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 StW_Sw04_Psd 1 "PRESSED" 0 "NOT_PRESSED_SNA" ; +VAL_ 69 WprSw6Posn 7 "SNA" 6 "STAGE2" 5 "STAGE1" 4 "INTERVAL4" 3 "INTERVAL3" 2 "INTERVAL2" 1 "INTERVAL1" 0 "OFF" ;VAL_ 257 GTW_epasControlType 0 "WITHOUT" 1 "WITH_ANGLE" 3 "WITH_BOTH" 2 "WITH_TORQUE" ; +VAL_ 109 StW_Sw_Stat3 7 "SNA" 6 "NDEF6" 5 "NDEF5" 4 "NDEF4" 3 "PLUS_MINUS" 2 "MINUS" 1 "PLUS" 0 "NPSD" ; +VAL_ 109 MsgTxmtId 3 "NDEF3" 2 "NDEF2" 1 "SCCM" 0 "EWM" ; +VAL_ 109 TSL_RND_Posn_StW 15 "SNA" 8 "D" 6 "INI" 4 "N_DOWN" 2 "N_UP" 1 "R" 0 "IDLE" ; +VAL_ 109 TSL_P_Psd_StW 3 "SNA" 2 "INI" 1 "PSD" 0 "IDLE" ; +VAL_ 257 GTW_epasEmergencyOn 1 "EMERGENCY_POWER" 0 "NONE" ; +VAL_ 257 GTW_epasLDWEnabled 1 "ALLOWED" 0 "INHIBITED" ; +VAL_ 257 GTW_epasPowerMode 0 "DRIVE_OFF" 1 "DRIVE_ON" 3 "LOAD_SHED" 2 "SHUTTING_DOWN" 15 "SNA" ; +VAL_ 257 GTW_epasTuneRequest 1 "DM_COMFORT" 3 "DM_SPORT" 2 "DM_STANDARD" 0 "FAIL_SAFE_DEFAULT" 4 "RWD_COMFORT" 6 "RWD_SPORT" 5 "RWD_STANDARD" 7 "SNA" ; +VAL_ 264 DI_torqueDriver -4096 "SNA" ; +VAL_ 264 DI_torqueMotor -4096 "SNA" ; +VAL_ 264 DI_soptState 7 "SOPT_TEST_SNA" 4 "SOPT_TEST_NOT_RUN" 3 "SOPT_TEST_PASSED" 2 "SOPT_TEST_FAILED" 1 "SOPT_TEST_IN_PROGRESS" 0 "SOPT_PRE_TEST" ; +VAL_ 264 DI_motorRPM -32768 "SNA" ; +VAL_ 264 DI_pedalPos 255 "SNA" ; +VAL_ 280 DI_torqueEstimate -2048 "SNA" ; +VAL_ 280 DI_gear 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ; +VAL_ 280 DI_brakePedal 1 "Applied" 0 "Not_applied" ; +VAL_ 280 DI_vehicleSpeed 4095 "SNA" ; +VAL_ 280 DI_gearRequest 7 "DI_GEAR_SNA" 4 "DI_GEAR_D" 3 "DI_GEAR_N" 2 "DI_GEAR_R" 1 "DI_GEAR_P" 0 "DI_GEAR_INVALID" ; +VAL_ 280 DI_torqueInterfaceFailure 1 "TORQUE_INTERFACE_FAILED" 0 "TORQUE_INTERFACE_NORMAL" ; +VAL_ 280 DI_brakePedalState 3 "SNA" 2 "INVALID" 1 "ON" 0 "OFF" ; +VAL_ 280 DI_epbParkRequest 1 "Park_requested" 0 "No_request" ; +VAL_ 280 DI_epbInterfaceReady 1 "EPB_INTERFACE_READY" 0 "EPB_INTERFACE_NOT_READY" ; +VAL_ 309 ESP_absBrakeEvent 1 "ACTIVE" 0 "NOT_ACTIVE" ; +VAL_ 309 ESP_brakeDiscWipingActive 1 "ACTIVE" 0 "INACTIVE" ; +VAL_ 309 ESP_brakeLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_espFaultLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_espLampFlash 1 "FLASH" 0 "OFF" ; +VAL_ 309 ESP_hillStartAssistActive 1 "ACTIVE" 0 "INACTIVE" 2 "NOT_AVAILABLE" 3 "SNA" ; +VAL_ 309 ESP_absFaultLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_espOffLamp 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_stabilityControlSts 2 "ENGAGED" 3 "FAULTED" 5 "INIT" 4 "NOT_CONFIGURED" 0 "OFF" 1 "ON" ; +VAL_ 309 ESP_tcLampFlash 1 "FLASH" 0 "OFF" ; +VAL_ 760 MCU_speedLimitUnits 1 "KPH" 0 "MPH" ; +VAL_ 760 MCU_userSpeedOffsetUnits 1 "KPH" 0 "MPH" ; +VAL_ 643 AirTemp_Insd 255 "SNA" ; +VAL_ 643 AirTemp_Outsd 254 "INIT" 255 "SNA" ; +VAL_ 643 Bckl_Sw_RL_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ; +VAL_ 643 Bckl_Sw_RM_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ; +VAL_ 643 Bckl_Sw_RR_Stat_SAM_R 2 "FLT" 1 "NOT" 0 "OK" 3 "SNA" ; +VAL_ 643 DL_RLtch_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_FL_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_FR_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_RL_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 DrRLtch_RR_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 EngHd_Stat 1 "CLS" 0 "NDEF0" 2 "OPN" 3 "SNA" ; +VAL_ 643 LgtSens_Night 0 "DAY" 1 "NIGHT" ; +VAL_ 643 MPkBrk_Stat 1 "ENGG" 0 "RELS" ; +VAL_ 643 RevGr_Engg 0 "DISENGG" 1 "ENGG" 2 "NDEF2" 3 "SNA" ; +VAL_ 643 StW_Cond_Stat 3 "BLINK" 1 "NDEF1" 0 "OFF" 2 "ON" ; +VAL_ 643 Trlr_Stat 2 "NDEF2" 0 "NONE" 1 "OK" 3 "SNA" ; +VAL_ 792 BOOT_STATE 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 CERRD 1 "CAN error detect" 0 "no Can error detected" ; +VAL_ 792 DAY 1 "Init" 0 "SNA" ; +VAL_ 792 DOOR_STATE_FL 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_FR 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_FrontTrunk 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_RL 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 DOOR_STATE_RR 2 "Init" 3 "SNA" 0 "closed" 1 "open" ; +VAL_ 792 GTW_updateInProgress 1 "IN_PROGRESS" 2 "IN_PROGRESS_NOT_USED" 3 "IN_PROGRESS_SNA" 0 "NOT_IN_PROGRESS" ; +VAL_ 792 Hour 30 "Init" 31 "SNA" ; +VAL_ 792 MCU_factoryMode 1 "FACTORY_MODE" 0 "NORMAL_MODE" ; +VAL_ 792 MCU_transportModeOn 0 "NORMAL_MODE" ; +VAL_ 792 MINUTE 62 "Init" 63 "SNA" ; +VAL_ 792 MONTH 1 "Init" 15 "SNA" ; +VAL_ 792 SECOND 62 "Init" 63 "SNA" ; +VAL_ 792 YEAR 126 "Init" 127 "SNA" ; +VAL_ 872 DI_aebState 2 "ENABLED" 4 "FAULT" 7 "SNA" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ; +VAL_ 872 DI_analogSpeed 4095 "SNA" ; +VAL_ 872 DI_cruiseState 2 "ENABLED" 5 "FAULT" 0 "OFF" 4 "OVERRIDE" 7 "PRE_CANCEL" 6 "PRE_FAULT" 1 "STANDBY" 3 "STANDSTILL" ; +VAL_ 872 DI_digitalSpeed 255 "SNA" ; +VAL_ 872 DI_immobilizerState 2 "AUTHENTICATING" 3 "DISARMED" 6 "FAULT" 4 "IDLE" 0 "INIT_SNA" 1 "REQUEST" 5 "RESET" ; +VAL_ 872 DI_speedUnits 1 "KPH" 0 "MPH" ; +VAL_ 872 DI_state 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ; +VAL_ 872 DI_systemState 3 "ABORT" 4 "ENABLE" 2 "FAULT" 1 "STANDBY" 0 "UNAVAILABLE" ; +VAL_ 872 DI_vehicleHoldState 2 "BLEND_IN" 4 "BLEND_OUT" 6 "FAULT" 7 "INIT" 5 "PARK" 1 "STANDBY" 3 "STANDSTILL" 0 "UNAVAILABLE" ; +VAL_ 880 EPAS_currentTuneMode 1 "DM_COMFORT" 3 "DM_SPORT" 2 "DM_STANDARD" 0 "FAIL_SAFE_DEFAULT" 4 "RWD_COMFORT" 6 "RWD_SPORT" 5 "RWD_STANDARD" 7 "UNAVAILABLE" ; +VAL_ 880 EPAS_eacErrorCode 14 "EAC_ERROR_EPB_INHIBIT" 3 "EAC_ERROR_HANDS_ON" 7 "EAC_ERROR_HIGH_ANGLE_RATE_REQ" 9 "EAC_ERROR_HIGH_ANGLE_RATE_SAFETY" 6 "EAC_ERROR_HIGH_ANGLE_REQ" 8 "EAC_ERROR_HIGH_ANGLE_SAFETY" 10 "EAC_ERROR_HIGH_MMOT_SAFETY" 11 "EAC_ERROR_HIGH_TORSION_SAFETY" 0 "EAC_ERROR_IDLE" 12 "EAC_ERROR_LOW_ASSIST" 2 "EAC_ERROR_MAX_SPEED" 1 "EAC_ERROR_MIN_SPEED" 13 "EAC_ERROR_PINION_VEL_DIFF" 4 "EAC_ERROR_TMP_FAULT" 5 "EAR_ERROR_MAX_STEER_DELTA" 15 "SNA" ; +VAL_ 880 EPAS_eacStatus 2 "EAC_ACTIVE" 1 "EAC_AVAILABLE" 3 "EAC_FAULT" 0 "EAC_INHIBITED" 4 "SNA" ; +VAL_ 880 EPAS_handsOnLevel 0 "0" 1 "1" 2 "2" 3 "3" ; +VAL_ 880 EPAS_steeringFault 1 "FAULT" 0 "NO_FAULT" ; +VAL_ 880 EPAS_steeringRackForce 1022 "NOT_IN_SPEC" 1023 "SNA" ; +VAL_ 880 EPAS_steeringReduced 0 "NORMAL_ASSIST" 1 "REDUCED_ASSIST" ; +VAL_ 880 EPAS_torsionBarTorque 0 "SEE_SPECIFICATION" 4095 "SNA" 4094 "UNDEFINABLE_DATA" ; +VAL_ 904 MCU_clusterReadyForDrive 0 "NO_SNA" 1 "YES" ; +VAL_ 1160 DAS_steeringAngleRequest 16384 "ZERO_ANGLE" ; +VAL_ 1160 DAS_steeringControlType 1 "ANGLE_CONTROL" 3 "DISABLED" 0 "NONE" 2 "RESERVED" ; +VAL_ 1160 DAS_steeringHapticRequest 1 "ACTIVE" 0 "IDLE" ; diff --git a/tools/templategen/main.cpp b/tools/templategen/main.cpp index f83148937..629c444f4 100644 --- a/tools/templategen/main.cpp +++ b/tools/templategen/main.cpp @@ -965,6 +965,7 @@ std::string genPluginHdr(const std::string& name) #include "plugin_type.h" #include "{nameLower}model.h" +// Note that max typestring length is limited to 128 chars. 64 causes VS2015 internal error. using MiscPlugin = PluginBase; struct {name}Plugin {{ diff --git a/travis/before_install.sh b/travis/before_install.sh index 96d22a49c..32af1e1fd 100755 --- a/travis/before_install.sh +++ b/travis/before_install.sh @@ -5,6 +5,6 @@ set -e if [ "$TRAVIS_OS_NAME" == "linux" ]; then export ci_env=`bash <(curl -s https://codecov.io/env)` else - brew install qt5 ninja + HOMEBREW_NO_AUTO_UPDATE=1 brew install qt5 ninja fi diff --git a/travis/docker_compile.sh b/travis/docker_compile.sh index a260b3b29..440023794 100755 --- a/travis/docker_compile.sh +++ b/travis/docker_compile.sh @@ -15,7 +15,7 @@ sudo modprobe vcan docker run \ $ci_env -e WITH_COVERAGE -u cds -e CC -e CXX -e DISPLAY=:10 --privileged --cap-add=ALL \ -v `pwd`:/home/sources rkollataj/candevstudio /bin/bash \ - -c "sudo ip link add name can0 type vcan && sudo ip link set can0 up && ip link && sudo service xvfb start && sudo chown cds:cds /home/sources && cd /home/sources && rm -rf build && mkdir -p build && cd build && source /opt/qt58/bin/qt58-env.sh && + -c "sudo ip link add name can0 type vcan && sudo ip link set can0 up && ip link && sudo service xvfb start && sudo chown -R cds:cds /home/sources && cd /home/sources && rm -rf build && mkdir -p build && cd build && source /opt/qt58/bin/qt58-env.sh && $cmake_command && make -j5 && make test &&