Skip to content

Commit

Permalink
Release v0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Jul 30, 2017
2 parents 01619bb + 061d027 commit ab237bb
Show file tree
Hide file tree
Showing 72 changed files with 426 additions and 231 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ set (CC_EXTERNAL_TGT "comms_champion_external")
macro (externals install_dir build_cc)
include(ExternalProject)

set (cc_tag "v0.18.1")
set (cc_tag "v0.20")
set (cc_main_dir "${CMAKE_BINARY_DIR}/comms_champion")
set (cc_src_dir "${cc_main_dir}/src")
set (cc_bin_dir "${cc_main_dir}/build")
Expand Down
142 changes: 91 additions & 51 deletions doc/main.dox
Original file line number Diff line number Diff line change
Expand Up @@ -301,51 +301,8 @@
/// virtual void handle(MyInputMessage& msg) override {...}
/// };
/// @endcode
///
/// Every message class in ublox::message namespace uses
/// @b COMMS_MSG_FIELDS_ACCESS() macro to provide names to its fields. It
/// makes the access to the fields of the message easier. The fields can be
/// accessed via defined accessor functions:
/// @code
/// class MyHandler
/// {
/// public:
/// void handle(InNavPosecef& msg) {
/// auto& iTOW = msg.field_iTOW(); // iTOW field
/// auto& ecefX = msg.field_ecefX(); // ecefX field
/// auto& ecefY = msg.field_ecefY(); // ecefY field
/// auto& ecefZ = msg.field_ecefZ(); // ecefZ field
///
/// auto iTowVal = iTOW.value(); // Get iTOW value
/// auto ecefXVal = ecefX.value(); // Get ecefX value
/// auto ecefYVal = ecefY.value(); // Get ecefY value
/// auto ecefZVal = ecefZ.value(); // Get ecefZ value
///
/// ... // Do something with the values
/// }
/// };
/// @endcode
/// or via @b FieldIdx enum.
/// @code
/// class MyHandler
/// {
/// public:
/// void handle(InNavPosecef& msg) {
/// auto& allFields = msg.fields(); // access to std::tuple of fields
/// auto& iTOW = std::get<InNavPosecef::FieldIdx_iTOW>(allFields); // iTOW field
/// auto& ecefX = std::get<InNavPosecef::FieldIdx_ecefX>(allFields); // ecefX field
/// auto& ecefY = std::get<InNavPosecef::FieldIdx_ecefX>(allFields); // ecefY field
/// auto& ecefZ = std::get<InNavPosecef::FieldIdx_ecefZ>(allFields); // ecefZ field
///
/// auto iTowVal = iTOW.value(); // Get iTOW value
/// auto ecefXVal = ecefX.value(); // Get ecefX value
/// auto ecefYVal = ecefY.value(); // Get ecefY value
/// auto ecefZVal = ecefZ.value(); // Get ecefZ value
///
/// ... // Do something with the values
/// }
/// };
/// @endcode
/// The later @ref ublox_fields_accessing section contains information on
/// how to access handled message fields.
///
/// @section ublox_output_messages Output Messages
/// Just like defining @ref ublox_input_messages, it is recommended to define
Expand Down Expand Up @@ -377,7 +334,7 @@
/// return 0U; // Nothing has been written
/// }
///
/// auto begIter = comms::writeIteratorFor<MyOutputMessage>(&outputBuf[0]);
/// auto begIter = comms::writeIteratorFor<MyOutputMessage>(buf);
/// auto iter = begIter;
/// auto es = protStack.write(msg, iter, bufLen);
/// if (es != comms::ErrorStatus::Success) {
Expand Down Expand Up @@ -481,10 +438,79 @@
/// @b fields() member function of the message class, the reference of such
/// tuple is returned:
/// @code
/// NavPosecef msg;
/// ublox::message::NavPosecef<...> msg;
/// NavPosecefFields::All& fields = msg.fields();
/// @endcode
///
/// @subsection ublox_fields_accessing Accessing Message Fields
/// Every message class in ublox::message namespace uses
/// @b COMMS_MSG_FIELDS_ACCESS() macro to provide names to its fields. For
/// example comms::message::NavPosecef class defines the following names:
/// @code
/// namespace ublox
/// {
/// namespace message
/// {
/// template <typename TMsgBase>
/// class NavPosecef : public comms::MessageBase<...>
/// {
/// public:
/// COMMS_MSG_FIELDS_ACCESS(iTOW, ecefX, ecefY, ecefZ, pAcc);
/// ...
/// };
///
/// } // namespace message
/// } // namespace ublox
/// @endcode
///
/// The macro generates @b field_<name> convenience access function(s) for
/// every name it receives. For example:
/// @code
/// class MyHandler
/// {
/// public:
/// void handle(InNavPosecef& msg) {
/// auto& iTOW = msg.field_iTOW(); // iTOW field
/// auto& ecefX = msg.field_ecefX(); // ecefX field
/// auto& ecefY = msg.field_ecefY(); // ecefY field
/// auto& ecefZ = msg.field_ecefZ(); // ecefZ field
///
/// auto iTowVal = iTOW.value(); // Get iTOW value
/// auto ecefXVal = ecefX.value(); // Get ecefX value
/// auto ecefYVal = ecefY.value(); // Get ecefY value
/// auto ecefZVal = ecefZ.value(); // Get ecefZ value
///
/// ... // Do something with the values
/// }
/// };
/// @endcode
/// The macro also generates enum @b FieldIdx enum containing @b FieldIdx_<name>
/// value for every provided name. They can be used to access fields by index
/// (comparing to names). For example:
/// @code
/// class MyHandler
/// {
/// public:
/// void handle(InNavPosecef& msg) {
/// auto& allFields = msg.fields(); // access to std::tuple of fields
/// auto& iTOW = std::get<InNavPosecef::FieldIdx_iTOW>(allFields); // iTOW field
/// auto& ecefX = std::get<InNavPosecef::FieldIdx_ecefX>(allFields); // ecefX field
/// auto& ecefY = std::get<InNavPosecef::FieldIdx_ecefX>(allFields); // ecefY field
/// auto& ecefZ = std::get<InNavPosecef::FieldIdx_ecefZ>(allFields); // ecefZ field
///
/// auto iTowVal = iTOW.value(); // Get iTOW value
/// auto ecefXVal = ecefX.value(); // Get ecefX value
/// auto ecefYVal = ecefY.value(); // Get ecefY value
/// auto ecefZVal = ecefZ.value(); // Get ecefZ value
///
/// ... // Do something with the values
/// }
/// };
/// @endcode
/// @b NOTE, that call to @b field_<name>() member function gives an access to
/// the @b field object, not the stored value. To access the stored value, please
/// use @b value() member function of the @b field.
///
/// In order to properly understand what the fields are, and how to operate with
/// them, it is recommended to thoroughly read the
/// <b>Fields Tutorial</b>
Expand Down Expand Up @@ -578,7 +604,7 @@
/// no real need to know the original units also. If the @b type of the units
/// is known (angle measurement in the example above), the developer can use
/// the converstion function(s) to the required units. In this case the
/// compiler will do all the necessary match calculation and/or type
/// compiler will do all the necessary math calculation and/or type
/// conversions.
///
/// To get a better understanding on units conversion, pleas read the
Expand All @@ -604,9 +630,23 @@
/// There are multiple bitmask fields that inherit from
/// @b comms::field::BitmaskValue (for example ublox::message::CfgPrtFields::outProtoMask).
/// This bitmask fields use @b COMMS_BITMASK_BITS() macro from @b COMMS library
/// to define names for the bits. This macro will create @b BitIdx enum with
/// all the values prefixed with @b BitIdx_, which cat be used to get/set
/// bit values.
/// to define names for the bits and @b COMMS_BITMASK_BITS_ACCESS() macro to generate
/// convenience set/get member functions. When the bits are "sequential", i.e.
/// start at bit @b 0 and go up without skips, then single @b COMMS_BITMASK_BITS_SEQ() macro
/// is used to achieve the same effect. These macro will create @b BitIdx enum with
/// all the values prefixed with @b BitIdx_, which cat be used as bit indices.
/// The macros also generate convenience access @b setBitValue_<name>() and @b
/// getBitValue_<name>() for every name provided to the macros. For example:
/// @code
/// using OutCfgPrtUsb = ublox::message::CfgPrtUsb<MyOutputMessage>;
///
/// OutCfgPrtUsb msg;
/// auto& outProtoMaskField = msg.field_outProtoMask();
///
/// outProtoMaskField.setBitValue_outUbx(true);
/// outProtoMaskField.setBitValue_outNmea(false);
/// @endcode
/// The @b BitIdx enum values can also be used:
/// @code
/// using OutCfgPrtUsb = ublox::message::CfgPrtUsb<MyOutputMessage>;
///
Expand Down
4 changes: 2 additions & 2 deletions include/ublox/message/AidHui.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ struct AidHuiFields
>
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(healthValid, utcValid, klobValid);
COMMS_BITMASK_BITS_SEQ(healthValid, utcValid, klobValid);
};

