Index: AlarmMapping.csv =================================================================== diff -u -r1f2e7dbd08b00f8c56eedf29f083733570aa642e -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- AlarmMapping.csv (.../AlarmMapping.csv) (revision 1f2e7dbd08b00f8c56eedf29f083733570aa642e) +++ AlarmMapping.csv (.../AlarmMapping.csv) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -1,323 +1,325 @@ - 0,"Indication for when no alarms is a possible situation." - 1,"Stuck button POST failure.\nStop or Off button detected to be pressed for at least 1 second during test shortly after power up." - 2,"HD FPGA POST failure." - 3,"DG FPGA POST failure." - 4,"HD Watchdog POST failure." - 5,"DG Watchdog POST failure." - 6,"UI communication POST failure.\nUI failed to communicate within a reasonable time after power up." - 7,"HD RTC battery low." - 8,"HD accelerometer failed POST." - 9,"DG accelerometer failed POST." - 10,"HD blood leak sensor setting embedded mode failure." - 11,"HD dialysate temperature below target temperature." - 12,"HD firmware image integrity POST test failed." - 13,"DG firmware image integrity POST test failed." - 14,"DG invalid usage record CRC." - 15,"HD invalid usage record CRC." - 16,"HD alarm audio failed POST." - 17,"HD UI POST failed." - 18,"DG load cells invalid calibration record." - 19,"HD dialysate temperature above target temperature." - 20,"DG conductivity sensors invalid calibration record." - 21,"DG drain line volume invalid calibration record." - 22,"DG reservoirs invalid calibration record." - 23,"DG acid concentrate calibration record." - 24,"DG bicarb concentrate calibration record." - 25,"DG accelerometer invalid calibration record." - 26,"HD accelerometer invalid calibration record." - 27,"HD blood leak sensor zero and self test sequence failed." - 28,"DG two wire sensors FPGA fault." - 29,"HD heparin force sensor invalid calibration record." - 30,"HD Software fault.\nSoftware found itself in an unexpected state." - 31,"Blood pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running." - 32,"Blood pump failed motor off check.\nMeasured speed while commanded off." - 33,"Blood pump failed motor direction check.\nMeasured vs commanded." - 34,"Blood pump failed rotor speed check.\nMismatch with rotor and motor speeds." - 35,"Dialysis inlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running." - 36,"Dialysis inlet pump failed motor off check.\nMeasured speed while commanded off." - 37,"Dialysis inlet pump failed motor direction check.\nMeasured vs commanded." - 38,"Dialysis inlet pump failed rotor speed check.\nMismatch with rotor and motor speeds." - 39,"Dialysis outlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running." - 40,"Dialysis outlet pump failed motor off check.\nMeasured speed while commanded off." - 41,"Dialysis outlet pump failed motor direction check.\nMeasured vs commanded." - 42,"Dialysis outlet pump failed rotor speed check.\nMismatch with rotor and motor speeds." - 43,"DG main primary heater FPGA fault." - 44,"User interface communication timeout." - 45,"HD too many bad communications CRC." - 46,"HD System message that required acknowledgment was not acknowledged." - 47,"Ultrafiltration rate is too high error during treatment." - 48,"Ultrafiltration volume accuracy error during treatment." - 49,"HD FPGA communication down for too long." - 50,"DG FPGA not accepting commanded valve states." - 51,"Blood pump failed motor speed check.\nMeasured vs commanded." - 52,"Dialysate inlet pump failed motor speed check.\nMeasured vs commanded." - 53,"Dialysate outlet pump failed motor speed check.\nMeasured vs commanded." - 54,"HD critical data integrity check failed." - 55,"DG critical data integrity check failed." - 56,"HD accelerometer error (no readings or FPGA reports error)." - 57,"DG accelerometer error (no readings or FPGA reports error)." - 58,"HD valve homing failed." - 59,"HD valve transition time out." - 60,"HD valve not functional." - 61,"HD valve current out of range." - 62,"HD valve position out of target." - 63,"HD blood leak FPGA fault." - 64,"DG barometric pressure sensor out of range." - 65,"HD requests DG command with invalid parameter fault." - 66,"HD blood leak sensor set point set failure." - 67,"HD blood pump occlusion self-test failure alarm." - 68,"HD active reservoir recirculation out of range." - 69,"HD blood leak sensor invalid calibration record." - 70,"HD arterial pressure self-test failure alarm." - 71,"HD venous pressure self-test failure alarm." - 72,"HD No load cell data message receive at least once every 2 seconds." - 73,"HD No dialysate temperature data message receive at least once every 2 seconds." - 74,"DG inlet UV reactor is on with no flow." - 75,"HD syringe pump self-test failure alarm." - 76,"HD monitored voltage is out of range." - 77,"DG monitored voltage is out of range." - 78,"HD syringe pump direction (from encoder) error." - 79,"HD syringe pump direction (from controller) error." - 80,"HD syringe pump fault reported by FPGA." - 81,"HD syringe pump over travel error." - 82,"HD syringe pump DAC write failure." - 83,"HD syringe pump is running while the BP is off." - 84,"DG set RTC year is invalid." - 85,"HD pump track latch opened alarm." - 86,"HD set RTC year is invalid." - 87,"DG heating invalid calibration record." - 88,"DG concentrate pumps hall sensor out of range." - 89,"DG outlet UV reactor on with no flow." - 90,"DG load cells A1/B1 FPGA fault." - 91,"HD No dialysate flow data receive in the last 3 seconds." - 92,"DG conductivity sensor bad status." - 93,"DG outlet primary conductivity out of range." - 94,"DG pressure out of range." - 95,"DG watchdog expired." - 96,"Inlet water temperature in high range." - 97,"Fill conductivity out of range." - 98,"HD battery communication fault." - 99,"HD syringe pump stall alarm." - 100,"HD no cartridge self-test timeout." - 101,"HD dry self-test timeout." - 102,"DG heat disinfect temperature gradient out of range." - 103,"HD invalid calibration CRC." - 104,"Air trap level sensors reporting illegal combination of air/fluid." - 105,"DG invalid calibration CRC." - 106,"DG dialysate flow sensor invalid calibration record." - 107,"HD reports DG restarted fault." - 108,"HD syringe pump ADC FPGA fault." - 109,"HD syringe pump volume check error." - 110,"HD syringe pump speed check error." - 111,"HD syringe pump not stopped in off state error." - 112,"DG load cells A1/B1 FPGA fault." - 113,"DG Drain pump current out of range." - 114,"HD venous air bubble detector self-test failure." - 115,"DG temperature sensor out of range." - 116,"DG temperature sensor ADC fault." - 117,"DG CAN message not acked." - 118,"DG RTC config error." - 119,"DG RTC battery low error." - 120,"HD pre-treatment mode wet self-test prime check failure." - 121,"DG main primary heater voltage out of range." - 122,"DG small primary heater voltage out of range." - 123,"DG trimmer heater voltage out of range." - 124,"HD end of treatment alarm (high priority)." - 125,"Blood sitting too long after treatment stopped by user alarm (>5 min)." - 126,"HD blood leak detected alarm." - 127,"Venous pressure too low during treatment." - 128,"HD venous air bubble detected alarm." - 129,"HD venous air bubble detected rinseback alarm." - 130,"Venous pressure too high during treatment." - 131,"Arterial pressure too low during treatment." - 132,"Arterial pressure too high during treatment." - 133,"DG fluid leak detected alarm." - 134,"HD fluid leak detected alarm." - 135,"HD experienced large acceleration." - 136,"DG experienced large acceleration." - 137,"HD tilt exceeds maximum." - 138,"DG tilt exceeds maximum." - 139,"HD AC power lost alarm." - 140,"Dialysate generator communication timeout." - 141,"Air trap fill timeout during treatment." - 142,"Blood pump occlusion detected." - 143,"DG dialysate temperature sensors out of range." - 144,"DG cleaning mode inlet water conductivity out of high range." - 145,"Concentrate conductivity after adding acid out of range alarm." - 146,"DG RTC or timer accuracy failure." - 147,"Wait for the DG to produce dialysate." - 148,"DG Cleaning mode inlet water temperature too high." - 149,"HD watchdog expired." - 150,"Inlet water conductivity in high range." - 151,"Inlet water conductivity in low range." - 152,"Inlet water pressure in low range." - 153,"HD prime completed high priority alarm." - 154,"DG cleaning mode inlet water conductivity out of low range." - 155,"HD No reservoirs data message receive at least once every 2 seconds." - 156,"HD No DG operation mode message receive at least once every 2 seconds." - 157,"DG chemical disinfect prime acid line timeout." - 158,"Inlet water temperature is in the low range." - 159,"DG chemical disinfect flush remove acid and close the concentrate cap." - 160,"Blood pump rotor speed too high." - 161,"DG comm too many bad CRCs." - 162,"DG FPGA clock speed check failure." - 163,"HD sees primary load cell for reservoir 1 change too much too fast." - 164,"HD sees primary load cell for reservoir 2 change too much too fast." - 165,"HD in treatment rinseback operation timeout." - 166,"HD in treatment re-circ sub-mode for too long." - 167,"HD cartridge door opened alarm." - 168,"HD active reservoir depletion timeout." - 169,"DG Dialysate flow rate out of maximum range." - 170,"HD syringe empty alarm." - 171,"HD syringe pump occlusion alarm." - 172,"HD syringe pump not enough Heparin alarm." - 173,"HD RTC configuration error." - 174,"HD RTC or timer accuracy failure." - 175,"HD pump direction status error." - 176,"HD dialysate temperature out of high safety range." - 177,"DG software fault.\nSoftware found itself in an unexpected state." - 178,"HD communication timeout." - 179,"DG FPGA communication down for too long." - 180,"DG RO flow out of maximum range." - 181,"DG load cells weight out of range for tare." - 182,"DG load cells invalid calibration." - 183,"DG invalid load cell value." - 184,"DG inlet UV reactor not healthy." - 185,"DG fan RPM out of range." - 186,"DG concentrate pump fault." - 187,"DG concentrate pump CP1 speed control error." - 188,"DG concentrate pump CP2 speed control error." - 189,"DG drain pump RPM out of range." - 190,"DG drain pump off fault." - 191,"DG flow rate out of upper range." - 192,"DG flow rate out of lower range." - 193,"HD dialysate temperature out of low safety range." - 194,"DG RO pump duty cycle out of range." - 195,"DG RO pump pressure out of range." - 196,"DG CPi/CPo sensors FPGA fault." - 197,"DG CD1/CD2 sensors FPGA fault." - 198,"RO flow too low while primary heater is on." - 199,"Dialysate flow too low while trimmer heater is on." - 200,"DG thermistors/sensors temperature out of range." - 201,"HD pre-treatment mode wet self-test lc vs FMD failure." - 202,"HD pre-treatment mode dry pressure normal self-test failure." - 203,"Pressure sensor fault." - 204,"RO rejection ratio out of range." - 205,"Conductivity sensor fault." - 206,"DG dialysate fill runs out of time." - 207,"DG flow meter check failure alarm." - 208,"HD venous pressure occlusion alarm." - 209,"DG drain circulation line timeout." - 210,"HD battery pack detected an error." - 211,"Blood sitting too long warning (>4 min)." - 212,"HD end of treatment alarm (user not acting to end treatment)." - 213,"HD prime completed medium priority alarm." - 214,"HD Saline bolus volume check failure." - 215,"HD rinseback volume check failure." - 216,"HD end treatment sub-mode timeout alarm." - 217,"HD blood prime volume check failure." - 218,"HD syringe detected alarm." - 219,"HD syringe pump syringe removed alarm." - 220,"DG THd sensors FPGA fault." - 221,"HD Saline bag is empty." - 222,"HD occlusion sensor FPGA fault." - 223,"HD arterial sensor FPGA fault." - 224,"Treatment stopped by user action." - 225,"HD end of treatment warning." - 226,"HD prime completed low priority alarm." - 227,"HD prime out of time alarm." - 228,"HD time out on prime saline purge air state." - 229,"HD prime dialysate dialyzer time out alarm." - 230,"HD prime dialysate bypass time out alarm." - 231,"HD pre-treatment mode dry pressure self-test failure." - 232,"HD pre-treatment mode wet self-test LC vs LC failure." - 233,"DG barometric sensor coefficients bad CRC." - 234,"DG inlet water pressure in high range." - 235,"HD in treatment stopped sub-mode after rinseback completed (no escalation)." - 236,"HD needs new cartridge to be installed." - 237,"HD prime saline dialyzer time out alarm." - 238,"HD no cartridge loaded or installed improperly alarm." - 239,"HD fail to remove cartridge alarm." - 240,"Bicarb conductivity out of range during bicarb pump check alarm." - 241,"DG reservoir drain time out." - 242,"DG reservoir fill time out." - 243,"DG reservoir leak time out." - 244,"DG cleaning mode temperature sensors difference out of range." - 245,"DG heat disinfect target temperature time out (could not reach to temperature)." - 246,"DG cleaning mode conductivity sensors out of range." - 247,"DG heat disinfect active cool time tour." - 248,"DG chemical disinfect could not reach to target temperature out of range." - 249,"DG chemical disinfect target conductivity out of range." - 250,"DG chemical disinfect insert acid and remove the concentrate cap." - 251,"HD invalid system record." - 252,"HD invalid service record." - 253,"DG invalid system record." - 254,"DG invalid service record." - 255,"HD and UI software builds are not compatible." - 256,"Alarm ID available for use." - 257,"DG FPGA power out timeout." - 258,"HD FPGA power out timeout." - 259,"HD temperatures out of range." - 260,"UI POST Application Integrity (Sha256Sum) failure." - 261,"UI POST CANBus failure." - 262,"UI POST Display failure." - 263,"UI POST Touch failure." - 264,"UI POST SD-Card failure." - 265,"UI POST RTC failure." - 266,"UI POST WiFi failure." - 267,"UI POST Bluetooth failure." - 268,"UI POST Ethernet failure." - 269,"UI POST Sound failure." - 270,"HD POST Safety Shutdown failure." - 271,"DG POST Safety Shutdown failure." - 272,"HD Fan RPM out of range." - 273,"HD measured blood pump flow rate is out of range." - 274,"HD measured dialysate inlet pump flow rate is out of range." - 275,"HD arterial pressure sensor is reading out of range." - 276,"HD venous pressure sensor is reading out of range." - 277,"HD BP occlusion sensor is reading out of range." - 278,"HD active reservoir weight out of range." - 279,"DG dialysate drain time out." - 280,"DG drain pump direction invalid." - 281,"Acid concentration bottle low volume alarm." - 282,"Bicarbonate concentration bottle low volume alarm." - 283,"DG load cells weight out of range." - 284,"DG load cells primary/back up drift out of range." - 285,"HD treatment recirculate timeout warning." - 286,"HD treatment rinseback complete timeout warning." - 287,"HD processor clock speed checks against FPGA clock failure." - 288,"HD load cells primary/back up drift out of range." - 289,"DG dialysate or concentrate caps not closed." - 290,"HD venous pressure sensor FPGA fault." - 291,"HD processor is in Disinfect Flush mode." - 292,"HD processor is in Disinfect Heat mode." - 293,"HD processor is in Disinfect Chemical mode." - 294,"HD processor Disinfect Chemical mode instructions to user." - 295,"UI POST CloudSync failure." - 296,"DG TDi sensors FPGA fault." - 297,"DG TRo sensors FPGA fault." - 298,"DG baro sensor FPGA fault." - 299,"DG invalid serial number." - 300,"HD invalid serial number." - 301,"DG primary heater power voltage out of range." - 302,"DG processor RAM error." - 303,"DG drain pump direction FPGA fault." - 304,"HD invalid usage record." - 305,"HD processor RAM error." - 306,"HD air trap over-fill alarm." - 307,"HD AC power lost second alarm." - 308,"DG CPi conductivity sensor invalid character received." - 309,"DG CPo conductivity sensor invalid character received." - 310,"DG CD1 conductivity sensor invalid character received." - 311,"DG CD2 conductivity sensor invalid character received." - 312,"HD Dialysate In flow rate to too low." - 313,"DG cleaning mode inlet water temperature too low." - 314,"DG cleaning mode inlet water pressure too high." - 315,"DG cleaning mode inlet water pressure too low." - 316,"DG acid concentrate pump park fault." - 317,"DG bicarb concentrate pump part fault." - 318,"HD Air Pump timeout alarm." - 319,"DG chemical disinfect flush flush sample." - 320,"DG chemical disinfect flush sample timeout." - 321,"DG outlet UV reactor not healthy." - 322,"Total number of alarms." + 0,"Indication for when no alarms is a possible situation." + 1,"HD stuck button POST failure.\nStop or Off button detected to be pressed for at least 1 second during test shortly after power up." + 2,"HD FPGA POST failure." + 3,"DG FPGA POST failure." + 4,"HD Watchdog POST failure." + 5,"DG Watchdog POST failure." + 6,"HD UI communication POST failure.\nUI failed to communicate within a reasonable time after power up." + 7,"HD RTC battery low." + 8,"HD accelerometer failed POST." + 9,"DG accelerometer failed POST." + 10,"HD blood leak sensor setting embedded mode failure." + 11,"HD dialysate temperature below target temperature or below safety temp." + 12,"HD firmware image integrity POST test failed." + 13,"DG firmware image integrity POST test failed." + 14,"DG invalid usage record CRC." + 15,"HD dialysate temperature above high safety." + 16,"HD alarm audio failed POST." + 17,"HD UI POST failed." + 18,"HD didn't get ACK on message to DG that required acknowledgment." + 19,"HD dialysate temperature above target temperature." + 20,"DG conductivity sensors invalid calibration record." + 21,"DG drain line volume invalid calibration record." + 22,"DG reservoirs invalid calibration record." + 23,"DG acid concentrate calibration record." + 24,"DG bicarb concentrate calibration record." + 25,"DG accelerometer invalid calibration record." + 26,"HD accelerometer invalid calibration record." + 27,"HD blood leak sensor zero and self test sequence failed." + 28,"DG two wire sensors FPGA fault." + 29,"HD heparin force sensor invalid calibration record." + 30,"HD Software fault.\nSoftware found itself in an unexpected state." + 31,"HD blood pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running." + 32,"HD blood pump failed motor off check.\nMeasured speed while commanded off." + 33,"HD blood pump failed motor direction check.\nMeasured vs commanded." + 34,"HD blood pump failed rotor speed check.\nMismatch with rotor and motor speeds." + 35,"HD dialysis inlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running." + 36,"HD dialysis inlet pump failed motor off check.\nMeasured speed while commanded off." + 37,"HD dialysis inlet pump failed motor direction check.\nMeasured vs commanded." + 38,"HD dialysis inlet pump failed rotor speed check.\nMismatch with rotor and motor speeds." + 39,"HD dialysis outlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running." + 40,"HD dialysis outlet pump failed motor off check.\nMeasured speed while commanded off." + 41,"HD dialysis outlet pump failed motor direction check.\nMeasured vs commanded." + 42,"HD dialysis outlet pump failed rotor speed check.\nMismatch with rotor and motor speeds." + 43,"DG main primary heater FPGA fault." + 44,"HD UI communication timeout." + 45,"HD too many bad communications CRC." + 46,"HD didn't get ACK on message to UI that required acknowledgment." + 47,"DG maximum RO Pump PWM exceeded." + 48,"HD ultrafiltration volume accuracy error during treatment." + 49,"HD FPGA communication down for too long." + 50,"DG FPGA not accepting commanded valve states." + 51,"HD blood pump failed motor speed check.\nMeasured vs commanded." + 52,"HD dialysate inlet pump failed motor speed check.\nMeasured vs commanded." + 53,"HD dialysate outlet pump failed motor speed check.\nMeasured vs commanded." + 54,"HD critical data integrity check failed." + 55,"DG critical data integrity check failed." + 56,"HD accelerometer error (no readings or FPGA reports error)." + 57,"DG accelerometer error (no readings or FPGA reports error)." + 58,"HD valve homing failed." + 59,"HD valve transition time out." + 60,"HD valve not functional." + 61,"HD valve current out of range." + 62,"HD valve position out of target." + 63,"HD syringe pump prime timeout." + 64,"DG barometric pressure sensor out of range." + 65,"HD DG requests DG command with invalid parameter fault." + 66,"HD blood leak sensor set point set failure." + 67,"HD blood pump occlusion self-test failure alarm." + 68,"HD active reservoir recirculation out of range." + 69,"HD blood leak sensor invalid calibration record." + 70,"HD arterial pressure self-test failure alarm." + 71,"HD venous pressure self-test failure alarm." + 72,"HD No load cell data message receive at least once every 2 seconds." + 73,"HD No dialysate temperature data message receive at least once every 2 seconds." + 74,"DG inlet UV reactor is on with no flow." + 75,"HD syringe pump self-test failure alarm." + 76,"HD monitored voltage is out of range." + 77,"DG monitored voltage is out of range." + 78,"HD syringe pump direction (from encoder) error." + 79,"HD syringe pump direction (from controller) error." + 80,"HD syringe pump fault reported by FPGA." + 81,"HD syringe pump over travel error." + 82,"HD syringe pump DAC write failure." + 83,"HD syringe pump is running while the BP is off." + 84,"DG set RTC year is invalid." + 85,"HD pump track latch opened alarm." + 86,"HD set RTC year is invalid." + 87,"DG heating invalid calibration record." + 88,"DG concentrate pumps hall sensor out of range." + 89,"DG outlet UV reactor on with no flow." + 90,"DG load cells A1/B1 FPGA fault." + 91,"HD No dialysate flow data receive in the last 3 seconds." + 92,"DG temperature sensors invalid calibration record." + 93,"DG outlet primary conductivity out of range." + 94,"DG pressure out of range." + 95,"DG watchdog expired." + 96,"DG inlet water temperature in high range." + 97,"DG fill conductivity out of range." + 98,"HD battery communication fault." + 99,"HD syringe pump stall alarm." + 100,"DG conductivity sensors invalid temperature compensation calibration record." + 101,"UI POST HD communication failure." + 102,"DG heat disinfect temperature gradient out of range." + 103,"HD invalid calibration CRC." + 104,"HD air trap level sensors reporting illegal combination of air/fluid." + 105,"DG invalid calibration CRC." + 106,"DG dialysate flow sensor invalid calibration record." + 107,"HD reports DG restarted fault." + 108,"HD syringe pump ADC FPGA fault." + 109,"HD syringe pump volume check error." + 110,"HD syringe pump speed check error." + 111,"HD syringe pump not stopped in off state error." + 112,"DG load cells A1/B1 FPGA fault." + 113,"DG Drain pump current out of range." + 114,"HD venous air bubble detector self-test failure." + 115,"DG temperature sensor out of range." + 116,"HD UI SD card failure." + 117,"DG CAN message not acked." + 118,"DG RTC config error." + 119,"DG RTC battery low error." + 120,"HD pre-treatment mode wet self-test prime check failure." + 121,"DG main primary heater voltage out of range." + 122,"DG small primary heater voltage out of range." + 123,"DG trimmer heater voltage out of range." + 124,"HD end of treatment alarm (high priority)." + 125,"HD blood sitting too long after treatment stopped by user alarm (>5 min)." + 126,"HD blood leak detected alarm." + 127,"HD venous pressure too low during treatment." + 128,"HD venous air bubble detected alarm." + 129,"HD blood leak recovering please wait." + 130,"HD venous pressure too high during treatment." + 131,"HD arterial pressure too low during treatment." + 132,"HD arterial pressure too high during treatment." + 133,"DG fluid leak detected alarm." + 134,"HD fluid leak detected alarm." + 135,"HD experienced large acceleration." + 136,"DG experienced large acceleration." + 137,"HD tilt exceeds maximum." + 138,"DG tilt exceeds maximum." + 139,"HD AC power lost alarm." + 140,"HD DG communication timeout." + 141,"HD air trap fill timeout during treatment." + 142,"HD blood pump occlusion detected." + 143,"DG dialysate temperature sensors out of range." + 144,"DG cleaning mode inlet water conductivity out of high range." + 145,"DG concentrate conductivity after adding acid out of range alarm." + 146,"DG RTC or timer accuracy failure." + 147,"DG wait for the DG to produce dialysate." + 148,"DG Cleaning mode inlet water temperature too high." + 149,"HD watchdog expired." + 150,"DG inlet water conductivity in high range." + 151,"DG inlet water conductivity in low range." + 152,"DG inlet water pressure in low range." + 153,"HD prime completed high priority alarm." + 154,"DG cleaning mode inlet water conductivity out of low range." + 155,"HD No reservoirs data message receive at least once every 2 seconds." + 156,"HD No DG operation mode message receive at least once every 2 seconds." + 157,"DG chemical disinfect prime acid line timeout." + 158,"DG inlet water temperature is in the low range." + 159,"DG chemical disinfect flush remove acid and close the concentrate cap." + 160,"HD blood pump rotor speed too high." + 161,"DG comm too many bad CRCs." + 162,"DG FPGA clock speed check failure." + 163,"HD sees primary load cell for reservoir 1 change too much too fast." + 164,"HD sees primary load cell for reservoir 2 change too much too fast." + 165,"HD in treatment rinseback operation timeout." + 166,"Test alarm, clear top only." + 167,"HD cartridge door opened alarm." + 168,"Test alarm, clear top only." + 169,"DG Dialysate flow rate out of maximum range." + 170,"HD syringe empty alarm." + 171,"HD syringe pump occlusion alarm." + 172,"HD syringe pump not enough Heparin alarm." + 173,"HD RTC configuration error." + 174,"HD RTC or timer accuracy failure." + 175,"HD pump direction status error." + 176,"Test alarm, clear top only." + 177,"DG software fault.\nSoftware found itself in an unexpected state." + 178,"HD communication timeout." + 179,"DG FPGA communication down for too long." + 180,"DG RO flow out of maximum range." + 181,"DG load cells weight out of range for tare." + 182,"DG load cells invalid calibration." + 183,"DG invalid load cell value." + 184,"DG inlet UV reactor not healthy." + 185,"DG fan RPM out of range." + 186,"DG concentrate pump fault." + 187,"DG concentrate pump CP1 speed control error." + 188,"DG concentrate pump CP2 speed control error." + 189,"DG drain pump RPM out of range." + 190,"DG drain pump off fault." + 191,"DG flow rate out of upper range." + 192,"DG flow rate out of lower range." + 193,"HD blood pump partial occlusion detected." + 194,"DG RO pump duty cycle out of range." + 195,"DG RO pump pressure out of range." + 196,"DG CPi/CPo sensors FPGA fault." + 197,"DG CD1/CD2 sensors FPGA fault." + 198,"DG RO flow too low while primary heater is on." + 199,"DG Dialysate flow too low while trimmer heater is on." + 200,"DG thermistors/sensors temperature out of range." + 201,"HD pre-treatment mode wet self-test lc vs FMD failure." + 202,"HD pre-treatment mode dry pressure normal self-test failure." + 203,"DG fill conductivities acid/bicarb invalid calibration record." + 204,"DG RO rejection ratio out of range." + 205,"DG conductivity sensor fault." + 206,"DG dialysate fill runs out of time." + 207,"DG flow meter check failure alarm." + 208,"HD venous pressure occlusion alarm." + 209,"DG drain circulation line timeout." + 210,"HD battery pack detected an error." + 211,"HD blood sitting too long warning (>4 min)." + 212,"HD end of treatment alarm (user not acting to end treatment)." + 213,"HD prime completed medium priority alarm." + 214,"Available for use." + 215,"Available for use." + 216,"HD end treatment sub-mode timeout alarm." + 217,"Available for use." + 218,"HD syringe detected alarm." + 219,"HD syringe pump syringe removed alarm." + 220,"DG THd sensors FPGA fault." + 221,"HD Saline bag is empty." + 222,"HD occlusion sensor FPGA fault." + 223,"HD arterial sensor FPGA fault." + 224,"HD treatment stopped by user action." + 225,"HD end of treatment warning." + 226,"HD prime completed low priority alarm." + 227,"Available for use." + 228,"HD time out on prime saline purge air state." + 229,"HD prime dialysate dialyzer time out alarm." + 230,"HD prime dialysate bypass time out alarm." + 231,"HD pre-treatment mode dry pressure self-test failure." + 232,"HD pre-treatment mode wet self-test LC vs LC failure." + 233,"DG barometric sensor coefficients bad CRC." + 234,"DG inlet water pressure in high range." + 235,"HD in treatment stopped sub-mode after rinseback completed (no escalation)." + 236,"HD needs new cartridge to be installed." + 237,"Available for use." + 238,"HD no cartridge loaded or installed improperly alarm." + 239,"HD fail to remove cartridge alarm." + 240,"DG bicarb conductivity out of range during bicarb pump check alarm." + 241,"DG reservoir drain time out." + 242,"DG reservoir fill time out." + 243,"DG reservoir leak time out." + 244,"DG cleaning mode temperature sensors difference out of range." + 245,"DG heat disinfect target temperature time out (could not reach to temperature)." + 246,"DG cleaning mode conductivity sensors out of range." + 247,"Alarm Id available." + 248,"DG chemical disinfect could not reach to target temperature out of range." + 249,"DG chemical disinfect target conductivity out of range." + 250,"DG chemical disinfect insert acid and remove the concentrate cap." + 251,"HD invalid system record." + 252,"HD invalid service record." + 253,"DG invalid system record." + 254,"DG invalid service record." + 255,"HD and UI software builds are not compatible." + 256,"HD processor is in Disinfect Chemical Flush mode." + 257,"HD invalid institutional record." + 258,"HD UI POST OS version compatibility failure." + 259,"HD temperatures out of range." + 260,"HD UI POST Application Integrity (Sha256Sum) failure." + 261,"HD UI POST CANBus failure." + 262,"Alarm Id available." + 263,"HD UI POST Touch failure." + 264,"HD UI POST SD-Card failure." + 265,"HD UI POST RTC failure." + 266,"HD UI POST WiFi failure." + 267,"HD UI POST Bluetooth failure." + 268,"HD UI POST Ethernet failure." + 269,"HD UI POST Sound failure." + 270,"HD POST Safety Shutdown failure." + 271,"DG POST Safety Shutdown failure." + 272,"HD Fan RPM out of range." + 273,"Available for use." + 274,"DG inactive reservoir weight out of range." + 275,"HD arterial pressure sensor is reading out of range." + 276,"HD venous pressure sensor is reading out of range." + 277,"HD BP occlusion sensor is reading out of range." + 278,"HD active reservoir weight out of range." + 279,"DG dialysate drain time out." + 280,"DG drain pump direction invalid." + 281,"Acid concentration bottle low volume alarm." + 282,"Bicarbonate concentration bottle low volume alarm." + 283,"DG load cells weight out of range." + 284,"DG load cells primary/back up drift out of range." + 285,"HD processor is in RO permeate sample mode." + 286,"DG concentrate cap not in proper position." + 287,"HD processor clock speed checks against FPGA clock failure." + 288,"HD load cells primary/back up drift out of range." + 289,"DG dialysate cap not closed." + 290,"HD venous pressure sensor FPGA fault." + 291,"HD processor is in Disinfect Flush mode." + 292,"HD processor is in Disinfect Heat mode." + 293,"HD processor is in Disinfect Chemical mode." + 294,"HD processor is in Disinfect active cool mode." + 295,"HD UI POST CloudSync failure." + 296,"DG TDi sensors FPGA fault." + 297,"DG TRo sensors FPGA fault." + 298,"DG baro sensor FPGA fault." + 299,"DG invalid serial number." + 300,"HD invalid serial number." + 301,"DG RO permeate sample remove the dialysate cap." + 302,"DG processor RAM error." + 303,"DG drain pump direction FPGA fault." + 304,"HD invalid usage record." + 305,"HD processor RAM error." + 306,"Alarm ID available." + 307,"HD AC power lost second alarm." + 308,"DG CPi conductivity sensor invalid character received." + 309,"DG CPo conductivity sensor invalid character received." + 310,"DG CD1 conductivity sensor invalid character received." + 311,"DG CD2 conductivity sensor invalid character received." + 312,"HD Dialysate In flow rate to too low." + 313,"DG cleaning mode inlet water temperature too low." + 314,"DG cleaning mode inlet water pressure too high." + 315,"DG cleaning mode inlet water pressure too low." + 316,"Alarm available." + 317,"Alarm available." + 318,"Alarm available for use." + 319,"DG chemical disinfect flush flush sample." + 320,"DG chemical disinfect flush sample timeout." + 321,"DG outlet UV reactor not healthy." + 322,"HD UI POST Year check failure." + 323,"HD UI POST Configuration check failure." + 324,"Total number of alarms." Index: denali.pro =================================================================== diff -u -r193d7f4cf456dbcf0b4aee1edbacdeb8d5706967 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- denali.pro (.../denali.pro) (revision 193d7f4cf456dbcf0b4aee1edbacdeb8d5706967) +++ denali.pro (.../denali.pro) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -43,6 +43,19 @@ # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +# For Update shared code, we're compiling for the UI: +DEFINES += COMPILING_ON_UI + +# This is targeting Qt 5.15 which relies on being binary +# compatible with openssl 1.1.1, most older versions require +# 1.0.0c. 1.1.1 must be installed on the target. +# Use: +# sudo apt-get install openssl +# Or maybe: +# sudo apt-get install libssl-dev +LIBS += -lssl -lcrypto + INCLUDEPATH += \ common \ sources \ @@ -78,6 +91,7 @@ sources/model/dg/data/disinfect \ sources/model/dg/adjustment \ sources/model/dg/adjustment/settings \ + sources/update \ sources/view \ sources/view/confirm \ sources/view/settings \ @@ -269,6 +283,19 @@ sources/gui/GuiGlobals.h \ sources/gui/GuiView.h \ sources/gui/GuiController.h \ + \ # SW Update + sources/update/EventWait.h \ + sources/update/HalStdTypes.h \ + sources/update/IDataProvider.h \ + sources/update/MsgLink.h \ + sources/update/Obfuscate.h \ + sources/update/Package.h \ + sources/update/SignRsa.h \ + sources/update/UiProtocol.h \ + sources/update/UiSwUpdate.h \ + sources/update/UiUpdateStatus.h \ + sources/update/UpdateProtocol.h \ + sources/update/VSwUpdate.h \ \ # ---------- Views ---------- sources/view/VTreatmentCreate.h \ sources/view/VEventSpy.h \ @@ -538,6 +565,15 @@ sources/gui/GuiGlobals.cpp \ sources/gui/GuiView.cpp \ sources/gui/GuiController.cpp \ + \ # Update + sources/update/Obfuscate.cpp \ + sources/update/Package.cpp \ + sources/update/PackageItem.cpp \ + sources/update/SignRsa.cpp \ + sources/update/UiProtocol.cpp \ + sources/update/UiSwUpdate.cpp \ + sources/update/UpdateProtocol.c \ + sources/update/VSwUpdate.cpp \ \ # ---------- Views ---------- sources/view/VTreatmentCreate.cpp \ sources/view/VEventSpy.cpp \ Index: denali.pro.user =================================================================== diff -u -r1f2e7dbd08b00f8c56eedf29f083733570aa642e -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- denali.pro.user (.../denali.pro.user) (revision 1f2e7dbd08b00f8c56eedf29f083733570aa642e) +++ denali.pro.user (.../denali.pro.user) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -103,6 +103,7 @@ true + "" 0 /home/denali/Projects/application/imake.sh %{sourceDir} ProjectExplorer.ProcessStep @@ -459,10 +460,9 @@ RemoteLinux.DirectUploadStep /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali - /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Release/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali - /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Release/denali + /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Release/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali @@ -472,6 +472,7 @@ /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Release/denali + /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Release/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali @@ -480,26 +481,26 @@ /home/denali/Projects/tmp/build/build-denali-Qt_5_15_10_iMX8-Debug/denali + 192.168.10.138 192.168.10.228 192.168.10.228 - 192.168.10.138 - 192.168.137.210 192.168.10.159 - 192.168.10.186 - 192.168.10.167 + 192.168.137.210 192.168.137.170 + 192.168.10.167 + 192.168.10.186 192.168.137.30 192.168.137.25 192.168.10.186 - 192.168.137.3 192.168.137.26 192.168.137.170 - 192.168.40.23 192.168.137.24 + 192.168.40.23 + 192.168.137.3 + 192.168.137.247 192.168.137.202 - 192.168.137.36 192.168.137.125 - 192.168.137.247 + 192.168.137.36 /home/root @@ -524,11 +525,13 @@ /home/root + /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots/x86_64-pokysdk-linux /opt/b2qt/3.1.18/sysroots/x86_64-pokysdk-linux /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots + /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots/x86_64-pokysdk-linux /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots @@ -542,52 +545,50 @@ /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots /opt/b2qt/3.1.18/sysroots - /opt/b2qt/3.1.18/sysroots - /opt/b2qt/3.1.18/sysroots + 2023-02-02T09:06:00.862 2023-01-17T18:18:03.749 2023-01-17T18:06:25.579 - 2023-02-02T09:06:00.862 - 2023-02-02T01:52:20.307 2023-01-24T18:19:13.179 - 2023-01-18T17:47:08.797 - 2023-02-02T19:40:15.813 + 2023-02-02T01:52:20.307 2023-01-27T10:15:15.423 + 2023-02-02T19:40:15.813 + 2023-01-18T17:47:08.797 2023-02-02T02:30:48.337 2023-02-02T02:13:54.596 2023-01-18T20:13:36.296 - 2023-02-02T02:40:56.627 2023-02-01T05:00:56.449 2023-01-27T09:45:11.898 - 2023-01-24T17:29:54.849 2023-02-02T02:05:29.947 + 2023-01-24T17:29:54.849 + 2023-02-02T02:40:56.627 + 2023-02-02T02:26:33.738 2023-02-02T01:46:50.167 - 2023-02-01T03:23:15.710 2023-02-02T02:07:25.922 - 2023-02-02T02:26:33.738 + 2023-02-01T03:23:15.710 + 2023-02-02T09:05:22.000 2023-01-17T18:17:25.000 2023-01-17T18:05:42.000 - 2023-02-02T09:05:22.000 - 2023-02-02T01:52:16.000 2023-01-24T18:18:58.000 - 2023-01-18T17:47:04.000 - 2023-02-02T19:39:36.000 + 2023-02-02T01:52:16.000 2023-01-27T10:15:08.000 + 2023-02-02T19:39:36.000 + 2023-01-18T17:47:04.000 2023-02-02T02:31:01.000 2023-02-02T02:14:08.000 2023-01-18T20:13:33.000 - 2023-02-02T02:41:10.000 2023-02-01T05:00:51.000 2023-01-27T09:44:58.000 - 2023-01-24T17:30:03.000 2023-02-02T02:05:42.000 + 2023-01-24T17:30:03.000 + 2023-02-02T02:41:10.000 + 2023-02-02T02:26:46.000 2023-02-02T01:47:02.000 - 2023-02-01T03:23:28.000 2023-02-02T02:07:21.000 - 2023-02-02T02:26:46.000 + 2023-02-01T03:23:28.000 2 Index: denali.qrc =================================================================== diff -u -rb6f86ce89361e33d989f6a9d01eb94c344a6384f -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- denali.qrc (.../denali.qrc) (revision b6f86ce89361e33d989f6a9d01eb94c344a6384f) +++ denali.qrc (.../denali.qrc) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -26,6 +26,7 @@ sources/gui/qml/pages/settings/SettingsFactoryReset.qml sources/gui/qml/pages/settings/SettingsDecommission.qml sources/gui/qml/pages/settings/SettingsInstitutionalRecord.qml + sources/gui/qml/pages/settings/SettingsSWUpdate.qml sources/gui/qml/dialogs/ConfirmDialog.qml Index: sources/ApplicationController.cpp =================================================================== diff -u -rc70ae33e19c08779ce89e2f1728f2d1af7b5c100 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision c70ae33e19c08779ce89e2f1728f2d1af7b5c100) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -373,24 +373,28 @@ { // DEBUG: return; #ifndef DISABLE_KEEP_ALIVE - QVariantList mData; - int mFakeDataLen = gFakeData.length(); - // coco begin validated: This is a fake data generator for CANBus missing/swapped frames Testing - // will never be executed on the product - // has been tested manually - if (mFakeDataLen) { - if (gFakeSeqAtBegin) { - createFakeSeqAtBeginLongMessage(mData, mFakeDataLen); + // Update can disable this message from being sent and + // the queueing up a possible response expectation. + if (_keepAlive) { + QVariantList mData; + int mFakeDataLen = gFakeData.length(); + // coco begin validated: This is a fake data generator for CANBus missing/swapped frames Testing + // will never be executed on the product + // has been tested manually + if (mFakeDataLen) { + if (gFakeSeqAtBegin) { + createFakeSeqAtBeginLongMessage(mData, mFakeDataLen); + } + else { + createFakeSequencedLongMessage (mData, mFakeDataLen); + } } + // disabled coco end else { - createFakeSequencedLongMessage (mData, mFakeDataLen); + mData += static_cast(GuiActionData::NoData); } + onActionTransmit(GuiActionType::ID_KeepAlive, mData); } - // disabled coco end - else { - mData += static_cast(GuiActionData::NoData); - } - onActionTransmit(GuiActionType::ID_KeepAlive, mData); #endif } @@ -526,6 +530,24 @@ */ void ApplicationController::initSettings() { + // this emit guaranties that the slot will be called in the application thread + // also the signal is private so it will be used internally only. + emit didSettingsInit({}); +} + +void ApplicationController::enableKeepAlive(bool vTurnOn) { + _keepAlive = vTurnOn; +} + + +/*! + * \brief ApplicationController::onSettingsInit + * \details The slot which will be called to start the settings initialization in Application thread. + * This method also initializes the Settings model singleton object to let it live in the Application thread. + * To start the setting initialization QConcurrent is used with QFuture to signal the Application when it's done. + */ +/*void ApplicationController::onSettingsInit() +{ // That is enough to call to the I function here to create the object in the thread that Settings is leaving in, // which currently is Application_Thread, since the Settings is created in that thread. _Settings; @@ -537,7 +559,7 @@ }); _settingsWatcher.setFuture(mFuture); } - +*/ /*! * \brief onSettingsUpdate * \details when the Settings reads the .conf files and fills the MSettings emits this finished signal @@ -669,17 +691,35 @@ * \brief ApplicationController::onPOSTDone * \details Sends the POST Final message */ -void ApplicationController::onPOSTDone(bool /*vPass*/) { - LOG_DEBUG("ApplicationPOST Done"); +//<<<<<<< HEAD +//void ApplicationController::onPOSTDone(bool /*vPass*/) { +// LOG_DEBUG("ApplicationPOST Done"); /// in manufacturing or update mode the configurations must reside in /root/home /// therefore the settings can be initialized after POST. +//#ifdef BUILD_FOR_DESKTOP +// initSettings(); +//#else +// if ( gEnableManufacturing || gEnableUpdating ) initSettings(); +//#endif +//} +//======= +void ApplicationController::onPOSTDone(bool vPass) { + emit didPOSTDone(vPass); // Used by Update SW. + AdjustUIPostFinalResultRequestData data; + data.mResult = vPass; + emit didAdjustment(data); + LOG_DEBUG("ApplicationPost Done"); + + /// in manufacturing or update mode the configurations must reside in /root/home + /// therefore the settings can be initialized after POST. #ifdef BUILD_FOR_DESKTOP initSettings(); #else if ( gEnableManufacturing || gEnableUpdating ) initSettings(); #endif } +//>>>>>>> DEN-sunrise-prb void ApplicationController::onQuitApplication() { Index: sources/ApplicationController.h =================================================================== diff -u -rc70ae33e19c08779ce89e2f1728f2d1af7b5c100 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/ApplicationController.h (.../ApplicationController.h) (revision c70ae33e19c08779ce89e2f1728f2d1af7b5c100) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -60,9 +60,12 @@ ApplicationPost _post; // I may need to be put in a concurrent. + bool _keepAlive = true; ///< Keep alive messaging on or off. public: void initSettings(); + void enableKeepAlive(bool vTurnOn); + public slots: bool init(); bool init(QThread &vThread); @@ -142,6 +145,7 @@ void didPOSTBluetoothData (const QString &vMacAddress); void didPOSTCloudSyncData (const QString &vNetAddress); + void didPOSTDone (bool vPass); signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG Index: sources/canbus/CanInterface.cpp =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/canbus/CanInterface.cpp (.../CanInterface.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/canbus/CanInterface.cpp (.../CanInterface.cpp) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -25,7 +25,11 @@ #include "Logger.h" #include "MessageGlobals.h" #include "FrameInterface.h" +#include "UiSwUpdate.h" +#include +#include + // namespace using namespace Can; @@ -232,6 +236,67 @@ } /*! + * \brief Turn CAN driver SW mode on/off. + * + * \param on Turn the mode on (true) or off (false). + */ +void CanInterface::setSWUpdateMode(bool on) +{ + _SWUpdateMode = on; +} + +/*! + * \brief Send from UI. + * + * \param msgId The CAN message Id. + * \param pData The payload data. + * \param length Length in bytes. + */ +bool CanInterface::sendSWUpdateMsg(uint16_t msgId, uint8_t* pData, uint32_t length) +{ + bool ok = false; + + if (_canDevice && _SWUpdateMode) + { + int32_t slength = (int32_t)length; // Use signed math. + ok = true; + std::size_t offset = 0; + while (ok && (slength > 0)) + { + QCanBusFrame frame; + + // Always 8 bytes, zero the remaining. + QByteArray qb((qsizetype)8, (char)0); + uint32_t limit = slength > 8 ? 8 : slength; + + // Fill in the data. + for (std::size_t ii = 0; ii < limit; ii++) { + qb[(uint)ii] = pData[offset + ii]; + } + frame.setFrameId(msgId); + frame.setPayload(qb); + offset += 8; + slength -= 8; + + ok = _canDevice->writeFrame(frame); + { + if (ok) { + _txFrameCount++; + } else { + _erFrameCount++; + } + } + + // Delay 500 us between msg sends. + // 8 bytes is roughly 400us. + using namespace std::chrono_literals; + std::this_thread::sleep_for(500us); + } + } + return ok; +} + +/*! * \brief CanInterface status * \details Sets the Can interface status description * \param vDescription - Description about the CANBus Interface errors @@ -264,7 +329,11 @@ // disabled coco begin validated: Manually tested since required to disable and enable the CANBus if( !_canDevice ) return false; //disabled coco end - return _canDevice->writeFrame(vFrame); + if (_SWUpdateMode) { + return true; + } else { + return _canDevice->writeFrame(vFrame); + } } /*! @@ -412,10 +481,23 @@ const QCanBusFrame frame = _canDevice->readFrame(); rxCount(); // disabled coco begin validated: This code is only for debugging purposes and had been tested manually. - if ( _enableConsoleOut ) + if ( _enableConsoleOut ) { consoleOut(frame, QString("Rx:%1").arg(_rxFrameCount)); - // disabled coco end - emit didFrameReceive(frame); + } + + if (_SWUpdateMode) { + + uint16_t msgId = frame.frameId(); + QByteArray qb = frame.payload(); + + uint8_t* pData = (uint8 *)qb.data(); + + SwUpdate::UiSwUpdate::instance().receive(msgId, pData); + } else { + + // disabled coco end + emit didFrameReceive(frame); + } } } @@ -430,8 +512,9 @@ bool ok = transmit(vFrame); txCount(); // disabled coco begin validated: This code is only for debugging purposes and had been tested manually. - if ( _enableConsoleOut ) + if ( _enableConsoleOut ) { consoleOut(vFrame, QString("Tx:%1").arg(_txFrameCount)); + } // disabled coco end emit didFrameTransmit(ok); } Index: sources/canbus/CanInterface.h =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/canbus/CanInterface.h (.../CanInterface.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/canbus/CanInterface.h (.../CanInterface.h) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -70,6 +70,8 @@ FrameCount _txFrameCount = 0; FrameCount _erFrameCount = 0; + bool _SWUpdateMode = false; + public slots: bool init(); bool init(QThread &vThread); @@ -80,6 +82,10 @@ void enableConsoleOut(bool vEnabled); void quitDevice(); + + void setSWUpdateMode(bool on); + + bool sendSWUpdateMsg(uint16_t msgId, uint8_t* pData, uint32_t length); private: void initConnections(); Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r38ae7b93679d05a54fc460dac68891562d7da72d -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 38ae7b93679d05a54fc460dac68891562d7da72d) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -1056,6 +1056,14 @@ // disabled coco end /*! + * \brief Get the sequence number, used by SW update to enter boot loader. + * \return sequence number value. + */ +uint16_t MessageDispatcher::getSequenceNumber() { + return (uint16_t)txCount(); +} + +/*! * \brief MessageDispatcher::txCount * \details count transmitted messages up the size of the Sequence type size * \return message count Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -r38ae7b93679d05a54fc460dac68891562d7da72d -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 38ae7b93679d05a54fc460dac68891562d7da72d) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -179,6 +179,8 @@ public: void enableConsoleOut(bool vEnable) { _builder.enableConsoleOut(vEnable); } + uint16_t getSequenceNumber(); + private: void initConnections(); Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r26433c42f2efa2cb18af95f523581c7eeeff049d -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 26433c42f2efa2cb18af95f523581c7eeeff049d) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -125,6 +125,8 @@ // ----- #include "VTreatmentAdjustmentEnd.h" +// ----- SW Update +#include "VSwUpdate.h" namespace Gui { Index: sources/gui/qml/main.qml =================================================================== diff -u -r26433c42f2efa2cb18af95f523581c7eeeff049d -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/gui/qml/main.qml (.../main.qml) (revision 26433c42f2efa2cb18af95f523581c7eeeff049d) +++ sources/gui/qml/main.qml (.../main.qml) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -117,6 +117,9 @@ // Confirm import VConfirm 0.1 +//SW Update +import VSWUpdate 0.1 + // Qml imports import "qrc:/globals" import "qrc:/pages" @@ -245,6 +248,9 @@ VDisinfectAdjustDisinfect { id: vDisinfectAdjustDisinfect } VAdjustDGCleaningUsage { id: vAdjustDGCleaningUsage } + // --- Update + VSWUpdate { id: vSWUpdate } + Background {} // ----- Follow the below Z order ----- Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r26433c42f2efa2cb18af95f523581c7eeeff049d -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 26433c42f2efa2cb18af95f523581c7eeeff049d) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -47,7 +47,7 @@ readonly property bool visibleLanguage : false - readonly property bool visibleSWUpdate : false + readonly property bool visibleSWUpdate : true readonly property bool visibleDGScheduling : false readonly property bool visibleCalibration : false @@ -242,7 +242,11 @@ push( _SettingsRootSSHAccess) break - case SettingsStack.FactoryReset: + case SettingsStack.SWUpdate: + push ( _settingsSWUpdate ) + break + + case SettingsStack.FactoryReset: push( _serviceFactoryReset ) break @@ -278,7 +282,12 @@ SettingsFactoryReset { id: _serviceFactoryReset } SettingsDecommission { id: _serviceDecommission } SettingsInstitutionalRecord { id: _settingsInstitutionalRecord } + SettingsSWUpdate { id: _settingsSWUpdate } + //UserConfirmation { id: _servicePassword + // property bool isPassword_Accepted : false + // property bool isDefaultPasswordSet : (vSettings.servicePass != "") + function gotoServiceMode( vservice ) { //DEBUG console.log (" 0 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vservice, stackView.initialItem, stackView.currentItem, stackView.depth) if ( ! _servicePassword.isPassword_Accepted ) return Index: sources/model/hd/alarm/MAlarmMapping.cpp =================================================================== diff -u -rf43d7f3eb64da40945cd57a145f0ffaa2b988692 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision f43d7f3eb64da40945cd57a145f0ffaa2b988692) +++ sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -7,7 +7,7 @@ * * \file MAlarmMapping.cpp * \author (last) Behrouz NematiPour - * \date (last) 01-Jan-2024 + * \date (last) 07-Jun-2024 * \author (original) Behrouz NematiPour * \date (original) 03-May-2021 * Index: sources/view/VView.h =================================================================== diff -u -r26433c42f2efa2cb18af95f523581c7eeeff049d -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/view/VView.h (.../VView.h) (revision 26433c42f2efa2cb18af95f523581c7eeeff049d) +++ sources/view/VView.h (.../VView.h) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -198,5 +198,7 @@ /* Disinfection */ \ REGISTER_TYPE( VDisinfectAdjustDisinfect ) \ REGISTER_TYPE( VAdjustDGCleaningUsage ) \ + /* Update */ \ + REGISTER_TYPE( VSWUpdate) //--------------------------------------------------------------------------------//