D3: CarrierStore + LoadPortStore
Per-CARRIERID and per-PORTID stores wrap the D1 FSMs, mirroring the ProcessJobStore / ExceptionStore pattern: heap-allocated state machines keyed in a std::map, non-movable to keep this-capture lambdas safe, synthetic create() that wires per-row change handlers into the store's top-level callbacks. CarrierStore: create(carrierid, port_id, capacity) — default 25-slot map fire_id_event / fire_slot_map_event / fire_access_event set_id_handler / set_slot_map_handler / set_access_handler LoadPortStore: create(port_id) associate(pid, carrierid) / disassociate(pid) fire_transfer_event / fire_reservation_event set_transfer_handler / set_reservation_handler / set_association_handler Both join EquipmentDataModel alongside process_jobs / control_jobs / exceptions. Six test cases cover create-dedup, ID-status change observation, slot-map / access independence, port association, transfer lifecycle, and reservation handler firing. Server-side dispatch (S3F17 -> CarrierStore::fire_id_event, S3F25 -> LoadPortStore transfer) lands in D4. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,7 @@ add_executable(secsgem_tests
|
||||
tests/test_control_jobs.cpp
|
||||
tests/test_exceptions.cpp
|
||||
tests/test_carrier_state.cpp
|
||||
tests/test_carriers.cpp
|
||||
)
|
||||
target_link_libraries(secsgem_tests PRIVATE secsgem doctest::doctest)
|
||||
target_compile_definitions(secsgem_tests PRIVATE
|
||||
|
||||
Reference in New Issue
Block a user