/// @brief All the fields bundled in std::tuple.
Expand Down
13 changes: 13 additions & 0 deletions include/ublox/message/AidIni.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ struct AidIniFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(fEdge=1, tm1=4, f1=6);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(fEdge, tm1, f1);
};

/// @brief Definition of "wno" field.
Expand Down Expand Up @@ -216,6 +222,13 @@ struct AidIniFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(pos, time, clockD, tp, clockF, lla, altInv, prevTm, utc=10);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(pos, time, clockD, tp, clockF, lla, altInv, prevTm, utc);

};

/// @brief All the fields bundled in std::tuple.
Expand Down
8 changes: 4 additions & 4 deletions include/ublox/message/CfgAnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ struct CfgAntFields
>
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(svcs, csd, ocd, pdwnOnSCD, recovery);
COMMS_BITMASK_BITS_SEQ(svcs, csd, ocd, pdwnOnSCD, recovery);
};

/// @brief Common definition of @b pinSwitch, @b pinSCD, and @b pinOCD member
Expand All @@ -59,10 +59,10 @@ struct CfgAntFields
struct reconfig : public field::common::X1T<comms::option::FixedBitLength<1> >
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(bit);
COMMS_BITMASK_BITS_SEQ(bit);
};

/// @brief Definition of "pins" field.
Expand Down
12 changes: 12 additions & 0 deletions include/ublox/message/CfgCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ struct CfgCfgFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(ioPort, msgConf, infMsg, navConf, rxmConf, rinvConf=9, antConf, logConf, ftsConf);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(ioPort, msgConf, infMsg, navConf, rxmConf, rinvConf, antConf, logConf, ftsConf);
};

