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