Commit Graph

60 Commits

Author SHA1 Message Date
26c2120743 Diag: improve E255 handling:
- allways run through finishDiag() method
 - on finishing diag: only remove elements in previousMachineEventSet if
data is valid
2025-09-24 11:25:54 +02:00
5c40e088aa Diag: restart carun is M0255 (was W255) 2025-07-29 15:46:26 +02:00
0467db23d1 Merge branch 'ImproveE255Handling' into improveDeviceControllerDiag 2025-06-25 10:36:19 +02:00
e1470d13f1 Diag: clear machine machineEventSet on valid data
This is allowed only here: dc-data is valid (i.e. check for E255 was
sucessfull).
This method sub_componentAssessment() will check all criteria of
dc-module conditions.
2025-06-25 10:29:58 +02:00
1165c4b92f Diag: set W255 only once 2025-06-24 15:03:21 +02:00
40acd0e0c4 Diag: set E255 only once 2025-06-24 14:25:52 +02:00
fe3696ce9c Diag: E255
- handle E255 in previousMachineEventSet (because machineEventSet will
   be cleared regularely)
 - do not call finishDiag() on E255 because this will interscect
   previous- with current machineEventSet and thus remove all Errors/
   Warnings because machineEventSet was cleared and includes only E255!
2025-06-24 14:18:35 +02:00
cc6dfee0e2 Diag: set E255 only once 2025-06-12 16:33:32 +02:00
91d8eb03b3 Diag: clear machineEventSet on diagRequest 2025-06-12 10:50:29 +02:00
3bef73ce4b Diag: remove E255 / W255 on valid data 2025-06-12 10:37:26 +02:00
8d03926de4 Diag: do no clear machineEventSet on diagRequest 2025-06-12 10:24:25 +02:00
b34716ef93 Minor: order debug output 2025-06-12 08:40:59 +02:00
f75f2c57df Diag: E255 / W255 / M0254 -> set, send and finish diag
This states are rather meta infos about dc condition. Therefore the
where created and sent outside of superviseSystem()-method.
This commit should ensure that:
 - this states are sent to ISMAS
 - this states are inserted in machineEventSet in order to enable
   a reset in next diagRun
2025-06-12 08:35:58 +02:00
18a35acf20 Diag: add single exit method for ReqDiag 2025-06-12 08:35:00 +02:00
ccc2b8120d Diag: new constructor for DCMachineEvent 2025-06-12 08:33:28 +02:00
ccc1c6033f Diag: Send operate O000 as last event (after set/reset events) 2025-06-11 14:13:09 +02:00
c23364874e Diag: machineEventSet:
- do not overwrite previous events, only insert new events (unite)
 - remove all events not in machineEventSet
2025-06-11 12:35:27 +02:00
1e5020132f Diag: DEBUG EventSets 2025-06-11 09:58:31 +02:00
6bd02f1831 Diag: care about EventSet.clear() (-> TEST / TODO) 2025-06-11 09:58:31 +02:00
923bff1117 Diag: Operate O000 is not part of machineEventSet
- O000 is not a direct result from DC
 - O000 is constructed in DCDiag, if no Error EXXXX and no Warning WXXXX
   ocurred
 -> O000 must not be part of machineEventSet (e.g. O000 can not be
    reset)
2025-06-11 09:58:31 +02:00
12be31ee49 Diag: getCurrentMachineState: return previousState ...
... if diag is running.
This method is currently not used, but maybe in future it could be
usefull to read current state.
2025-06-11 09:58:31 +02:00
f8757b352d Diag: clear machineEventSet on the begin of DCDiag ...
... not on end.
This is to keep current machineEventSet during normal IDLE process.
2025-06-11 09:58:25 +02:00
4567aed6d1 Introduce DCMachineEvent ...
... this is an DC-Plugin internal data-structure which can be
transformed to an ATBMachineEvent and sent to ISMAS.