/// @brief Definition of "clearMask" field.
Expand All @@ -65,6 +71,12 @@ struct CfgCfgFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(devBBR, devFlash, devEEPROM, devSpiFlash=4);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(devBBR, devFlash, devEEPROM, devSpiFlash);
};

/// @brief Definition of optional "deviceMask" field.
Expand Down
4 changes: 2 additions & 2 deletions include/ublox/message/CfgDosc.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ struct CfgDoscFields
struct isCalibrated : public field::common::X1T<comms::option::FixedBitLength<1> >
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(bit);
COMMS_BITMASK_BITS_SEQ(bit);
};


Expand Down
14 changes: 10 additions & 4 deletions include/ublox/message/CfgEkf.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ struct CfgEkfFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(clTab=1, clCalib=2, nomTacho=4, nomGyro=5, setTemp=6, dir=7);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(clTab, clCalib, nomTacho, nomGyro, setTemp, dir);
};

/// @brief Definition of "configFlags" field.
Expand All @@ -68,10 +74,10 @@ struct CfgEkfFields
>
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(pulsesPerM, useSerWt);
COMMS_BITMASK_BITS_SEQ(pulsesPerM, useSerWt);
};

/// @brief Definition of "inverseFlags" field.
Expand All @@ -81,10 +87,10 @@ struct CfgEkfFields
>
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(invDir, invGyro);
COMMS_BITMASK_BITS_SEQ(invDir, invGyro);
};

/// @brief Definition of "reserved2" field.
Expand Down
6 changes: 6 additions & 0 deletions include/ublox/message/CfgEsfgwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ struct CfgEsfgwtFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(setVehicle=12, setTime, setWt);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(setVehicle, setTime, setWt);
};

/// @brief Definition of "id" field.
Expand Down
6 changes: 6 additions & 0 deletions include/ublox/message/CfgFxn.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ struct CfgFxnFields
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(sleep=1, absAlign=3, onOff);

/// @brief Provide convenience access functions for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS_ACCESS(sleep, absAlign, onOff);
};

/// @brief Definition of "tReacq" field.
Expand Down
11 changes: 8 additions & 3 deletions include/ublox/message/CfgGnss.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ struct CfgGnssFields
>
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(enable);
COMMS_BITMASK_BITS_SEQ(enable);
};

/// @brief Definition of "sigCfgMask" member field of the @ref flags bitfield.
Expand Down Expand Up @@ -122,7 +122,12 @@ struct CfgGnssFields
/// @brief Definition of the list of configuration blocks
/// @tparam TOpt Extra option(s)
template <typename TOpt = comms::option::EmptyOption>
using blocksList = field::common::ListT<block, TOpt>;
using blocksList =
field::common::ListT<
block,
comms::option::SequenceSizeForcingEnabled,
TOpt
>;

/// @brief All the fields bundled in std::tuple.
/// @tparam TOpt Extra option(s) for @ref blocksList field
Expand Down
4 changes: 2 additions & 2 deletions include/ublox/message/CfgInf.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ struct CfgInfFields
field::common::X1T<comms::option::BitmaskReservedBits<0xe0, 0> >
{
/// @brief Provide names for internal bits.
/// @details See definition of @b COMMS_BITMASK_BITS macro
/// @details See definition of @b COMMS_BITMASK_BITS_SEQ macro
/// related to @b comms::field::BitmaskValue class from COMMS library
/// for details.
COMMS_BITMASK_BITS(ERROR, WARNING, NOTICE, DEBUG, TEST);
COMMS_BITMASK_BITS_SEQ(ERROR, WARNING, NOTICE, DEBUG, TEST);
};

/// @brief Definition of "infMsgMask" field.
Expand Down

0 comments on commit ab237bb

Please sign in to comment.