/*! * * Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file MAdjustRequestsBase.h * \author (last) Behrouz NematiPour * \date (last) 22-Mar-2021 * \author (original) Behrouz NematiPour * \date (original) 22-Mar-2021 * */ #pragma once // Qt #include //project #include "MessageGlobals.h" using namespace Gui; namespace Model { /*! * Simple request models * These are models to send the request for the doAdjustment * The the only reason thy have been defined to help overloading the adjustment methods * Otherwise the parameters are so tiny models. */ class MModel { protected: /*! * \brief toString * \details the global toString function for all the request message models * which is mainly used for logging and debugging. * \param vStringPrefix - a prefix string to be inserted after senderID (UI) and parameter values list. * This is comma separated. * \param vParameters - list of parameter values of the model as a comma separated string. * \return QString */ static QString toString (const QString &vStringPrefix, const QVariant &vParameters) { QString senderID = "UI,"; return QString(senderID + vStringPrefix + "," + vParameters.toStringList().join(',')); } public: /*! * \brief canid returns the default channel id of the message. * it can be modified by the specific message which inherits the MModel. * \return Can::Can_Id */ static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_HD; } }; }