diff --git a/json/card_source.json b/json/card_source.json index 99b793a..cab62f4 100644 --- a/json/card_source.json +++ b/json/card_source.json @@ -1,63 +1,284 @@ { - "$schema": "../../../tools/card-layouts/schemas/card-source.schema.json", "schema": "esc-card-source.v1", + "$schema": "../../../tools/card-layouts/schemas/card-source.schema.json", + "schema": "esc-card-source.v1", "card": { - "id": "mpabi-freertos-cpp-14-sw-timer", "series": "freertos-cpp", "series_title": "FreeRTOS C++", "number": "14", "count": "16", "slug": "sw-timer", - "title": "Software Timer and the Timer Daemon Task", "topic": "One-shot/periodic policy, daemon command queue, typed callback context and lifetime", "project": "Freestanding C++ nad FreeRTOS", "subject": "Informatyka", - "level": "Rok 2 · L13 · RV32I/Hazard3", "revision_date": "2026-07-19T00:00:00+02:00", "status": "Gotowa", "version": "v00.01", - "uuid": "78db37df-63e5-4c5b-80ce-f73a411f0b50", "author": "M. Pabiszczak", "year": "2026" + "id": "mpabi-freertos-cpp-14-sw-timer", + "series": "freertos-cpp", + "series_title": "FreeRTOS C++", + "number": "14", + "count": "16", + "slug": "sw-timer", + "title": "Software Timer and the Timer Daemon Task", + "topic": "One-shot/periodic policy, daemon command queue, typed callback context and lifetime", + "project": "Freestanding C++ nad FreeRTOS", + "subject": "Informatyka", + "level": "Rok 2 · L13 · RV32I/Hazard3", + "revision_date": "2026-07-19T00:00:00+02:00", + "status": "Gotowa", + "version": "v00.01", + "uuid": "78db37df-63e5-4c5b-80ce-f73a411f0b50", + "author": "M. Pabiszczak", + "year": "2026" + }, + "generated": { + "tex": "doc/generated/main.tex", + "html": "web/index.html", + "html_css": "web/style.css", + "html_tree_inspector": false, + "react_app": true }, - "generated": {"tex": "doc/generated/main.tex", "html": "web/index.html", "html_css": "web/style.css", "html_tree_inspector": false, "react_app": true}, "template": "templates/karta-klasyczna.json", "title_block": { - "category": "KARTA PRACY · INFORMATYKA", "prepared_by": "M. Pabiszczak", "prepared_on": "2026-07-19T00:00:00+02:00", - "title": "Software Timer and the Timer Daemon Task", "repository_url": "https://zsl-gitea.mpabi.pl/edu-freertos-cpp/lab-rv32i-freertos-sw-timer", - "revision": "v00.01", "issued_on": "2026-07-19T00:00:00+02:00", "series": "FREERTOS-CPP-14", "document_type": "karta pracy", "tool": "card-layouts", - "show_qr": false, "show_repository_qr": false, "height_cm": 2.6, "repeat_on_every_page": true, "replace_front_matter": true + "category": "KARTA PRACY · INFORMATYKA", + "prepared_by": "M. Pabiszczak", + "prepared_on": "2026-07-19T00:00:00+02:00", + "title": "Software Timer and the Timer Daemon Task", + "repository_url": "https://zsl-gitea.mpabi.pl/edu-freertos-cpp/lab-rv32i-freertos-sw-timer", + "revision": "v00.01", + "issued_on": "2026-07-19T00:00:00+02:00", + "series": "FREERTOS-CPP-14", + "document_type": "karta pracy", + "tool": "card-layouts", + "show_qr": false, + "show_repository_qr": false, + "height_cm": 2.6, + "repeat_on_every_page": true, + "replace_front_matter": true, + "url": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/78db37df-63e5-4c5b-80ce-f73a411f0b50" }, "front_page_scope": { - "title": "Cel karty", "content_tex": "Uczeń rozdziela przyjęcie polecenia do timer queue od wykonania callbacku, mierzy one-shot/periodic timeline i dowodzi kontekstu timer daemon task.", - "scope_title": "Zakres karty", "scope_content_tex": "Software timer nie jest ISR. Callback współdzieli daemon task z innymi timerami; storage i typed context muszą przeżyć wszystkie pending commands i callbacks." + "title": "Cel karty", + "content_tex": "Uczeń rozdziela przyjęcie polecenia do timer queue od wykonania callbacku, mierzy one-shot/periodic timeline i dowodzi kontekstu timer daemon task.", + "scope_title": "Zakres karty", + "scope_content_tex": "Software timer nie jest ISR. Callback współdzieli daemon task z innymi timerami; storage i typed context muszą przeżyć wszystkie pending commands i callbacks." + }, + "side_margin_tree_layout": { + "columns": [ + { + "id": "zawodowe", + "label": "TECH", + "side": "left", + "tree": "WE -> EK -> KW", + "description": "Command queue, expiry ticks, task handle/stack i static storage." + }, + { + "id": "ogolne", + "label": "OG", + "side": "right", + "tree": "WE -> EN -> KW", + "description": "Acceptance versus completion oraz lifetime granicy callbacku." + } + ] }, - "side_margin_tree_layout": {"columns": [ - {"id": "zawodowe", "label": "TECH", "side": "left", "tree": "WE -> EK -> KW", "description": "Command queue, expiry ticks, task handle/stack i static storage."}, - {"id": "ogolne", "label": "OG", "side": "right", "tree": "WE -> EN -> KW", "description": "Acceptance versus completion oraz lifetime granicy callbacku."} - ]}, "learning_effects": { - "K14.EN01": {"bloom_level": "Analiza", "label": "Daemon i lifetime", "text": "Uczeń analizuje asynchroniczne command acceptance, współdzielony daemon i lifetime timer ID/context.", "assessment_criteria": ["K14.KW01"]}, - "K14.EK01": {"bloom_level": "Zastosowanie", "label": "Timer timeline", "text": "Uczeń implementuje typed one-shot/periodic wrapper i mierzy start, reset, change-period, stop oraz callback context.", "assessment_criteria": ["K14.KW01"]} + "K14.EN01": { + "bloom_level": "Analiza", + "label": "Daemon i lifetime", + "text": "Uczeń analizuje asynchroniczne command acceptance, współdzielony daemon i lifetime timer ID/context.", + "assessment_criteria": [ + "K14.KW01" + ] + }, + "K14.EK01": { + "bloom_level": "Zastosowanie", + "label": "Timer timeline", + "text": "Uczeń implementuje typed one-shot/periodic wrapper i mierzy start, reset, change-period, stop oraz callback context.", + "assessment_criteria": [ + "K14.KW01" + ] + } }, "assessment_criteria": { - "K14.KW01": {"text": "Program kończy się PASS; dwa starty accepted przy callback snapshot 0, reset@1 daje one-shot@6, periodic ma ticks 2/4/7 po change@4, stop usuwa aktywność, callback działa na Tmr Svc, a static create ma heap delta 0.", "learning_effects": ["K14.EN01", "K14.EK01"]} + "K14.KW01": { + "text": "Program kończy się PASS; dwa starty accepted przy callback snapshot 0, reset@1 daje one-shot@6, periodic ma ticks 2/4/7 po change@4, stop usuwa aktywność, callback działa na Tmr Svc, a static create ma heap delta 0.", + "learning_effects": [ + "K14.EN01", + "K14.EK01" + ] + } }, "educational_requirements": { "K14.WE01": { - "text": "Implementacja i dowód typed software timers na współdzielonym timer daemon tasku.", "label": "Software timer i daemon", "learning_effects": ["K14.EN01", "K14.EK01"], + "text": "Implementacja i dowód typed software timers na współdzielonym timer daemon tasku.", + "label": "Software timer i daemon", + "learning_effects": [ + "K14.EN01", + "K14.EK01" + ], "learning_tree": { - "schema": "we-learning-tree.v1", "policy": "Każde polecenie ma osobny dowód acceptance i osobny dowód wykonania/timeline.", - "ogolne": [{"effect_ref": "K14.EN01", "display": "EN LOCAL RTOS.TIMER.01", "source": "LOCAL", "official": "RTOS.TIMER", "local": "01", "kind": "EN", "tree_id": "K14.WE01.OG.LOCAL.RTOS.TIMER.01", "text": "Analizuje kolejkę, daemon, blocking callback i lifetime contextu.", "kw": [{"criterion_ref": "K14.KW01", "display": "KW LOCAL RTOS.TIMER.01", "source": "LOCAL", "kind": "KW", "official": "RTOS.TIMER", "local": "01", "text": "Nie utożsamia pdPASS z callback completion i chroni storage/context przed premature destruction."}]}], - "zawodowe": [{"effect_ref": "K14.EK01", "display": "EK LOCAL DBG.TIMER.01", "source": "LOCAL", "official": "DBG.TIMER", "local": "01", "kind": "EK", "tree_id": "K14.WE01.TECH.LOCAL.DBG.TIMER.01", "text": "Mierzy expiry ticks, activity, daemon handle/name, stack i heap.", "kw": [{"criterion_ref": "K14.KW01", "display": "KW LOCAL DBG.TIMER.01", "source": "LOCAL", "kind": "KW", "official": "DBG.TIMER", "local": "01", "text": "Pokazuje ticks 2/4/6/7, inactive after expiry/stop, Tmr Svc i PASS."}]}] + "schema": "we-learning-tree.v1", + "policy": "Każde polecenie ma osobny dowód acceptance i osobny dowód wykonania/timeline.", + "ogolne": [ + { + "effect_ref": "K14.EN01", + "display": "EN LOCAL RTOS.TIMER.01", + "source": "LOCAL", + "official": "RTOS.TIMER", + "local": "01", + "kind": "EN", + "tree_id": "K14.WE01.OG.LOCAL.RTOS.TIMER.01", + "text": "Analizuje kolejkę, daemon, blocking callback i lifetime contextu.", + "kw": [ + { + "criterion_ref": "K14.KW01", + "display": "KW LOCAL RTOS.TIMER.01", + "source": "LOCAL", + "kind": "KW", + "official": "RTOS.TIMER", + "local": "01", + "text": "Nie utożsamia pdPASS z callback completion i chroni storage/context przed premature destruction." + } + ] + } + ], + "zawodowe": [ + { + "effect_ref": "K14.EK01", + "display": "EK LOCAL DBG.TIMER.01", + "source": "LOCAL", + "official": "DBG.TIMER", + "local": "01", + "kind": "EK", + "tree_id": "K14.WE01.TECH.LOCAL.DBG.TIMER.01", + "text": "Mierzy expiry ticks, activity, daemon handle/name, stack i heap.", + "kw": [ + { + "criterion_ref": "K14.KW01", + "display": "KW LOCAL DBG.TIMER.01", + "source": "LOCAL", + "kind": "KW", + "official": "DBG.TIMER", + "local": "01", + "text": "Pokazuje ticks 2/4/6/7, inactive after expiry/stop, Tmr Svc i PASS." + } + ] + } + ] } } }, "sections": [ - {"title": "Typed policy i command queue", "content_kind": "prose", "content_tex": "Utwórz static OneShotTimer i PeriodicTimer, wyłącz copy/move, wykonaj explicit start przed schedulerem i zapisz callback snapshot.", "educational_requirement_refs": ["K14.WE01"], "learning_effect_refs": ["K14.EK01"], "assessment_criterion_refs": ["K14.KW01"], "area_tree_refs": ["K14.WE01.TECH.LOCAL.DBG.TIMER.01"], "steps": [ - {"id": "S01", "title": "Potwierdź dwa accepted commands i zero callbacków przy return.", "tree_refs": ["K14.WE01.TECH.LOCAL.DBG.TIMER.01"]}, - {"id": "S02", "title": "Zmierz initial periodic expiries 2 i 4.", "tree_refs": ["K14.WE01.TECH.LOCAL.DBG.TIMER.01"]} - ]}, - {"title": "Reset, change-period i stop", "content_kind": "prose", "content_tex": "Resetuj one-shot w ticku 1, zmień periodic z 2 na 3 w ticku 4, a po trzecim callbacku wyślij stop i potwierdź inactive.", "educational_requirement_refs": ["K14.WE01"], "learning_effect_refs": ["K14.EK01"], "assessment_criterion_refs": ["K14.KW01"], "area_tree_refs": ["K14.WE01.TECH.LOCAL.DBG.TIMER.01"], "steps": [ - {"id": "S03", "title": "Pokaż one-shot expiry 6 i periodic expiry 7.", "tree_refs": ["K14.WE01.TECH.LOCAL.DBG.TIMER.01"]}, - {"id": "S04", "title": "Pokaż brak czwartego callbacku po stop.", "tree_refs": ["K14.WE01.TECH.LOCAL.DBG.TIMER.01"]} - ]}, - {"title": "Daemon context, storage i lifetime", "content_kind": "prose", "content_tex": "Porównaj current task z timer daemon handle/name, stos callbacku ze stosem verifiera oraz heap przed/po static create; sformułuj lifetime contract.", "educational_requirement_refs": ["K14.WE01"], "learning_effect_refs": ["K14.EN01"], "assessment_criterion_refs": ["K14.KW01"], "area_tree_refs": ["K14.WE01.OG.LOCAL.RTOS.TIMER.01"], "steps": [ - {"id": "S05", "title": "Udowodnij Tmr Svc, osobny stack i heap delta 0.", "tree_refs": ["K14.WE01.OG.LOCAL.RTOS.TIMER.01"]}, - {"id": "S06", "title": "Wyjaśnij zakaz blocking callback i premature destruction.", "tree_refs": ["K14.WE01.OG.LOCAL.RTOS.TIMER.01"]} - ]} + { + "title": "Typed policy i command queue", + "content_kind": "prose", + "content_tex": "Utwórz static OneShotTimer i PeriodicTimer, wyłącz copy/move, wykonaj explicit start przed schedulerem i zapisz callback snapshot.", + "educational_requirement_refs": [ + "K14.WE01" + ], + "learning_effect_refs": [ + "K14.EK01" + ], + "assessment_criterion_refs": [ + "K14.KW01" + ], + "area_tree_refs": [ + "K14.WE01.TECH.LOCAL.DBG.TIMER.01" + ], + "steps": [ + { + "id": "S01", + "title": "Potwierdź dwa accepted commands i zero callbacków przy return.", + "tree_refs": [ + "K14.WE01.TECH.LOCAL.DBG.TIMER.01" + ] + }, + { + "id": "S02", + "title": "Zmierz initial periodic expiries 2 i 4.", + "tree_refs": [ + "K14.WE01.TECH.LOCAL.DBG.TIMER.01" + ] + } + ] + }, + { + "title": "Reset, change-period i stop", + "content_kind": "prose", + "content_tex": "Resetuj one-shot w ticku 1, zmień periodic z 2 na 3 w ticku 4, a po trzecim callbacku wyślij stop i potwierdź inactive.", + "educational_requirement_refs": [ + "K14.WE01" + ], + "learning_effect_refs": [ + "K14.EK01" + ], + "assessment_criterion_refs": [ + "K14.KW01" + ], + "area_tree_refs": [ + "K14.WE01.TECH.LOCAL.DBG.TIMER.01" + ], + "steps": [ + { + "id": "S03", + "title": "Pokaż one-shot expiry 6 i periodic expiry 7.", + "tree_refs": [ + "K14.WE01.TECH.LOCAL.DBG.TIMER.01" + ] + }, + { + "id": "S04", + "title": "Pokaż brak czwartego callbacku po stop.", + "tree_refs": [ + "K14.WE01.TECH.LOCAL.DBG.TIMER.01" + ] + } + ] + }, + { + "title": "Daemon context, storage i lifetime", + "content_kind": "prose", + "content_tex": "Porównaj current task z timer daemon handle/name, stos callbacku ze stosem verifiera oraz heap przed/po static create; sformułuj lifetime contract.", + "educational_requirement_refs": [ + "K14.WE01" + ], + "learning_effect_refs": [ + "K14.EN01" + ], + "assessment_criterion_refs": [ + "K14.KW01" + ], + "area_tree_refs": [ + "K14.WE01.OG.LOCAL.RTOS.TIMER.01" + ], + "steps": [ + { + "id": "S05", + "title": "Udowodnij Tmr Svc, osobny stack i heap delta 0.", + "tree_refs": [ + "K14.WE01.OG.LOCAL.RTOS.TIMER.01" + ] + }, + { + "id": "S06", + "title": "Wyjaśnij zakaz blocking callback i premature destruction.", + "tree_refs": [ + "K14.WE01.OG.LOCAL.RTOS.TIMER.01" + ] + } + ] + } ], - "tasks": {"task01": { - "title": "Static one-shot i periodic timer na daemon tasku", "uuid": "78db37df-63e5-4c5b-80ce-f73a411f0b50", - "prompt_tex": "Zaimplementuj typed static software timers, rozdziel command acceptance od callback execution i zmierz reset/change/stop, daemon context, stack oraz heap.", - "criterion": "Starts 2/callbacks 0; reset@1/one@6; periodic 2,4,7/change@4; stopped inactive/no fourth; daemon handle/name; different SP; heap delta 0; pass=1.", - "educational_requirement_refs": ["K14.WE01"], "learning_effect_refs": ["K14.EN01", "K14.EK01"], "assessment_criterion_ref": "K14.KW01", "links": {"equations": [], "figures": []} - }}, - "tasks_order": ["task01"] + "tasks": { + "task01": { + "title": "Static one-shot i periodic timer na daemon tasku", + "uuid": "78db37df-63e5-4c5b-80ce-f73a411f0b50", + "prompt_tex": "Zaimplementuj typed static software timers, rozdziel command acceptance od callback execution i zmierz reset/change/stop, daemon context, stack oraz heap.", + "criterion": "Starts 2/callbacks 0; reset@1/one@6; periodic 2,4,7/change@4; stopped inactive/no fourth; daemon handle/name; different SP; heap delta 0; pass=1.", + "educational_requirement_refs": [ + "K14.WE01" + ], + "learning_effect_refs": [ + "K14.EN01", + "K14.EK01" + ], + "assessment_criterion_ref": "K14.KW01", + "links": { + "equations": [], + "figures": [] + } + } + }, + "tasks_order": [ + "task01" + ] }