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