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:
@@ -24,4 +24,12 @@ inline std::optional<uint32_t> resolve_variable(const EquipmentDataModel& m,
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// Resolve a collection-event name to its CEID. nullopt if unknown.
|
||||
inline std::optional<uint32_t> resolve_event(const EquipmentDataModel& m,
|
||||
const std::string& name) {
|
||||
for (const auto& e : m.events.all_events())
|
||||
if (e.name == name) return e.id;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
} // namespace secsgem::gem
|
||||
|
||||
Reference in New Issue
Block a user