Index: denali.pro.user =================================================================== diff -u -rc503f43840024e18650c1ac558448dd0f3b70427 -r6aea3fd1baa6992d6eba9938599374f615649fab --- denali.pro.user (.../denali.pro.user) (revision c503f43840024e18650c1ac558448dd0f3b70427) +++ denali.pro.user (.../denali.pro.user) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -1,6 +1,6 @@ - + EnvironmentId Index: main.cpp =================================================================== diff -u -rc503f43840024e18650c1ac558448dd0f3b70427 -r6aea3fd1baa6992d6eba9938599374f615649fab --- main.cpp (.../main.cpp) (revision c503f43840024e18650c1ac558448dd0f3b70427) +++ main.cpp (.../main.cpp) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -15,14 +15,15 @@ /*! * \mainpage UI Software Design Description - * \section Detailed Description + * \details Detailed Description.\n * This document has been generated by Doxygen.\n * This document describes the detail description of the UI Application Software design.\n - * UI Application starts by Application Initialization which happens in \ref main.cpp "Initialization section".\n + * UI Application starts by Application Initialization which happens in \ref main() "Application Initialization".\n * For information please see : - * - \subpage CommandLineSwitches - * - \subpage MessageFlow - * - \subpage MessageView + * - \ref main() "Application Initialization" + * - \subpage CommandLineSwitches "Command line switches" + * - \subpage MessageFlow "Messaging workflow" + * - \subpage MessageView "Messaging View and exposure in UI" */ // Qt @@ -224,10 +225,11 @@ #include TEST_CLASS_INCLUDE QTEST_MAIN(TEST_CLASS_NAME) #else -/*! \brief Application Initialization\n - * Some part of the application need to be initialized out of any thread. - * So is initialized here to be initialized in the main thread. - * this section also includes: +/*! + * \brief Application Initialization + * \details Some part of the application need to be initialized out of any thread. + * So is initialized here to be initialized in the main thread. + * this section also includes: */ int main(int argc, char *argv[]) { @@ -281,21 +283,21 @@ " \n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); } - //! - Initializing USB Watcher + //! - Initializing the Drive Watcher _DriveWatcher.init(Threads::_DriveWatcher_Thread); - //! - Initializing CanBus Interface + //! - Initializing the CANBus Interface if (_CanInterface.init(Threads::_CanFrame_Thread)) { _CanInterface.enableConsoleOut(gConsoleoutCanInterface); } - //! - Initializing CanBus Message Handler + //! - Initializing the CANBus Message Handler _FrameInterface.init(Threads::_CanFrame_Thread); - //! - Initializing the CanBus Message Acknowledgment Model + //! - Initializing the CANBus Message Acknowledgment Model _MessageAcknowModel.init(Threads::_CanAcknow_Thread); - //! - Initializing CanBus Message Dispatcher + //! - Initializing the CANBus Message Dispatcher if (_MessageDispatcher.init(Threads::_CanMessage_Thread)) { _MessageDispatcher.enableConsoleOut(gConsoleoutFrameInterface); } @@ -310,7 +312,7 @@ _MainTimer.init(); - //! - Initialize the Qml Viewer and starts GUI + //! - Initialize the QML Viewer and starts GUI int app_exec = -1; LOG_DEBUG("UI Initializing"); if ( startGui() ) { Index: sources/ApplicationController.h =================================================================== diff -u -rc503f43840024e18650c1ac558448dd0f3b70427 -r6aea3fd1baa6992d6eba9938599374f615649fab --- sources/ApplicationController.h (.../ApplicationController.h) (revision c503f43840024e18650c1ac558448dd0f3b70427) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -40,7 +40,7 @@ * This class is the main gate keeper for decisions and will decide if a message should pass through the other observers. * Currently (08/30/2020) is a bridge and will pass all the messages. * Later with implementation/help of the main state machine will decide on the state of the device what needs to be done. - * \note States are like [Idle, Out of Battery, Fault, FW connection lost] and such + * \note States are like [Idle, Run on Battery, Fault, FW connection lost] and such */ class ApplicationController : public QObject { Index: sources/model/MAbstract.h =================================================================== diff -u -r00d9bb06ec2bad14f6dc2db678b750c244f694ef -r6aea3fd1baa6992d6eba9938599374f615649fab --- sources/model/MAbstract.h (.../MAbstract.h) (revision 00d9bb06ec2bad14f6dc2db678b750c244f694ef) +++ sources/model/MAbstract.h (.../MAbstract.h) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -53,15 +53,41 @@ }; public: - // the model needs to implement these since each model have different meaning of the bytes from different source(unit). + + /*! + * \brief fromByteArray + * \details converts the values from Byte Arrays to the Model data. + * \param vByteArray - the byte array input + * \param vIndex - current index of each data section in byte array + * \return true on successful conversion + */ virtual bool fromByteArray(const QByteArray &vByteArray , int *vIndex = nullptr) = 0; + /*! + * \brief typeText + * \details type of the model which can be Data or Event which is mostly used in logging. + * \return Enum of Types + */ virtual Type_Enum typeText ( ) const = 0; + /*! + * \brief unitText + * \details the unit which UI communicates with by using this model and is used in Logging mostly + * \return Enum of Units + */ virtual Unit_Enum unitText ( ) const = 0; + /*! + * \brief infoText + * \details the text description of the model which will be used in the logging. + * \return QString + */ virtual QString infoText ( ) const = 0; + /*! + * \brief parameters + * \return current data values of the models. + */ virtual QVariantList parameters ( ) const = 0; - // Non-virtuals which working with parameters virtual method. + // Non-virtual methods which working with parameters virtual method. void toVariantList(QVariantList &vData) const; QString toString ( ) const; QString description ( ) const; Index: sources/model/MModel.h =================================================================== diff -u -rc503f43840024e18650c1ac558448dd0f3b70427 -r6aea3fd1baa6992d6eba9938599374f615649fab --- sources/model/MModel.h (.../MModel.h) (revision c503f43840024e18650c1ac558448dd0f3b70427) +++ sources/model/MModel.h (.../MModel.h) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -62,25 +62,30 @@ * View [URL="\ref application/sources/view" ]; * GuiController [URL="\ref Gui::GuiController" ]; * ApplicationController [URL="\ref ApplicationController" ]; - * MessageDispatcher [URL="\ref Can::MessageDispatcher" ]; - * MessageAcknow [URL="\ref Can::MessageAcknowModel" ]; - * MessageInterpreter [URL="\ref Can::MessageInterpreter" ]; - * MessageBuilder [URL="\ref Can::MessageBuilder" ]; * FrameInterface [URL="\ref Can::FrameInterface" ]; * CanInterface [URL="\ref Can::CanInterface" ]; * CANBus [shape=box ]; + * subgraph MessageDispatcher { + * node [shape=ellipse, fontname=Arial, fontsize=11, URL="\ref Can::MessageDispatcher"]; + * label = "Message_Dispatcher"; + * MessageAcknow [URL="\ref Can::MessageAcknowModel" ]; + * MessageInterpreter [URL="\ref Can::MessageInterpreter" ]; + * MessageBuilder [URL="\ref Can::MessageBuilder" ]; + * MessageDispatcher -> MessageInterpreter [dir="both" ]; + * MessageDispatcher -> MessageAcknow [dir="both" ]; + * MessageInterpreter -> MessageBuilder [dir="both" ]; + * } * user -> QML [dir="both" ]; * QML -> { GuiView, } [dir="both" ]; * { GuiView, } -> GuiController [dir="both" ]; * GuiController -> ApplicationController [dir="both" ]; * ApplicationController -> MessageDispatcher [dir="both" ]; - * MessageDispatcher -> MessageInterpreter [dir="both" ]; - * MessageDispatcher -> MessageAcknow ; - * MessageInterpreter -> MessageBuilder [dir="both" ]; - * MessageBuilder -> FrameInterface [dir="both" ]; + * MessageDispatcher -> FrameInterface [dir="both" ]; * FrameInterface -> CanInterface [dir="both" ]; * CanInterface -> CANBus [dir="both" ]; * } + * + * * \enddot * \note This instruction needs to be reviewed. * \details Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -rc503f43840024e18650c1ac558448dd0f3b70427 -r6aea3fd1baa6992d6eba9938599374f615649fab --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision c503f43840024e18650c1ac558448dd0f3b70427) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -136,6 +136,17 @@ } }; +/*! + * \brief The MAdjustSalineReq class + * \details The model to request the Saline Bolus state + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | #1 | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------:|:---------------------:| + * | 18 | 0x100 | 9 | Req | Y | UI | HD | Saline Bolus Request | 0=Stop, 1=Start (U32) | + * + * \sa MTreatmentSaline : Saline Bolus Data + * \sa MAdjustSalineResponse : Saline Bolus Response + * + */ class MAdjustSalineReq : public MModel { public: enum State { Index: sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h =================================================================== diff -u -rb5238b7e7b9973a54a0402f4d6d609989a76629f -r6aea3fd1baa6992d6eba9938599374f615649fab --- sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h (.../MTreatmentAdjustSalineResponse.h) (revision b5238b7e7b9973a54a0402f4d6d609989a76629f) +++ sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h (.../MTreatmentAdjustSalineResponse.h) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -25,6 +25,18 @@ namespace Model { +/*! + * \brief The MAdjustSalineResponse class + * \details The Saline Bolus adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | #1 | #2 | #3 | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------:|:-----------------:|:----------------------:|:-------------------:| + * | 20 | 0x020 | 6 | Rsp | Y | HD | UI | Saline Bolus Response| 0=No, 1=Yes (U32) | rejection reason (U32) | Bolus Vol.-mL (U32) | + * + * \sa MAdjustSalineReq : Saline Bolus Request + * \sa MTreatmentSaline : Saline Bolus Data + * + */ class MAdjustSalineResponse : public MAbstract { // friends Index: sources/model/hd/data/MTreatmentSalineData.h =================================================================== diff -u -r00d9bb06ec2bad14f6dc2db678b750c244f694ef -r6aea3fd1baa6992d6eba9938599374f615649fab --- sources/model/hd/data/MTreatmentSalineData.h (.../MTreatmentSalineData.h) (revision 00d9bb06ec2bad14f6dc2db678b750c244f694ef) +++ sources/model/hd/data/MTreatmentSalineData.h (.../MTreatmentSalineData.h) (revision 6aea3fd1baa6992d6eba9938599374f615649fab) @@ -25,7 +25,18 @@ class tst_models; namespace Model { - +/*! + * \brief The MTreatmentSaline class + * the model which populates the data of message : + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | #1:mTarget | #2:mCumulative | #3:mDelivered | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:------------------------------------:|:-------------:|:--------------:|:-----------------:| + * | 47 | 0x040 | 7 | 1 Hz | N | HD | All | Treatment Saline Bolus Data (all mL) | Max vol (U32) | Cum. vol (F32) | In-prog vol (F32) | + * + * \sa MAdjustSalineReq : Saline Bolus Request + * \sa MAdjustSalineResponse : Saline Bolus Response + * + */ class MTreatmentSaline : public MAbstract { // friends