ci-server-engineer/.claude/skills/class-object-engineering/tasks/change-reset-class.md
cliu c98a33b736 ISS-028: Engineering Module class reset verified
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 18:23:43 +10:00

70 lines
2.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
task: Change a class that already has objects (compile and reset)
version: R1.03
source: IM 36K10L10-01EN §4 (Reset class); IM 36K10P11-01EN §2.3, §10.4; practiced with CI-Eng-Sample class CIENG_TANK 2026-09-30
status: verified
---
# Change a class that has objects
Objects keep running the **old** compiled code until their class is reset (verified). A reset
restarts every object of the class; by the manual, `ONCE` trigger groups fire again. Items the
objects created were kept, with their values (verified).
## 1. New source and compile
`dssqld -m` with the class name, `COMPILE` 1 and the new `METHOD`:
```
@FIELDS
NAME,COMPILE,METHOD
@CLASS_DF
"CIENG_TANK",1,@"
CLASS CIENG_TANK;
…
ENDCLASS CIENG_TANK;
"@
```
`Errors` 0 = compiled. On a compile error the old code stays; see `load-class-object.md` for
reading the error listing.
Export the class (`load-class-object.md` §2): after the compile `RESET_REQUIRED` = 1 and
`OBJECTS_RESET` = 0 of `OBJECTS` n. Verified: the object still printed the old text.
## 2. Reset the class
**Works** — `opcdbg`, Classes, action 8 *Reset class*: class name, node (0 = this node), file
for a reset report (empty = none; this prompt is not in the manual):
```
printf '2\n8\n<CLASS>\n0\n\n-1\n-1\n' | timeout 30 opcdbg 0
```
(Bash. Interactively, type the same answers.) Keep the time-out: `opcdbg` repeats its last
prompt forever when the input runs out.
Afterwards `RESET_REQUIRED` = 0 and the object used the new code at once (verified).
**Also works** — Engineering Module: *Configuration › I/O processing › Classes* › right-click the
class › *Reset*. The *Class - reset* window shows *Reset required* / *Extended reset required*,
options *Force extended reset* and *Abort after first failure*, progress (reset n of m, failed)
and a reset report; click **Reset** (verified by the user 2026-10-01: 1 of 1 object reset,
`RESET_REQUIRED` 0). This window is the front end of dataset `CLASS_RESET_COMMAND`.
**Does not work** (verified 2026-09-30, ISS-028):
- `dssqld -m` with `NAME,RESET` = `"<class>",1` (also with `RESET_NODE` = the host node name):
accepted with 0 errors but nothing happens.
- `dssqld -m` on `OBJECT_DF` with `RESET` 1: refused with `OPC-E-OBJ_RSTREQ, The class needs to
be reset first`.
- `CLASS_RESET_COMMAND` (system-wide reset, fields `RESET`, `GENERATE_REPORT`, `PROGRESS`,
`OBJECTS_RESET` …): the dataset allows only read and update, `dssqld -e` returns no record,
`dssqld -m` gives *Not found*, `dssqld -i` is refused (`DSS-E-NO_AUTH`). Verified 2026-10-01.
## 3. Changing prompts or signals
Only a change in the method bodies was practiced. When the class **prolog** changes (new
signals, prompts, attributes, created items), check `EXTENDED_RESET_REQUIRED` in `CLASS_DF`
after compiling; what an extended reset does was not tested. The safe way is to recreate the
objects (remove, load) — note that removing an object deletes the items it created, with their
history links.