Files
secs-gem/include/secsgem/gem/e90_constants.hpp
raphael 511950aa4a E2: E90 standard CEIDs + server-side substrate event emission
Adds the canonical E90-0716 §6.5 collection-event identifiers as a
single header of inline constants (gem/e90_constants.hpp) keyed off
SubstrateState / SubstrateProcessingState transitions:

  901 AtSource           910 NeedsProcessing
  902 AtWork             911 InProcess
  903 AtDestination      912 Processed
                         913 Aborted
                         914 Stopped
                         915 Rejected
                         916 Lost
                         917 Skipped

Values use the 901+ block to avoid collision with the demo CEIDs in
data/equipment.yaml (100s/200s/400s).

Server installs location + processing change handlers on
model->substrates that map every transition to emit_event() with the
matching CEID.  The existing event-report machinery (subscription
state, S6F11 batching, spool) gates the actual wire emission, so this
plays nicely with hosts that subscribe to only a subset of substrate
events.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 00:50:53 +02:00

28 lines
1.2 KiB
C++

#pragma once
#include <cstdint>
// E90 §6 standard collection event identifiers. Equipment vendors
// frequently register additional CEIDs around the base set; the
// constants below are the canonical ones called out by E90-0716 §6.5,
// keyed off the SubstrateState transitions so application code can
// emit them directly from a SubstrateStore change handler.
//
// Values use a high block (901+) to avoid collisions with the demo
// CEIDs in data/equipment.yaml (which uses 100s/200s/400s).
namespace secsgem::gem::e90 {
inline constexpr uint32_t kCeidSubstrateAtSource = 901;
inline constexpr uint32_t kCeidSubstrateAtWork = 902;
inline constexpr uint32_t kCeidSubstrateAtDestination = 903;
inline constexpr uint32_t kCeidSubstrateNeedsProcessing = 910;
inline constexpr uint32_t kCeidSubstrateInProcess = 911;
inline constexpr uint32_t kCeidSubstrateProcessed = 912;
inline constexpr uint32_t kCeidSubstrateAborted = 913;
inline constexpr uint32_t kCeidSubstrateStopped = 914;
inline constexpr uint32_t kCeidSubstrateRejected = 915;
inline constexpr uint32_t kCeidSubstrateLost = 916;
inline constexpr uint32_t kCeidSubstrateSkipped = 917;
} // namespace secsgem::gem::e90