From 8dbc022abcbb5b8c0b95c3d1c76429c7ff74510a Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Fri, 23 Jul 2021 14:40:24 +0200 Subject: QCanBusFrame: Extend documentation * Add missing description * Add missing enum value * Add more cross-references Pick-to: 6.5 6.2 Change-Id: I60e540c9d7a7de1d4ff35d1ff7db324d6efc0ef0 Reviewed-by: Ivan Solovev (cherry picked from commit 81fc30498ed1bc9f96853926fdac211a8f180ec1) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit d1765814f61a0dc0c3fd630613c1bacebe270655) --- src/serialbus/qcanbusframe.cpp | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/serialbus/qcanbusframe.cpp b/src/serialbus/qcanbusframe.cpp index 863f4b1..f672a5e 100644 --- a/src/serialbus/qcanbusframe.cpp +++ b/src/serialbus/qcanbusframe.cpp @@ -19,19 +19,31 @@ using namespace Qt::StringLiterals; \l QCanBusDevice can use QCanBusFrame for read and write operations. It contains the frame identifier and the data payload. QCanBusFrame contains the timestamp of the moment it was read. - \sa QCanBusFrame::TimeStamp + \sa QCanBusFrame::FrameId, QCanBusFrame::TimeStamp, payload() +*/ + +/*! + \typedef QCanBusFrame::FrameId + + A distinct type for a CAN bus frame identifier with either 11 or 29 bit. + + \sa frameId(), setFrameId() */ /*! \fn QCanBusFrame::QCanBusFrame(QCanBusFrame::FrameType type = DataFrame) Constructs a CAN frame of the specified \a type. + + \sa QCanBusFrame::FrameType, setFrameType() */ /*! \fn QCanBusFrame::QCanBusFrame(QCanBusFrame::FrameId identifier, const QByteArray &data) Constructs a CAN frame using \a identifier as the frame identifier and \a data as the payload. + + \sa QCanBusFrame::FrameId */ /*! @@ -59,7 +71,7 @@ using namespace Qt::StringLiterals; When the format is extended and a \a newFrameId with up to 11 bits or less is passed, the \e {CAN extended frame format} setting is \b not changed. - \sa frameId(), hasExtendedFrameFormat() + \sa QCanBusFrame::FrameId, frameId(), hasExtendedFrameFormat() */ /*! @@ -102,20 +114,20 @@ using namespace Qt::StringLiterals; If the frame is of \l ErrorFrame type, this ID is always 0. - \sa setFrameId(), hasExtendedFrameFormat() + \sa QCanBusFrame::FrameId, setFrameId(), hasExtendedFrameFormat() */ /*! \fn bool QCanBusFrame::hasExtendedFrameFormat() const - Returns \c true if the CAN frame uses a 29bit identifier; - otherwise \c false, implying an 11bit identifier. + Returns \c true if the CAN frame uses a 29 bit identifier; + otherwise \c false, implying an 11 bit identifier. \sa setExtendedFrameFormat(), frameId() */ /*! - \fn void QCanBusFrame::setExtendedFrameFormat(bool isExtended) + \fn void QCanBusFrame::setExtendedFrameFormat(bool isExtended) Sets the extended frame format flag to \a isExtended. @@ -135,6 +147,7 @@ using namespace Qt::StringLiterals; \value Qt_5_8 This frame is the initial version introduced in Qt 5.8 \value Qt_5_9 This frame version was introduced in Qt 5.9 + \value Qt_5_10 This frame version was introduced in Qt 5.10 */ /*! @@ -149,7 +162,7 @@ using namespace Qt::StringLiterals; \value InvalidFrame This value represents an invalid frame. This type is used for error reporting. - \sa setFrameType() + \sa frameType(), setFrameType() */ /*! @@ -171,6 +184,8 @@ using namespace Qt::StringLiterals; \value ControllerRestartError The controller restarted. \value UnknownError An unknown error has occurred. \value AnyError Matches every other error type. + + \sa error(), setError() */ /*! @@ -178,7 +193,7 @@ using namespace Qt::StringLiterals; Returns the type of the frame. - \sa setFrameType() + \sa QCanBusFrame::FrameType, setFrameType() */ /*! @@ -186,7 +201,7 @@ using namespace Qt::StringLiterals; Sets the type of the frame to \a newType. - \sa frameType() + \sa QCanBusFrame::FrameType, frameType() */ /*! @@ -211,7 +226,7 @@ using namespace Qt::StringLiterals; Returns the error of the current error frame. If the frame is not an \l ErrorFrame, this function returns \l NoError. - \sa setError() + \sa QCanBusFrame::FrameError, setError() */ /*! @@ -220,7 +235,7 @@ using namespace Qt::StringLiterals; Sets the frame's \a error type. This function does nothing if \l frameType() is not an \l ErrorFrame. - \sa error() + \sa QCanBusFrame::FrameError, error() */ /*! -- cgit v1.2.3