DCMachineEvent is in fact a couple ot DeviceController::State and a
QString eventID.

Thi eventID is necessary to send a state-reset to ISMAS. ISMAS needs
same enventID for set- and reset Events.
2025-06-11 09:55:25 +02:00
4df3a83126 Debug diag: print machineEventSet 2025-06-11 09:43:53 +02:00
5c66abfd87 Improve E255 handling:
- start BackgroundTask on first data not valid
 - in any case of E255/data-no-valid: try to restart diag;
   This is because there were only 'returns' without initiating
   something, so that next check/restart carun happened first on next
   wokeup.
2025-05-28 13:57:48 +02:00
efe56672ff DCDiag: add dbus interface 2025-05-27 12:59:12 +02:00
0876fa229e Diag: do not send reset errors/warnings ...
... this is a proposal for future.
2025-05-08 10:11:19 +02:00
1c13d92171 New proposal for DeviceControllerDiag:
Manage two sets of errors and compare to previous run.
2025-04-14 08:18:11 +02:00
8fe705f49b DCState: send EVENT_CLASS::STATE as eventName "Mxxxx" 2024-11-20 15:42:29 +01:00
18104b7271 Start dc_autoRequest() on wokeup 2024-09-25 12:33:52 +02:00
9be2841187 Init DC structs 2024-08-09 08:06:14 +02:00
ac93e9e631 Send W255 on restart CArun 2024-07-15 11:09:37 +02:00
c1dd20ec4f Restart carun on consecutive E255 2024-07-15 11:09:28 +02:00
6c2717c56b Diag: check doors in sub_componentAssessment ...
... this prevents sending Operate "O000" in case of an opend door and
enables sending Operate "O000" after closing all doors because
'lastResult' has not changed.
2024-06-11 09:27:07 +02:00
816182c87b Diag: restart on E255 2024-06-03 12:49:33 +02:00
492d3a107a Diag: set timeout for diagRequest from config ...
Option: "ATBDeviceControllerPlugin/diagTimeout"
 Description: Timeout for diagRequest in seconds.
 Default value: 45s
2024-06-03 12:09:34 +02:00
962cd01eac Re-enable sending DC-State after closing doors 2024-06-03 11:53:58 +02:00
d66363da46 Diag: Temperatur warning: E004 (Error) -> W004 (Warning) 2024-05-27 13:16:28 +02:00
7b25f86d6b CoinEscrow error is considered a warning (W010) 2024-05-17 14:08:07 +02:00
5a999a0494 Comment: proposal: MachineEvents with JSON-Parameter 2024-05-16 17:38:03 +02:00
ec18ac45e4 Send diagEvent E255 as ERROR 2024-05-16 17:37:29 +02:00
379a5d4e3e Diag: track ErrorState 2024-03-19 13:43:01 +01:00
a5c900b9fe Fix: send operate 2024-03-15 13:40:16 +01:00
70b488de66 Diag: send operate (O000) only if State has changed 2024-03-12 16:20:39 +01:00
d5786aa5ab Add COIN_PROCESSER::NONE (machine without coin processing) 2024-03-08 12:44:41 +01:00
0cc89cefab Read dc-firmware-version: filter return value (null-character) 2024-01-31 12:22:18 +01:00
d2efe566c5 Add persistentData to store dc-fw-version
Reading dc-fw-version is somehow complicated ...
Id does not work reliable on startup, so we do read it also on every
diagRequest().
Version string is then stored in persistent data.
This data can be used e.g. by other tools to show the
device-controller-firmware-version.
2024-01-31 11:34:00 +01:00
b3ad8e1ee9 Interrupt DiagRequest on error 2023-12-11 18:32:27 +01:00
48d65b679f Add interface for coinProcessor() and billAcceptor() 2023-11-23 17:58:36 +01:00
4187d8044d Fix: finish diag on right place 2023-07-27 14:36:06 +02:00