diff --git a/lang/cpp/src/messages/CFG.cpp b/lang/cpp/src/messages/CFG.cpp index 35a2ee0..a7070bd 100644 --- a/lang/cpp/src/messages/CFG.cpp +++ b/lang/cpp/src/messages/CFG.cpp @@ -1,5 +1,5 @@ // File lang/cpp/src/messages/CFG.cpp -// Auto-generated by pyUBX generateCPP.py v0.2 on 2023-06-07T13:38:14.189260 +// Auto-generated by pyUBX generateCPP.py v0.2 on 2023-12-05T08:08:36.118865 // See https://github.com/mayeranalytics/pyUBX // DO NOT MODIFY THIS FILE! @@ -328,6 +328,19 @@ std::string ubx::CFG::RATE::getDescription(void) const { } uint8_t* ubx::CFG::RATE::getDataStartAddress(void) const { return (uint8_t*)&data; } uint16_t ubx::CFG::RATE::getDataSize(void) const { return sizeof(data); } +uint8_t ubx::CFG::RST::getClassId(void) const { return ubx::CFG::classID; } +uint8_t ubx::CFG::RST::getMessageId(void) const { return messageID; } +const std::string &ubx::CFG::RST::getClassName(void) const { return classIDName; } +std::string ubx::CFG::RST::getMessageName(void) const { return std::string("RST"); }; +std::string ubx::CFG::RST::getDescription(void) const { + std::stringstream ret; + ret << "{\"classId\":" << std::to_string(getClassId()) << ",\"messageId\":" << std::to_string(getMessageId()) << ",\"classIdName\":\"" << getClassName() << "\",\"messageIdName\":\"" << getMessageName() << "\""; + ret << ", \"navBbrMask\":" << std::to_string(data.navBbrMask) << ", \"resetMode\":" << std::to_string(data.resetMode) << ", \"reserved1\":" << "0"; + ret << "}"; + return ret.str(); +} +uint8_t* ubx::CFG::RST::getDataStartAddress(void) const { return (uint8_t*)&data; } +uint16_t ubx::CFG::RST::getDataSize(void) const { return sizeof(data); } uint8_t ubx::CFG::RXM::getClassId(void) const { return ubx::CFG::classID; } uint8_t ubx::CFG::RXM::getMessageId(void) const { return messageID; } const std::string &ubx::CFG::RXM::getClassName(void) const { return classIDName; } diff --git a/lang/cpp/src/messages/CFG.hpp b/lang/cpp/src/messages/CFG.hpp index 1a581c9..a5bcfbd 100644 --- a/lang/cpp/src/messages/CFG.hpp +++ b/lang/cpp/src/messages/CFG.hpp @@ -1,5 +1,5 @@ // File lang/cpp/src/messages/CFG.hpp -// Auto-generated by pyUBX generateCPP.py v0.2 on 2023-06-07T13:38:14.187228 +// Auto-generated by pyUBX generateCPP.py v0.2 on 2023-12-05T08:10:39.084429 // See https://github.com/mayeranalytics/pyUBX // DO NOT MODIFY THIS FILE! @@ -724,6 +724,52 @@ struct __attribute__((packed)) RATE : public SerializeCommon } data; }; +/* 32.10.29.1 Reset receiver / Clear backup data structures + * + * Do not expect this message to be acknowledged by the receiver. + * • Newer FW version will not acknowledge this message at all. + * • Older FW version will acknowledge this message but the acknowledge may not + * be sent completely before the receiver is reset. + * Notes: + * • If Galileo is enabled, UBX-CFG-RST Controlled GNSS start must be followed by + * UBX-CFG-CFG to save current configuration to BBR and then by UBX-CFG-RST + * with resetMode set to Hardware reset. + * • If Galileo is enabled, use resetMode Hardware reset instead of Controlled + * software reset or Controlled software reset (GNSS only). + */ +struct __attribute__((packed)) RST : public SerializeCommon +{ + virtual uint8_t getClassId(void) const override; + virtual uint8_t getMessageId(void) const override; + virtual const std::string &getClassName(void) const override; + virtual std::string getMessageName(void) const override; + virtual std::string getDescription(void) const override; + virtual uint8_t* getDataStartAddress(void) const override; + virtual uint16_t getDataSize(void) const override; + + static constexpr uint8_t messageID = 4; + + struct __attribute__((packed)) _data { + uint16_t navBbrMask; + uint8_t resetMode; + uint8_t reserved1; + + enum _navBbrMask_allowed{ + allowed_navBbrMask_HOT_START=0, + allowed_navBbrMask_WARM_START=1, + allowed_navBbrMask_COLD_START=65535, + }; + enum _resetMode_allowed{ + allowed_resetMode_HW=0, + allowed_resetMode_SW=1, + allowed_resetMode_SW_GNSS_ONLY=2, + allowed_resetMode_HW_AFTER_SHUTDOWN=3, + allowed_resetMode_STOP=8, + allowed_resetMode_START=9, + }; + } data; +}; + /* §31.11.27 RXM configuration. * * For a detailed description see section 'Power Management'. diff --git a/lang/cpp/src/parseUbxMessage.cpp b/lang/cpp/src/parseUbxMessage.cpp index 6b1f91b..1b96e30 100644 --- a/lang/cpp/src/parseUbxMessage.cpp +++ b/lang/cpp/src/parseUbxMessage.cpp @@ -1,5 +1,5 @@ // File lang/cpp/src/parseUbxMessage.cpp -// Auto-generated by pyUBX generateCPP.py v0.2 on 2023-06-07T13:38:14.201552 +// Auto-generated by pyUBX generateCPP.py v0.2 on 2023-12-05T08:08:36.125575 // See https://github.com/mayeranalytics/pyUBX // DO NOT MODIFY THIS FILE! #include @@ -100,6 +100,11 @@ std::shared_ptr ParseUbxMessage::createUbx(const uint8_t *buf, ret = shared_ptr(new CFG::RATE); break; } + case CFG::RST::messageID: // Message CFG-RST + { + ret = shared_ptr(new CFG::RST); + break; + } case CFG::RXM::messageID: // Message CFG-RXM { ret = shared_ptr(new CFG::RXM); diff --git a/ubx/UBX/CFG.py b/ubx/UBX/CFG.py index 1951928..5537abf 100644 --- a/ubx/UBX/CFG.py +++ b/ubx/UBX/CFG.py @@ -164,6 +164,40 @@ class Fields: 5: "NavIC time" }) + class RST: + u"""32.10.29.1 Reset receiver / Clear backup data structures + + Do not expect this message to be acknowledged by the receiver. + • Newer FW version will not acknowledge this message at all. + • Older FW version will acknowledge this message but the acknowledge may not + be sent completely before the receiver is reset. + Notes: + • If Galileo is enabled, UBX-CFG-RST Controlled GNSS start must be followed by + UBX-CFG-CFG to save current configuration to BBR and then by UBX-CFG-RST + with resetMode set to Hardware reset. + • If Galileo is enabled, use resetMode Hardware reset instead of Controlled + software reset or Controlled software reset (GNSS only). + """ + + _id = 0x04 + + class Fields: + navBbrMask = X2(1, allowed={ + 0:"HOT_START", + 1:"WARM_START", + 0xFFFF: "COLD_START" + }) + resetMode = U1(2, allowed={ + 0:"HW", + 1:"SW", + 2:"SW_GNSS_ONLY", + 3: "HW_AFTER_SHUTDOWN", + 8: "STOP", + 9: "START", + }) + reserved1 = U1(3) # reserved + + @addGet class RXM: u"""§31.11.27 RXM configuration.