/************************************************************************** * * Copyright (c) 2020-2020 Diality Inc. - All Rights Reserved. * * 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 MessagePayloads.h * * @author (last) Sean Nash * @date (last) 28-Jul-2020 * * @author (original) Sean Nash * @date (original) 28-Jul-2020 * ***************************************************************************/ #ifndef __MESSAGE_PAYLOADS_H__ #define __MESSAGE_PAYLOADS_H__ // ********** public definitions ********** #pragma pack(push,1) /** * @addtogroup SystemCommMessages * @{ */ /// Payload record structure for an off button confirmation message from the UI. typedef struct { U08 confirmed; ///< 1 = confirmed, 0 = rejected/timed out } OFF_BUTTON_MESSAGE_FROM_UI_PAYLOAD_T; /// Payload record structure for an alarm status message. typedef struct { U32 alarmState; ///< Alarm state: 0 = no alarms, 1 = low priority, 2 = medium priority, 3 = high priority U32 alarmTop; ///< ID of top active alarm U32 escalatesIn; ///< Top active alarm escalates in this many seconds U32 silenceExpiresIn; ///< Silencing of alarms expires in this many seconds U16 alarmsFlags; ///< bit flags: 1 = true, 0 = false for each bit flag } ALARM_COMP_STATUS_PAYLOAD_T; /// Payload record structure for an HD versions message. typedef struct { U08 major; U08 minor; U08 micro; U16 build; U08 fpgaId; U08 fpgaMajor; U08 fpgaMinor; U08 fpgaLab; } HD_VERSIONS_T; /// Payload record structure for a linear calibration message. typedef struct { F32 gain; F32 offset; } LINEAR_F32_CAL_PAYLOAD_T; /// Payload record structure for an accelerometer calibration message. typedef struct { F32 xOffset; F32 yOffset; F32 zOffset; } ACCEL_CAL_PAYLOAD_T; /// Payload record structure for a peristaltic pump data message. typedef struct { U32 setPoint; F32 measFlow; F32 measRotorSpd; F32 measPumpSpd; F32 measMCSpd; F32 measMCCurr; F32 pwmDC; } PERISTALTIC_PUMP_STATUS_PAYLOAD_T; /// Payload record structure for the pressure & occlusions data message. typedef struct { F32 arterialPressure; F32 venousPressure; F32 bldPumpOcclusion; F32 diPumpOcclusion; F32 doPumpOcclusion; } PRESSURE_OCCLUSION_DATA_T; /// Payload record structure for a treatment time status message. typedef struct { U32 treatmentTimePrescribedinSec; U32 treatmentTimeElapsedinSec; U32 treatmentTimeRemaininginSec; } TREATMENT_TIME_DATA_T; /// Payload record structure for a treatment state message. typedef struct { U32 treatmentSubMode; U32 uFState; U32 salineBolusState; } TREATMENT_STATE_DATA_T; /// Payload record structure for a load cell data message. typedef struct { F32 res1PrimaryLoadCell; F32 res1BackupLoadCell; F32 res2PrimaryLoadCell; F32 res2BackupLoadCell; } LOAD_CELL_READINGS_PAYLOAD_T; /// Payload record structure for an RO pump data message. typedef struct { U32 setPtPSI; F32 measFlowRateMlMin; F32 setPWM; } DG_RO_PUMP_DATA_PAYLOAD_T; /// Payload record structure for a drain pump data message. typedef struct { U32 setPtRPM; F32 setPWM; } DG_DRAIN_PUMP_DATA_PAYLOAD_T; /// Payload record structure for a DG pressures data message. typedef struct { F32 roInPSI; F32 roOutPSI; F32 drainInPSI; F32 drainOutPSI; } DG_PRESSURES_DATA_PAYLOAD_T; /// Payload record structure for a reservoirs data message. typedef struct { U32 resID; U32 setFillToVolumeMl; U32 setDrainToVolumeMl; } DG_RESERVOIRS_DATA_PAYLOAD_T; /// Payload record structure for an ultrafiltration volume change confirmation message. typedef struct { F32 volume_mL; U32 adjustType; } UF_SETTINGS_CHANGE_CONFIRMATION_PAYLOAD_T; /// Payload record structure for DG temperature sensors data message. typedef struct { F32 TPi; F32 TPo; F32 TD1; F32 TD2; F32 TRo; F32 TDi; F32 HtrPrimThermo; F32 HtrTrimThermo; F32 HtrPrimColdJunc; F32 HtrTrimColdJunc; F32 HtrPrimInternal; F32 HtrTrimInternal; } DG_TEMPERATURES_T; /// Payload record structure for a pump set point override message. typedef struct { BOOL reset; S32 setPt; U32 ctrlMode; } OVERRIDE_PUMP_SET_PT_PAYLOAD_T; /**@}*/ #pragma pack(pop) #endif