/*! * * Copyright (c) 2021-2024 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 MTreatmentStopData.cpp * \author (last) Behrouz NematiPour * \date (last) 07-Oct-2021 * \author (original) Behrouz NematiPour * \date (original) 07-Oct-2021 * */ #include "MTreatmentStopData.h" using namespace Model; QVariantList MTreatmentStop::parameters() const { return { _data.mTotal .value, _data.mCountDown.value, }; } bool MTreatmentStop::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position if ( ! GetValue(vByteArray, index, _data.mTotal )) goto lError; if ( ! GetValue(vByteArray, index, _data.mCountDown)) goto lError; return true ; lError: if(vIndex) { *vIndex = index; } return false ; } /*! * \brief MTreatmentStop::data * \details Provides model's Data from the received messages data values * \return Data */ MTreatmentStop::Data MTreatmentStop::data() const { Data data; data.mTotal = _data.mTotal .value; data.mCountDown = _data.mCountDown.value; return data; }