feat(daemon): FireEvent + event name resolution + in-process gRPC tests
- name_index: add resolve_event(name) -> CEID (unit-tested). - equipment_service.hpp: extract the gRPC service + value/state conversion into a shared header; add FireEvent (optional per-fire variable values, then trigger the collection event by name). secs_gemd slims to main(). - test_daemon_service: real in-process gRPC integration test (client stub -> service -> EquipmentRuntime) proving SetVariables lands in the model, GetControlState reports the state, FireEvent and unknown-name paths behave. Separate secs_gemd_tests target (links grpc++/proto), gated on the daemon. Core suite 459/459 (2799 assertions); daemon gRPC tests 15/15. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,3 +21,13 @@ TEST_CASE("resolve_variable maps config names to VIDs across SVIDs and DVIDs") {
|
||||
CHECK_FALSE(gem::resolve_variable(m, "nonexistent").has_value());
|
||||
CHECK_FALSE(gem::resolve_variable(m, "").has_value());
|
||||
}
|
||||
|
||||
TEST_CASE("resolve_event maps collection-event names to CEIDs") {
|
||||
gem::EquipmentDataModel m;
|
||||
config::load_equipment(SECSGEM_DATA_DIR "/equipment.yaml", m);
|
||||
|
||||
CHECK(gem::resolve_event(m, "ControlStateChanged") == 100);
|
||||
CHECK(gem::resolve_event(m, "ProcessStarted") == 300);
|
||||
CHECK(gem::resolve_event(m, "ControlJobCompleted") == 401);
|
||||
CHECK_FALSE(gem::resolve_event(m, "nonexistent").has_value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user