Sign in

    moonbit-iec104

    Portable IEC 60870-5-104 protocol core for SCADA, gateways, and deterministic simulation.

    iec104
    scada
    telecontrol
    protocol
    Download zip
    Author
    Version
    0.3.1
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    31

    No dependencies

    #moonbit-iec104

    一个面向 SCADA、变电站自动化、配电网关和协议仿真的 IEC 60870-5-104 协议核心。项目使用 MoonBit 编写,库层不绑定 TCP 实现或操作系统 I/O,便于嵌入网关、测试工具和确定性仿真器。

    #项目定位

    本项目覆盖 IEC 104 链路层与常用应用层数据模型,重点放在可验证的二进制编解码、链路状态、序号窗口、信息对象和边界行为。网络传输由调用方接入,协议核心因此可以在 native、wasm-gc 等目标上复用。

    #核心能力

    • APCI I/S/U 帧编解码、15 位发送/接收序号和序号窗口。
    • STARTDT、STOPDT、TESTFR 链路状态机、定时器和流式 APDU 解析。
    • IEC 104 常用 Type ID、VSQ、传送原因、公共地址和信息体地址模型。
    • 单点、双点、步位、归一化值、标度值、短浮点值、累计量及命令对象。
    • CP24Time2a、CP56Time2a、质量描述符、地址序列和带时标 ASDU 编解码。
    • 点表、历史变更、总召唤/计数量召唤、读命令、时钟同步和命令策略。
    • 站点数据库、事务提交、质量门控、历史归档、遥测死区和告警生命周期。
    • 命令调度、文件分片传输、冗余切换、服务依赖编排和传输会话管理。
    • 资源限制、重放保护、CRC、帧统计、健康报告、契约向量和确定性工作负载。

    #快速开始

    需要 MoonBit stable 工具链。首次使用时执行:

    moon update moon fmt moon check --deny-warn --target all moon build --target wasm-gc moon test --deny-warn --target wasm-gc

    运行示例 CLI:

    moon run cmd/main moon run cmd/main -- --help moon run cmd/main -- --benchmark moon run cmd/main -- --application-benchmark

    在库代码中构造并编码一个 I 帧:

    ///|
    let payload = @hhxhhx78/moonbit-iec104.normalized_value_asdu(3, 1, 2300, 0)

    ///|
    let apdu = @hhxhhx78/moonbit-iec104.encode_frame(
    @hhxhhx78/moonbit-iec104.information_frame(0, 0, payload),
    )

    #CLI

    cmd/main 提供一个不依赖外部服务的可重复示例:默认编码一个归一化测量值 I 帧;--benchmark 执行固定的 10,000 帧编解码工作负载;--application-benchmark 执行站点、遥测、命令、文件和仿真服务工作负载;--help 显示用法。宿主机耗时由基准命令外部测量,避免把平台时钟引入协议核心。

    #架构

    层次主要文件职责
    链路与帧frame_types.mbt, codec.mbt, validation.mbt, state_machine.mbtAPCI、ASDU 基础模型、校验和链路状态
    应用数据protocol_domain.mbt, quality.mbt, time_tags.mbt, application_objects.mbt, extended_asdu.mbtType ID、地址、质量、时标和信息对象
    服务与状态transport_layer.mbt, station_database.mbt, telemetry_pipeline.mbt, command_scheduler.mbt, point_store.mbt传输会话、站点数据库、遥测、命令和点表
    运行时能力file_transfer.mbt, historical_archive.mbt, redundancy_manager.mbt, service_registry.mbt, runtime_facade.mbt文件、归档、冗余、依赖编排和统一运行时
    工具与可靠性wire_tools.mbt, security_limits.mbt, diagnostics_metrics.mbt, health_report.mbt字节工具、资源保护、指标和诊断
    仿真与契约simulation.mbt, conformance_catalog.mbt, protocol_profiles.mbt, benchmark_api.mbt确定性仿真、类型目录、能力协商和基准接口
    示例cmd/main可运行的最小 CLI

    #基准

    基准工作负载由 run_benchmark_workload 定义,输入、输出字节数和 CRC 校验和均是确定的;宿主机实测结果记录在 BENCHMARKS.md,包含执行环境、命令、重复次数和原始输出。重新测量:

    1..5 | ForEach-Object { Measure-Command { moon run cmd/main -- --benchmark } }

    该数据用于比较同一环境下的回归趋势,不代表所有设备或网络部署的吞吐承诺。

    #测试

    测试覆盖帧编解码、链路状态、Type ID 和地址边界、CP24/CP56 闰年与无效日期、质量位、签名测量值、ASDU 截断/尾随字节、序号回绕、流式输入、点表容量与事务冲突、服务依赖与租约、质量门控、文件分片顺序、遥测死区、命令幂等、资源限制、CRC 和确定性基准。推荐在本地分别运行:

    moon check --deny-warn --target all moon test --deny-warn --target wasm-gc moon test --deny-warn --target native

    #CI

    .github/workflows/check.yml 在 Ubuntu、macOS 和 Windows 上安装 MoonBit stable,执行版本检查、依赖更新、格式检查、接口文件一致性、所有目标检查、wasm-gc 构建和测试。CI 使用最小只读仓库权限;本地若缺少某个后端运行时,应以对应平台 CI 结果和明确的本地环境提示为准。

    #许可证

    本项目采用 Apache License 2.0。

    AdmissionDecision

    pub enum AdmissionDecision {
    AcceptedAdmission
    RejectedAdmission(Diagnostic)
    } derive(
    Debug
    )

    AlarmEvent

    pub struct AlarmEvent {
    station : CommonAddress
    address : InformationAddress
    name : String
    severity : AlarmSeverity
    active : Bool
    value : Float
    timestamp : Int
    message : String
    } derive(Eq,
    Debug
    )

    An alarm lifecycle event.

    AlarmEvent::active

    fn AlarmEvent::active(self : AlarmEvent) -> Bool

    AlarmEvent::address

    AlarmEvent::message

    fn AlarmEvent::message(self : AlarmEvent) -> String

    AlarmEvent::name

    fn AlarmEvent::name(self : AlarmEvent) -> String

    AlarmEvent::severity

    fn AlarmEvent::severity(self : AlarmEvent) -> AlarmSeverity

    AlarmEvent::station

    fn AlarmEvent::station(self : AlarmEvent) -> CommonAddress

    AlarmEvent::timestamp

    fn AlarmEvent::timestamp(self : AlarmEvent) -> Int

    AlarmEvent::value

    fn AlarmEvent::value(self : AlarmEvent) -> Float

    AlarmJournal

    pub struct AlarmJournal {
    active : Map[String, AlarmRecord]
    events : Array[AlarmJournalEvent]
    event_limit : Int
    next_sequence : Int
    metrics : AlarmJournalMetrics
    } derive(
    Debug
    )

    Bounded alarm journal with acknowledge, shelf and escalation workflows.

    AlarmJournal::acknowledge

    fn AlarmJournal::acknowledge(self : AlarmJournal, key : String, operator : String, timestamp : Int) -> Result[AlarmRecord, String]

    AlarmJournal::active_count

    fn AlarmJournal::active_count(self : AlarmJournal) -> Int

    AlarmJournal::all

    AlarmJournal::escalate

    fn AlarmJournal::escalate(self : AlarmJournal, key : String, operator : String, timestamp : Int) -> Result[AlarmRecord, String]

    AlarmJournal::events

    AlarmJournal::get

    fn AlarmJournal::get(self : AlarmJournal, key : String) -> AlarmRecord?

    AlarmJournal::ingest

    fn AlarmJournal::ingest(self : AlarmJournal, event : AlarmEvent) -> Result[AlarmRecord, String]

    AlarmJournal::metrics

    AlarmJournal::new

    fn AlarmJournal::new(event_limit? : Int) -> Result[AlarmJournal, String]

    AlarmJournal::shelve

    fn AlarmJournal::shelve(self : AlarmJournal, key : String, operator : String, until : Int, timestamp : Int) -> Result[AlarmRecord, String]

    AlarmJournal::unshelve_expired

    fn AlarmJournal::unshelve_expired(self : AlarmJournal, timestamp : Int) -> Int

    AlarmJournalAction

    pub enum AlarmJournalAction {
    AlarmOpened
    AlarmUpdated
    AlarmAcknowledgedAction
    AlarmShelvedAction
    AlarmUnshelvedAction
    AlarmEscalatedAction
    AlarmClearedAction
    } derive(Eq,
    Debug
    )

    AlarmJournalEvent

    pub struct AlarmJournalEvent {
    sequence : Int
    timestamp : Int
    key : String
    action : AlarmJournalAction
    operator : String
    detail : String
    } derive(Eq,
    Debug
    )

    AlarmJournalEvent::action

    AlarmJournalEvent::detail

    fn AlarmJournalEvent::detail(self : AlarmJournalEvent) -> String

    AlarmJournalEvent::key

    fn AlarmJournalEvent::key(self : AlarmJournalEvent) -> String

    AlarmJournalEvent::operator

    fn AlarmJournalEvent::operator(self : AlarmJournalEvent) -> String

    AlarmJournalEvent::sequence

    fn AlarmJournalEvent::sequence(self : AlarmJournalEvent) -> Int

    AlarmJournalEvent::timestamp

    fn AlarmJournalEvent::timestamp(self : AlarmJournalEvent) -> Int

    AlarmJournalMetrics

    pub struct AlarmJournalMetrics {
    opened : Int
    acknowledged : Int
    shelved : Int
    escalated : Int
    cleared : Int
    } derive(Eq,
    Debug
    )

    AlarmJournalMetrics::acknowledged

    fn AlarmJournalMetrics::acknowledged(self : AlarmJournalMetrics) -> Int

    AlarmJournalMetrics::cleared

    fn AlarmJournalMetrics::cleared(self : AlarmJournalMetrics) -> Int

    AlarmJournalMetrics::escalated

    fn AlarmJournalMetrics::escalated(self : AlarmJournalMetrics) -> Int

    AlarmJournalMetrics::new

    AlarmJournalMetrics::opened

    fn AlarmJournalMetrics::opened(self : AlarmJournalMetrics) -> Int

    AlarmJournalMetrics::shelved

    fn AlarmJournalMetrics::shelved(self : AlarmJournalMetrics) -> Int

    AlarmLifecycle

    pub enum AlarmLifecycle {
    AlarmActive
    AlarmAcknowledged
    AlarmShelved
    AlarmCleared
    AlarmEscalated
    } derive(Eq,
    Debug
    )

    Lifecycle state tracked independently from telemetry threshold evaluation.

    AlarmRecord

    pub struct AlarmRecord {
    key : String
    station : CommonAddress
    address : InformationAddress
    name : String
    severity : AlarmSeverity
    lifecycle : AlarmLifecycle
    first_seen : Int
    last_seen : Int
    occurrences : Int
    acknowledged_by : String?
    acknowledged_at : Int?
    shelf_until : Int?
    last_value : Float
    message : String
    } derive(
    Debug
    )

    AlarmRecord::acknowledged_at

    fn AlarmRecord::acknowledged_at(self : AlarmRecord) -> Int?

    AlarmRecord::acknowledged_by

    fn AlarmRecord::acknowledged_by(self : AlarmRecord) -> String?

    AlarmRecord::address

    AlarmRecord::first_seen

    fn AlarmRecord::first_seen(self : AlarmRecord) -> Int

    AlarmRecord::key

    fn AlarmRecord::key(self : AlarmRecord) -> String

    AlarmRecord::last_seen

    fn AlarmRecord::last_seen(self : AlarmRecord) -> Int

    AlarmRecord::last_value

    fn AlarmRecord::last_value(self : AlarmRecord) -> Float

    AlarmRecord::lifecycle

    fn AlarmRecord::lifecycle(self : AlarmRecord) -> AlarmLifecycle

    AlarmRecord::message

    fn AlarmRecord::message(self : AlarmRecord) -> String

    AlarmRecord::name

    fn AlarmRecord::name(self : AlarmRecord) -> String

    AlarmRecord::occurrences

    fn AlarmRecord::occurrences(self : AlarmRecord) -> Int

    AlarmRecord::severity

    fn AlarmRecord::severity(self : AlarmRecord) -> AlarmSeverity

    AlarmRecord::shelf_until

    fn AlarmRecord::shelf_until(self : AlarmRecord) -> Int?

    AlarmRecord::station

    fn AlarmRecord::station(self : AlarmRecord) -> CommonAddress

    AlarmRule

    pub struct AlarmRule {
    low : Float?
    high : Float?
    severity : AlarmSeverity
    hysteresis : Float
    name : String
    } derive(Eq,
    Debug
    )

    Threshold used for alarm creation and clearing.

    AlarmRule::high

    fn AlarmRule::high(self : AlarmRule) -> Float?

    AlarmRule::hysteresis

    fn AlarmRule::hysteresis(self : AlarmRule) -> Float

    AlarmRule::low

    fn AlarmRule::low(self : AlarmRule) -> Float?

    AlarmRule::name

    fn AlarmRule::name(self : AlarmRule) -> String

    AlarmRule::new

    fn AlarmRule::new(name : String, severity : AlarmSeverity, low? : Float, high? : Float, hysteresis? : Float) -> Result[AlarmRule, String]

    AlarmRule::severity

    fn AlarmRule::severity(self : AlarmRule) -> AlarmSeverity

    AlarmSeverity

    pub enum AlarmSeverity {
    InformationalAlarm
    WarningAlarm
    MajorAlarm
    CriticalAlarm
    } derive(Eq,
    Debug
    )

    Alarm severity emitted by a threshold stage.

    AlarmSeverity::weight

    fn AlarmSeverity::weight(self : AlarmSeverity) -> Int

    ApduParseResult

    pub enum ApduParseResult {
    NeedMore(Int)
    Complete(Frame, Int)
    Invalid(Diagnostic)
    } derive(
    Debug
    )

    Incremental APDU parsing result for TCP or serial gateway adapters.

    ApduStreamDecoder

    pub struct ApduStreamDecoder {
    buffer : Array[Byte]
    max_apdu : Int
    } derive(
    Debug
    )

    A portable byte accumulator for stream transports.

    ApduStreamDecoder::available_frames

    fn ApduStreamDecoder::available_frames(self : ApduStreamDecoder) -> Int

    Number of complete frames available in a buffered stream.

    ApduStreamDecoder::buffered

    fn ApduStreamDecoder::buffered(self : ApduStreamDecoder) -> Int

    ApduStreamDecoder::clear

    fn ApduStreamDecoder::clear(self : ApduStreamDecoder) -> Unit

    ApduStreamDecoder::new

    fn ApduStreamDecoder::new(max_apdu? : Int) -> Result[ApduStreamDecoder, String]

    ApduStreamDecoder::next

    Parse and remove the first complete APDU, preserving partial data.

    ApduStreamDecoder::push

    fn ApduStreamDecoder::push(self : ApduStreamDecoder, data : Bytes) -> Result[Int, Diagnostic]

    ApplicationBenchmarkWorkload

    pub enum ApplicationBenchmarkWorkload {
    CodecWorkload
    DatabaseWorkload
    TelemetryWorkload
    SchedulerWorkload
    FileWorkload
    ScenarioWorkload
    } derive(Eq,
    Debug
    )

    Benchmark workload families used by the local CLI and CI smoke checks.

    ApplicationObject

    pub struct ApplicationObject {
    address : InformationAddress
    type_id : ApplicationType
    value : ApplicationValue
    time_tag : TimeTag?
    } derive(Eq,
    Debug
    )

    An address-qualified application object with an optional time tag.

    ApplicationObject::address

    ApplicationObject::is_command

    fn ApplicationObject::is_command(self : ApplicationObject) -> Bool

    ApplicationObject::is_measurement

    fn ApplicationObject::is_measurement(self : ApplicationObject) -> Bool

    ApplicationObject::new

    fn ApplicationObject::new(address : InformationAddress, value : ApplicationValue, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    Construct an application object and optionally attach its standard time tag.

    ApplicationObject::summary

    fn ApplicationObject::summary(self : ApplicationObject) -> (Int, Int, Int, Bool)

    Return a type-tagged object as a stable compact summary tuple.

    ApplicationObject::time_tag

    ApplicationObject::type_id

    ApplicationObject::validate

    fn ApplicationObject::validate(self : ApplicationObject) -> Result[Unit, Diagnostic]

    Validate an application object before placing it in an ASDU.

    ApplicationObject::value

    ApplicationType

    pub enum ApplicationType {
    MSpNa
    MSpTa
    MDpNa
    MDpTa
    MStNa
    MStTa
    MBoNa
    MBoTa
    MMeNa
    MMeTa
    MMeNb
    MMeTb
    MMeNc
    MMeTc
    MItNa
    MItTa
    MEpTa
    MEpTb
    MEpTc
    MPsNa
    MMeNd
    MSpTb
    MDpTb
    MStTb
    MBoTb
    MMeTd
    MMeTe
    MMeTf
    MItTb
    MEpTd
    MEpTe
    MEpTf
    MEiNa
    CScNa
    CDcNa
    CRcNa
    CSeNa
    CSeNb
    CSeNc
    CBoNa
    CIcNa
    CCiNa
    CRdNa
    CCsNa
    CTsNa
    CRpNa
    UnknownType(Int)
    } derive(Eq,
    Debug
    )

    Standard IEC 104 application type identifiers.

    ApplicationType::has_time_tag

    fn ApplicationType::has_time_tag(self : ApplicationType) -> Bool

    Whether a type carries a CP24 or CP56 time tag.

    ApplicationType::is_control

    fn ApplicationType::is_control(self : ApplicationType) -> Bool

    Whether an application type belongs to control direction data.

    ApplicationType::is_monitoring

    fn ApplicationType::is_monitoring(self : ApplicationType) -> Bool

    Whether an application type belongs to monitor direction data.

    ApplicationType::number

    fn ApplicationType::number(self : ApplicationType) -> Int

    Return an IEC 104 type identifier number.

    ApplicationType::value_width

    fn ApplicationType::value_width(self : ApplicationType) -> Int?

    Preferred information-object payload width, excluding IOA and time tag.

    ApplicationValue

    pub enum ApplicationValue {
    SinglePointValue(SinglePointValue)
    DoublePointValue(DoublePointValue)
    StepPositionValue(StepPositionValue)
    BitStringValue(UInt)
    NormalizedMeasurement(NormalizedValue)
    ScaledMeasurement(ScaledValue)
    ShortFloatMeasurement(ShortFloatValue)
    BinaryCounterMeasurement(BinaryCounterValue)
    SingleCommand(Bool, Int)
    DoubleCommand(Int, Int)
    RegulatingStepCommand(Int, Int)
    NormalizedSetPoint(Int, Int)
    ScaledSetPoint(Int, Int)
    ShortFloatSetPoint(Float, Int)
    BitStringCommand(UInt)
    InterrogationCommand(Int)
    CounterInterrogationCommand(Int)
    ReadCommand
    ClockSyncCommand(Cp56Time)
    TestCommand(Int)
    ResetCommand(Int)
    DelayCommand(Int)
    EndOfInitialization(Int)
    RawValue(Bytes)
    } derive(Eq,
    Debug
    )

    Values carried by standard IEC 104 information objects.

    ArchiveBucket

    pub struct ArchiveBucket {
    station : CommonAddress
    address : InformationAddress
    start : Int
    end : Int
    count : Int
    minimum : Float
    maximum : Float
    sum : Float
    invalid : Int
    } derive(Eq,
    Debug
    )

    ArchiveBucket::address

    ArchiveBucket::average

    fn ArchiveBucket::average(self : ArchiveBucket) -> Float

    ArchiveBucket::count

    fn ArchiveBucket::count(self : ArchiveBucket) -> Int

    ArchiveBucket::end

    fn ArchiveBucket::end(self : ArchiveBucket) -> Int

    ArchiveBucket::invalid

    fn ArchiveBucket::invalid(self : ArchiveBucket) -> Int

    ArchiveBucket::maximum

    fn ArchiveBucket::maximum(self : ArchiveBucket) -> Float

    ArchiveBucket::minimum

    fn ArchiveBucket::minimum(self : ArchiveBucket) -> Float

    ArchiveBucket::start

    fn ArchiveBucket::start(self : ArchiveBucket) -> Int

    ArchiveBucket::station

    ArchiveBucket::sum

    fn ArchiveBucket::sum(self : ArchiveBucket) -> Float

    ArchivePolicy

    pub struct ArchivePolicy {
    maximum_samples : Int
    maximum_age : Int
    bucket_width : Int
    reject_invalid : Bool
    } derive(Eq,
    Debug
    )

    Retention policy for historical telemetry samples.

    ArchivePolicy::bucket_width

    fn ArchivePolicy::bucket_width(self : ArchivePolicy) -> Int

    ArchivePolicy::maximum_age

    fn ArchivePolicy::maximum_age(self : ArchivePolicy) -> Int

    ArchivePolicy::maximum_samples

    fn ArchivePolicy::maximum_samples(self : ArchivePolicy) -> Int

    ArchivePolicy::new

    fn ArchivePolicy::new(maximum_samples? : Int, maximum_age? : Int, bucket_width? : Int, reject_invalid? : Bool) -> Result[ArchivePolicy, String]

    ArchivePolicy::reject_invalid

    fn ArchivePolicy::reject_invalid(self : ArchivePolicy) -> Bool

    ArchiveQuery

    pub struct ArchiveQuery {
    station : CommonAddress?
    first_address : InformationAddress?
    last_address : InformationAddress?
    start : Int?
    end : Int?
    source : String?
    include_invalid : Bool
    } derive(Eq,
    Debug
    )

    Query over a station/address/time range.

    ArchiveQuery::address_range

    fn ArchiveQuery::address_range(self : ArchiveQuery, first : InformationAddress, last : InformationAddress) -> ArchiveQuery

    ArchiveQuery::all

    ArchiveQuery::from_source

    fn ArchiveQuery::from_source(self : ArchiveQuery, source : String) -> ArchiveQuery

    ArchiveQuery::station

    fn ArchiveQuery::station(self : ArchiveQuery, value : CommonAddress) -> ArchiveQuery

    ArchiveQuery::time_range

    fn ArchiveQuery::time_range(self : ArchiveQuery, start : Int, end : Int) -> ArchiveQuery

    ArchiveQuery::with_invalid

    fn ArchiveQuery::with_invalid(self : ArchiveQuery, include_invalid_value : Bool) -> ArchiveQuery

    ArchiveStore

    pub struct ArchiveStore {
    samples : Array[ArchivedSample]
    policy : ArchivePolicy
    next_sequence : Int
    evicted : Int
    } derive(
    Debug
    )

    ArchiveStore::append

    fn ArchiveStore::append(self : ArchiveStore, sample : TelemetrySample) -> Result[Unit, String]

    ArchiveStore::append_batch

    fn ArchiveStore::append_batch(self : ArchiveStore, samples : Array[TelemetrySample]) -> Int

    ArchiveStore::buckets

    fn ArchiveStore::buckets(self : ArchiveStore, query : ArchiveQuery) -> Array[ArchiveBucket]

    ArchiveStore::evicted

    fn ArchiveStore::evicted(self : ArchiveStore) -> Int

    ArchiveStore::latest

    fn ArchiveStore::latest(self : ArchiveStore, station : CommonAddress, address : InformationAddress) -> ArchivedSample?

    ArchiveStore::len

    fn ArchiveStore::len(self : ArchiveStore) -> Int

    ArchiveStore::new

    ArchiveStore::policy

    ArchiveStore::prune

    fn ArchiveStore::prune(self : ArchiveStore, now : Int) -> Int

    ArchiveStore::query

    ArchiveStore::range_count

    fn ArchiveStore::range_count(self : ArchiveStore, query : ArchiveQuery) -> Int

    ArchivedSample

    pub struct ArchivedSample {
    station : CommonAddress
    address : InformationAddress
    type_id : ApplicationType
    value : Float
    quality : QualityDescriptor
    timestamp : Int
    sequence : Int
    source : String
    } derive(
    Debug
    )

    A durable-shaped historical sample retained in memory by the core.

    ArchivedSample::address

    ArchivedSample::quality

    ArchivedSample::sequence

    fn ArchivedSample::sequence(self : ArchivedSample) -> Int

    ArchivedSample::source

    fn ArchivedSample::source(self : ArchivedSample) -> String

    ArchivedSample::station

    ArchivedSample::timestamp

    fn ArchivedSample::timestamp(self : ArchivedSample) -> Int

    ArchivedSample::type_id

    ArchivedSample::value

    fn ArchivedSample::value(self : ArchivedSample) -> Float

    AsduEnvelope

    pub struct AsduEnvelope {
    type_id : ApplicationType
    sequence : Bool
    cause : CauseOfTransmission
    common_address : CommonAddress
    objects : Array[ApplicationObject]
    } derive(Eq,
    Debug
    )

    A complete ASDU envelope with address-qualified application objects.

    AsduEnvelope::cause

    AsduEnvelope::common_address

    fn AsduEnvelope::common_address(self : AsduEnvelope) -> CommonAddress

    AsduEnvelope::count

    fn AsduEnvelope::count(self : AsduEnvelope) -> Int

    AsduEnvelope::new

    fn AsduEnvelope::new(type_id : ApplicationType, sequence : Bool, cause : CauseOfTransmission, common_address : CommonAddress, objects : Array[ApplicationObject]) -> Result[AsduEnvelope, Diagnostic]

    Construct an ASDU envelope and check its object/type relationship.

    AsduEnvelope::objects

    AsduEnvelope::sequence

    fn AsduEnvelope::sequence(self : AsduEnvelope) -> Bool

    AsduEnvelope::type_id

    AsduHeader

    pub struct AsduHeader {
    type_id : TypeId
    variable_count : Int
    sequence : Bool
    cause : Int
    common_address : Int
    } derive(Eq,
    Debug
    )

    Common information object address and cause of transmission.

    AsduHeader::cause

    fn AsduHeader::cause(self : AsduHeader) -> Int

    AsduHeader::common_address

    fn AsduHeader::common_address(self : AsduHeader) -> Int

    AsduHeader::count

    fn AsduHeader::count(self : AsduHeader) -> Int

    AsduHeader::is_sequence

    fn AsduHeader::is_sequence(self : AsduHeader) -> Bool

    AsduHeader::type_id

    fn AsduHeader::type_id(self : AsduHeader) -> TypeId

    AuditAction

    pub enum AuditAction {
    AuthorizationChecked
    PolicyChanged
    MaintenanceChanged
    CommandAuthorized
    FileAuthorized
    StationConfigured
    FailoverAuthorized
    } derive(Eq,
    Debug
    )

    BenchmarkCase

    pub struct BenchmarkCase {
    name : String
    rounds : Int
    payload_size : Int
    target : String
    } derive(Eq,
    Debug
    )

    A repeatable benchmark case with a deterministic workload definition.

    BenchmarkCase::name

    fn BenchmarkCase::name(self : BenchmarkCase) -> String

    BenchmarkCase::new

    fn BenchmarkCase::new(name : String, rounds : Int, payload_size : Int, target : String) -> Result[BenchmarkCase, String]

    BenchmarkCase::payload_size

    fn BenchmarkCase::payload_size(self : BenchmarkCase) -> Int

    BenchmarkCase::rounds

    fn BenchmarkCase::rounds(self : BenchmarkCase) -> Int

    BenchmarkCase::target

    fn BenchmarkCase::target(self : BenchmarkCase) -> String

    BenchmarkResult

    pub struct BenchmarkResult {
    case : BenchmarkCase
    encoded_frames : Int
    encoded_bytes : Int
    checksum : UInt
    elapsed_micros : Int
    } derive(Eq,
    Debug
    )

    BenchmarkResult::case

    BenchmarkResult::checksum

    fn BenchmarkResult::checksum(self : BenchmarkResult) -> UInt

    BenchmarkResult::elapsed_micros

    fn BenchmarkResult::elapsed_micros(self : BenchmarkResult) -> Int

    BenchmarkResult::encoded_bytes

    fn BenchmarkResult::encoded_bytes(self : BenchmarkResult) -> Int

    BenchmarkResult::encoded_frames

    fn BenchmarkResult::encoded_frames(self : BenchmarkResult) -> Int

    BenchmarkResult::frames_per_second

    fn BenchmarkResult::frames_per_second(self : BenchmarkResult) -> Float

    BenchmarkResult::megabytes_per_second

    fn BenchmarkResult::megabytes_per_second(self : BenchmarkResult) -> Float

    BenchmarkResult::new

    fn BenchmarkResult::new(case : BenchmarkCase, workload : BenchmarkWorkload, elapsed_micros : Int) -> Result[BenchmarkResult, String]

    BenchmarkSuite

    pub struct BenchmarkSuite {
    cases : Array[BenchmarkCase]
    } derive(
    Debug
    )

    BenchmarkSuite::add

    fn BenchmarkSuite::add(self : BenchmarkSuite, case : BenchmarkCase) -> Result[Unit, String]

    BenchmarkSuite::cases

    BenchmarkSuite::len

    fn BenchmarkSuite::len(self : BenchmarkSuite) -> Int

    BenchmarkSuite::new

    BenchmarkSuite::run

    fn BenchmarkSuite::run(self : BenchmarkSuite, elapsed_micros : Array[Int]) -> Result[Array[BenchmarkResult], String]

    Run a deterministic benchmark workload; elapsed time is supplied by the host.

    BenchmarkWorkload

    pub struct BenchmarkWorkload {
    rounds : Int
    payload_size : Int
    encoded_frames : Int
    encoded_bytes : Int
    checksum : UInt
    } derive(Eq,
    Debug
    )

    A repeatable workload used by local benchmark runs.

    BenchmarkWorkload::checksum

    fn BenchmarkWorkload::checksum(self : BenchmarkWorkload) -> UInt

    BenchmarkWorkload::encoded_bytes

    fn BenchmarkWorkload::encoded_bytes(self : BenchmarkWorkload) -> Int

    BenchmarkWorkload::encoded_frames

    fn BenchmarkWorkload::encoded_frames(self : BenchmarkWorkload) -> Int

    BenchmarkWorkload::payload_size

    fn BenchmarkWorkload::payload_size(self : BenchmarkWorkload) -> Int

    BenchmarkWorkload::rounds

    fn BenchmarkWorkload::rounds(self : BenchmarkWorkload) -> Int

    BinaryCounterValue

    pub struct BinaryCounterValue {
    value : UInt
    sequence : Int
    carry : Bool
    adjusted : Bool
    invalid : Bool
    } derive(Eq,
    Debug
    )

    32-bit binary counter value with sequence and overflow flags.

    BinaryCounterValue::flags

    fn BinaryCounterValue::flags(self : BinaryCounterValue) -> Int

    BinaryCounterValue::new

    fn BinaryCounterValue::new(value : UInt, sequence? : Int, carry? : Bool, adjusted? : Bool, invalid? : Bool) -> Result[BinaryCounterValue, String]

    BinaryCounterValue::sequence

    fn BinaryCounterValue::sequence(self : BinaryCounterValue) -> Int

    BinaryCounterValue::value

    fn BinaryCounterValue::value(self : BinaryCounterValue) -> UInt

    ByteCursor

    pub struct ByteCursor {
    data : Bytes
    offset : Int
    } derive(
    Debug
    )

    A bounds-checked cursor for binary protocol decoders.

    ByteCursor::done

    fn ByteCursor::done(self : ByteCursor) -> Bool

    ByteCursor::new

    fn ByteCursor::new(data : Bytes) -> ByteCursor

    ByteCursor::offset

    fn ByteCursor::offset(self : ByteCursor) -> Int

    ByteCursor::read_byte

    fn ByteCursor::read_byte(self : ByteCursor) -> Result[Byte, Diagnostic]

    ByteCursor::read_bytes

    fn ByteCursor::read_bytes(self : ByteCursor, length : Int) -> Result[Bytes, Diagnostic]

    ByteCursor::read_u16

    fn ByteCursor::read_u16(self : ByteCursor) -> Result[Int, Diagnostic]

    ByteCursor::read_u24

    fn ByteCursor::read_u24(self : ByteCursor) -> Result[Int, Diagnostic]

    ByteCursor::read_u32

    fn ByteCursor::read_u32(self : ByteCursor) -> Result[UInt, Diagnostic]

    ByteCursor::remaining

    fn ByteCursor::remaining(self : ByteCursor) -> Int

    ByteCursor::seek

    fn ByteCursor::seek(self : ByteCursor, offset : Int) -> Result[Unit, Diagnostic]

    ByteCursor::skip

    fn ByteCursor::skip(self : ByteCursor, length : Int) -> Result[Unit, Diagnostic]

    ByteStatistics

    pub struct ByteStatistics {
    length : Int
    zeroes : Int
    high_bit : Int
    checksum : UInt
    minimum : Int
    maximum : Int
    } derive(Eq,
    Debug
    )

    Per-byte statistics useful for fixture and link diagnostics.

    ByteStatistics::checksum

    fn ByteStatistics::checksum(self : ByteStatistics) -> UInt

    ByteStatistics::high_bit

    fn ByteStatistics::high_bit(self : ByteStatistics) -> Int

    ByteStatistics::length

    fn ByteStatistics::length(self : ByteStatistics) -> Int

    ByteStatistics::maximum

    fn ByteStatistics::maximum(self : ByteStatistics) -> Int

    ByteStatistics::minimum

    fn ByteStatistics::minimum(self : ByteStatistics) -> Int

    ByteStatistics::zeroes

    fn ByteStatistics::zeroes(self : ByteStatistics) -> Int

    ByteWriter

    pub struct ByteWriter {
    bytes : Array[Byte]
    } derive(
    Debug
    )

    A small writer used by application-specific extensions.

    ByteWriter::len

    fn ByteWriter::len(self : ByteWriter) -> Int

    ByteWriter::new

    fn ByteWriter::new() -> ByteWriter

    ByteWriter::push

    fn ByteWriter::push(self : ByteWriter, value : Byte) -> Unit

    ByteWriter::push_bytes

    fn ByteWriter::push_bytes(self : ByteWriter, value : Bytes) -> Unit

    ByteWriter::push_u16

    fn ByteWriter::push_u16(self : ByteWriter, value : Int) -> Result[Unit, String]

    ByteWriter::push_u24

    fn ByteWriter::push_u24(self : ByteWriter, value : Int) -> Result[Unit, String]

    ByteWriter::push_u32

    fn ByteWriter::push_u32(self : ByteWriter, value : UInt) -> Unit

    ByteWriter::to_bytes

    fn ByteWriter::to_bytes(self : ByteWriter) -> Bytes

    Cause

    pub enum Cause {
    Periodic
    Background
    Spontaneous
    Initialised
    Request
    Activation
    ActivationConfirmation
    ActivationTermination
    Unknown(Int)
    } derive(Eq,
    Debug
    )

    Standard causes of transmission used by IEC 104 application services.

    Cause::is_activation

    fn Cause::is_activation(self : Cause) -> Bool

    Cause::is_spontaneous

    fn Cause::is_spontaneous(self : Cause) -> Bool

    Cause::is_termination

    fn Cause::is_termination(self : Cause) -> Bool

    Cause::number

    fn Cause::number(self : Cause) -> Int

    CauseCategory

    pub enum CauseCategory {
    Periodic
    Background
    Spontaneous
    Initialised
    Request
    Activation
    ActivationConfirmation
    ActivationTermination
    ReturnInformationRemote
    ReturnInformationLocal
    UnknownCause
    } derive(Eq,
    Debug
    )

    Cause of transmission category. The numeric value is kept separate from the qualifier so applications can preserve vendor extensions.

    CauseCategory::number

    fn CauseCategory::number(self : CauseCategory) -> Int

    Return the standard six-bit cause value.

    CauseOfTransmission

    pub struct CauseOfTransmission {
    category : CauseCategory
    number : Int
    positive : Bool
    test_flag : Bool
    originator : Int
    qualifier : Int
    } derive(Eq,
    Debug
    )

    Full cause of transmission, including the originator and qualifier bits.

    CauseOfTransmission::flags

    fn CauseOfTransmission::flags(self : CauseOfTransmission) -> Int

    Return the four low flag bits in the IEC COT representation.

    CauseOfTransmission::from_number

    fn CauseOfTransmission::from_number(number : Int, positive? : Bool, test_flag? : Bool, originator? : Int, qualifier? : Int) -> Result[CauseOfTransmission, String]

    Construct a cause from a raw standard number while preserving extension data.

    CauseOfTransmission::new

    fn CauseOfTransmission::new(category : CauseCategory, positive? : Bool, test_flag? : Bool, originator? : Int, qualifier? : Int) -> Result[CauseOfTransmission, String]

    Construct a validated cause of transmission.

    CauseOfTransmission::originator

    fn CauseOfTransmission::originator(self : CauseOfTransmission) -> Int

    Return the originator address.

    CauseOfTransmission::qualifier

    fn CauseOfTransmission::qualifier(self : CauseOfTransmission) -> Int

    Return the qualifier value.

    CauseOfTransmission::raw

    Return the raw cause number.

    ClockSyncTransaction

    pub struct ClockSyncTransaction {
    request : ServiceRequest
    status : ServiceStatus
    received : Cp56Time?
    applied_at : Int?
    } derive(
    Debug
    )

    Clock synchronization service with a deterministic skew calculation.

    ClockSyncTransaction::activate

    fn ClockSyncTransaction::activate(self : ClockSyncTransaction) -> Result[Unit, String]

    ClockSyncTransaction::apply

    fn ClockSyncTransaction::apply(self : ClockSyncTransaction, timestamp : Cp56Time, applied_at : Int) -> Result[Int, String]

    ClockSyncTransaction::new

    fn ClockSyncTransaction::new(request : ServiceRequest) -> Result[ClockSyncTransaction, String]

    ClockSyncTransaction::received

    ClockSyncTransaction::status

    CommandAudit

    pub struct CommandAudit {
    ticket : Int
    timestamp : Int
    from : CommandLifecycle
    to : CommandLifecycle
    attempt : Int
    message : String
    } derive(Eq,
    Debug
    )

    A transition emitted by the scheduler for audit and UI consumers.

    CommandAudit::attempt

    fn CommandAudit::attempt(self : CommandAudit) -> Int

    CommandAudit::from

    CommandAudit::message

    fn CommandAudit::message(self : CommandAudit) -> String

    CommandAudit::new

    fn CommandAudit::new(ticket : Int, timestamp : Int, from : CommandLifecycle, to : CommandLifecycle, attempt : Int, message : String) -> CommandAudit

    CommandAudit::ticket

    fn CommandAudit::ticket(self : CommandAudit) -> Int

    CommandAudit::timestamp

    fn CommandAudit::timestamp(self : CommandAudit) -> Int

    CommandAudit::to

    CommandDispatch

    pub struct CommandDispatch {
    ticket : Int
    station : CommonAddress
    object : ApplicationObject
    attempt : Int
    expires_at : Int
    } derive(
    Debug
    )

    A dispatch result containing the ticket and object to encode on the wire.

    CommandDispatch::attempt

    fn CommandDispatch::attempt(self : CommandDispatch) -> Int

    CommandDispatch::expires_at

    fn CommandDispatch::expires_at(self : CommandDispatch) -> Int

    CommandDispatch::object

    CommandDispatch::station

    CommandDispatch::ticket

    fn CommandDispatch::ticket(self : CommandDispatch) -> Int

    CommandLifecycle

    pub enum CommandLifecycle {
    QueuedCommand
    DispatchedCommand
    AwaitingConfirmation
    CompletedCommand
    FailedCommand
    RejectedCommand
    ExpiredCommand
    CancelledCommand
    } derive(Eq,
    Debug
    )

    Lifecycle state of a command ticket.

    CommandOutcome

    pub struct CommandOutcome {
    accepted : Bool
    status : ServiceStatus
    object : ApplicationObject?
    message : String
    } derive(
    Debug
    )

    CommandOutcome::accepted

    fn CommandOutcome::accepted(self : CommandOutcome) -> Bool

    CommandOutcome::message

    fn CommandOutcome::message(self : CommandOutcome) -> String

    CommandOutcome::object

    CommandOutcome::status

    CommandPolicy

    pub struct CommandPolicy {
    allowed : Map[Int, Bool]
    allow_all : Bool
    max_qualifier : Int
    } derive(
    Debug
    )

    A command authorization policy for host applications.

    CommandPolicy::allow

    fn CommandPolicy::allow(self : CommandPolicy, address : InformationAddress) -> Unit

    CommandPolicy::allow_all

    fn CommandPolicy::allow_all() -> CommandPolicy

    CommandPolicy::deny

    fn CommandPolicy::deny(self : CommandPolicy, address : InformationAddress) -> Unit

    CommandPolicy::deny_all

    fn CommandPolicy::deny_all() -> CommandPolicy

    CommandPolicy::permits

    fn CommandPolicy::permits(self : CommandPolicy, object : ApplicationObject) -> Bool

    CommandPolicy::set_max_qualifier

    fn CommandPolicy::set_max_qualifier(self : CommandPolicy, value : Int) -> Result[Unit, String]

    CommandPriority

    pub enum CommandPriority {
    EmergencyPriority
    HighPriority
    NormalPriority
    LowPriority
    } derive(Eq,
    Debug
    )

    Priority used by the deterministic command scheduler.

    CommandPriority::weight

    fn CommandPriority::weight(self : CommandPriority) -> Int

    CommandQueue

    pub struct CommandQueue {
    pending : Array[ApplicationObject]
    completed : Array[CommandOutcome]
    limit : Int
    } derive(
    Debug
    )

    A FIFO command queue with explicit outcomes.

    CommandQueue::completed_count

    fn CommandQueue::completed_count(self : CommandQueue) -> Int

    CommandQueue::enqueue

    fn CommandQueue::enqueue(self : CommandQueue, object : ApplicationObject) -> Result[Unit, String]

    CommandQueue::new

    fn CommandQueue::new(limit? : Int) -> Result[CommandQueue, String]

    CommandQueue::outcomes

    CommandQueue::pending_count

    fn CommandQueue::pending_count(self : CommandQueue) -> Int

    CommandQueue::process_one

    fn CommandQueue::process_one(self : CommandQueue, policy : CommandPolicy) -> CommandOutcome?

    CommandRequest

    pub struct CommandRequest {
    ticket : Int
    station : CommonAddress
    object : ApplicationObject
    priority : CommandPriority
    submitted_at : Int
    deadline : Int
    idempotency_key : String
    source : String
    policy : RetryPolicy
    attempts : Int
    lifecycle : CommandLifecycle
    next_attempt_at : Int
    last_error : String
    } derive(
    Debug
    )

    A command request admitted to the scheduler.

    CommandRequest::attempts

    fn CommandRequest::attempts(self : CommandRequest) -> Int

    CommandRequest::deadline

    fn CommandRequest::deadline(self : CommandRequest) -> Int

    CommandRequest::idempotency_key

    fn CommandRequest::idempotency_key(self : CommandRequest) -> String

    CommandRequest::last_error

    fn CommandRequest::last_error(self : CommandRequest) -> String

    CommandRequest::lifecycle

    CommandRequest::new

    fn CommandRequest::new(ticket : Int, station : CommonAddress, object : ApplicationObject, priority : CommandPriority, submitted_at : Int, deadline : Int, idempotency_key : String, source : String, policy : RetryPolicy) -> Result[CommandRequest, Diagnostic]

    CommandRequest::next_attempt_at

    fn CommandRequest::next_attempt_at(self : CommandRequest) -> Int

    CommandRequest::object

    CommandRequest::policy

    CommandRequest::priority

    CommandRequest::source

    fn CommandRequest::source(self : CommandRequest) -> String

    CommandRequest::station

    CommandRequest::submitted_at

    fn CommandRequest::submitted_at(self : CommandRequest) -> Int

    CommandRequest::ticket

    fn CommandRequest::ticket(self : CommandRequest) -> Int

    CommandScheduler

    pub struct CommandScheduler {
    pending : Array[CommandRequest]
    audits : Array[CommandAudit]
    audit_limit : Int
    idempotency : Map[String, Int]
    next_ticket : Int
    metrics : SchedulerMetrics
    } derive(
    Debug
    )

    Deterministic command scheduler with idempotency and retry handling.

    CommandScheduler::audits

    CommandScheduler::cancel

    fn CommandScheduler::cancel(self : CommandScheduler, ticket : Int, now : Int, reason? : String) -> Result[CommandRequest, Diagnostic]

    CommandScheduler::confirm

    fn CommandScheduler::confirm(self : CommandScheduler, ticket : Int, now : Int, accepted : Bool, message? : String) -> Result[CommandRequest, Diagnostic]

    CommandScheduler::dispatch

    fn CommandScheduler::dispatch(self : CommandScheduler, policy : CommandPolicy, now : Int) -> Result[CommandDispatch?, Diagnostic]

    CommandScheduler::expire

    fn CommandScheduler::expire(self : CommandScheduler, now : Int) -> Array[CommandRequest]

    CommandScheduler::get

    fn CommandScheduler::get(self : CommandScheduler, ticket : Int) -> CommandRequest?

    CommandScheduler::metrics

    CommandScheduler::new

    fn CommandScheduler::new(audit_limit? : Int) -> Result[CommandScheduler, String]

    CommandScheduler::pending_count

    fn CommandScheduler::pending_count(self : CommandScheduler) -> Int

    CommandScheduler::submit

    fn CommandScheduler::submit(self : CommandScheduler, station : CommonAddress, object : ApplicationObject, priority : CommandPriority, now : Int, deadline : Int, idempotency_key : String, source? : String, policy? : RetryPolicy) -> Result[CommandRequest, Diagnostic]

    CommandScheduler::terminal

    CommonAddress

    pub struct CommonAddress {
    value : Int
    } derive(Eq,
    Debug
    )

    Common address of ASDU values. Zero is reserved for an unassigned station.

    CommonAddress::is_global

    fn CommonAddress::is_global(self : CommonAddress) -> Bool

    Return whether this common address is the global station address.

    CommonAddress::new

    fn CommonAddress::new(value : Int) -> Result[CommonAddress, String]

    Create a two-byte common address.

    CommonAddress::number

    fn CommonAddress::number(self : CommonAddress) -> Int

    Return the numeric common address.

    ConfigChange

    pub struct ConfigChange {
    key : String
    kind : ConfigChangeKind
    from : ConfigValue?
    to : ConfigValue?
    revision : Int
    timestamp : Int
    operator : String
    message : String
    } derive(Eq,
    Debug
    )

    ConfigChange::from

    ConfigChange::key

    fn ConfigChange::key(self : ConfigChange) -> String

    ConfigChange::kind

    ConfigChange::message

    fn ConfigChange::message(self : ConfigChange) -> String

    ConfigChange::operator

    fn ConfigChange::operator(self : ConfigChange) -> String

    ConfigChange::revision

    fn ConfigChange::revision(self : ConfigChange) -> Int

    ConfigChange::timestamp

    fn ConfigChange::timestamp(self : ConfigChange) -> Int

    ConfigChange::to

    ConfigChangeKind

    pub enum ConfigChangeKind {
    ConfigAdded
    ConfigUpdated
    ConfigReset
    ConfigRejected
    } derive(Eq,
    Debug
    )

    ConfigDefinition

    pub struct ConfigDefinition {
    key : String
    description : String
    default_value : ConfigValue
    required : Bool
    minimum : Int?
    maximum : Int?
    secret : Bool
    restart_required : Bool
    } derive(Eq,
    Debug
    )

    ConfigDefinition::default_value

    fn ConfigDefinition::default_value(self : ConfigDefinition) -> ConfigValue

    ConfigDefinition::description

    fn ConfigDefinition::description(self : ConfigDefinition) -> String

    ConfigDefinition::key

    fn ConfigDefinition::key(self : ConfigDefinition) -> String

    ConfigDefinition::maximum

    fn ConfigDefinition::maximum(self : ConfigDefinition) -> Int?

    ConfigDefinition::minimum

    fn ConfigDefinition::minimum(self : ConfigDefinition) -> Int?

    ConfigDefinition::new

    fn ConfigDefinition::new(key : String, description : String, default_value : ConfigValue, required? : Bool, minimum? : Int, maximum? : Int, secret? : Bool, restart_required? : Bool) -> Result[ConfigDefinition, String]

    ConfigDefinition::required

    fn ConfigDefinition::required(self : ConfigDefinition) -> Bool

    ConfigDefinition::restart_required

    fn ConfigDefinition::restart_required(self : ConfigDefinition) -> Bool

    ConfigDefinition::secret

    fn ConfigDefinition::secret(self : ConfigDefinition) -> Bool

    ConfigEntry

    pub struct ConfigEntry {
    definition : ConfigDefinition
    value : ConfigValue
    revision : Int
    updated_at : Int
    updated_by : String
    } derive(Eq,
    Debug
    )

    Value and source revision stored for one key.

    ConfigEntry::definition

    fn ConfigEntry::definition(self : ConfigEntry) -> ConfigDefinition

    ConfigEntry::revision

    fn ConfigEntry::revision(self : ConfigEntry) -> Int

    ConfigEntry::updated_at

    fn ConfigEntry::updated_at(self : ConfigEntry) -> Int

    ConfigEntry::updated_by

    fn ConfigEntry::updated_by(self : ConfigEntry) -> String

    ConfigEntry::value

    fn ConfigEntry::value(self : ConfigEntry) -> ConfigValue

    ConfigTransaction

    pub struct ConfigTransaction {
    base_revision : Int
    operator : String
    timestamp : Int
    updates : Array[(String, ConfigValue)]
    resets : Array[String]
    closed : Bool
    } derive(
    Debug
    )

    ConfigTransaction::base_revision

    fn ConfigTransaction::base_revision(self : ConfigTransaction) -> Int

    ConfigTransaction::count

    fn ConfigTransaction::count(self : ConfigTransaction) -> Int

    ConfigTransaction::new

    fn ConfigTransaction::new(base_revision : Int, operator : String, timestamp : Int) -> ConfigTransaction

    ConfigTransaction::operator

    fn ConfigTransaction::operator(self : ConfigTransaction) -> String

    ConfigTransaction::reset

    fn ConfigTransaction::reset(self : ConfigTransaction, key : String) -> Result[Unit, String]

    ConfigTransaction::rollback

    fn ConfigTransaction::rollback(self : ConfigTransaction) -> Unit

    ConfigTransaction::set

    fn ConfigTransaction::set(self : ConfigTransaction, key : String, value : ConfigValue) -> Result[Unit, String]

    ConfigTransaction::timestamp

    fn ConfigTransaction::timestamp(self : ConfigTransaction) -> Int

    ConfigValue

    pub enum ConfigValue {
    ConfigInt(Int)
    ConfigBool(Bool)
    ConfigText(String)
    ConfigDuration(Int)
    ConfigAddress(CommonAddress)
    ConfigAddressList(Array[CommonAddress])
    } derive(Eq,
    Debug
    )

    Configuration value types accepted by the runtime registry.

    ConfigValue::type_name

    fn ConfigValue::type_name(self : ConfigValue) -> String

    ConfigurationRegistry

    pub struct ConfigurationRegistry {
    definitions : Map[String, ConfigDefinition]
    values : Map[String, ConfigEntry]
    history : Array[ConfigChange]
    history_limit : Int
    revision : Int
    } derive(
    Debug
    )

    Versioned configuration registry with atomic transaction commits.

    ConfigurationRegistry::commit

    fn ConfigurationRegistry::commit(self : ConfigurationRegistry, transaction : ConfigTransaction) -> Result[Array[ConfigChange], String]

    ConfigurationRegistry::definition

    fn ConfigurationRegistry::definition(self : ConfigurationRegistry, key : String) -> ConfigDefinition?

    ConfigurationRegistry::export_lines

    fn ConfigurationRegistry::export_lines(self : ConfigurationRegistry) -> Array[String]

    ConfigurationRegistry::get

    fn ConfigurationRegistry::get(self : ConfigurationRegistry, key : String) -> ConfigEntry?

    ConfigurationRegistry::history

    ConfigurationRegistry::keys

    ConfigurationRegistry::len

    ConfigurationRegistry::new

    fn ConfigurationRegistry::new(history_limit? : Int) -> Result[ConfigurationRegistry, String]

    ConfigurationRegistry::register_definition

    fn ConfigurationRegistry::register_definition(self : ConfigurationRegistry, definition : ConfigDefinition, timestamp : Int, operator : String) -> Result[Unit, String]

    ConfigurationRegistry::reset

    fn ConfigurationRegistry::reset(self : ConfigurationRegistry, key : String, timestamp : Int, operator : String) -> Result[ConfigEntry, String]

    ConfigurationRegistry::revision

    fn ConfigurationRegistry::revision(self : ConfigurationRegistry) -> Int

    ConfigurationRegistry::set

    fn ConfigurationRegistry::set(self : ConfigurationRegistry, key : String, value : ConfigValue, timestamp : Int, operator : String) -> Result[ConfigEntry, String]

    ConformanceReport

    pub struct ConformanceReport {
    valid : Bool
    type_id : ApplicationType
    object_count : Int
    expected_width : Int
    actual_width : Int
    issues : Array[String]
    } derive(Eq,
    Debug
    )

    An ASDU consistency report that can be shown in CLI diagnostics.

    ConformanceReport::actual_width

    fn ConformanceReport::actual_width(self : ConformanceReport) -> Int

    ConformanceReport::add_issue

    fn ConformanceReport::add_issue(self : ConformanceReport, message : String) -> Unit

    ConformanceReport::expected_width

    fn ConformanceReport::expected_width(self : ConformanceReport) -> Int

    ConformanceReport::issues

    fn ConformanceReport::issues(self : ConformanceReport) -> Array[String]

    ConformanceReport::new

    ConformanceReport::object_count

    fn ConformanceReport::object_count(self : ConformanceReport) -> Int

    ConformanceReport::type_id

    ConformanceReport::valid

    fn ConformanceReport::valid(self : ConformanceReport) -> Bool

    ConformanceVector

    pub struct ConformanceVector {
    name : String
    category : VectorCategory
    input : Bytes
    expectation : VectorExpectation
    expected_kind : FrameKind?
    expected_send : Int?
    expected_receive : Int?
    expected_payload : Bytes?
    } derive(
    Debug
    )

    A deterministic byte-level protocol vector.

    ConformanceVector::category

    ConformanceVector::expectation

    ConformanceVector::expected_kind

    fn ConformanceVector::expected_kind(self : ConformanceVector) -> FrameKind?

    ConformanceVector::expected_payload

    fn ConformanceVector::expected_payload(self : ConformanceVector) -> Bytes?

    ConformanceVector::expected_receive

    fn ConformanceVector::expected_receive(self : ConformanceVector) -> Int?

    ConformanceVector::expected_send

    fn ConformanceVector::expected_send(self : ConformanceVector) -> Int?

    ConformanceVector::input

    fn ConformanceVector::input(self : ConformanceVector) -> Bytes

    ConformanceVector::name

    fn ConformanceVector::name(self : ConformanceVector) -> String

    ConformanceVector::new

    fn ConformanceVector::new(name : String, category : VectorCategory, input : Bytes, expectation : VectorExpectation, expected_kind? : FrameKind, expected_send? : Int, expected_receive? : Int, expected_payload? : Bytes) -> Result[ConformanceVector, String]

    ConnectionParameters

    pub struct ConnectionParameters {
    k : Int
    w : Int
    t0_seconds : Int
    t1_seconds : Int
    t2_seconds : Int
    t3_seconds : Int
    } derive(Eq,
    Debug
    )

    IEC 104 link-layer timing and window parameters.

    ConnectionParameters::default

    Default parameters from the commonly deployed IEC 104 profile.

    ConnectionParameters::k

    ConnectionParameters::new

    fn ConnectionParameters::new(k : Int, w : Int, t0_seconds : Int, t1_seconds : Int, t2_seconds : Int, t3_seconds : Int) -> Result[ConnectionParameters, String]

    Validate and construct link-layer parameters.

    ConnectionParameters::t0

    ConnectionParameters::t1

    ConnectionParameters::t2

    ConnectionParameters::t3

    ConnectionParameters::w

    CounterInterrogationRequest

    pub struct CounterInterrogationRequest {
    common_address : CommonAddress
    qualifier : Int
    created_at : Int
    } derive(Eq,
    Debug
    )

    Counter-interrogation request used for historical counter snapshots.

    CounterInterrogationRequest::common_address

    CounterInterrogationRequest::created_at

    CounterInterrogationRequest::new

    fn CounterInterrogationRequest::new(common_address : CommonAddress, qualifier : Int, created_at : Int) -> Result[CounterInterrogationRequest, String]

    CounterInterrogationRequest::qualifier

    Cp24Time

    pub struct Cp24Time {
    millisecond : Int
    minute : Int
    } derive(Eq,
    Debug
    )

    Three-byte CP24Time2a value used by short time-tagged ASDUs.

    Cp24Time::from_bytes

    fn Cp24Time::from_bytes(data : Bytes, offset? : Int) -> Result[Cp24Time, String]

    Cp24Time::millisecond

    fn Cp24Time::millisecond(self : Cp24Time) -> Int

    Cp24Time::minute

    fn Cp24Time::minute(self : Cp24Time) -> Int

    Cp24Time::new

    fn Cp24Time::new(millisecond : Int, minute : Int) -> Result[Cp24Time, String]

    Cp24Time::remainder_millisecond

    fn Cp24Time::remainder_millisecond(self : Cp24Time) -> Int

    Cp24Time::second

    fn Cp24Time::second(self : Cp24Time) -> Int

    Cp24Time::to_array

    fn Cp24Time::to_array(self : Cp24Time) -> Array[Byte]

    Cp56Time

    pub struct Cp56Time {
    year : Int
    month : Int
    day : Int
    weekday : Int
    hour : Int
    minute : Int
    millisecond : Int
    } derive(Eq,
    Debug
    )

    Seven-byte CP56Time2a timestamp.

    Cp56Time::calendar_year

    fn Cp56Time::calendar_year(self : Cp56Time, century? : Int) -> Int

    Return the four-digit calendar year represented by the protocol year.

    Cp56Time::day

    fn Cp56Time::day(self : Cp56Time) -> Int

    Cp56Time::from_bytes

    fn Cp56Time::from_bytes(data : Bytes, offset? : Int) -> Result[Cp56Time, String]

    Cp56Time::hour

    fn Cp56Time::hour(self : Cp56Time) -> Int

    Cp56Time::millisecond

    fn Cp56Time::millisecond(self : Cp56Time) -> Int

    Cp56Time::minute

    fn Cp56Time::minute(self : Cp56Time) -> Int

    Cp56Time::month

    fn Cp56Time::month(self : Cp56Time) -> Int

    Cp56Time::new

    fn Cp56Time::new(year : Int, month : Int, day : Int, hour : Int, minute : Int, millisecond : Int, weekday? : Int) -> Result[Cp56Time, String]

    Construct a CP56 timestamp. The year is the two-digit protocol year.

    Cp56Time::ordering_key

    fn Cp56Time::ordering_key(self : Cp56Time) -> Int

    A deterministic date-time ordering key.

    Cp56Time::remainder_millisecond

    fn Cp56Time::remainder_millisecond(self : Cp56Time) -> Int

    Cp56Time::second

    fn Cp56Time::second(self : Cp56Time) -> Int

    Cp56Time::to_array

    fn Cp56Time::to_array(self : Cp56Time) -> Array[Byte]

    Cp56Time::weekday

    fn Cp56Time::weekday(self : Cp56Time) -> Int

    Cp56Time::year

    fn Cp56Time::year(self : Cp56Time) -> Int

    DatabaseEvent

    pub struct DatabaseEvent {
    sequence : Int
    timestamp : Int
    kind : DatabaseEventKind
    common_address : CommonAddress?
    point_address : InformationAddress?
    message : String
    } derive(Eq,
    Debug
    )

    DatabaseEvent::common_address

    fn DatabaseEvent::common_address(self : DatabaseEvent) -> CommonAddress?

    DatabaseEvent::kind

    DatabaseEvent::message

    fn DatabaseEvent::message(self : DatabaseEvent) -> String

    DatabaseEvent::new

    fn DatabaseEvent::new(sequence : Int, timestamp : Int, kind : DatabaseEventKind, common_address? : CommonAddress, point_address? : InformationAddress, message? : String) -> DatabaseEvent

    DatabaseEvent::point_address

    fn DatabaseEvent::point_address(self : DatabaseEvent) -> InformationAddress?

    DatabaseEvent::sequence

    fn DatabaseEvent::sequence(self : DatabaseEvent) -> Int

    DatabaseEvent::timestamp

    fn DatabaseEvent::timestamp(self : DatabaseEvent) -> Int

    DatabaseEventKind

    pub enum DatabaseEventKind {
    StationAdded
    StationRemoved
    StationStateChanged
    PointChanged
    DatabaseCompacted
    TransactionCommitted
    TransactionRejected
    } derive(Eq,
    Debug
    )

    A bounded journal entry for changes to the station database.

    DatabaseSnapshot

    pub struct DatabaseSnapshot {
    revision : Int
    timestamp : Int
    stations : Array[StationSummary]
    events : Array[DatabaseEvent]
    } derive(
    Debug
    )

    A database snapshot used by exports and optimistic readers.

    DatabaseSnapshot::events

    DatabaseSnapshot::revision

    fn DatabaseSnapshot::revision(self : DatabaseSnapshot) -> Int

    DatabaseSnapshot::stations

    DatabaseSnapshot::timestamp

    fn DatabaseSnapshot::timestamp(self : DatabaseSnapshot) -> Int

    DatabaseTransaction

    pub struct DatabaseTransaction {
    base_revision : Int
    timestamp : Int
    additions : Array[StationConfig]
    removals : Array[CommonAddress]
    states : Array[(CommonAddress, StationStatus, StationStateReason, String)]
    points : Array[(CommonAddress, ApplicationObject, String)]
    closed : Bool
    } derive(
    Debug
    )

    A transaction over station configuration and point updates.

    DatabaseTransaction::add_station

    fn DatabaseTransaction::add_station(self : DatabaseTransaction, config : StationConfig) -> Result[Unit, String]

    DatabaseTransaction::base_revision

    fn DatabaseTransaction::base_revision(self : DatabaseTransaction) -> Int

    DatabaseTransaction::new

    fn DatabaseTransaction::new(base_revision : Int, timestamp : Int) -> DatabaseTransaction

    DatabaseTransaction::operation_count

    fn DatabaseTransaction::operation_count(self : DatabaseTransaction) -> Int

    DatabaseTransaction::remove_station

    fn DatabaseTransaction::remove_station(self : DatabaseTransaction, common_address : CommonAddress) -> Result[Unit, String]

    DatabaseTransaction::rollback

    fn DatabaseTransaction::rollback(self : DatabaseTransaction) -> Unit

    DatabaseTransaction::set_state

    fn DatabaseTransaction::set_state(self : DatabaseTransaction, common_address : CommonAddress, status : StationStatus, reason : StationStateReason, message? : String) -> Result[Unit, String]

    DatabaseTransaction::timestamp

    fn DatabaseTransaction::timestamp(self : DatabaseTransaction) -> Int

    DatabaseTransaction::write_point

    fn DatabaseTransaction::write_point(self : DatabaseTransaction, common_address : CommonAddress, object : ApplicationObject, source? : String) -> Result[Unit, Diagnostic]

    DeadbandRule

    pub struct DeadbandRule {
    absolute : Float
    relative_percent : Float
    minimum_interval : Int
    } derive(Eq,
    Debug
    )

    Deadband rule that prevents unchanged analog values from flooding a link.

    DeadbandRule::absolute

    fn DeadbandRule::absolute(self : DeadbandRule) -> Float

    DeadbandRule::changed

    fn DeadbandRule::changed(self : DeadbandRule, previous : TelemetrySample, current : TelemetrySample) -> Bool

    DeadbandRule::minimum_interval

    fn DeadbandRule::minimum_interval(self : DeadbandRule) -> Int

    DeadbandRule::new

    fn DeadbandRule::new(absolute? : Float, relative_percent? : Float, minimum_interval? : Int) -> Result[DeadbandRule, String]

    DeadbandRule::relative_percent

    fn DeadbandRule::relative_percent(self : DeadbandRule) -> Float

    Diagnostic

    pub struct Diagnostic {
    kind : DiagnosticKind
    message : String
    offset : Int?
    } derive(Eq,
    Debug
    )

    Structured diagnostic returned by validation and service layers.

    Diagnostic::kind

    Diagnostic::message

    fn Diagnostic::message(self : Diagnostic) -> String

    Diagnostic::new

    fn Diagnostic::new(kind : DiagnosticKind, message : String, offset? : Int) -> Diagnostic

    Diagnostic::offset

    fn Diagnostic::offset(self : Diagnostic) -> Int?

    Diagnostic::to_line

    fn Diagnostic::to_line(self : Diagnostic) -> String

    Produce a compact human-readable diagnostic line for CLI and logs.

    DiagnosticCatalog

    pub struct DiagnosticCatalog {
    records : Map[String, DiagnosticRecord]
    history : Array[DiagnosticRecord]
    history_limit : Int
    metrics : DiagnosticCatalogMetrics
    } derive(
    Debug
    )

    DiagnosticCatalog::acknowledge

    fn DiagnosticCatalog::acknowledge(self : DiagnosticCatalog, key : String, operator : String) -> Result[DiagnosticRecord, String]

    DiagnosticCatalog::active

    DiagnosticCatalog::get

    fn DiagnosticCatalog::get(self : DiagnosticCatalog, key : String) -> DiagnosticRecord?

    DiagnosticCatalog::history

    DiagnosticCatalog::len

    fn DiagnosticCatalog::len(self : DiagnosticCatalog) -> Int

    DiagnosticCatalog::metrics

    DiagnosticCatalog::new

    fn DiagnosticCatalog::new(history_limit? : Int) -> Result[DiagnosticCatalog, String]

    DiagnosticCatalog::purge_resolved

    fn DiagnosticCatalog::purge_resolved(self : DiagnosticCatalog) -> Int

    DiagnosticCatalog::record_diagnostic

    fn DiagnosticCatalog::record_diagnostic(self : DiagnosticCatalog, diagnostic : Diagnostic, severity : DiagnosticSeverity, station : CommonAddress?, timestamp : Int) -> DiagnosticRecord

    DiagnosticCatalog::resolve

    fn DiagnosticCatalog::resolve(self : DiagnosticCatalog, key : String, timestamp : Int) -> Result[DiagnosticRecord, String]

    DiagnosticCatalogMetrics

    pub struct DiagnosticCatalogMetrics {
    raised : Int
    resolved : Int
    acknowledged : Int
    deduplicated : Int
    } derive(Eq,
    Debug
    )

    DiagnosticCatalogMetrics::acknowledged

    fn DiagnosticCatalogMetrics::acknowledged(self : DiagnosticCatalogMetrics) -> Int

    DiagnosticCatalogMetrics::deduplicated

    fn DiagnosticCatalogMetrics::deduplicated(self : DiagnosticCatalogMetrics) -> Int

    DiagnosticCatalogMetrics::new

    DiagnosticCatalogMetrics::raised

    DiagnosticCatalogMetrics::resolved

    DiagnosticKind

    pub enum DiagnosticKind {
    MalformedFrame
    InvalidSequence
    InvalidAddress
    InvalidType
    InvalidQualifier
    UnsupportedFeature
    WindowExhausted
    TimerExpired
    StateViolation
    TransportFailure
    } derive(Eq,
    Debug
    )

    A stable classification for protocol diagnostics.

    DiagnosticRecord

    pub struct DiagnosticRecord {
    key : String
    kind : DiagnosticKind
    severity : DiagnosticSeverity
    message : String
    station : CommonAddress?
    first_seen : Int
    last_seen : Int
    occurrences : Int
    active : Bool
    acknowledged : Bool
    acknowledged_by : String?
    } derive(Eq,
    Debug
    )

    DiagnosticRecord::acknowledged

    fn DiagnosticRecord::acknowledged(self : DiagnosticRecord) -> Bool

    DiagnosticRecord::acknowledged_by

    fn DiagnosticRecord::acknowledged_by(self : DiagnosticRecord) -> String?

    DiagnosticRecord::active

    fn DiagnosticRecord::active(self : DiagnosticRecord) -> Bool

    DiagnosticRecord::first_seen

    fn DiagnosticRecord::first_seen(self : DiagnosticRecord) -> Int

    DiagnosticRecord::key

    fn DiagnosticRecord::key(self : DiagnosticRecord) -> String

    DiagnosticRecord::kind

    DiagnosticRecord::last_seen

    fn DiagnosticRecord::last_seen(self : DiagnosticRecord) -> Int

    DiagnosticRecord::message

    fn DiagnosticRecord::message(self : DiagnosticRecord) -> String

    DiagnosticRecord::occurrences

    fn DiagnosticRecord::occurrences(self : DiagnosticRecord) -> Int

    DiagnosticRecord::severity

    DiagnosticRecord::station

    DiagnosticSeverity

    pub enum DiagnosticSeverity {
    NoticeDiagnostic
    WarningDiagnostic
    ErrorDiagnostic
    CriticalDiagnostic
    } derive(Eq,
    Debug
    )

    Operational severity for normalized protocol diagnostics.

    DiagnosticSeverity::weight

    fn DiagnosticSeverity::weight(self : DiagnosticSeverity) -> Int

    DoublePointValue

    pub struct DoublePointValue {
    state : Int
    quality : StatusQuality
    } derive(Eq,
    Debug
    )

    Double point information value. IEC 104 reserves state value 0 and 3.

    DoublePointValue::from_byte

    fn DoublePointValue::from_byte(value : Int) -> Result[DoublePointValue, String]

    DoublePointValue::new

    fn DoublePointValue::new(state : Int, quality? : StatusQuality) -> Result[DoublePointValue, String]

    DoublePointValue::quality

    DoublePointValue::state

    fn DoublePointValue::state(self : DoublePointValue) -> Int

    DoublePointValue::to_byte

    fn DoublePointValue::to_byte(self : DoublePointValue) -> Int

    EventLog

    pub struct EventLog {
    events : Array[ProtocolEvent]
    }

    In-memory event log for examples, tests and host applications.

    EventLog::all

    fn EventLog::all(self : EventLog) -> Array[ProtocolEvent]

    EventLog::len

    fn EventLog::len(self : EventLog) -> Int

    EventLog::new

    fn EventLog::new() -> EventLog

    EventLog::push

    fn EventLog::push(self : EventLog, event : ProtocolEvent) -> Unit

    FailoverEvent

    pub struct FailoverEvent {
    station : CommonAddress
    from_peer : Int?
    to_peer : Int?
    reason : FailoverReason
    timestamp : Int
    fencing_token : Int
    message : String
    } derive(Eq,
    Debug
    )

    Ownership transition emitted by the redundancy manager.

    FailoverEvent::fencing_token

    fn FailoverEvent::fencing_token(self : FailoverEvent) -> Int

    FailoverEvent::from_peer

    fn FailoverEvent::from_peer(self : FailoverEvent) -> Int?

    FailoverEvent::message

    fn FailoverEvent::message(self : FailoverEvent) -> String

    FailoverEvent::reason

    FailoverEvent::station

    FailoverEvent::timestamp

    fn FailoverEvent::timestamp(self : FailoverEvent) -> Int

    FailoverEvent::to_peer

    fn FailoverEvent::to_peer(self : FailoverEvent) -> Int?

    FailoverReason

    pub enum FailoverReason {
    StartupElection
    HeartbeatTimeout
    ProtocolFault
    ManualTakeover
    PeerRecovered
    FencingRequired
    } derive(Eq,
    Debug
    )

    Why ownership of a redundant station changed.

    FileIdentity

    pub struct FileIdentity {
    station : CommonAddress
    name : String
    file_id : Int
    } derive(Eq,
    Debug
    )

    A file identity used by the file service layer.

    FileIdentity::file_id

    fn FileIdentity::file_id(self : FileIdentity) -> Int

    FileIdentity::name

    fn FileIdentity::name(self : FileIdentity) -> String

    FileIdentity::new

    fn FileIdentity::new(station : CommonAddress, name : String, file_id : Int) -> Result[FileIdentity, String]

    FileIdentity::station

    fn FileIdentity::station(self : FileIdentity) -> CommonAddress

    FileInventoryEntry

    pub struct FileInventoryEntry {
    identity : FileIdentity
    size : Int
    revision : Int
    checksum : UInt
    updated_at : Int
    } derive(Eq,
    Debug
    )

    A file inventory entry returned to operational clients.

    FileInventoryEntry::checksum

    fn FileInventoryEntry::checksum(self : FileInventoryEntry) -> UInt

    FileInventoryEntry::identity

    FileInventoryEntry::revision

    fn FileInventoryEntry::revision(self : FileInventoryEntry) -> Int

    FileInventoryEntry::size

    fn FileInventoryEntry::size(self : FileInventoryEntry) -> Int

    FileInventoryEntry::updated_at

    fn FileInventoryEntry::updated_at(self : FileInventoryEntry) -> Int

    FileSegment

    pub struct FileSegment {
    file_id : Int
    section : Int
    offset : Int
    data : Bytes
    last : Bool
    checksum : UInt
    } derive(Eq,
    Debug
    )

    Segment of a file containing an offset and an end marker.

    FileSegment::checksum

    fn FileSegment::checksum(self : FileSegment) -> UInt

    FileSegment::data

    fn FileSegment::data(self : FileSegment) -> Bytes

    FileSegment::file_id

    fn FileSegment::file_id(self : FileSegment) -> Int

    FileSegment::last

    fn FileSegment::last(self : FileSegment) -> Bool

    FileSegment::new

    fn FileSegment::new(file_id : Int, section : Int, offset : Int, data : Bytes, last : Bool) -> Result[FileSegment, String]

    FileSegment::offset

    fn FileSegment::offset(self : FileSegment) -> Int

    FileSegment::section

    fn FileSegment::section(self : FileSegment) -> Int

    FileSegment::valid_checksum

    fn FileSegment::valid_checksum(self : FileSegment) -> Bool

    FileStore

    pub struct FileStore {
    files : Map[String, StoredFile]
    capacity : Int
    maximum_size : Int
    } derive(
    Debug
    )

    A bounded in-memory store used by outstations and gateway adapters.

    FileStore::capacity

    fn FileStore::capacity(self : FileStore) -> Int

    FileStore::get

    fn FileStore::get(self : FileStore, name : String) -> StoredFile?

    FileStore::inventory

    fn FileStore::inventory(self : FileStore) -> Array[FileInventoryEntry]

    FileStore::len

    fn FileStore::len(self : FileStore) -> Int

    FileStore::maximum_size

    fn FileStore::maximum_size(self : FileStore) -> Int

    FileStore::new

    fn FileStore::new(capacity? : Int, maximum_size? : Int) -> Result[FileStore, String]

    FileStore::put

    fn FileStore::put(self : FileStore, identity : FileIdentity, data : Bytes, timestamp : Int) -> Result[StoredFile, String]

    FileStore::remove

    fn FileStore::remove(self : FileStore, name : String) -> Result[StoredFile, String]

    FileTransferDirection

    pub enum FileTransferDirection {
    UploadFile
    DownloadFile
    } derive(Eq,
    Debug
    )

    Direction of a file service request.

    FileTransferManager

    pub struct FileTransferManager {
    store : FileStore
    sessions : Map[Int, FileTransferSession]
    history : Array[FileTransferSession]
    history_limit : Int
    next_ticket : Int
    metrics : FileTransferMetrics
    } derive(
    Debug
    )

    File service coordinator for stores and station sessions.

    FileTransferManager::ack

    fn FileTransferManager::ack(self : FileTransferManager, ticket : Int, timestamp : Int) -> Result[Unit, String]

    FileTransferManager::activate

    fn FileTransferManager::activate(self : FileTransferManager, ticket : Int, timestamp : Int) -> Result[Unit, String]

    FileTransferManager::append

    fn FileTransferManager::append(self : FileTransferManager, ticket : Int, segment : FileSegment, timestamp : Int) -> Result[FileTransferState, String]

    FileTransferManager::begin_download

    fn FileTransferManager::begin_download(self : FileTransferManager, identity : FileIdentity, segment_size? : Int, timestamp? : Int) -> Result[Array[FileSegment], String]

    FileTransferManager::begin_upload

    fn FileTransferManager::begin_upload(self : FileTransferManager, identity : FileIdentity, expected_size : Int, expected_checksum? : UInt, segment_size? : Int, timestamp? : Int) -> Result[FileTransferSession, String]

    FileTransferManager::cancel

    fn FileTransferManager::cancel(self : FileTransferManager, ticket : Int, timestamp : Int) -> Result[Unit, String]

    FileTransferManager::finish

    fn FileTransferManager::finish(self : FileTransferManager, ticket : Int, timestamp : Int) -> Result[StoredFile, String]

    FileTransferManager::get

    FileTransferManager::history

    FileTransferManager::metrics

    FileTransferManager::new

    fn FileTransferManager::new(store : FileStore, history_limit? : Int) -> Result[FileTransferManager, String]

    FileTransferManager::session_count

    fn FileTransferManager::session_count(self : FileTransferManager) -> Int

    FileTransferManager::store

    FileTransferMetrics

    pub struct FileTransferMetrics {
    sessions : Int
    completed : Int
    failed : Int
    cancelled : Int
    segments : Int
    bytes : Int
    } derive(Eq,
    Debug
    )

    Counters for file service throughput and failures.

    FileTransferMetrics::bytes

    fn FileTransferMetrics::bytes(self : FileTransferMetrics) -> Int

    FileTransferMetrics::cancelled

    fn FileTransferMetrics::cancelled(self : FileTransferMetrics) -> Int

    FileTransferMetrics::completed

    fn FileTransferMetrics::completed(self : FileTransferMetrics) -> Int

    FileTransferMetrics::failed

    fn FileTransferMetrics::failed(self : FileTransferMetrics) -> Int

    FileTransferMetrics::new

    FileTransferMetrics::segments

    fn FileTransferMetrics::segments(self : FileTransferMetrics) -> Int

    FileTransferMetrics::sessions

    fn FileTransferMetrics::sessions(self : FileTransferMetrics) -> Int

    FileTransferSession

    pub struct FileTransferSession {
    ticket : Int
    identity : FileIdentity
    direction : FileTransferDirection
    expected_size : Int
    segment_size : Int
    expected_checksum : UInt?
    buffer : Array[Byte]
    next_offset : Int
    next_section : Int
    state : FileTransferState
    attempts : Int
    last_activity : Int
    error : String
    } derive(
    Debug
    )

    File transfer session with ordered segment assembly.

    FileTransferSession::ack

    fn FileTransferSession::ack(self : FileTransferSession, timestamp : Int) -> Result[Unit, String]

    FileTransferSession::activate

    fn FileTransferSession::activate(self : FileTransferSession, timestamp : Int) -> Result[Unit, String]

    FileTransferSession::append

    fn FileTransferSession::append(self : FileTransferSession, segment : FileSegment, timestamp : Int) -> Result[Unit, String]

    FileTransferSession::attempts

    fn FileTransferSession::attempts(self : FileTransferSession) -> Int

    FileTransferSession::cancel

    fn FileTransferSession::cancel(self : FileTransferSession, timestamp : Int) -> Result[Unit, String]

    FileTransferSession::data

    fn FileTransferSession::data(self : FileTransferSession) -> Bytes

    FileTransferSession::direction

    FileTransferSession::error

    fn FileTransferSession::error(self : FileTransferSession) -> String

    FileTransferSession::expected_checksum

    fn FileTransferSession::expected_checksum(self : FileTransferSession) -> UInt?

    FileTransferSession::expected_size

    fn FileTransferSession::expected_size(self : FileTransferSession) -> Int

    FileTransferSession::fail

    fn FileTransferSession::fail(self : FileTransferSession, timestamp : Int, message : String) -> Unit

    FileTransferSession::identity

    FileTransferSession::last_activity

    fn FileTransferSession::last_activity(self : FileTransferSession) -> Int

    FileTransferSession::new

    fn FileTransferSession::new(ticket : Int, identity : FileIdentity, direction : FileTransferDirection, expected_size : Int, segment_size : Int, expected_checksum : UInt?, timestamp : Int) -> Result[FileTransferSession, String]

    FileTransferSession::next_offset

    fn FileTransferSession::next_offset(self : FileTransferSession) -> Int

    FileTransferSession::next_section

    fn FileTransferSession::next_section(self : FileTransferSession) -> Int

    FileTransferSession::received_size

    fn FileTransferSession::received_size(self : FileTransferSession) -> Int

    FileTransferSession::segment_size

    fn FileTransferSession::segment_size(self : FileTransferSession) -> Int

    FileTransferSession::state

    FileTransferSession::ticket

    fn FileTransferSession::ticket(self : FileTransferSession) -> Int

    FileTransferState

    pub enum FileTransferState {
    FileIdle
    FileSelecting
    FileTransferring
    FileWaitingForAck
    FileCompleted
    FileFailed
    FileCancelled
    } derive(Eq,
    Debug
    )

    State of a bounded IEC 104 file transfer session.

    Frame

    pub struct Frame {
    kind : FrameKind
    send_sequence : Int
    receive_sequence : Int
    control : UInt16
    payload : Bytes
    } derive(Eq,
    Debug
    )

    A decoded APCI frame. payload contains the ASDU for I frames.

    Frame::control

    fn Frame::control(self : Frame) -> UInt16

    Frame::is_information

    fn Frame::is_information(self : Frame) -> Bool

    Frame::is_supervisory

    fn Frame::is_supervisory(self : Frame) -> Bool

    Frame::is_unnumbered

    fn Frame::is_unnumbered(self : Frame) -> Bool

    Frame::kind

    fn Frame::kind(self : Frame) -> FrameKind

    Stable accessors for frame values used by host integrations.

    Frame::payload

    fn Frame::payload(self : Frame) -> Bytes

    Frame::receive_sequence

    fn Frame::receive_sequence(self : Frame) -> Int

    Frame::send_sequence

    fn Frame::send_sequence(self : Frame) -> Int

    FrameKind

    pub enum FrameKind {
    Information
    Supervisory
    Unnumbered
    } derive(Eq,
    Debug
    )

    IEC 60870-5-104 frame kinds.

    FrameMetrics

    pub struct FrameMetrics {
    frames_encoded : Int
    frames_decoded : Int
    information_frames : Int
    supervisory_frames : Int
    unnumbered_frames : Int
    bytes_encoded : Int
    bytes_decoded : Int
    malformed_frames : Int
    sequence_errors : Int
    service_failures : Int
    } derive(Eq,
    Debug
    )

    Counters for protocol throughput and error monitoring.

    FrameMetrics::error_count

    fn FrameMetrics::error_count(self : FrameMetrics) -> Int

    FrameMetrics::new

    FrameMetrics::record_decoded

    fn FrameMetrics::record_decoded(self : FrameMetrics, frame : Frame) -> Unit

    FrameMetrics::record_encoded

    fn FrameMetrics::record_encoded(self : FrameMetrics, frame : Frame) -> Unit

    FrameMetrics::record_malformed

    fn FrameMetrics::record_malformed(self : FrameMetrics) -> Unit

    FrameMetrics::record_sequence_error

    fn FrameMetrics::record_sequence_error(self : FrameMetrics) -> Unit

    FrameMetrics::record_service_failure

    fn FrameMetrics::record_service_failure(self : FrameMetrics) -> Unit

    FrameMetrics::snapshot

    fn FrameMetrics::snapshot(self : FrameMetrics) -> MetricsSnapshot

    FrameMetrics::success_rate

    fn FrameMetrics::success_rate(self : FrameMetrics) -> Float

    FrameMetrics::total_bytes

    fn FrameMetrics::total_bytes(self : FrameMetrics) -> Int

    FrameMetrics::total_frames

    fn FrameMetrics::total_frames(self : FrameMetrics) -> Int

    GatewayAdmissionPolicy

    pub struct GatewayAdmissionPolicy {
    max_objects : Int
    allow_monitoring : Bool
    allow_control : Bool
    allowed_types : Array[ApplicationType]
    denied_types : Array[ApplicationType]
    } derive(Eq,
    Debug
    )

    Admission policy applied before a gateway accepts an ASDU.

    GatewayAdmissionPolicy::allow_type

    fn GatewayAdmissionPolicy::allow_type(self : GatewayAdmissionPolicy, type_id : ApplicationType) -> Unit

    GatewayAdmissionPolicy::default

    GatewayAdmissionPolicy::deny_type

    fn GatewayAdmissionPolicy::deny_type(self : GatewayAdmissionPolicy, type_id : ApplicationType) -> Unit

    GatewayAdmissionPolicy::evaluate

    fn GatewayAdmissionPolicy::evaluate(self : GatewayAdmissionPolicy, envelope : AsduEnvelope) -> Result[Unit, String]

    GatewayAdmissionPolicy::max_objects

    fn GatewayAdmissionPolicy::max_objects(self : GatewayAdmissionPolicy) -> Int

    GatewayAdmissionPolicy::new

    fn GatewayAdmissionPolicy::new(max_objects : Int, allow_monitoring? : Bool, allow_control? : Bool) -> Result[GatewayAdmissionPolicy, String]

    GatewayCounters

    pub struct GatewayCounters {
    accepted : Int
    forwarded : Int
    dropped : Int
    rejected : Int
    stored : Int
    } derive(Eq,
    Debug
    )

    Counters exposed by the gateway for operational dashboards.

    GatewayCounters::accepted

    fn GatewayCounters::accepted(self : GatewayCounters) -> Int

    GatewayCounters::dropped

    fn GatewayCounters::dropped(self : GatewayCounters) -> Int

    GatewayCounters::empty

    GatewayCounters::forwarded

    fn GatewayCounters::forwarded(self : GatewayCounters) -> Int

    GatewayCounters::rejected

    fn GatewayCounters::rejected(self : GatewayCounters) -> Int

    GatewayCounters::stored

    fn GatewayCounters::stored(self : GatewayCounters) -> Int

    GatewayCounters::total

    fn GatewayCounters::total(self : GatewayCounters) -> Int

    GatewayDispatch

    pub enum GatewayDispatch {
    Forwarded(GatewayEnvelope, GatewayRoute)
    Dropped(GatewayEnvelope, String)
    } derive(
    Debug
    )

    GatewayDispatch::envelope

    GatewayDispatch::is_forwarded

    fn GatewayDispatch::is_forwarded(self : GatewayDispatch) -> Bool

    GatewayDispatch::message

    fn GatewayDispatch::message(self : GatewayDispatch) -> String

    GatewayEnvelope

    pub struct GatewayEnvelope {
    ingress : Int
    egress : Int
    common_address : CommonAddress
    asdu : AsduEnvelope
    received_at : Int
    trace_id : String
    } derive(
    Debug
    )

    An ASDU together with gateway ingress metadata.

    GatewayEnvelope::asdu

    GatewayEnvelope::common_address

    fn GatewayEnvelope::common_address(self : GatewayEnvelope) -> CommonAddress

    GatewayEnvelope::egress

    fn GatewayEnvelope::egress(self : GatewayEnvelope) -> Int

    GatewayEnvelope::ingress

    fn GatewayEnvelope::ingress(self : GatewayEnvelope) -> Int

    GatewayEnvelope::new

    fn GatewayEnvelope::new(ingress : Int, egress : Int, asdu : AsduEnvelope, received_at : Int, trace_id? : String) -> Result[GatewayEnvelope, String]

    GatewayEnvelope::object_count

    fn GatewayEnvelope::object_count(self : GatewayEnvelope) -> Int

    GatewayEnvelope::received_at

    fn GatewayEnvelope::received_at(self : GatewayEnvelope) -> Int

    GatewayEnvelope::trace_id

    fn GatewayEnvelope::trace_id(self : GatewayEnvelope) -> String

    GatewayMode

    pub enum GatewayMode {
    Stopped
    Starting
    Running
    Draining
    Faulted(String)
    } derive(Eq,
    Debug
    )

    Lifecycle of an in-memory IEC 104 gateway runtime.

    GatewayMode::is_accepting

    fn GatewayMode::is_accepting(self : GatewayMode) -> Bool

    GatewayMode::is_quiescent

    fn GatewayMode::is_quiescent(self : GatewayMode) -> Bool

    GatewayMode::name

    fn GatewayMode::name(self : GatewayMode) -> String

    GatewayRoute

    pub struct GatewayRoute {
    id : Int
    source : Int
    destination : Int
    common_address : CommonAddress?
    type_ids : Array[ApplicationType]
    enabled : Bool
    priority : Int
    } derive(Eq,
    Debug
    )

    A route between two logical gateway endpoints.

    GatewayRoute::common_address

    fn GatewayRoute::common_address(self : GatewayRoute) -> CommonAddress?

    GatewayRoute::describe

    fn GatewayRoute::describe(self : GatewayRoute) -> String

    GatewayRoute::destination

    fn GatewayRoute::destination(self : GatewayRoute) -> Int

    GatewayRoute::enabled

    fn GatewayRoute::enabled(self : GatewayRoute) -> Bool

    GatewayRoute::id

    fn GatewayRoute::id(self : GatewayRoute) -> Int

    GatewayRoute::new

    fn GatewayRoute::new(id : Int, source : Int, destination : Int, common_address? : CommonAddress, type_ids? : Array[ApplicationType], priority? : Int) -> Result[GatewayRoute, String]

    GatewayRoute::priority

    fn GatewayRoute::priority(self : GatewayRoute) -> Int

    GatewayRoute::set_enabled

    fn GatewayRoute::set_enabled(self : GatewayRoute, enabled : Bool) -> Unit

    GatewayRoute::source

    fn GatewayRoute::source(self : GatewayRoute) -> Int

    GatewayRoute::type_ids

    GatewayRouteTable

    pub struct GatewayRouteTable {
    routes : Array[GatewayRoute]
    capacity : Int
    } derive(
    Debug
    )

    Deterministic route table. Higher priority wins; ties use the lower route id.

    GatewayRouteTable::add

    fn GatewayRouteTable::add(self : GatewayRouteTable, route : GatewayRoute) -> Result[Unit, String]

    GatewayRouteTable::capacity

    fn GatewayRouteTable::capacity(self : GatewayRouteTable) -> Int

    GatewayRouteTable::len

    fn GatewayRouteTable::len(self : GatewayRouteTable) -> Int

    GatewayRouteTable::new

    fn GatewayRouteTable::new(capacity? : Int) -> Result[GatewayRouteTable, String]

    GatewayRouteTable::remove

    fn GatewayRouteTable::remove(self : GatewayRouteTable, route_id : Int) -> Bool

    GatewayRouteTable::routes

    GatewayRouteTable::select

    fn GatewayRouteTable::select(self : GatewayRouteTable, source : Int, common_address : CommonAddress, type_id : ApplicationType) -> GatewayRoute?

    GatewayRouteTable::set_enabled

    fn GatewayRouteTable::set_enabled(self : GatewayRouteTable, route_id : Int, enabled : Bool) -> Bool

    GatewayRuntime

    pub struct GatewayRuntime {
    mode : GatewayMode
    routes : GatewayRouteTable
    policy : GatewayAdmissionPolicy
    inbound : Array[GatewayEnvelope]
    outbound : Array[GatewayEnvelope]
    dead_letters : Array[GatewayEnvelope]
    stores : Array[GatewayStoreBinding]
    counters : GatewayCounters
    max_queue : Int
    last_error : String?
    } derive(
    Debug
    )

    Deterministic in-memory routing runtime. Network adapters can feed its queue and poll the outbound queue without coupling protocol logic to a socket API.

    GatewayRuntime::add_route

    fn GatewayRuntime::add_route(self : GatewayRuntime, route : GatewayRoute) -> Result[Unit, String]

    GatewayRuntime::attach_store

    fn GatewayRuntime::attach_store(self : GatewayRuntime, binding : GatewayStoreBinding) -> Result[Unit, String]

    GatewayRuntime::begin_drain

    fn GatewayRuntime::begin_drain(self : GatewayRuntime) -> Result[Unit, String]

    GatewayRuntime::counters

    GatewayRuntime::dead_letter_len

    fn GatewayRuntime::dead_letter_len(self : GatewayRuntime) -> Int

    GatewayRuntime::diagnostics

    fn GatewayRuntime::diagnostics(self : GatewayRuntime) -> String

    Return a stable, line-oriented diagnostics report for logs and health probes.

    GatewayRuntime::drain

    fn GatewayRuntime::drain(self : GatewayRuntime, max_dispatches? : Int) -> Array[GatewayDispatch]

    GatewayRuntime::enqueue

    fn GatewayRuntime::enqueue(self : GatewayRuntime, envelope : GatewayEnvelope) -> Result[Unit, String]

    GatewayRuntime::fail

    fn GatewayRuntime::fail(self : GatewayRuntime, message : String) -> Unit

    GatewayRuntime::ingest_to_store

    fn GatewayRuntime::ingest_to_store(self : GatewayRuntime, envelope : GatewayEnvelope) -> Result[Int, String]

    GatewayRuntime::last_error

    fn GatewayRuntime::last_error(self : GatewayRuntime) -> String?

    GatewayRuntime::mode

    GatewayRuntime::new

    fn GatewayRuntime::new(max_queue : Int, route_capacity? : Int, policy? : GatewayAdmissionPolicy) -> Result[GatewayRuntime, String]

    GatewayRuntime::outbound_len

    fn GatewayRuntime::outbound_len(self : GatewayRuntime) -> Int

    GatewayRuntime::poll_outbound

    fn GatewayRuntime::poll_outbound(self : GatewayRuntime) -> GatewayEnvelope?

    GatewayRuntime::queue_len

    fn GatewayRuntime::queue_len(self : GatewayRuntime) -> Int

    GatewayRuntime::remove_route

    fn GatewayRuntime::remove_route(self : GatewayRuntime, route_id : Int) -> Bool

    GatewayRuntime::routes

    GatewayRuntime::set_policy

    fn GatewayRuntime::set_policy(self : GatewayRuntime, policy : GatewayAdmissionPolicy) -> Unit

    GatewayRuntime::snapshot

    GatewayRuntime::start

    fn GatewayRuntime::start(self : GatewayRuntime) -> Result[Unit, String]

    GatewayRuntime::stop

    fn GatewayRuntime::stop(self : GatewayRuntime) -> Result[Unit, String]

    GatewayRuntime::store_count

    fn GatewayRuntime::store_count(self : GatewayRuntime) -> Int

    GatewayRuntime::take_dead_letter

    fn GatewayRuntime::take_dead_letter(self : GatewayRuntime) -> GatewayEnvelope?

    GatewaySnapshot

    pub struct GatewaySnapshot {
    mode : GatewayMode
    routes : Int
    queue : Int
    outbound : Int
    dead_letters : Int
    counters : GatewayCounters
    last_error : String?
    } derive(Eq,
    Debug
    )

    Snapshot suitable for a health endpoint or a periodic metrics export.

    GatewaySnapshot::counters

    GatewaySnapshot::dead_letters

    fn GatewaySnapshot::dead_letters(self : GatewaySnapshot) -> Int

    GatewaySnapshot::last_error

    fn GatewaySnapshot::last_error(self : GatewaySnapshot) -> String?

    GatewaySnapshot::mode

    GatewaySnapshot::outbound

    fn GatewaySnapshot::outbound(self : GatewaySnapshot) -> Int

    GatewaySnapshot::queue

    fn GatewaySnapshot::queue(self : GatewaySnapshot) -> Int

    GatewaySnapshot::routes

    fn GatewaySnapshot::routes(self : GatewaySnapshot) -> Int

    GatewayStoreBinding

    pub struct GatewayStoreBinding {
    common_address : CommonAddress
    store : PointStore
    accepted : Int
    rejected : Int
    } derive(
    Debug
    )

    A point store attached to one common address in the gateway.

    GatewayStoreBinding::accepted

    fn GatewayStoreBinding::accepted(self : GatewayStoreBinding) -> Int

    GatewayStoreBinding::common_address

    GatewayStoreBinding::ingest

    fn GatewayStoreBinding::ingest(self : GatewayStoreBinding, envelope : GatewayEnvelope) -> Result[Int, String]

    GatewayStoreBinding::new

    fn GatewayStoreBinding::new(common_address : CommonAddress, history_limit? : Int) -> Result[GatewayStoreBinding, String]

    GatewayStoreBinding::rejected

    fn GatewayStoreBinding::rejected(self : GatewayStoreBinding) -> Int

    GatewayStoreBinding::store

    HealthReport

    pub struct HealthReport {
    state : HealthState
    score : Int
    checks : Array[String]
    warnings : Array[String]
    } derive(Eq,
    Debug
    )

    HealthReport::checks

    fn HealthReport::checks(self : HealthReport) -> Array[String]

    HealthReport::new

    fn HealthReport::new(state : HealthState, score : Int, checks : Array[String], warnings : Array[String]) -> HealthReport

    HealthReport::score

    fn HealthReport::score(self : HealthReport) -> Int

    HealthReport::state

    HealthReport::warnings

    fn HealthReport::warnings(self : HealthReport) -> Array[String]

    HealthState

    pub enum HealthState {
    Healthy
    Degraded
    Unready
    } derive(Eq,
    Debug
    )

    Health state suitable for gateway readiness endpoints.

    Iec104Runtime

    pub struct Iec104Runtime {
    database : StationDatabase
    telemetry : TelemetryPipeline
    schedulers : Map[Int, CommandScheduler]
    redundancy : Map[Int, RedundancyManager]
    policy : OperationalPolicy
    redundancy_policy : RedundancyPolicy
    files : FileTransferManager
    clock : VirtualClock
    events : Array[RuntimeEvent]
    event_limit : Int
    next_event : Int
    metrics : RuntimeMetrics
    } derive(
    Debug
    )

    Integration facade connecting data, control, policy and redundancy layers.

    Iec104Runtime::add_peer

    fn Iec104Runtime::add_peer(self : Iec104Runtime, peer : RedundantPeer) -> Result[Unit, String]

    Iec104Runtime::confirm_command

    fn Iec104Runtime::confirm_command(self : Iec104Runtime, station : CommonAddress, ticket : Int, accepted : Bool, message? : String) -> Result[CommandRequest, Diagnostic]

    Iec104Runtime::database

    Iec104Runtime::dispatch_command

    fn Iec104Runtime::dispatch_command(self : Iec104Runtime, station : CommonAddress, policy : CommandPolicy) -> Result[CommandDispatch?, Diagnostic]

    Iec104Runtime::events

    Iec104Runtime::files

    Iec104Runtime::health

    Iec104Runtime::heartbeat

    fn Iec104Runtime::heartbeat(self : Iec104Runtime, station : CommonAddress, peer_id : Int) -> Result[Unit, String]

    Iec104Runtime::ingest

    fn Iec104Runtime::ingest(self : Iec104Runtime, station : CommonAddress, object : ApplicationObject, source? : String) -> Result[PipelineResult, Diagnostic]

    Iec104Runtime::metrics

    Iec104Runtime::new

    fn Iec104Runtime::new(config? : RuntimeConfig) -> Result[Iec104Runtime, String]

    Iec104Runtime::now

    fn Iec104Runtime::now(self : Iec104Runtime) -> Int

    Iec104Runtime::policy

    Iec104Runtime::register_station

    fn Iec104Runtime::register_station(self : Iec104Runtime, config : StationConfig) -> Result[StationSummary, String]

    Iec104Runtime::submit_command

    fn Iec104Runtime::submit_command(self : Iec104Runtime, operator_id : String, station : CommonAddress, object : ApplicationObject, priority : CommandPriority, deadline : Int, idempotency_key : String) -> Result[CommandRequest, Diagnostic]

    Iec104Runtime::telemetry

    Iec104Runtime::tick

    fn Iec104Runtime::tick(self : Iec104Runtime, seconds : Int) -> Result[Unit, String]

    InformationAddress

    pub struct InformationAddress {
    value : Int
    } derive(Eq,
    Debug
    )

    The three-byte information object address used by IEC 104.

    InformationAddress::from_octets

    fn InformationAddress::from_octets(low : Int, middle : Int, high : Int) -> Result[InformationAddress, String]

    Construct an information object address from its three octets.

    InformationAddress::high

    fn InformationAddress::high(self : InformationAddress) -> Int

    Return the most significant address octet.

    InformationAddress::is_broadcast

    fn InformationAddress::is_broadcast(self : InformationAddress) -> Bool

    Return whether the address is the protocol's broadcast address.

    InformationAddress::low

    fn InformationAddress::low(self : InformationAddress) -> Int

    Return the least significant address octet.

    InformationAddress::middle

    fn InformationAddress::middle(self : InformationAddress) -> Int

    Return the middle address octet.

    InformationAddress::new

    fn InformationAddress::new(value : Int) -> Result[InformationAddress, String]

    Create an information object address in the inclusive 0..0xffffff range.

    InformationAddress::number

    fn InformationAddress::number(self : InformationAddress) -> Int

    Return the numeric address.

    InformationObject

    pub enum InformationObject {
    Single(Bool, Int)
    Double(Int, Int)
    Normalized(Int, Int)
    ShortFloat(Float, Int)
    BitString(UInt, Int)
    } derive(Eq,
    Debug
    )

    IEC information object values supported by the first stable API.

    Interrogation

    pub struct Interrogation {
    request : InterrogationRequest
    phase : InterrogationPhase
    objects_sent : Int
    }

    Small deterministic transaction tracker; data transport remains caller-owned.

    Interrogation::activate

    fn Interrogation::activate(self : Interrogation) -> Int

    Interrogation::finish

    fn Interrogation::finish(self : Interrogation) -> Int

    Interrogation::new

    Interrogation::record

    fn Interrogation::record(self : Interrogation, count : Int) -> Result[Unit, String]

    InterrogationPhase

    pub enum InterrogationPhase {
    Idle
    Activated
    Sending
    Terminated
    } derive(Eq,
    Debug
    )

    Phases emitted by an interrogation transaction.

    InterrogationPlan

    pub struct InterrogationPlan {
    request : InterrogationRequest
    objects : Array[ApplicationObject]
    batch_size : Int
    cursor : Int
    status : ServiceStatus
    } derive(
    Debug
    )

    A total interrogation plan which can be emitted in deterministic batches.

    InterrogationPlan::activate

    fn InterrogationPlan::activate(self : InterrogationPlan) -> Result[Int, String]

    InterrogationPlan::new

    fn InterrogationPlan::new(request : InterrogationRequest, objects : Array[ApplicationObject], batch_size? : Int) -> Result[InterrogationPlan, String]

    InterrogationPlan::next_batch

    fn InterrogationPlan::next_batch(self : InterrogationPlan) -> Result[Array[ApplicationObject], String]

    InterrogationPlan::remaining

    fn InterrogationPlan::remaining(self : InterrogationPlan) -> Int

    InterrogationPlan::request

    InterrogationPlan::status

    InterrogationPlan::terminate

    fn InterrogationPlan::terminate(self : InterrogationPlan) -> Result[Int, String]

    InterrogationRequest

    pub struct InterrogationRequest {
    common_address : Int
    qualifier : Int
    } derive(Eq,
    Debug
    )

    A total interrogation request, suitable for a master command queue.

    InterrogationRequest::new

    fn InterrogationRequest::new(common_address : Int, qualifier? : Int) -> InterrogationRequest

    LengthHistogram

    pub struct LengthHistogram {
    buckets : Map[Int, Int]
    samples : Int
    } derive(
    Debug
    )

    A compact histogram for APDU length distribution.

    LengthHistogram::all

    fn LengthHistogram::all(self : LengthHistogram) -> Array[(Int, Int)]

    LengthHistogram::bucket

    fn LengthHistogram::bucket(self : LengthHistogram, maximum : Int) -> Int

    LengthHistogram::new

    LengthHistogram::observe

    fn LengthHistogram::observe(self : LengthHistogram, length : Int) -> Unit

    LengthHistogram::samples

    fn LengthHistogram::samples(self : LengthHistogram) -> Int

    LinkHealth

    pub enum LinkHealth {
    HealthyLink
    SuspectLink
    FailedLink
    RecoveringLink
    } derive(Eq,
    Debug
    )

    Health state used by the failover election.

    LinkHealth::examples

    fn LinkHealth::examples() -> Array[LinkHealth]

    LinkState

    pub enum LinkState {
    Disconnected
    Connecting
    Started
    Stopped
    TestPending
    } derive(Eq,
    Debug
    )

    Link-layer state used by a master or outstation session.

    LinkState::is_connected

    fn LinkState::is_connected(self : LinkState) -> Bool

    LinkState::is_terminal

    fn LinkState::is_terminal(self : LinkState) -> Bool

    MaintenanceWindow

    pub struct MaintenanceWindow {
    id : Int
    station : CommonAddress?
    start : Int
    end : Int
    reason : String
    blocks_commands : Bool
    blocks_file_writes : Bool
    enabled : Bool
    } derive(Eq,
    Debug
    )

    A bounded maintenance interval during which risky actions are blocked.

    MaintenanceWindow::blocks_commands

    fn MaintenanceWindow::blocks_commands(self : MaintenanceWindow) -> Bool

    MaintenanceWindow::blocks_file_writes

    fn MaintenanceWindow::blocks_file_writes(self : MaintenanceWindow) -> Bool

    MaintenanceWindow::contains

    fn MaintenanceWindow::contains(self : MaintenanceWindow, station : CommonAddress, timestamp : Int) -> Bool

    MaintenanceWindow::disable

    fn MaintenanceWindow::disable(self : MaintenanceWindow) -> Unit

    MaintenanceWindow::enabled

    fn MaintenanceWindow::enabled(self : MaintenanceWindow) -> Bool

    MaintenanceWindow::end

    fn MaintenanceWindow::end(self : MaintenanceWindow) -> Int

    MaintenanceWindow::id

    fn MaintenanceWindow::id(self : MaintenanceWindow) -> Int

    MaintenanceWindow::new

    fn MaintenanceWindow::new(id : Int, start : Int, end : Int, reason : String, station? : CommonAddress, blocks_commands? : Bool, blocks_file_writes? : Bool) -> Result[MaintenanceWindow, String]

    MaintenanceWindow::reason

    fn MaintenanceWindow::reason(self : MaintenanceWindow) -> String

    MaintenanceWindow::start

    fn MaintenanceWindow::start(self : MaintenanceWindow) -> Int

    MaintenanceWindow::station

    ManagedTransportState

    pub enum ManagedTransportState {
    TransportCreated
    TransportConnecting
    TransportStarted
    TransportStopping
    TransportStopped
    TransportFailed
    TransportClosed
    } derive(Eq,
    Debug
    )

    State of a managed transport endpoint.

    MeasurementState

    pub enum MeasurementState {
    Good
    Blocked
    Substituted
    NotTopical
    Invalid
    } derive(Eq,
    Debug
    )

    Quality-preserving measurement classification used by point stores.

    MetricsSnapshot

    pub struct MetricsSnapshot {
    frames : Int
    bytes : Int
    errors : Int
    success_rate : Float
    } derive(Eq,
    Debug
    )

    Snapshot an evolving metrics object for export or health endpoints.

    MetricsSnapshot::bytes

    fn MetricsSnapshot::bytes(self : MetricsSnapshot) -> Int

    MetricsSnapshot::errors

    fn MetricsSnapshot::errors(self : MetricsSnapshot) -> Int

    MetricsSnapshot::frames

    fn MetricsSnapshot::frames(self : MetricsSnapshot) -> Int

    MetricsSnapshot::success_rate

    fn MetricsSnapshot::success_rate(self : MetricsSnapshot) -> Float

    NegotiationDecision

    pub enum NegotiationDecision {
    CompatibleProfile
    IncompatibleProfile(Array[String])
    } derive(
    Debug
    )

    NormalizedValue

    pub struct NormalizedValue {
    value : Int
    quality : QualityDescriptor
    } derive(Eq,
    Debug
    )

    Normalized signed 16-bit measurement.

    NormalizedValue::new

    fn NormalizedValue::new(value : Int, quality? : QualityDescriptor) -> Result[NormalizedValue, String]

    NormalizedValue::quality

    NormalizedValue::raw_unsigned

    fn NormalizedValue::raw_unsigned(self : NormalizedValue) -> Int

    NormalizedValue::to_array

    fn NormalizedValue::to_array(self : NormalizedValue) -> Array[Byte]

    NormalizedValue::value

    fn NormalizedValue::value(self : NormalizedValue) -> Int

    OperationalPermission

    pub enum OperationalPermission {
    ViewTelemetry
    ViewDiagnostics
    ReadFiles
    WriteFiles
    SubmitCommands
    ConfirmCommands
    ManageStations
    ManageRoutes
    ManagePolicies
    PerformFailover
    } derive(Eq,
    Debug
    )

    Fine-grained operations that can be authorized.

    OperationalPolicy

    pub struct OperationalPolicy {
    rules : Array[PolicyRule]
    windows : Array[MaintenanceWindow]
    identities : Map[String, OperatorIdentity]
    journal : PolicyAuditJournal
    revision : Int
    } derive(
    Debug
    )

    Central policy evaluator for operator-facing services.

    OperationalPolicy::add_identity

    fn OperationalPolicy::add_identity(self : OperationalPolicy, identity : OperatorIdentity) -> Result[Unit, String]

    OperationalPolicy::add_rule

    fn OperationalPolicy::add_rule(self : OperationalPolicy, rule : PolicyRule) -> Result[Unit, String]

    OperationalPolicy::add_window

    fn OperationalPolicy::add_window(self : OperationalPolicy, window : MaintenanceWindow) -> Result[Unit, String]

    OperationalPolicy::authorize

    fn OperationalPolicy::authorize(self : OperationalPolicy, operator_id : String, permission : OperationalPermission, station : CommonAddress, type_id : ApplicationType?, timestamp : Int) -> PolicyDecision

    OperationalPolicy::identity

    fn OperationalPolicy::identity(self : OperationalPolicy, id : String) -> OperatorIdentity?

    OperationalPolicy::journal

    OperationalPolicy::new

    fn OperationalPolicy::new(audit_limit? : Int) -> Result[OperationalPolicy, String]

    OperationalPolicy::remove_identity

    fn OperationalPolicy::remove_identity(self : OperationalPolicy, id : String) -> Result[Unit, String]

    OperationalPolicy::revision

    fn OperationalPolicy::revision(self : OperationalPolicy) -> Int

    OperationalPolicy::windows

    OperatorIdentity

    pub struct OperatorIdentity {
    id : String
    display_name : String
    role : OperatorRole
    stations : Array[CommonAddress]
    active : Bool
    } derive(Eq,
    Debug
    )

    OperatorIdentity::active

    fn OperatorIdentity::active(self : OperatorIdentity) -> Bool

    OperatorIdentity::covers

    fn OperatorIdentity::covers(self : OperatorIdentity, station : CommonAddress) -> Bool

    OperatorIdentity::display_name

    fn OperatorIdentity::display_name(self : OperatorIdentity) -> String

    OperatorIdentity::id

    fn OperatorIdentity::id(self : OperatorIdentity) -> String

    OperatorIdentity::new

    fn OperatorIdentity::new(id : String, display_name : String, role : OperatorRole, stations? : Array[CommonAddress], active? : Bool) -> Result[OperatorIdentity, String]

    OperatorIdentity::role

    OperatorIdentity::stations

    OperatorRole

    pub enum OperatorRole {
    ViewerRole
    EngineerRole
    DispatcherRole
    AdministratorRole
    ServiceRole
    } derive(Eq,
    Debug
    )

    Roles recognized by the operational authorization layer.

    OperatorRole::examples

    fn OperatorRole::examples() -> Array[OperatorRole]

    Outstation

    pub struct Outstation {
    common_address : Int
    single_points : Map[Int, Bool]
    normalized_values : Map[Int, Int]
    }

    A compact in-memory outstation used in tests, demos and protocol simulations.

    Outstation::new

    fn Outstation::new(common_address : Int) -> Outstation

    Outstation::normalized

    fn Outstation::normalized(self : Outstation, ioa : Int) -> Int?

    Outstation::set_normalized

    fn Outstation::set_normalized(self : Outstation, ioa : Int, value : Int) -> Unit

    Outstation::set_single

    fn Outstation::set_single(self : Outstation, ioa : Int, value : Bool) -> Unit

    Outstation::single

    fn Outstation::single(self : Outstation, ioa : Int) -> Bool?

    Outstation::snapshot_normalized

    fn Outstation::snapshot_normalized(self : Outstation) -> Array[PointSnapshot]

    Outstation::snapshot_single

    fn Outstation::snapshot_single(self : Outstation) -> Array[PointSnapshot]

    PipelineResult

    pub struct PipelineResult {
    sample : TelemetrySample
    accepted : Bool
    changed : Bool
    rate_valid : Bool
    alarms : Array[AlarmEvent]
    subscribers : Array[Int]
    message : String
    } derive(
    Debug
    )

    Result of processing one application object.

    PipelineResult::accepted

    fn PipelineResult::accepted(self : PipelineResult) -> Bool

    PipelineResult::alarms

    PipelineResult::changed

    fn PipelineResult::changed(self : PipelineResult) -> Bool

    PipelineResult::message

    fn PipelineResult::message(self : PipelineResult) -> String

    PipelineResult::rate_valid

    fn PipelineResult::rate_valid(self : PipelineResult) -> Bool

    PipelineResult::sample

    PipelineResult::subscribers

    fn PipelineResult::subscribers(self : PipelineResult) -> Array[Int]

    PointChange

    pub struct PointChange {
    kind : PointChangeKind
    address : InformationAddress
    revision : Int
    timestamp : Int
    message : String
    } derive(Eq,
    Debug
    )

    PointChange::address

    PointChange::kind

    PointChange::message

    fn PointChange::message(self : PointChange) -> String

    PointChange::new

    fn PointChange::new(kind : PointChangeKind, address : InformationAddress, revision : Int, timestamp : Int, message : String) -> PointChange

    PointChange::revision

    fn PointChange::revision(self : PointChange) -> Int

    PointChange::timestamp

    fn PointChange::timestamp(self : PointChange) -> Int

    PointChangeKind

    pub enum PointChangeKind {
    Inserted
    Updated
    Removed
    Rejected
    } derive(Eq,
    Debug
    )

    A change recorded by the point store.

    PointDirection

    pub enum PointDirection {
    MonitorDirection
    ControlDirection
    } derive(Eq,
    Debug
    )

    Point direction used by a station data model.

    PointFilter

    pub struct PointFilter {
    direction : PointDirection?
    type_id : ApplicationType?
    first_address : InformationAddress?
    last_address : InformationAddress?
    only_valid : Bool
    source : String?
    } derive(Eq,
    Debug
    )

    Query constraints for a point-store snapshot.

    PointFilter::all

    PointFilter::control

    fn PointFilter::control() -> PointFilter

    PointFilter::from_source

    fn PointFilter::from_source(self : PointFilter, source : String) -> PointFilter

    PointFilter::monitoring

    fn PointFilter::monitoring() -> PointFilter

    PointFilter::valid_only

    fn PointFilter::valid_only(self : PointFilter) -> PointFilter

    PointFilter::with_range

    fn PointFilter::with_range(self : PointFilter, first : InformationAddress, last : InformationAddress) -> PointFilter

    PointFilter::with_type

    fn PointFilter::with_type(self : PointFilter, type_id : ApplicationType) -> PointFilter

    PointRecord

    pub struct PointRecord {
    address : InformationAddress
    type_id : ApplicationType
    value : ApplicationValue
    time_tag : TimeTag?
    revision : Int
    updated_at : Int
    source : String
    } derive(Eq,
    Debug
    )

    A stored value with its protocol identity and update metadata.

    PointRecord::address

    PointRecord::direction

    fn PointRecord::direction(self : PointRecord) -> PointDirection

    PointRecord::is_valid

    fn PointRecord::is_valid(self : PointRecord) -> Bool

    PointRecord::new

    fn PointRecord::new(object : ApplicationObject, updated_at : Int, revision? : Int, source? : String) -> PointRecord

    PointRecord::revision

    fn PointRecord::revision(self : PointRecord) -> Int

    PointRecord::source

    fn PointRecord::source(self : PointRecord) -> String

    PointRecord::time_tag

    fn PointRecord::time_tag(self : PointRecord) -> TimeTag?

    PointRecord::type_id

    fn PointRecord::type_id(self : PointRecord) -> ApplicationType

    PointRecord::updated_at

    fn PointRecord::updated_at(self : PointRecord) -> Int

    PointRecord::value

    PointSnapshot

    pub struct PointSnapshot {
    ioa : Int
    value : InformationObject
    }

    An immutable snapshot of values that can be used to build a response ASDU.

    PointStore

    pub struct PointStore {
    common_address : CommonAddress
    points : Map[Int, PointRecord]
    history : Array[PointChange]
    history_limit : Int
    } derive(
    Debug
    )

    Deterministic point store for outstations, simulators and gateways.

    PointStore::addresses

    fn PointStore::addresses(self : PointStore) -> Array[InformationAddress]

    PointStore::common_address

    fn PointStore::common_address(self : PointStore) -> CommonAddress

    PointStore::get

    fn PointStore::get(self : PointStore, address : InformationAddress) -> PointRecord?

    PointStore::history

    fn PointStore::history(self : PointStore) -> Array[PointChange]

    PointStore::history_len

    fn PointStore::history_len(self : PointStore) -> Int

    PointStore::len

    fn PointStore::len(self : PointStore) -> Int

    PointStore::new

    fn PointStore::new(common_address : CommonAddress, history_limit? : Int) -> Result[PointStore, String]

    PointStore::objects

    fn PointStore::objects(self : PointStore, filter : PointFilter) -> Array[ApplicationObject]

    Convert a store snapshot into application objects for interrogation.

    PointStore::query

    fn PointStore::query(self : PointStore, filter : PointFilter) -> Array[PointRecord]

    PointStore::remove

    fn PointStore::remove(self : PointStore, address : InformationAddress, timestamp : Int) -> Result[PointChange, Diagnostic]

    PointStore::statistics

    fn PointStore::statistics(self : PointStore) -> StoreStatistics

    PointStore::upsert

    fn PointStore::upsert(self : PointStore, object : ApplicationObject, timestamp : Int, source? : String) -> Result[PointChange, Diagnostic]

    PolicyAudit

    pub struct PolicyAudit {
    sequence : Int
    timestamp : Int
    action : AuditAction
    operator : String
    station : CommonAddress?
    object : InformationAddress?
    allowed : Bool
    detail : String
    } derive(Eq,
    Debug
    )

    PolicyAudit::action

    fn PolicyAudit::action(self : PolicyAudit) -> AuditAction

    PolicyAudit::allowed

    fn PolicyAudit::allowed(self : PolicyAudit) -> Bool

    PolicyAudit::detail

    fn PolicyAudit::detail(self : PolicyAudit) -> String

    PolicyAudit::object

    PolicyAudit::operator

    fn PolicyAudit::operator(self : PolicyAudit) -> String

    PolicyAudit::sequence

    fn PolicyAudit::sequence(self : PolicyAudit) -> Int

    PolicyAudit::station

    fn PolicyAudit::station(self : PolicyAudit) -> CommonAddress?

    PolicyAudit::timestamp

    fn PolicyAudit::timestamp(self : PolicyAudit) -> Int

    PolicyAuditJournal

    pub struct PolicyAuditJournal {
    entries : Array[PolicyAudit]
    limit : Int
    next_sequence : Int
    } derive(
    Debug
    )

    Bounded audit journal shared by authorization and management APIs.

    PolicyAuditJournal::all

    PolicyAuditJournal::append

    fn PolicyAuditJournal::append(self : PolicyAuditJournal, timestamp : Int, action : AuditAction, operator : String, station : CommonAddress?, object : InformationAddress?, allowed : Bool, detail : String) -> PolicyAudit

    PolicyAuditJournal::len

    fn PolicyAuditJournal::len(self : PolicyAuditJournal) -> Int

    PolicyAuditJournal::new

    fn PolicyAuditJournal::new(limit? : Int) -> Result[PolicyAuditJournal, String]

    PolicyDecision

    pub struct PolicyDecision {
    allowed : Bool
    permission : OperationalPermission
    operator : String
    station : CommonAddress
    rule_id : Int?
    reason : String
    } derive(Eq,
    Debug
    )

    PolicyDecision::allowed

    fn PolicyDecision::allowed(self : PolicyDecision) -> Bool

    PolicyDecision::operator

    fn PolicyDecision::operator(self : PolicyDecision) -> String

    PolicyDecision::permission

    PolicyDecision::reason

    fn PolicyDecision::reason(self : PolicyDecision) -> String

    PolicyDecision::rule_id

    fn PolicyDecision::rule_id(self : PolicyDecision) -> Int?

    PolicyDecision::station

    PolicyRule

    pub struct PolicyRule {
    id : Int
    permission : OperationalPermission
    station : CommonAddress?
    type_ids : Array[ApplicationType]
    roles : Array[OperatorRole]
    enabled : Bool
    reason : String
    } derive(Eq,
    Debug
    )

    A station/type-specific policy rule.

    PolicyRule::disable

    fn PolicyRule::disable(self : PolicyRule) -> Unit

    PolicyRule::enabled

    fn PolicyRule::enabled(self : PolicyRule) -> Bool

    PolicyRule::id

    fn PolicyRule::id(self : PolicyRule) -> Int

    PolicyRule::new

    fn PolicyRule::new(id : Int, permission : OperationalPermission, reason : String, station? : CommonAddress, type_ids? : Array[ApplicationType], roles? : Array[OperatorRole]) -> Result[PolicyRule, String]

    PolicyRule::permission

    fn PolicyRule::permission(self : PolicyRule) -> OperationalPermission

    PolicyRule::reason

    fn PolicyRule::reason(self : PolicyRule) -> String

    PolicyRule::roles

    fn PolicyRule::roles(self : PolicyRule) -> Array[OperatorRole]

    PolicyRule::station

    fn PolicyRule::station(self : PolicyRule) -> CommonAddress?

    PolicyRule::type_ids

    fn PolicyRule::type_ids(self : PolicyRule) -> Array[ApplicationType]

    ProfileRegistry

    pub struct ProfileRegistry {
    profiles : Map[String, StationProfile]
    } derive(
    Debug
    )

    ProfileRegistry::get

    fn ProfileRegistry::get(self : ProfileRegistry, name : String) -> StationProfile?

    ProfileRegistry::len

    fn ProfileRegistry::len(self : ProfileRegistry) -> Int

    ProfileRegistry::names

    fn ProfileRegistry::names(self : ProfileRegistry) -> Array[String]

    ProfileRegistry::new

    ProfileRegistry::put

    fn ProfileRegistry::put(self : ProfileRegistry, profile : StationProfile) -> Result[Unit, String]

    ProfileRegistry::remove

    fn ProfileRegistry::remove(self : ProfileRegistry, name : String) -> Bool

    ProfileRegistry::replace

    fn ProfileRegistry::replace(self : ProfileRegistry, profile : StationProfile) -> Unit

    ProtocolEvent

    pub enum ProtocolEvent {
    Connected
    Started
    Stopped
    Sent(Int)
    Received(Int)
    Acknowledged(Int)
    Fault(String)
    } derive(Eq,
    Debug
    )

    A protocol event useful for deterministic simulation and diagnostics.

    ProtocolRouter

    pub struct ProtocolRouter {
    rules : Array[RoutingRule]
    queues : Map[Int, Array[RoutedObject]]
    queue_capacity : Int
    metrics : RouterMetrics
    sequence : Int
    } derive(
    Debug
    )

    Address/type-aware router with bounded egress queues.

    ProtocolRouter::add_rule

    fn ProtocolRouter::add_rule(self : ProtocolRouter, rule : RoutingRule) -> Result[Unit, String]

    ProtocolRouter::drain

    fn ProtocolRouter::drain(self : ProtocolRouter, destination : Int, limit : Int) -> Array[RoutedObject]

    ProtocolRouter::evaluate

    fn ProtocolRouter::evaluate(self : ProtocolRouter, source : Int, destination : Int, object : ApplicationObject) -> RouteDecision

    ProtocolRouter::metrics

    ProtocolRouter::new

    fn ProtocolRouter::new(queue_capacity? : Int) -> Result[ProtocolRouter, String]

    ProtocolRouter::queue_count

    fn ProtocolRouter::queue_count(self : ProtocolRouter) -> Int

    ProtocolRouter::route

    fn ProtocolRouter::route(self : ProtocolRouter, source : Int, destination : Int, object : ApplicationObject, timestamp : Int) -> Result[RouteDecision, Diagnostic]

    ProtocolRouter::rules

    ProtocolTimers

    pub struct ProtocolTimers {
    t0 : TimerState
    t1 : TimerState
    t2 : TimerState
    t3 : TimerState
    } derive(Eq,
    Debug
    )

    ProtocolTimers::expired

    fn ProtocolTimers::expired(self : ProtocolTimers, now : Int) -> Array[String]

    ProtocolTimers::new

    ProtocolTimers::start_t0

    fn ProtocolTimers::start_t0(self : ProtocolTimers, deadline : Int) -> Unit

    ProtocolTimers::start_t1

    fn ProtocolTimers::start_t1(self : ProtocolTimers, deadline : Int) -> Unit

    ProtocolTimers::start_t2

    fn ProtocolTimers::start_t2(self : ProtocolTimers, deadline : Int) -> Unit

    ProtocolTimers::start_t3

    fn ProtocolTimers::start_t3(self : ProtocolTimers, deadline : Int) -> Unit

    ProtocolTimers::stop_t0

    fn ProtocolTimers::stop_t0(self : ProtocolTimers) -> Unit

    ProtocolTimers::stop_t1

    fn ProtocolTimers::stop_t1(self : ProtocolTimers) -> Unit

    ProtocolTimers::stop_t2

    fn ProtocolTimers::stop_t2(self : ProtocolTimers) -> Unit

    ProtocolTimers::stop_t3

    fn ProtocolTimers::stop_t3(self : ProtocolTimers) -> Unit

    QualityDescriptor

    pub struct QualityDescriptor {
    overflow : Bool
    blocked : Bool
    substituted : Bool
    not_topical : Bool
    invalid : Bool
    } derive(Eq,
    Debug
    )

    Quality descriptor shared by status and measurement objects.

    QualityDescriptor::clear

    QualityDescriptor::flags

    fn QualityDescriptor::flags(self : QualityDescriptor) -> Array[String]

    QualityDescriptor::from_byte

    fn QualityDescriptor::from_byte(value : Int) -> Result[QualityDescriptor, String]

    Decode the low byte of a QDS value.

    QualityDescriptor::has_status_change

    fn QualityDescriptor::has_status_change(self : QualityDescriptor) -> Bool

    QualityDescriptor::is_usable

    fn QualityDescriptor::is_usable(self : QualityDescriptor) -> Bool

    QualityDescriptor::to_byte

    fn QualityDescriptor::to_byte(self : QualityDescriptor) -> Int

    QualityDescriptor::with_blocked

    fn QualityDescriptor::with_blocked(self : QualityDescriptor, value : Bool) -> QualityDescriptor

    QualityDescriptor::with_invalid

    fn QualityDescriptor::with_invalid(self : QualityDescriptor, value : Bool) -> QualityDescriptor

    QualityDescriptor::with_not_topical

    fn QualityDescriptor::with_not_topical(self : QualityDescriptor, value : Bool) -> QualityDescriptor

    QualityDescriptor::with_overflow

    fn QualityDescriptor::with_overflow(self : QualityDescriptor, value : Bool) -> QualityDescriptor

    QualityDescriptor::with_substituted

    fn QualityDescriptor::with_substituted(self : QualityDescriptor, value : Bool) -> QualityDescriptor

    QualityDisposition

    pub enum QualityDisposition {
    QualityAccepted
    QualityDegraded
    QualityRejected
    } derive(Eq,
    Debug
    )

    Result applied when an incoming point violates an operational quality gate.

    QualityEvaluation

    pub struct QualityEvaluation {
    station : CommonAddress?
    address : InformationAddress?
    disposition : QualityDisposition
    score : Int
    age : Int
    evaluated_at : Int
    rule_id : Int
    findings : Array[QualityFinding]
    message : String
    } derive(Eq,
    Debug
    )

    Evaluation of one point, including all reasons retained for audit.

    QualityEvaluation::accepted

    fn QualityEvaluation::accepted(self : QualityEvaluation) -> Bool

    QualityEvaluation::address

    QualityEvaluation::age

    fn QualityEvaluation::age(self : QualityEvaluation) -> Int

    QualityEvaluation::disposition

    QualityEvaluation::evaluated_at

    fn QualityEvaluation::evaluated_at(self : QualityEvaluation) -> Int

    QualityEvaluation::finding_count

    fn QualityEvaluation::finding_count(self : QualityEvaluation) -> Int

    QualityEvaluation::findings

    QualityEvaluation::has_finding

    fn QualityEvaluation::has_finding(self : QualityEvaluation, finding : QualityFinding) -> Bool

    QualityEvaluation::is_hard_failure

    fn QualityEvaluation::is_hard_failure(self : QualityEvaluation) -> Bool

    QualityEvaluation::message

    fn QualityEvaluation::message(self : QualityEvaluation) -> String

    QualityEvaluation::rule_id

    fn QualityEvaluation::rule_id(self : QualityEvaluation) -> Int

    QualityEvaluation::score

    fn QualityEvaluation::score(self : QualityEvaluation) -> Int

    QualityEvaluation::station

    QualityEvaluation::summary_line

    fn QualityEvaluation::summary_line(self : QualityEvaluation) -> String

    QualityEvaluation::worst_finding

    QualityFinding

    pub enum QualityFinding {
    QualityInvalidValue
    QualityStaleValue
    QualityFutureTimestamp
    QualityMissingSource
    QualityUnknownStation
    QualityControlBlocked
    QualityNoFinding
    } derive(Eq,
    Debug
    )

    Machine-readable findings retained in the quality audit stream.

    QualityGateRule

    pub struct QualityGateRule {
    id : Int
    name : String
    max_age : Int
    future_skew : Int
    require_source : Bool
    reject_invalid : Bool
    reject_stale : Bool
    reject_future : Bool
    reject_control : Bool
    invalid_penalty : Int
    stale_penalty : Int
    future_penalty : Int
    missing_source_penalty : Int
    enabled : Bool
    } derive(Eq,
    Debug
    )

    A configurable quality gate for one station or an entire deployment.

    QualityGateRule::default_rule

    fn QualityGateRule::default_rule() -> QualityGateRule

    QualityGateRule::enabled

    fn QualityGateRule::enabled(self : QualityGateRule) -> Bool

    QualityGateRule::future_penalty

    fn QualityGateRule::future_penalty(self : QualityGateRule) -> Int

    QualityGateRule::future_skew

    fn QualityGateRule::future_skew(self : QualityGateRule) -> Int

    QualityGateRule::id

    fn QualityGateRule::id(self : QualityGateRule) -> Int

    QualityGateRule::invalid_penalty

    fn QualityGateRule::invalid_penalty(self : QualityGateRule) -> Int

    QualityGateRule::max_age

    fn QualityGateRule::max_age(self : QualityGateRule) -> Int

    QualityGateRule::missing_source_penalty

    fn QualityGateRule::missing_source_penalty(self : QualityGateRule) -> Int

    QualityGateRule::name

    fn QualityGateRule::name(self : QualityGateRule) -> String

    QualityGateRule::new

    fn QualityGateRule::new(id : Int, name : String, max_age? : Int, future_skew? : Int, require_source? : Bool, reject_invalid? : Bool, reject_stale? : Bool, reject_future? : Bool, reject_control? : Bool, invalid_penalty? : Int, stale_penalty? : Int, future_penalty? : Int, missing_source_penalty? : Int, enabled? : Bool) -> Result[QualityGateRule, String]

    QualityGateRule::reject_control

    fn QualityGateRule::reject_control(self : QualityGateRule) -> Bool

    QualityGateRule::reject_future

    fn QualityGateRule::reject_future(self : QualityGateRule) -> Bool

    QualityGateRule::reject_invalid

    fn QualityGateRule::reject_invalid(self : QualityGateRule) -> Bool

    QualityGateRule::reject_stale

    fn QualityGateRule::reject_stale(self : QualityGateRule) -> Bool

    QualityGateRule::require_source

    fn QualityGateRule::require_source(self : QualityGateRule) -> Bool

    QualityGateRule::stale_penalty

    fn QualityGateRule::stale_penalty(self : QualityGateRule) -> Int

    QualityGateRule::with_enabled

    fn QualityGateRule::with_enabled(self : QualityGateRule, enabled : Bool) -> QualityGateRule

    QualityPolicyEngine

    pub struct QualityPolicyEngine {
    rules : Map[Int, QualityGateRule]
    station_rules : Map[Int, Int]
    history : Array[QualityEvaluation]
    history_limit : Int
    metrics : QualityPolicyMetrics
    } derive(
    Debug
    )

    Bounded policy engine keyed by rule id and station common address.

    QualityPolicyEngine::accepts_point

    fn QualityPolicyEngine::accepts_point(self : QualityPolicyEngine, station : CommonAddress, record : PointRecord, now : Int) -> Bool

    QualityPolicyEngine::accepts_sample

    fn QualityPolicyEngine::accepts_sample(self : QualityPolicyEngine, sample : TelemetrySample, now : Int) -> Bool

    QualityPolicyEngine::assign

    fn QualityPolicyEngine::assign(self : QualityPolicyEngine, station : CommonAddress, rule_id : Int) -> Result[Unit, String]

    QualityPolicyEngine::assigned_rule

    fn QualityPolicyEngine::assigned_rule(self : QualityPolicyEngine, station : CommonAddress) -> Int

    QualityPolicyEngine::assigned_stations

    QualityPolicyEngine::audit_lines

    fn QualityPolicyEngine::audit_lines(self : QualityPolicyEngine) -> Array[String]

    QualityPolicyEngine::clear_history

    fn QualityPolicyEngine::clear_history(self : QualityPolicyEngine) -> Unit

    QualityPolicyEngine::enabled_rule_ids

    fn QualityPolicyEngine::enabled_rule_ids(self : QualityPolicyEngine) -> Array[Int]

    QualityPolicyEngine::evaluate_object

    fn QualityPolicyEngine::evaluate_object(self : QualityPolicyEngine, station : CommonAddress, object : ApplicationObject, source : String, timestamp : Int, now : Int) -> QualityEvaluation

    QualityPolicyEngine::evaluate_point

    fn QualityPolicyEngine::evaluate_point(self : QualityPolicyEngine, station : CommonAddress, record : PointRecord, now : Int) -> QualityEvaluation

    QualityPolicyEngine::evaluate_records

    fn QualityPolicyEngine::evaluate_records(self : QualityPolicyEngine, station : CommonAddress, records : Array[PointRecord], now : Int) -> QualityPolicyReport

    QualityPolicyEngine::evaluate_sample

    fn QualityPolicyEngine::evaluate_sample(self : QualityPolicyEngine, sample : TelemetrySample, now : Int) -> QualityEvaluation

    QualityPolicyEngine::evaluate_store

    fn QualityPolicyEngine::evaluate_store(self : QualityPolicyEngine, store : PointStore, now : Int) -> QualityPolicyReport

    QualityPolicyEngine::filter_accepted

    QualityPolicyEngine::filter_rejected

    QualityPolicyEngine::finding_counts

    fn QualityPolicyEngine::finding_counts(_self : QualityPolicyEngine, evaluations : Array[QualityEvaluation]) -> Map[String, Int]

    QualityPolicyEngine::history

    QualityPolicyEngine::history_len

    fn QualityPolicyEngine::history_len(self : QualityPolicyEngine) -> Int

    QualityPolicyEngine::history_since

    fn QualityPolicyEngine::history_since(self : QualityPolicyEngine, evaluated_at : Int) -> Array[QualityEvaluation]

    QualityPolicyEngine::metrics

    QualityPolicyEngine::new

    fn QualityPolicyEngine::new(history_limit? : Int) -> Result[QualityPolicyEngine, String]

    QualityPolicyEngine::register_rule

    fn QualityPolicyEngine::register_rule(self : QualityPolicyEngine, rule : QualityGateRule) -> Result[Unit, String]

    QualityPolicyEngine::rejected_history

    QualityPolicyEngine::remove_assignment

    fn QualityPolicyEngine::remove_assignment(self : QualityPolicyEngine, station : CommonAddress) -> Bool

    QualityPolicyEngine::remove_rule

    fn QualityPolicyEngine::remove_rule(self : QualityPolicyEngine, id : Int) -> Result[Unit, String]

    QualityPolicyEngine::replace_rule

    fn QualityPolicyEngine::replace_rule(self : QualityPolicyEngine, rule : QualityGateRule) -> Result[Unit, String]

    QualityPolicyEngine::rule

    QualityPolicyEngine::rule_ids

    fn QualityPolicyEngine::rule_ids(self : QualityPolicyEngine) -> Array[Int]

    QualityPolicyEngine::rule_lines

    fn QualityPolicyEngine::rule_lines(self : QualityPolicyEngine) -> Array[String]

    QualityPolicyEngine::snapshot

    QualityPolicyEngine::station_rule

    QualityPolicyEngine::stations_for_rule

    fn QualityPolicyEngine::stations_for_rule(self : QualityPolicyEngine, rule_id : Int) -> Array[CommonAddress]

    QualityPolicyEngine::unassign

    fn QualityPolicyEngine::unassign(self : QualityPolicyEngine, station : CommonAddress) -> Unit

    QualityPolicyEngine::validate_configuration

    fn QualityPolicyEngine::validate_configuration(self : QualityPolicyEngine) -> Array[String]

    QualityPolicyMetrics

    pub struct QualityPolicyMetrics {
    evaluated : Int
    accepted : Int
    degraded : Int
    rejected : Int
    invalid : Int
    stale : Int
    future : Int
    missing_source : Int
    control_blocked : Int
    } derive(Eq,
    Debug
    )

    Aggregate counters used by dashboards and acceptance reports.

    QualityPolicyMetrics::acceptance_percent

    fn QualityPolicyMetrics::acceptance_percent(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::accepted

    fn QualityPolicyMetrics::accepted(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::control_blocked

    fn QualityPolicyMetrics::control_blocked(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::degraded

    fn QualityPolicyMetrics::degraded(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::evaluated

    fn QualityPolicyMetrics::evaluated(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::future

    fn QualityPolicyMetrics::future(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::has_rejections

    fn QualityPolicyMetrics::has_rejections(self : QualityPolicyMetrics) -> Bool

    QualityPolicyMetrics::invalid

    fn QualityPolicyMetrics::invalid(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::missing_source

    fn QualityPolicyMetrics::missing_source(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::new

    QualityPolicyMetrics::quality_percent

    fn QualityPolicyMetrics::quality_percent(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::rejected

    fn QualityPolicyMetrics::rejected(self : QualityPolicyMetrics) -> Int

    QualityPolicyMetrics::stale

    QualityPolicyMetrics::total_findings

    fn QualityPolicyMetrics::total_findings(self : QualityPolicyMetrics) -> Int

    QualityPolicyReport

    pub struct QualityPolicyReport {
    total : Int
    accepted : Int
    degraded : Int
    rejected : Int
    evaluations : Array[QualityEvaluation]
    } derive(
    Debug
    )

    Summary returned after evaluating a point-store snapshot.

    QualityPolicyReport::accepted

    fn QualityPolicyReport::accepted(self : QualityPolicyReport) -> Int

    QualityPolicyReport::degraded

    fn QualityPolicyReport::degraded(self : QualityPolicyReport) -> Int

    QualityPolicyReport::evaluations

    QualityPolicyReport::has_rejections

    fn QualityPolicyReport::has_rejections(self : QualityPolicyReport) -> Bool

    QualityPolicyReport::quality_percent

    fn QualityPolicyReport::quality_percent(self : QualityPolicyReport) -> Int

    QualityPolicyReport::rejected

    fn QualityPolicyReport::rejected(self : QualityPolicyReport) -> Int

    QualityPolicyReport::total

    fn QualityPolicyReport::total(self : QualityPolicyReport) -> Int

    QualityPolicySnapshot

    pub struct QualityPolicySnapshot {
    rule_count : Int
    assignment_count : Int
    history_count : Int
    metrics : QualityPolicyMetrics
    configuration_issues : Array[String]
    } derive(
    Debug
    )

    QualityPolicySnapshot::assignment_count

    fn QualityPolicySnapshot::assignment_count(self : QualityPolicySnapshot) -> Int

    QualityPolicySnapshot::configuration_issues

    fn QualityPolicySnapshot::configuration_issues(self : QualityPolicySnapshot) -> Array[String]

    QualityPolicySnapshot::history_count

    fn QualityPolicySnapshot::history_count(self : QualityPolicySnapshot) -> Int

    QualityPolicySnapshot::metrics

    QualityPolicySnapshot::rule_count

    fn QualityPolicySnapshot::rule_count(self : QualityPolicySnapshot) -> Int

    RateLimiter

    pub struct RateLimiter {
    window_start : Int
    window_size : Int
    limit : Int
    used : Int
    } derive(Eq,
    Debug
    )

    A fixed-window rate limiter for commands and diagnostics.

    RateLimiter::allow

    fn RateLimiter::allow(self : RateLimiter, now : Int) -> Bool

    RateLimiter::new

    fn RateLimiter::new(window_size : Int, limit : Int) -> Result[RateLimiter, String]

    RateLimiter::remaining

    fn RateLimiter::remaining(self : RateLimiter) -> Int

    RateLimiter::used

    fn RateLimiter::used(self : RateLimiter) -> Int

    RateRule

    pub struct RateRule {
    maximum_per_second : Float
    minimum_interval : Int
    } derive(Eq,
    Debug
    )

    Rate-of-change rule for detecting stale or physically implausible updates.

    RateRule::maximum_per_second

    fn RateRule::maximum_per_second(self : RateRule) -> Float

    RateRule::minimum_interval

    fn RateRule::minimum_interval(self : RateRule) -> Int

    RateRule::new

    fn RateRule::new(maximum_per_second : Float, minimum_interval? : Int) -> Result[RateRule, String]

    RateRule::within

    fn RateRule::within(self : RateRule, previous : TelemetrySample, current : TelemetrySample) -> Bool

    ReadTransaction

    pub struct ReadTransaction {
    request : ServiceRequest
    status : ServiceStatus
    } derive(
    Debug
    )

    Read service state for a single information object.

    ReadTransaction::activate

    fn ReadTransaction::activate(self : ReadTransaction) -> Result[Unit, String]

    ReadTransaction::complete

    fn ReadTransaction::complete(self : ReadTransaction, object : ApplicationObject) -> Result[ServiceResponse, String]

    ReadTransaction::new

    fn ReadTransaction::new(request : ServiceRequest) -> Result[ReadTransaction, String]

    ReadTransaction::reject

    fn ReadTransaction::reject(self : ReadTransaction, message : String) -> ServiceResponse

    ReadTransaction::status

    RedundancyManager

    pub struct RedundancyManager {
    station : CommonAddress
    peers : Map[Int, RedundantPeer]
    events : Array[FailoverEvent]
    event_limit : Int
    policy : RedundancyPolicy
    owner : Int?
    last_takeover : Int
    fencing_token : Int
    metrics : RedundancyMetrics
    } derive(
    Debug
    )

    Deterministic primary/standby ownership manager.

    RedundancyManager::add_peer

    fn RedundancyManager::add_peer(self : RedundancyManager, peer : RedundantPeer) -> Result[Unit, String]

    RedundancyManager::elect

    fn RedundancyManager::elect(self : RedundancyManager, now : Int) -> Result[FailoverEvent?, String]

    RedundancyManager::events

    RedundancyManager::fencing_token

    fn RedundancyManager::fencing_token(self : RedundancyManager) -> Int

    RedundancyManager::heartbeat

    fn RedundancyManager::heartbeat(self : RedundancyManager, id : Int, now : Int) -> Result[LinkHealth, String]

    RedundancyManager::manual_takeover

    fn RedundancyManager::manual_takeover(self : RedundancyManager, id : Int, now : Int) -> Result[FailoverEvent, String]

    RedundancyManager::metrics

    RedundancyManager::new

    fn RedundancyManager::new(station : CommonAddress, policy? : RedundancyPolicy, event_limit? : Int) -> Result[RedundancyManager, String]

    RedundancyManager::owner

    fn RedundancyManager::owner(self : RedundancyManager) -> Int?

    RedundancyManager::peer

    fn RedundancyManager::peer(self : RedundancyManager, id : Int) -> RedundantPeer?

    RedundancyManager::peer_count

    fn RedundancyManager::peer_count(self : RedundancyManager) -> Int

    RedundancyManager::policy

    RedundancyManager::remove_peer

    fn RedundancyManager::remove_peer(self : RedundancyManager, id : Int) -> Result[Unit, String]

    RedundancyManager::station

    RedundancyManager::tick

    fn RedundancyManager::tick(self : RedundancyManager, now : Int) -> Array[FailoverEvent]

    RedundancyMetrics

    pub struct RedundancyMetrics {
    heartbeats : Int
    missed : Int
    elections : Int
    takeovers : Int
    recoveries : Int
    fenced : Int
    } derive(Eq,
    Debug
    )

    Runtime metrics for redundant links.

    RedundancyMetrics::elections

    fn RedundancyMetrics::elections(self : RedundancyMetrics) -> Int

    RedundancyMetrics::fenced

    fn RedundancyMetrics::fenced(self : RedundancyMetrics) -> Int

    RedundancyMetrics::heartbeats

    fn RedundancyMetrics::heartbeats(self : RedundancyMetrics) -> Int

    RedundancyMetrics::missed

    fn RedundancyMetrics::missed(self : RedundancyMetrics) -> Int

    RedundancyMetrics::new

    RedundancyMetrics::recoveries

    fn RedundancyMetrics::recoveries(self : RedundancyMetrics) -> Int

    RedundancyMetrics::takeovers

    fn RedundancyMetrics::takeovers(self : RedundancyMetrics) -> Int

    RedundancyPolicy

    pub struct RedundancyPolicy {
    heartbeat_interval : Int
    failure_threshold : Int
    recovery_threshold : Int
    takeover_cooldown : Int
    require_fencing : Bool
    } derive(Eq,
    Debug
    )

    RedundancyPolicy::failure_threshold

    fn RedundancyPolicy::failure_threshold(self : RedundancyPolicy) -> Int

    RedundancyPolicy::heartbeat_interval

    fn RedundancyPolicy::heartbeat_interval(self : RedundancyPolicy) -> Int

    RedundancyPolicy::new

    fn RedundancyPolicy::new(heartbeat_interval? : Int, failure_threshold? : Int, recovery_threshold? : Int, takeover_cooldown? : Int, require_fencing? : Bool) -> Result[RedundancyPolicy, String]

    RedundancyPolicy::recovery_threshold

    fn RedundancyPolicy::recovery_threshold(self : RedundancyPolicy) -> Int

    RedundancyPolicy::require_fencing

    fn RedundancyPolicy::require_fencing(self : RedundancyPolicy) -> Bool

    RedundancyPolicy::takeover_cooldown

    fn RedundancyPolicy::takeover_cooldown(self : RedundancyPolicy) -> Int

    RedundantPeer

    pub struct RedundantPeer {
    id : Int
    station : CommonAddress
    priority : Int
    role : RedundantRole
    health : LinkHealth
    missed_heartbeats : Int
    recovered_heartbeats : Int
    last_heartbeat : Int
    fencing_token : Int
    endpoint : String
    } derive(Eq,
    Debug
    )

    Peer endpoint participating in station ownership election.

    RedundantPeer::endpoint

    fn RedundantPeer::endpoint(self : RedundantPeer) -> String

    RedundantPeer::fencing_token

    fn RedundantPeer::fencing_token(self : RedundantPeer) -> Int

    RedundantPeer::health

    fn RedundantPeer::health(self : RedundantPeer) -> LinkHealth

    RedundantPeer::id

    fn RedundantPeer::id(self : RedundantPeer) -> Int

    RedundantPeer::last_heartbeat

    fn RedundantPeer::last_heartbeat(self : RedundantPeer) -> Int

    RedundantPeer::missed_heartbeats

    fn RedundantPeer::missed_heartbeats(self : RedundantPeer) -> Int

    RedundantPeer::new

    fn RedundantPeer::new(id : Int, station : CommonAddress, priority : Int, endpoint : String) -> Result[RedundantPeer, String]

    RedundantPeer::priority

    fn RedundantPeer::priority(self : RedundantPeer) -> Int

    RedundantPeer::recovered_heartbeats

    fn RedundantPeer::recovered_heartbeats(self : RedundantPeer) -> Int

    RedundantPeer::role

    RedundantPeer::station

    RedundantRole

    pub enum RedundantRole {
    PrimaryLink
    StandbyLink
    CandidateLink
    FencedLink
    } derive(Eq,
    Debug
    )

    Role of a redundant IEC 104 link endpoint.

    RedundantRole::examples

    fn RedundantRole::examples() -> Array[RedundantRole]

    ReplayGuard

    pub struct ReplayGuard {
    seen : Map[UInt, Int]
    ttl : Int
    limit : Int
    } derive(
    Debug
    )

    Replay guard keyed by APDU checksum and a bounded time interval.

    ReplayGuard::is_replay

    fn ReplayGuard::is_replay(self : ReplayGuard, frame : Bytes, now : Int) -> Bool

    ReplayGuard::len

    fn ReplayGuard::len(self : ReplayGuard) -> Int

    ReplayGuard::new

    fn ReplayGuard::new(ttl : Int, limit : Int) -> Result[ReplayGuard, String]

    ReplayGuard::purge

    fn ReplayGuard::purge(self : ReplayGuard, now : Int) -> Int

    ReplayGuard::remember

    fn ReplayGuard::remember(self : ReplayGuard, frame : Bytes, now : Int) -> Result[Unit, String]

    ResourceLimits

    pub struct ResourceLimits {
    max_apdu : Int
    max_asdu : Int
    max_objects : Int
    max_history : Int
    max_commands : Int
    max_trace_events : Int
    } derive(Eq,
    Debug
    )

    Resource limits prevent malformed peers from exhausting a gateway.

    ResourceLimits::default

    ResourceLimits::max_apdu

    fn ResourceLimits::max_apdu(self : ResourceLimits) -> Int

    ResourceLimits::max_asdu

    fn ResourceLimits::max_asdu(self : ResourceLimits) -> Int

    ResourceLimits::max_commands

    fn ResourceLimits::max_commands(self : ResourceLimits) -> Int

    ResourceLimits::max_history

    fn ResourceLimits::max_history(self : ResourceLimits) -> Int

    ResourceLimits::max_objects

    fn ResourceLimits::max_objects(self : ResourceLimits) -> Int

    ResourceLimits::max_trace_events

    fn ResourceLimits::max_trace_events(self : ResourceLimits) -> Int

    ResourceLimits::new

    fn ResourceLimits::new(max_apdu : Int, max_asdu : Int, max_objects : Int, max_history : Int, max_commands : Int, max_trace_events : Int) -> Result[ResourceLimits, String]

    RetryPolicy

    pub struct RetryPolicy {
    max_attempts : Int
    timeout : Int
    backoff : Int
    retry_rejected : Bool
    } derive(Eq,
    Debug
    )

    Retry and timeout policy for a command family.

    RetryPolicy::backoff

    fn RetryPolicy::backoff(self : RetryPolicy) -> Int

    RetryPolicy::max_attempts

    fn RetryPolicy::max_attempts(self : RetryPolicy) -> Int

    RetryPolicy::new

    fn RetryPolicy::new(max_attempts? : Int, timeout? : Int, backoff? : Int, retry_rejected? : Bool) -> Result[RetryPolicy, String]

    RetryPolicy::retry_rejected

    fn RetryPolicy::retry_rejected(self : RetryPolicy) -> Bool

    RetryPolicy::timeout

    fn RetryPolicy::timeout(self : RetryPolicy) -> Int

    RouteDecision

    pub struct RouteDecision {
    accepted : Bool
    rule_id : Int?
    action : RoutingAction
    source : Int
    destination : Int
    object : ApplicationObject
    reason : String
    } derive(
    Debug
    )

    RouteDecision::accepted

    fn RouteDecision::accepted(self : RouteDecision) -> Bool

    RouteDecision::action

    RouteDecision::destination

    fn RouteDecision::destination(self : RouteDecision) -> Int

    RouteDecision::object

    RouteDecision::reason

    fn RouteDecision::reason(self : RouteDecision) -> String

    RouteDecision::rule_id

    fn RouteDecision::rule_id(self : RouteDecision) -> Int?

    RouteDecision::source

    fn RouteDecision::source(self : RouteDecision) -> Int

    RoutedObject

    pub struct RoutedObject {
    decision : RouteDecision
    timestamp : Int
    sequence : Int
    } derive(
    Debug
    )

    RoutedObject::decision

    fn RoutedObject::decision(self : RoutedObject) -> RouteDecision

    RoutedObject::sequence

    fn RoutedObject::sequence(self : RoutedObject) -> Int

    RoutedObject::timestamp

    fn RoutedObject::timestamp(self : RoutedObject) -> Int

    RouterMetrics

    pub struct RouterMetrics {
    evaluated : Int
    forwarded : Int
    stored : Int
    rejected : Int
    dropped : Int
    queue_overflow : Int
    } derive(Eq,
    Debug
    )

    RouterMetrics::dropped

    fn RouterMetrics::dropped(self : RouterMetrics) -> Int

    RouterMetrics::evaluated

    fn RouterMetrics::evaluated(self : RouterMetrics) -> Int

    RouterMetrics::forwarded

    fn RouterMetrics::forwarded(self : RouterMetrics) -> Int

    RouterMetrics::new

    RouterMetrics::queue_overflow

    fn RouterMetrics::queue_overflow(self : RouterMetrics) -> Int

    RouterMetrics::rejected

    fn RouterMetrics::rejected(self : RouterMetrics) -> Int

    RouterMetrics::stored

    fn RouterMetrics::stored(self : RouterMetrics) -> Int

    RoutingAction

    pub enum RoutingAction {
    RouteStore
    RouteForward
    RouteStoreAndForward
    RouteDrop
    RouteReject
    } derive(Eq,
    Debug
    )

    Routing action selected for an address-qualified application object.

    RoutingRule

    pub struct RoutingRule {
    id : Int
    source : Int
    destination : Int
    common_address : CommonAddress?
    type_ids : Array[ApplicationType]
    action : RoutingAction
    priority : Int
    enabled : Bool
    } derive(Eq,
    Debug
    )

    RoutingRule::action

    fn RoutingRule::action(self : RoutingRule) -> RoutingAction

    RoutingRule::common_address

    fn RoutingRule::common_address(self : RoutingRule) -> CommonAddress?

    RoutingRule::destination

    fn RoutingRule::destination(self : RoutingRule) -> Int

    RoutingRule::disable

    fn RoutingRule::disable(self : RoutingRule) -> Unit

    RoutingRule::enabled

    fn RoutingRule::enabled(self : RoutingRule) -> Bool

    RoutingRule::id

    fn RoutingRule::id(self : RoutingRule) -> Int

    RoutingRule::new

    fn RoutingRule::new(id : Int, source : Int, destination : Int, action : RoutingAction, common_address? : CommonAddress, type_ids? : Array[ApplicationType], priority? : Int) -> Result[RoutingRule, String]

    RoutingRule::priority

    fn RoutingRule::priority(self : RoutingRule) -> Int

    RoutingRule::source

    fn RoutingRule::source(self : RoutingRule) -> Int

    RoutingRule::type_ids

    fn RoutingRule::type_ids(self : RoutingRule) -> Array[ApplicationType]

    RuntimeConfig

    pub struct RuntimeConfig {
    event_limit : Int
    audit_limit : Int
    scheduler_audit_limit : Int
    file_history_limit : Int
    file_capacity : Int
    file_maximum_size : Int
    telemetry_alarm_limit : Int
    redundancy_policy : RedundancyPolicy
    } derive(
    Debug
    )

    Runtime-wide limits and policy defaults.

    RuntimeConfig::audit_limit

    fn RuntimeConfig::audit_limit(self : RuntimeConfig) -> Int

    RuntimeConfig::default

    fn RuntimeConfig::default() -> RuntimeConfig

    RuntimeConfig::event_limit

    fn RuntimeConfig::event_limit(self : RuntimeConfig) -> Int

    RuntimeConfig::file_capacity

    fn RuntimeConfig::file_capacity(self : RuntimeConfig) -> Int

    RuntimeConfig::file_history_limit

    fn RuntimeConfig::file_history_limit(self : RuntimeConfig) -> Int

    RuntimeConfig::file_maximum_size

    fn RuntimeConfig::file_maximum_size(self : RuntimeConfig) -> Int

    RuntimeConfig::new

    fn RuntimeConfig::new(event_limit? : Int, audit_limit? : Int, scheduler_audit_limit? : Int, file_history_limit? : Int, file_capacity? : Int, file_maximum_size? : Int, telemetry_alarm_limit? : Int, redundancy_policy? : RedundancyPolicy) -> Result[RuntimeConfig, String]

    RuntimeConfig::redundancy_policy

    fn RuntimeConfig::redundancy_policy(self : RuntimeConfig) -> RedundancyPolicy

    RuntimeConfig::scheduler_audit_limit

    fn RuntimeConfig::scheduler_audit_limit(self : RuntimeConfig) -> Int

    RuntimeConfig::telemetry_alarm_limit

    fn RuntimeConfig::telemetry_alarm_limit(self : RuntimeConfig) -> Int

    RuntimeEvent

    pub struct RuntimeEvent {
    sequence : Int
    timestamp : Int
    kind : RuntimeEventKind
    station : CommonAddress?
    object : InformationAddress?
    correlation : Int
    message : String
    } derive(Eq,
    Debug
    )

    RuntimeEvent::correlation

    fn RuntimeEvent::correlation(self : RuntimeEvent) -> Int

    RuntimeEvent::kind

    RuntimeEvent::message

    fn RuntimeEvent::message(self : RuntimeEvent) -> String

    RuntimeEvent::object

    RuntimeEvent::sequence

    fn RuntimeEvent::sequence(self : RuntimeEvent) -> Int

    RuntimeEvent::station

    fn RuntimeEvent::station(self : RuntimeEvent) -> CommonAddress?

    RuntimeEvent::timestamp

    fn RuntimeEvent::timestamp(self : RuntimeEvent) -> Int

    RuntimeEventKind

    pub enum RuntimeEventKind {
    RuntimeStarted
    StationRegisteredRuntime
    TelemetryAcceptedRuntime
    TelemetryRejectedRuntime
    CommandSubmittedRuntime
    CommandDispatchedRuntime
    CommandCompletedRuntime
    FileSessionRuntime
    RedundancyRuntime
    RuntimeDiagnostic
    } derive(Eq,
    Debug
    )

    Runtime event categories exposed by the integration facade.

    RuntimeHealth

    pub struct RuntimeHealth {
    timestamp : Int
    revision : Int
    stations : Int
    points : Int
    pending_commands : Int
    active_alarms : Int
    active_sessions : Int
    redundancy_owners : Int
    event_count : Int
    policy_revision : Int
    healthy : Bool
    message : String
    } derive(Eq,
    Debug
    )

    Runtime health summary for control-room endpoints.

    RuntimeHealth::active_alarms

    fn RuntimeHealth::active_alarms(self : RuntimeHealth) -> Int

    RuntimeHealth::active_sessions

    fn RuntimeHealth::active_sessions(self : RuntimeHealth) -> Int

    RuntimeHealth::event_count

    fn RuntimeHealth::event_count(self : RuntimeHealth) -> Int

    RuntimeHealth::healthy

    fn RuntimeHealth::healthy(self : RuntimeHealth) -> Bool

    RuntimeHealth::message

    fn RuntimeHealth::message(self : RuntimeHealth) -> String

    RuntimeHealth::pending_commands

    fn RuntimeHealth::pending_commands(self : RuntimeHealth) -> Int

    RuntimeHealth::points

    fn RuntimeHealth::points(self : RuntimeHealth) -> Int

    RuntimeHealth::policy_revision

    fn RuntimeHealth::policy_revision(self : RuntimeHealth) -> Int

    RuntimeHealth::redundancy_owners

    fn RuntimeHealth::redundancy_owners(self : RuntimeHealth) -> Int

    RuntimeHealth::revision

    fn RuntimeHealth::revision(self : RuntimeHealth) -> Int

    RuntimeHealth::stations

    fn RuntimeHealth::stations(self : RuntimeHealth) -> Int

    RuntimeHealth::timestamp

    fn RuntimeHealth::timestamp(self : RuntimeHealth) -> Int

    RuntimeMetrics

    pub struct RuntimeMetrics {
    telemetry_received : Int
    telemetry_accepted : Int
    telemetry_rejected : Int
    commands_submitted : Int
    commands_dispatched : Int
    commands_completed : Int
    diagnostics : Int
    } derive(Eq,
    Debug
    )

    Aggregated runtime counters.

    RuntimeMetrics::commands_completed

    fn RuntimeMetrics::commands_completed(self : RuntimeMetrics) -> Int

    RuntimeMetrics::commands_dispatched

    fn RuntimeMetrics::commands_dispatched(self : RuntimeMetrics) -> Int

    RuntimeMetrics::commands_submitted

    fn RuntimeMetrics::commands_submitted(self : RuntimeMetrics) -> Int

    RuntimeMetrics::diagnostics

    fn RuntimeMetrics::diagnostics(self : RuntimeMetrics) -> Int

    RuntimeMetrics::new

    RuntimeMetrics::telemetry_accepted

    fn RuntimeMetrics::telemetry_accepted(self : RuntimeMetrics) -> Int

    RuntimeMetrics::telemetry_received

    fn RuntimeMetrics::telemetry_received(self : RuntimeMetrics) -> Int

    RuntimeMetrics::telemetry_rejected

    fn RuntimeMetrics::telemetry_rejected(self : RuntimeMetrics) -> Int

    ScaledValue

    pub struct ScaledValue {
    value : Int
    quality : QualityDescriptor
    } derive(Eq,
    Debug
    )

    Signed 16-bit scaled measurement.

    ScaledValue::new

    fn ScaledValue::new(value : Int, quality? : QualityDescriptor) -> Result[ScaledValue, String]

    ScaledValue::quality

    ScaledValue::to_array

    fn ScaledValue::to_array(self : ScaledValue) -> Array[Byte]

    ScaledValue::value

    fn ScaledValue::value(self : ScaledValue) -> Int

    Scenario

    pub struct Scenario {
    name : String
    duration : Int
    steps : Array[ScenarioStep]
    fail_fast : Bool
    } derive(
    Debug
    )

    Scenario::add

    fn Scenario::add(self : Scenario, action : ScenarioAction, at : Int, label : String) -> Result[Unit, String]

    Scenario::duration

    fn Scenario::duration(self : Scenario) -> Int

    Scenario::fail_fast

    fn Scenario::fail_fast(self : Scenario) -> Bool

    Scenario::name

    fn Scenario::name(self : Scenario) -> String

    Scenario::new

    fn Scenario::new(name : String, duration : Int, fail_fast? : Bool) -> Result[Scenario, String]

    Scenario::steps

    fn Scenario::steps(self : Scenario) -> Array[ScenarioStep]

    ScenarioAction

    pub enum ScenarioAction {
    WaitScenario(Int)
    HeartbeatScenario(Int)
    ReceiveApduScenario(Bytes)
    SendApduScenario(Bytes)
    SetPointScenario(InformationAddress, Int)
    RaiseDiagnosticScenario(String)
    ClearDiagnosticScenario
    CheckpointScenario(String)
    } derive(
    Debug
    )

    Actions available in deterministic station integration scenarios.

    ScenarioContext

    pub struct ScenarioContext {
    now : Int
    received : Int
    sent : Int
    heartbeats : Int
    points : Map[Int, Int]
    diagnostics : Array[String]
    } derive(
    Debug
    )

    ScenarioContext::diagnostics

    fn ScenarioContext::diagnostics(self : ScenarioContext) -> Array[String]

    ScenarioContext::heartbeats

    fn ScenarioContext::heartbeats(self : ScenarioContext) -> Int

    ScenarioContext::new

    ScenarioContext::now

    fn ScenarioContext::now(self : ScenarioContext) -> Int

    ScenarioContext::point

    fn ScenarioContext::point(self : ScenarioContext, address : InformationAddress) -> Int?

    ScenarioContext::received

    fn ScenarioContext::received(self : ScenarioContext) -> Int

    ScenarioContext::sent

    fn ScenarioContext::sent(self : ScenarioContext) -> Int

    ScenarioObservation

    pub struct ScenarioObservation {
    step : Int
    timestamp : Int
    label : String
    success : Bool
    detail : String
    } derive(Eq,
    Debug
    )

    ScenarioObservation::detail

    fn ScenarioObservation::detail(self : ScenarioObservation) -> String

    ScenarioObservation::label

    fn ScenarioObservation::label(self : ScenarioObservation) -> String

    ScenarioObservation::step

    ScenarioObservation::success

    fn ScenarioObservation::success(self : ScenarioObservation) -> Bool

    ScenarioObservation::timestamp

    fn ScenarioObservation::timestamp(self : ScenarioObservation) -> Int

    ScenarioResult

    pub struct ScenarioResult {
    name : String
    completed : Bool
    elapsed : Int
    observations : Array[ScenarioObservation]
    checkpoints : Array[String]
    failures : Array[String]
    } derive(
    Debug
    )

    ScenarioResult::checkpoints

    fn ScenarioResult::checkpoints(self : ScenarioResult) -> Array[String]

    ScenarioResult::completed

    fn ScenarioResult::completed(self : ScenarioResult) -> Bool

    ScenarioResult::elapsed

    fn ScenarioResult::elapsed(self : ScenarioResult) -> Int

    ScenarioResult::failures

    fn ScenarioResult::failures(self : ScenarioResult) -> Array[String]

    ScenarioResult::name

    fn ScenarioResult::name(self : ScenarioResult) -> String

    ScenarioResult::observations

    ScenarioRunner

    pub struct ScenarioRunner {
    context : ScenarioContext
    results : Array[ScenarioResult]
    run_count : Int
    } derive(
    Debug
    )

    ScenarioRunner::context

    ScenarioRunner::new

    ScenarioRunner::results

    ScenarioRunner::run

    fn ScenarioRunner::run(self : ScenarioRunner, scenario : Scenario) -> ScenarioResult

    ScenarioRunner::run_count

    fn ScenarioRunner::run_count(self : ScenarioRunner) -> Int

    ScenarioStep

    pub struct ScenarioStep {
    index : Int
    at : Int
    action : ScenarioAction
    label : String
    } derive(
    Debug
    )

    ScenarioStep::action

    ScenarioStep::at

    fn ScenarioStep::at(self : ScenarioStep) -> Int

    ScenarioStep::index

    fn ScenarioStep::index(self : ScenarioStep) -> Int

    ScenarioStep::label

    fn ScenarioStep::label(self : ScenarioStep) -> String

    ScenarioStep::new

    fn ScenarioStep::new(index : Int, at : Int, action : ScenarioAction, label : String) -> Result[ScenarioStep, String]

    ScheduledAction

    pub struct ScheduledAction {
    at : Int
    ordinal : Int
    action : SimulationAction
    } derive(
    Debug
    )

    ScheduledAction::action

    ScheduledAction::at

    fn ScheduledAction::at(self : ScheduledAction) -> Int

    ScheduledAction::new

    fn ScheduledAction::new(at : Int, ordinal : Int, action : SimulationAction) -> ScheduledAction

    ScheduledAction::ordinal

    fn ScheduledAction::ordinal(self : ScheduledAction) -> Int

    SchedulerMetrics

    pub struct SchedulerMetrics {
    accepted : Int
    duplicates : Int
    rejected : Int
    dispatched : Int
    completed : Int
    failed : Int
    expired : Int
    cancelled : Int
    retried : Int
    } derive(Eq,
    Debug
    )

    Scheduler counters exposed to operational metrics.

    SchedulerMetrics::accepted

    fn SchedulerMetrics::accepted(self : SchedulerMetrics) -> Int

    SchedulerMetrics::cancelled

    fn SchedulerMetrics::cancelled(self : SchedulerMetrics) -> Int

    SchedulerMetrics::completed

    fn SchedulerMetrics::completed(self : SchedulerMetrics) -> Int

    SchedulerMetrics::dispatched

    fn SchedulerMetrics::dispatched(self : SchedulerMetrics) -> Int

    SchedulerMetrics::duplicates

    fn SchedulerMetrics::duplicates(self : SchedulerMetrics) -> Int

    SchedulerMetrics::expired

    fn SchedulerMetrics::expired(self : SchedulerMetrics) -> Int

    SchedulerMetrics::failed

    fn SchedulerMetrics::failed(self : SchedulerMetrics) -> Int

    SchedulerMetrics::new

    SchedulerMetrics::rejected

    fn SchedulerMetrics::rejected(self : SchedulerMetrics) -> Int

    SchedulerMetrics::retried

    fn SchedulerMetrics::retried(self : SchedulerMetrics) -> Int

    SequenceWindow

    pub struct SequenceWindow {
    first_unacknowledged : Int
    next_send : Int
    next_receive : Int
    capacity : Int
    } derive(Eq,
    Debug
    )

    A validated receive/send sequence window.

    SequenceWindow::acknowledge

    fn SequenceWindow::acknowledge(self : SequenceWindow, sequence : Int) -> Result[Int, String]

    SequenceWindow::available

    fn SequenceWindow::available(self : SequenceWindow) -> Int

    SequenceWindow::can_send

    fn SequenceWindow::can_send(self : SequenceWindow) -> Bool

    SequenceWindow::new

    fn SequenceWindow::new(capacity : Int) -> Result[SequenceWindow, String]

    SequenceWindow::next_receive

    fn SequenceWindow::next_receive(self : SequenceWindow) -> Int

    SequenceWindow::next_send

    fn SequenceWindow::next_send(self : SequenceWindow) -> Int

    SequenceWindow::pending

    fn SequenceWindow::pending(self : SequenceWindow) -> Int

    SequenceWindow::receive

    fn SequenceWindow::receive(self : SequenceWindow, sequence : Int) -> Result[Unit, String]

    SequenceWindow::reserve_send

    fn SequenceWindow::reserve_send(self : SequenceWindow) -> Result[Int, String]

    ServiceDefinition

    pub struct ServiceDefinition {
    name : String
    kind : SupervisorServiceKind
    dependencies : Array[ServiceDependency]
    startup_timeout : Int
    shutdown_timeout : Int
    heartbeat_interval : Int
    restart_limit : Int
    restart_backoff : Int
    enabled : Bool
    critical : Bool
    tags : Array[String]
    } derive(Eq,
    Debug
    )

    Static policy and timeouts for one managed service.

    ServiceDefinition::critical

    fn ServiceDefinition::critical(self : ServiceDefinition) -> Bool

    ServiceDefinition::dependencies

    ServiceDefinition::enabled

    fn ServiceDefinition::enabled(self : ServiceDefinition) -> Bool

    ServiceDefinition::heartbeat_interval

    fn ServiceDefinition::heartbeat_interval(self : ServiceDefinition) -> Int

    ServiceDefinition::kind

    ServiceDefinition::name

    fn ServiceDefinition::name(self : ServiceDefinition) -> String

    ServiceDefinition::new

    fn ServiceDefinition::new(name : String, kind : SupervisorServiceKind, dependencies? : Array[ServiceDependency], startup_timeout? : Int, shutdown_timeout? : Int, heartbeat_interval? : Int, restart_limit? : Int, restart_backoff? : Int, enabled? : Bool, critical? : Bool, tags? : Array[String]) -> Result[ServiceDefinition, String]

    ServiceDefinition::restart_backoff

    fn ServiceDefinition::restart_backoff(self : ServiceDefinition) -> Int

    ServiceDefinition::restart_limit

    fn ServiceDefinition::restart_limit(self : ServiceDefinition) -> Int

    ServiceDefinition::shutdown_timeout

    fn ServiceDefinition::shutdown_timeout(self : ServiceDefinition) -> Int

    ServiceDefinition::startup_timeout

    fn ServiceDefinition::startup_timeout(self : ServiceDefinition) -> Int

    ServiceDefinition::tags

    fn ServiceDefinition::tags(self : ServiceDefinition) -> Array[String]

    ServiceDependency

    pub struct ServiceDependency {
    name : String
    required : Bool
    allow_degraded : Bool
    } derive(Eq,
    Debug
    )

    A dependency edge in the service graph.

    ServiceDependency::allow_degraded

    fn ServiceDependency::allow_degraded(self : ServiceDependency) -> Bool

    ServiceDependency::name

    fn ServiceDependency::name(self : ServiceDependency) -> String

    ServiceDependency::new

    fn ServiceDependency::new(name : String, required? : Bool, allow_degraded? : Bool) -> Result[ServiceDependency, String]

    ServiceDependency::required

    fn ServiceDependency::required(self : ServiceDependency) -> Bool

    ServiceEvent

    pub struct ServiceEvent {
    sequence : Int
    timestamp : Int
    service : String
    kind : ServiceEventKind
    detail : String
    lifecycle : ServiceLifecycle
    health : ServiceHealth
    } derive(Eq,
    Debug
    )

    One bounded event emitted by the supervisor.

    ServiceEvent::detail

    fn ServiceEvent::detail(self : ServiceEvent) -> String

    ServiceEvent::health

    ServiceEvent::kind

    ServiceEvent::lifecycle

    fn ServiceEvent::lifecycle(self : ServiceEvent) -> ServiceLifecycle

    ServiceEvent::sequence

    fn ServiceEvent::sequence(self : ServiceEvent) -> Int

    ServiceEvent::service

    fn ServiceEvent::service(self : ServiceEvent) -> String

    ServiceEvent::timestamp

    fn ServiceEvent::timestamp(self : ServiceEvent) -> Int

    ServiceEventKind

    pub enum ServiceEventKind {
    ServiceRegisteredEvent
    ServiceStartedEvent
    ServiceStoppedEvent
    ServiceDrainingEvent
    ServiceFailedEvent
    ServiceBlockedEvent
    ServiceHeartbeatEvent
    ServiceHealthEvent
    ServiceRestartEvent
    ServiceLeaseEvent
    ServiceReconciledEvent
    } derive(Eq,
    Debug
    )

    Reason for a supervisor event.

    ServiceHealth

    pub enum ServiceHealth {
    HealthUnknown
    HealthHealthy
    HealthDegraded
    HealthUnhealthy
    HealthStale
    } derive(Eq,
    Debug
    )

    Health state reported by a service and evaluated by its dependants.

    ServiceHealthSummary

    pub struct ServiceHealthSummary {
    registered : Int
    running : Int
    degraded : Int
    unhealthy : Int
    stopped : Int
    failed : Int
    blocked : Int
    critical_failures : Int
    } derive(Eq,
    Debug
    )

    ServiceHealthSummary::blocked

    fn ServiceHealthSummary::blocked(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::critical_failures

    fn ServiceHealthSummary::critical_failures(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::degraded

    fn ServiceHealthSummary::degraded(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::failed

    fn ServiceHealthSummary::failed(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::new

    ServiceHealthSummary::registered

    fn ServiceHealthSummary::registered(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::running

    fn ServiceHealthSummary::running(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::stopped

    fn ServiceHealthSummary::stopped(self : ServiceHealthSummary) -> Int

    ServiceHealthSummary::unhealthy

    fn ServiceHealthSummary::unhealthy(self : ServiceHealthSummary) -> Int

    ServiceKind

    pub enum ServiceKind {
    InterrogationService
    CounterInterrogationService
    ReadService
    ClockSyncService
    CommandService
    ResetService
    DelayAcquisitionService
    } derive(Eq,
    Debug
    )

    Application service classes supported by the portable core.

    ServiceLease

    pub struct ServiceLease {
    owner : String
    acquired_at : Int
    expires_at : Int
    generation : Int
    } derive(Eq,
    Debug
    )

    A renewable lease used to fence duplicate service workers.

    ServiceLease::acquired_at

    fn ServiceLease::acquired_at(self : ServiceLease) -> Int

    ServiceLease::active

    fn ServiceLease::active(self : ServiceLease, timestamp : Int) -> Bool

    ServiceLease::expires_at

    fn ServiceLease::expires_at(self : ServiceLease) -> Int

    ServiceLease::generation

    fn ServiceLease::generation(self : ServiceLease) -> Int

    ServiceLease::new

    fn ServiceLease::new(owner : String, acquired_at : Int, expires_at : Int, generation : Int) -> Result[ServiceLease, String]

    ServiceLease::owner

    fn ServiceLease::owner(self : ServiceLease) -> String

    ServiceLifecycle

    pub enum ServiceLifecycle {
    ServiceRegistered
    ServiceStarting
    ServiceRunning
    ServiceDraining
    ServiceStopped
    ServiceFailed
    ServiceBlocked
    } derive(Eq,
    Debug
    )

    Lifecycle state used by the service supervisor.

    ServiceRecord

    pub struct ServiceRecord {
    definition : ServiceDefinition
    lifecycle : ServiceLifecycle
    health : ServiceHealth
    restart_count : Int
    last_transition : Int
    last_heartbeat : Int
    last_error : String
    generation : Int
    lease : ServiceLease?
    } derive(
    Debug
    )

    Mutable operational state retained for one service.

    ServiceRecord::definition

    ServiceRecord::generation

    fn ServiceRecord::generation(self : ServiceRecord) -> Int

    ServiceRecord::health

    ServiceRecord::is_available

    fn ServiceRecord::is_available(self : ServiceRecord) -> Bool

    ServiceRecord::is_terminal

    fn ServiceRecord::is_terminal(self : ServiceRecord) -> Bool

    ServiceRecord::kind

    ServiceRecord::last_error

    fn ServiceRecord::last_error(self : ServiceRecord) -> String

    ServiceRecord::last_heartbeat

    fn ServiceRecord::last_heartbeat(self : ServiceRecord) -> Int

    ServiceRecord::last_transition

    fn ServiceRecord::last_transition(self : ServiceRecord) -> Int

    ServiceRecord::lease

    ServiceRecord::lifecycle

    ServiceRecord::name

    fn ServiceRecord::name(self : ServiceRecord) -> String

    ServiceRecord::new

    fn ServiceRecord::new(definition : ServiceDefinition, timestamp : Int) -> ServiceRecord

    ServiceRecord::restart_count

    fn ServiceRecord::restart_count(self : ServiceRecord) -> Int

    ServiceRegistry

    pub struct ServiceRegistry {
    records : Map[String, ServiceRecord]
    events : Array[ServiceEvent]
    event_limit : Int
    next_sequence : Int
    topology_revision : Int
    } derive(
    Debug
    )

    Bounded service registry and dependency-aware supervisor.

    ServiceRegistry::acquire_lease

    fn ServiceRegistry::acquire_lease(self : ServiceRegistry, name : String, owner : String, timestamp : Int, ttl : Int) -> Result[ServiceLease, String]

    ServiceRegistry::blocked

    fn ServiceRegistry::blocked(self : ServiceRegistry) -> Array[String]

    ServiceRegistry::critical_services

    fn ServiceRegistry::critical_services(self : ServiceRegistry) -> Array[String]

    ServiceRegistry::definition

    fn ServiceRegistry::definition(self : ServiceRegistry, name : String) -> ServiceDefinition?

    ServiceRegistry::dependants

    fn ServiceRegistry::dependants(self : ServiceRegistry, name : String) -> Array[String]

    ServiceRegistry::dependencies_ready

    fn ServiceRegistry::dependencies_ready(self : ServiceRegistry, name : String) -> Result[Bool, String]

    ServiceRegistry::event_lines

    fn ServiceRegistry::event_lines(self : ServiceRegistry) -> Array[String]

    ServiceRegistry::events

    ServiceRegistry::events_since

    fn ServiceRegistry::events_since(self : ServiceRegistry, sequence : Int) -> Array[ServiceEvent]

    ServiceRegistry::expire_leases

    fn ServiceRegistry::expire_leases(self : ServiceRegistry, timestamp : Int) -> Array[String]

    ServiceRegistry::fail

    fn ServiceRegistry::fail(self : ServiceRegistry, name : String, timestamp : Int, message : String) -> Result[ServiceRecord, String]

    ServiceRegistry::failed

    fn ServiceRegistry::failed(self : ServiceRegistry) -> Array[String]

    ServiceRegistry::get

    fn ServiceRegistry::get(self : ServiceRegistry, name : String) -> ServiceRecord?

    ServiceRegistry::health_summary

    ServiceRegistry::heartbeat

    fn ServiceRegistry::heartbeat(self : ServiceRegistry, name : String, timestamp : Int) -> Result[ServiceRecord, String]

    ServiceRegistry::len

    fn ServiceRegistry::len(self : ServiceRegistry) -> Int

    ServiceRegistry::mark_stale

    fn ServiceRegistry::mark_stale(self : ServiceRegistry, timestamp : Int) -> Array[String]

    ServiceRegistry::names

    fn ServiceRegistry::names(self : ServiceRegistry) -> Array[String]

    ServiceRegistry::new

    fn ServiceRegistry::new(event_limit? : Int) -> Result[ServiceRegistry, String]

    ServiceRegistry::reconcile

    fn ServiceRegistry::reconcile(self : ServiceRegistry, timestamp : Int) -> Array[String]

    Start enabled services whose required dependencies are already healthy.

    ServiceRegistry::records

    ServiceRegistry::register

    fn ServiceRegistry::register(self : ServiceRegistry, definition : ServiceDefinition, timestamp : Int) -> Result[ServiceRecord, String]

    ServiceRegistry::release_lease

    fn ServiceRegistry::release_lease(self : ServiceRegistry, name : String, owner : String, timestamp : Int) -> Result[Unit, String]

    ServiceRegistry::renew_lease

    fn ServiceRegistry::renew_lease(self : ServiceRegistry, name : String, owner : String, timestamp : Int, ttl : Int) -> Result[ServiceLease, String]

    ServiceRegistry::restart

    fn ServiceRegistry::restart(self : ServiceRegistry, name : String, timestamp : Int, reason? : String) -> Result[ServiceRecord, String]

    ServiceRegistry::running

    fn ServiceRegistry::running(self : ServiceRegistry) -> Array[String]

    ServiceRegistry::set_health

    fn ServiceRegistry::set_health(self : ServiceRegistry, name : String, health : ServiceHealth, timestamp : Int, detail? : String) -> Result[ServiceRecord, String]

    ServiceRegistry::start

    fn ServiceRegistry::start(self : ServiceRegistry, name : String, timestamp : Int) -> Result[ServiceRecord, String]

    ServiceRegistry::startup_order

    fn ServiceRegistry::startup_order(self : ServiceRegistry) -> Result[Array[String], String]

    Return services in dependency order for deterministic startup planning.

    ServiceRegistry::stop

    fn ServiceRegistry::stop(self : ServiceRegistry, name : String, timestamp : Int, force? : Bool) -> Result[ServiceRecord, String]

    ServiceRegistry::topology_revision

    fn ServiceRegistry::topology_revision(self : ServiceRegistry) -> Int

    ServiceRegistry::unregister

    fn ServiceRegistry::unregister(self : ServiceRegistry, name : String, _timestamp : Int) -> Result[Unit, String]

    ServiceRequest

    pub struct ServiceRequest {
    service : ServiceKind
    address : InformationAddress
    common_address : CommonAddress
    qualifier : Int
    created_at : Int
    originator : Int
    } derive(Eq,
    Debug
    )

    An application service request independent of a transport.

    ServiceRequest::address

    ServiceRequest::common_address

    fn ServiceRequest::common_address(self : ServiceRequest) -> CommonAddress

    ServiceRequest::created_at

    fn ServiceRequest::created_at(self : ServiceRequest) -> Int

    ServiceRequest::new

    fn ServiceRequest::new(service : ServiceKind, address : InformationAddress, common_address : CommonAddress, qualifier : Int, created_at : Int, originator? : Int) -> Result[ServiceRequest, Diagnostic]

    ServiceRequest::originator

    fn ServiceRequest::originator(self : ServiceRequest) -> Int

    ServiceRequest::qualifier

    fn ServiceRequest::qualifier(self : ServiceRequest) -> Int

    ServiceRequest::service

    ServiceResponse

    pub struct ServiceResponse {
    request : ServiceRequest
    status : ServiceStatus
    cause : CauseOfTransmission
    objects : Array[ApplicationObject]
    message : String
    } derive(
    Debug
    )

    A service response with optional application data.

    ServiceResponse::cause

    ServiceResponse::message

    fn ServiceResponse::message(self : ServiceResponse) -> String

    ServiceResponse::new

    fn ServiceResponse::new(request : ServiceRequest, status : ServiceStatus, cause : CauseOfTransmission, objects : Array[ApplicationObject], message? : String) -> ServiceResponse

    ServiceResponse::objects

    ServiceResponse::request

    ServiceResponse::status

    ServiceStatus

    pub enum ServiceStatus {
    IdleService
    ActiveService
    ConfirmedService
    TerminatedService
    RejectedService
    FailedService
    } derive(Eq,
    Debug
    )

    Result state used by application transactions.

    Session

    pub struct Session {
    state : LinkState
    send_sequence : Int
    receive_sequence : Int
    window_size : Int
    pending : Int
    } derive(
    Debug
    )

    A deterministic session state machine. Transport I/O is intentionally injected by callers.

    Session::new

    fn Session::new(window_size? : Int) -> Session

    Session::receive

    fn Session::receive(self : Session, frame : Frame) -> Result[Unit, String]

    Session::send

    fn Session::send(self : Session, payload : Bytes) -> Result[Frame, String]

    Session::snapshot

    fn Session::snapshot(self : Session) -> SessionSnapshot

    Session::start

    fn Session::start(self : Session) -> Frame

    Session::stop

    fn Session::stop(self : Session) -> Frame

    fn Session::test_link(self : Session) -> Frame

    SessionAction

    pub enum SessionAction {
    SendStart
    SendStop
    SendTest
    SendSupervisory(Int)
    SendInformation(Int)
    DeliverInformation(Bytes)
    Acknowledge(Int)
    Report(Diagnostic)
    NoAction
    } derive(
    Debug
    )

    A deterministic action emitted by a session driver.

    SessionSnapshot

    pub struct SessionSnapshot {
    state : LinkState
    send_sequence : Int
    receive_sequence : Int
    pending : Int
    window_size : Int
    } derive(Eq,
    Debug
    )

    Host-visible session observation.

    SessionSnapshot::available

    fn SessionSnapshot::available(self : SessionSnapshot) -> Int

    SessionSnapshot::is_started

    fn SessionSnapshot::is_started(self : SessionSnapshot) -> Bool

    SessionSnapshot::pending

    fn SessionSnapshot::pending(self : SessionSnapshot) -> Int

    SessionSnapshot::receive_sequence

    fn SessionSnapshot::receive_sequence(self : SessionSnapshot) -> Int

    SessionSnapshot::send_sequence

    fn SessionSnapshot::send_sequence(self : SessionSnapshot) -> Int

    ShortFloatValue

    pub struct ShortFloatValue {
    value : Float
    quality : QualityDescriptor
    } derive(Eq,
    Debug
    )

    IEEE-754 short floating point measurement.

    ShortFloatValue::new

    fn ShortFloatValue::new(value : Float, quality? : QualityDescriptor) -> ShortFloatValue

    ShortFloatValue::quality

    ShortFloatValue::value

    fn ShortFloatValue::value(self : ShortFloatValue) -> Float

    Simulation

    pub struct Simulation {
    clock : VirtualClock
    actions : Array[ScheduledAction]
    events : Array[SimulationEvent]
    next_ordinal : Int
    max_events : Int
    } derive(
    Debug
    )

    Simulation::clear_events

    fn Simulation::clear_events(self : Simulation) -> Unit

    Simulation::events

    Simulation::new

    fn Simulation::new(start? : Int, max_events? : Int) -> Result[Simulation, String]

    Simulation::now

    fn Simulation::now(self : Simulation) -> Int

    Simulation::pending

    fn Simulation::pending(self : Simulation) -> Int

    Simulation::run_until

    fn Simulation::run_until(self : Simulation, timestamp : Int) -> Result[Int, String]

    Run all scheduled actions up to an inclusive timestamp.

    Simulation::schedule

    fn Simulation::schedule(self : Simulation, at : Int, action : SimulationAction) -> Result[Unit, String]

    Simulation::step

    fn Simulation::step(self : Simulation) -> Result[Bool, String]

    Run the next scheduled action, if any.

    SimulationAction

    pub enum SimulationAction {
    Receive(Frame)
    Publish(ApplicationObject)
    AdvanceTimer(String)
    Record(String)
    } derive(
    Debug
    )

    Work scheduled for a deterministic simulation tick.

    SimulationEvent

    pub enum SimulationEvent {
    FrameProduced(Int, Frame)
    ObjectPublished(Int, ApplicationObject)
    TimerAdvanced(Int, String)
    Note(Int, String)
    SimulationFault(Int, Diagnostic)
    } derive(
    Debug
    )

    Results emitted by one simulation step.

    SinglePointValue

    pub struct SinglePointValue {
    state : Bool
    quality : StatusQuality
    } derive(Eq,
    Debug
    )

    Single point information value, including its QDS.

    SinglePointValue::from_byte

    fn SinglePointValue::from_byte(value : Int) -> Result[SinglePointValue, String]

    SinglePointValue::new

    fn SinglePointValue::new(state : Bool, quality? : StatusQuality) -> SinglePointValue

    SinglePointValue::quality

    SinglePointValue::state

    fn SinglePointValue::state(self : SinglePointValue) -> Bool

    SinglePointValue::to_byte

    fn SinglePointValue::to_byte(self : SinglePointValue) -> Int

    StationConfig

    pub struct StationConfig {
    common_address : CommonAddress
    name : String
    location : String
    owner : String
    point_capacity : Int
    history_limit : Int
    heartbeat_interval : Int
    tags : Array[String]
    enabled : Bool
    } derive(Eq,
    Debug
    )

    An immutable station identity and deployment configuration.

    StationConfig::common_address

    fn StationConfig::common_address(self : StationConfig) -> CommonAddress

    StationConfig::enabled

    fn StationConfig::enabled(self : StationConfig) -> Bool

    StationConfig::heartbeat_interval

    fn StationConfig::heartbeat_interval(self : StationConfig) -> Int

    StationConfig::history_limit

    fn StationConfig::history_limit(self : StationConfig) -> Int

    StationConfig::location

    fn StationConfig::location(self : StationConfig) -> String

    StationConfig::name

    fn StationConfig::name(self : StationConfig) -> String

    StationConfig::new

    fn StationConfig::new(common_address : CommonAddress, name : String, location? : String, owner? : String, point_capacity? : Int, history_limit? : Int, heartbeat_interval? : Int, tags? : Array[String], enabled? : Bool) -> Result[StationConfig, String]

    Build a station configuration with conservative operational defaults.

    StationConfig::owner

    fn StationConfig::owner(self : StationConfig) -> String

    StationConfig::point_capacity

    fn StationConfig::point_capacity(self : StationConfig) -> Int

    StationConfig::tags

    fn StationConfig::tags(self : StationConfig) -> Array[String]

    StationConfig::with_enabled

    fn StationConfig::with_enabled(self : StationConfig, enabled : Bool) -> StationConfig

    StationConfig::with_tags

    fn StationConfig::with_tags(self : StationConfig, tags : Array[String]) -> StationConfig

    StationCounters

    pub struct StationCounters {
    received_updates : Int
    accepted_updates : Int
    rejected_updates : Int
    commands : Int
    command_failures : Int
    heartbeat_misses : Int
    quality_events : Int
    bytes_received : Int
    bytes_sent : Int
    } derive(Eq,
    Debug
    )

    Operational counters for one station.

    StationCounters::accepted_updates

    fn StationCounters::accepted_updates(self : StationCounters) -> Int

    StationCounters::bytes_received

    fn StationCounters::bytes_received(self : StationCounters) -> Int

    StationCounters::bytes_sent

    fn StationCounters::bytes_sent(self : StationCounters) -> Int

    StationCounters::command_failures

    fn StationCounters::command_failures(self : StationCounters) -> Int

    StationCounters::commands

    fn StationCounters::commands(self : StationCounters) -> Int

    StationCounters::heartbeat_misses

    fn StationCounters::heartbeat_misses(self : StationCounters) -> Int

    StationCounters::new

    StationCounters::quality_events

    fn StationCounters::quality_events(self : StationCounters) -> Int

    StationCounters::received_updates

    fn StationCounters::received_updates(self : StationCounters) -> Int

    StationCounters::record_bytes_received

    fn StationCounters::record_bytes_received(self : StationCounters, bytes : Int) -> Unit

    StationCounters::record_bytes_sent

    fn StationCounters::record_bytes_sent(self : StationCounters, bytes : Int) -> Unit

    StationCounters::record_command

    fn StationCounters::record_command(self : StationCounters) -> Unit

    StationCounters::record_command_failure

    fn StationCounters::record_command_failure(self : StationCounters) -> Unit

    StationCounters::record_quality_event

    fn StationCounters::record_quality_event(self : StationCounters) -> Unit

    StationCounters::rejected_updates

    fn StationCounters::rejected_updates(self : StationCounters) -> Int

    StationDatabase

    pub struct StationDatabase {
    stations : Map[Int, StationRecord]
    events : Array[DatabaseEvent]
    event_limit : Int
    revision : Int
    next_sequence : Int
    } derive(
    Debug
    )

    The normalized, bounded in-memory operational database.

    StationDatabase::commit

    fn StationDatabase::commit(self : StationDatabase, transaction : DatabaseTransaction) -> Result[Array[DatabaseEvent], Diagnostic]

    Commit an optimistic transaction atomically from the caller's perspective.

    StationDatabase::compact_events

    fn StationDatabase::compact_events(self : StationDatabase, keep : Int, timestamp : Int) -> Result[Unit, String]

    StationDatabase::contains

    fn StationDatabase::contains(self : StationDatabase, common_address : CommonAddress) -> Bool

    StationDatabase::event_count

    fn StationDatabase::event_count(self : StationDatabase) -> Int

    StationDatabase::events

    StationDatabase::events_since

    fn StationDatabase::events_since(self : StationDatabase, sequence : Int) -> Array[DatabaseEvent]

    StationDatabase::get

    fn StationDatabase::get(self : StationDatabase, common_address : CommonAddress) -> StationRecord?

    StationDatabase::heartbeat

    fn StationDatabase::heartbeat(self : StationDatabase, common_address : CommonAddress, timestamp : Int) -> Result[StationStateChange?, String]

    StationDatabase::miss_heartbeat

    fn StationDatabase::miss_heartbeat(self : StationDatabase, common_address : CommonAddress, timestamp : Int) -> Result[StationStateChange?, String]

    StationDatabase::new

    fn StationDatabase::new(event_limit? : Int) -> Result[StationDatabase, String]

    StationDatabase::point_snapshot

    fn StationDatabase::point_snapshot(self : StationDatabase, common_address : CommonAddress, filter : PointFilter) -> Result[StationPointSnapshot, String]

    StationDatabase::query

    fn StationDatabase::query(self : StationDatabase, query : StationQuery, now : Int) -> Array[StationSummary]

    StationDatabase::read

    fn StationDatabase::read(self : StationDatabase, common_address : CommonAddress, filter : PointFilter) -> Result[Array[PointRecord], String]

    StationDatabase::register

    fn StationDatabase::register(self : StationDatabase, config : StationConfig, timestamp : Int) -> Result[StationSummary, String]

    StationDatabase::revision

    fn StationDatabase::revision(self : StationDatabase) -> Int

    StationDatabase::set_state

    fn StationDatabase::set_state(self : StationDatabase, common_address : CommonAddress, status : StationStatus, reason : StationStateReason, timestamp : Int, message? : String) -> Result[StationStateChange, String]

    StationDatabase::snapshot

    fn StationDatabase::snapshot(self : StationDatabase, timestamp : Int) -> DatabaseSnapshot

    StationDatabase::station_count

    fn StationDatabase::station_count(self : StationDatabase) -> Int

    StationDatabase::summary

    fn StationDatabase::summary(self : StationDatabase, common_address : CommonAddress, now : Int) -> Result[StationSummary, String]

    StationDatabase::unregister

    fn StationDatabase::unregister(self : StationDatabase, common_address : CommonAddress, timestamp : Int) -> Result[Unit, String]

    StationDatabase::write

    fn StationDatabase::write(self : StationDatabase, common_address : CommonAddress, object : ApplicationObject, timestamp : Int, source? : String) -> Result[PointChange, Diagnostic]

    StationPointSnapshot

    pub struct StationPointSnapshot {
    common_address : CommonAddress
    database_revision : Int
    station_revision : Int
    points : Array[PointRecord]
    } derive(
    Debug
    )

    A read-only point snapshot associated with one database revision.

    StationPointSnapshot::common_address

    StationPointSnapshot::database_revision

    fn StationPointSnapshot::database_revision(self : StationPointSnapshot) -> Int

    StationPointSnapshot::points

    StationPointSnapshot::station_revision

    fn StationPointSnapshot::station_revision(self : StationPointSnapshot) -> Int

    StationProfile

    pub struct StationProfile {
    name : String
    common_address : CommonAddress
    parameters : ConnectionParameters
    supported_types : Array[ApplicationType]
    max_objects : Int
    tls_required : Bool
    } derive(
    Debug
    )

    A station profile exchanged by deployment configuration and test tools.

    StationProfile::common_address

    fn StationProfile::common_address(self : StationProfile) -> CommonAddress

    StationProfile::max_objects

    fn StationProfile::max_objects(self : StationProfile) -> Int

    StationProfile::name

    fn StationProfile::name(self : StationProfile) -> String

    StationProfile::new

    fn StationProfile::new(name : String, common_address : CommonAddress, parameters : ConnectionParameters, supported_types : Array[ApplicationType], max_objects? : Int, tls_required? : Bool) -> Result[StationProfile, String]

    StationProfile::parameters

    StationProfile::supported_types

    fn StationProfile::supported_types(self : StationProfile) -> Array[ApplicationType]

    StationProfile::supports

    fn StationProfile::supports(self : StationProfile, type_id : ApplicationType) -> Bool

    StationProfile::tls_required

    fn StationProfile::tls_required(self : StationProfile) -> Bool

    StationQuery

    pub struct StationQuery {
    status : StationStatus?
    tag : String?
    name_prefix : String?
    include_disabled : Bool
    min_points : Int?
    max_heartbeat_age : Int?
    } derive(Eq,
    Debug
    )

    Query used by database readers and supervisory dashboards.

    StationQuery::all

    StationQuery::with_disabled

    fn StationQuery::with_disabled(self : StationQuery, include_disabled_value : Bool) -> StationQuery

    StationQuery::with_max_heartbeat_age

    fn StationQuery::with_max_heartbeat_age(self : StationQuery, age : Int) -> StationQuery

    StationQuery::with_min_points

    fn StationQuery::with_min_points(self : StationQuery, count : Int) -> StationQuery

    StationQuery::with_name_prefix

    fn StationQuery::with_name_prefix(self : StationQuery, prefix : String) -> StationQuery

    StationQuery::with_status

    fn StationQuery::with_status(self : StationQuery, status : StationStatus) -> StationQuery

    StationQuery::with_tag

    fn StationQuery::with_tag(self : StationQuery, tag : String) -> StationQuery

    StationRecord

    pub struct StationRecord {
    config : StationConfig
    store : PointStore
    status : StationStatus
    last_seen : Int
    revision : Int
    counters : StationCounters
    transitions : Array[StationStateChange]
    } derive(
    Debug
    )

    Record for a provisioned station and its point store.

    StationRecord::config

    StationRecord::counters

    StationRecord::last_seen

    fn StationRecord::last_seen(self : StationRecord) -> Int

    StationRecord::revision

    fn StationRecord::revision(self : StationRecord) -> Int

    StationRecord::status

    StationRecord::store

    StationRecord::transitions

    StationSimulation

    pub struct StationSimulation {
    store : PointStore
    session : Session
    simulation : Simulation
    metrics : FrameMetrics
    trace : TraceLog
    } derive(
    Debug
    )

    A deterministic station simulation composed from a point store and session.

    StationSimulation::events

    StationSimulation::ingest

    fn StationSimulation::ingest(self : StationSimulation, object : ApplicationObject, timestamp : Int) -> Result[PointChange, Diagnostic]

    StationSimulation::metrics

    StationSimulation::new

    fn StationSimulation::new(common_address : CommonAddress, window_size? : Int) -> Result[StationSimulation, String]

    StationSimulation::receive

    fn StationSimulation::receive(self : StationSimulation, frame : Frame) -> Result[Unit, String]

    StationSimulation::run_until

    fn StationSimulation::run_until(self : StationSimulation, timestamp : Int) -> Result[Int, String]

    StationSimulation::schedule

    fn StationSimulation::schedule(self : StationSimulation, at : Int, action : SimulationAction) -> Result[Unit, String]

    StationSimulation::send

    fn StationSimulation::send(self : StationSimulation, payload : Bytes) -> Result[Frame, String]

    StationSimulation::session

    StationSimulation::start

    StationSimulation::stop

    StationSimulation::store

    StationSimulation::trace

    StationStateChange

    pub struct StationStateChange {
    common_address : CommonAddress
    from : StationStatus
    to : StationStatus
    reason : StationStateReason
    timestamp : Int
    revision : Int
    message : String
    } derive(Eq,
    Debug
    )

    A state transition stored in the station audit stream.

    StationStateChange::common_address

    StationStateChange::from

    StationStateChange::message

    fn StationStateChange::message(self : StationStateChange) -> String

    StationStateChange::new

    fn StationStateChange::new(common_address : CommonAddress, from : StationStatus, to : StationStatus, reason : StationStateReason, timestamp : Int, revision : Int, message? : String) -> StationStateChange

    StationStateChange::reason

    StationStateChange::revision

    fn StationStateChange::revision(self : StationStateChange) -> Int

    StationStateChange::timestamp

    fn StationStateChange::timestamp(self : StationStateChange) -> Int

    StationStateChange::to

    StationStateReason

    pub enum StationStateReason {
    ProvisionedByOperator
    LinkEstablished
    LinkLost
    HeartbeatMissed
    ProtocolError
    QualityDegraded
    ManualQuarantine
    ManualRelease
    MaintenanceWindow
    } derive(Eq,
    Debug
    )

    The reason recorded when the station state changes.

    StationStatus

    pub enum StationStatus {
    Provisioned
    Online
    Degraded
    Offline
    Quarantined
    } derive(Eq,
    Debug
    )

    Lifecycle state of an IEC 104 station in the local operational database.

    StationSummary

    pub struct StationSummary {
    common_address : CommonAddress
    name : String
    status : StationStatus
    point_count : Int
    last_seen : Int
    revision : Int
    valid_points : Int
    invalid_points : Int
    heartbeat_age : Int
    } derive(Eq,
    Debug
    )

    A compact summary suitable for a health endpoint or dashboard.

    StationSummary::common_address

    fn StationSummary::common_address(self : StationSummary) -> CommonAddress

    StationSummary::heartbeat_age

    fn StationSummary::heartbeat_age(self : StationSummary) -> Int

    StationSummary::invalid_points

    fn StationSummary::invalid_points(self : StationSummary) -> Int

    StationSummary::last_seen

    fn StationSummary::last_seen(self : StationSummary) -> Int

    StationSummary::name

    fn StationSummary::name(self : StationSummary) -> String

    StationSummary::point_count

    fn StationSummary::point_count(self : StationSummary) -> Int

    StationSummary::revision

    fn StationSummary::revision(self : StationSummary) -> Int

    StationSummary::status

    StationSummary::valid_points

    fn StationSummary::valid_points(self : StationSummary) -> Int

    StatusQuality

    pub struct StatusQuality {
    blocked : Bool
    substituted : Bool
    not_topical : Bool
    invalid : Bool
    } derive(Eq,
    Debug
    )

    Quality descriptor for single and double point status values.

    StatusQuality::as_measurement

    fn StatusQuality::as_measurement(self : StatusQuality) -> QualityDescriptor

    StatusQuality::clear

    StatusQuality::from_byte

    fn StatusQuality::from_byte(value : Int) -> Result[StatusQuality, String]

    StatusQuality::is_usable

    fn StatusQuality::is_usable(self : StatusQuality) -> Bool

    StatusQuality::to_byte

    fn StatusQuality::to_byte(self : StatusQuality) -> Int

    StepPositionValue

    pub struct StepPositionValue {
    position : Int
    transient : Bool
    quality : StatusQuality
    } derive(Eq,
    Debug
    )

    Step position value with a signed seven-bit position and transient flag.

    StepPositionValue::new

    fn StepPositionValue::new(position : Int, transient? : Bool, quality? : StatusQuality) -> Result[StepPositionValue, String]

    StepPositionValue::position

    fn StepPositionValue::position(self : StepPositionValue) -> Int

    StepPositionValue::quality

    StepPositionValue::to_array

    fn StepPositionValue::to_array(self : StepPositionValue) -> Array[Byte]

    StoreStatistics

    pub struct StoreStatistics {
    total : Int
    monitoring : Int
    control : Int
    valid : Int
    invalid : Int
    revisions : Int
    changes : Int
    } derive(Eq,
    Debug
    )

    Aggregate counts for an in-memory point store.

    StoreStatistics::changes

    fn StoreStatistics::changes(self : StoreStatistics) -> Int

    StoreStatistics::control

    fn StoreStatistics::control(self : StoreStatistics) -> Int

    StoreStatistics::empty

    StoreStatistics::invalid

    fn StoreStatistics::invalid(self : StoreStatistics) -> Int

    StoreStatistics::monitoring

    fn StoreStatistics::monitoring(self : StoreStatistics) -> Int

    StoreStatistics::revisions

    fn StoreStatistics::revisions(self : StoreStatistics) -> Int

    StoreStatistics::total

    fn StoreStatistics::total(self : StoreStatistics) -> Int

    StoreStatistics::valid

    fn StoreStatistics::valid(self : StoreStatistics) -> Int

    StoreTransaction

    pub struct StoreTransaction {
    pending : Array[(ApplicationObject, Int, String)]
    removed : Array[(InformationAddress, Int)]
    committed : Bool
    } derive(
    Debug
    )

    A transaction that stages changes before committing them to a store.

    StoreTransaction::commit

    fn StoreTransaction::commit(self : StoreTransaction, store : PointStore) -> Result[Array[PointChange], Diagnostic]

    StoreTransaction::new

    StoreTransaction::pending_count

    fn StoreTransaction::pending_count(self : StoreTransaction) -> Int

    StoreTransaction::rollback

    fn StoreTransaction::rollback(self : StoreTransaction) -> Unit

    StoreTransaction::stage

    fn StoreTransaction::stage(self : StoreTransaction, object : ApplicationObject, timestamp : Int, source? : String) -> Result[Unit, Diagnostic]

    StoreTransaction::stage_remove

    fn StoreTransaction::stage_remove(self : StoreTransaction, address : InformationAddress, timestamp : Int) -> Result[Unit, Diagnostic]

    StoredFile

    pub struct StoredFile {
    identity : FileIdentity
    data : Bytes
    created_at : Int
    updated_at : Int
    revision : Int
    checksum : UInt
    } derive(Eq,
    Debug
    )

    Metadata and immutable content for one locally retained file.

    StoredFile::checksum

    fn StoredFile::checksum(self : StoredFile) -> UInt

    StoredFile::created_at

    fn StoredFile::created_at(self : StoredFile) -> Int

    StoredFile::data

    fn StoredFile::data(self : StoredFile) -> Bytes

    StoredFile::identity

    fn StoredFile::identity(self : StoredFile) -> FileIdentity

    StoredFile::new

    fn StoredFile::new(identity : FileIdentity, data : Bytes, timestamp : Int) -> StoredFile

    StoredFile::revision

    fn StoredFile::revision(self : StoredFile) -> Int

    StoredFile::size

    fn StoredFile::size(self : StoredFile) -> Int

    StoredFile::updated_at

    fn StoredFile::updated_at(self : StoredFile) -> Int

    SupervisorServiceKind

    pub enum SupervisorServiceKind {
    TransportService
    StationDatabaseService
    TelemetryService
    CommandService
    ArchiveService
    FileService
    AlarmService
    DiagnosticService
    SimulationService
    ApiService
    } derive(Eq,
    Debug
    )

    Runtime service classes exposed by the IEC 104 operational host.

    TelemetryAggregate

    pub struct TelemetryAggregate {
    count : Int
    first_timestamp : Int
    last_timestamp : Int
    minimum : Float
    maximum : Float
    sum : Float
    invalid_count : Int
    } derive(Eq,
    Debug
    )

    Aggregate statistics maintained per point.

    TelemetryAggregate::average

    fn TelemetryAggregate::average(self : TelemetryAggregate) -> Float

    TelemetryAggregate::count

    fn TelemetryAggregate::count(self : TelemetryAggregate) -> Int

    TelemetryAggregate::empty

    TelemetryAggregate::first_timestamp

    fn TelemetryAggregate::first_timestamp(self : TelemetryAggregate) -> Int

    TelemetryAggregate::invalid_count

    fn TelemetryAggregate::invalid_count(self : TelemetryAggregate) -> Int

    TelemetryAggregate::last_timestamp

    fn TelemetryAggregate::last_timestamp(self : TelemetryAggregate) -> Int

    TelemetryAggregate::maximum

    fn TelemetryAggregate::maximum(self : TelemetryAggregate) -> Float

    TelemetryAggregate::minimum

    fn TelemetryAggregate::minimum(self : TelemetryAggregate) -> Float

    TelemetryAggregate::sum

    fn TelemetryAggregate::sum(self : TelemetryAggregate) -> Float

    TelemetryMetrics

    pub struct TelemetryMetrics {
    received : Int
    emitted : Int
    suppressed : Int
    invalid : Int
    rate_rejected : Int
    alarms_raised : Int
    alarms_cleared : Int
    } derive(Eq,
    Debug
    )

    Pipeline metrics for rate, quality, deadband and alarm stages.

    TelemetryMetrics::alarms_cleared

    fn TelemetryMetrics::alarms_cleared(self : TelemetryMetrics) -> Int

    TelemetryMetrics::alarms_raised

    fn TelemetryMetrics::alarms_raised(self : TelemetryMetrics) -> Int

    TelemetryMetrics::emitted

    fn TelemetryMetrics::emitted(self : TelemetryMetrics) -> Int

    TelemetryMetrics::invalid

    fn TelemetryMetrics::invalid(self : TelemetryMetrics) -> Int

    TelemetryMetrics::new

    TelemetryMetrics::rate_rejected

    fn TelemetryMetrics::rate_rejected(self : TelemetryMetrics) -> Int

    TelemetryMetrics::received

    fn TelemetryMetrics::received(self : TelemetryMetrics) -> Int

    TelemetryMetrics::suppressed

    fn TelemetryMetrics::suppressed(self : TelemetryMetrics) -> Int

    TelemetryPipeline

    pub struct TelemetryPipeline {
    samples : Map[Int, TelemetrySample]
    aggregates : Map[Int, TelemetryAggregate]
    deadbands : Map[Int, DeadbandRule]
    rates : Map[Int, RateRule]
    alarms : Map[Int, Array[AlarmRule]]
    active_alarms : Map[String, Bool]
    subscriptions : Array[TelemetrySubscription]
    alarm_history : Array[AlarmEvent]
    alarm_limit : Int
    sequence : Int
    metrics : TelemetryMetrics
    } derive(
    Debug
    )

    A quality-aware, deterministic telemetry processing pipeline.

    TelemetryPipeline::aggregate

    TelemetryPipeline::alarm_history

    fn TelemetryPipeline::alarm_history(self : TelemetryPipeline) -> Array[AlarmEvent]

    TelemetryPipeline::ingest

    fn TelemetryPipeline::ingest(self : TelemetryPipeline, station : CommonAddress, object : ApplicationObject, timestamp : Int, source? : String) -> Result[PipelineResult, Diagnostic]

    TelemetryPipeline::latest

    TelemetryPipeline::metrics

    TelemetryPipeline::new

    fn TelemetryPipeline::new(alarm_limit? : Int) -> Result[TelemetryPipeline, String]

    TelemetryPipeline::sample_count

    fn TelemetryPipeline::sample_count(self : TelemetryPipeline) -> Int

    TelemetryPipeline::set_alarm_rules

    fn TelemetryPipeline::set_alarm_rules(self : TelemetryPipeline, address : InformationAddress, rules : Array[AlarmRule]) -> Unit

    TelemetryPipeline::set_deadband

    fn TelemetryPipeline::set_deadband(self : TelemetryPipeline, address : InformationAddress, rule : DeadbandRule) -> Unit

    TelemetryPipeline::set_rate_rule

    fn TelemetryPipeline::set_rate_rule(self : TelemetryPipeline, address : InformationAddress, rule : RateRule) -> Unit

    TelemetryPipeline::subscribe

    fn TelemetryPipeline::subscribe(self : TelemetryPipeline, subscription : TelemetrySubscription) -> Result[Unit, String]

    TelemetryPipeline::unsubscribe

    fn TelemetryPipeline::unsubscribe(self : TelemetryPipeline, id : Int) -> Bool

    TelemetrySample

    pub struct TelemetrySample {
    station : CommonAddress
    address : InformationAddress
    type_id : ApplicationType
    value : Float
    quality : QualityDescriptor
    state : TelemetryState
    timestamp : Int
    source : String
    sequence : Int
    } derive(
    Debug
    )

    A sample normalized to a numeric value while retaining IEC identity.

    TelemetrySample::address

    TelemetrySample::quality

    TelemetrySample::sequence

    fn TelemetrySample::sequence(self : TelemetrySample) -> Int

    TelemetrySample::source

    fn TelemetrySample::source(self : TelemetrySample) -> String

    TelemetrySample::state

    TelemetrySample::station

    TelemetrySample::timestamp

    fn TelemetrySample::timestamp(self : TelemetrySample) -> Int

    TelemetrySample::type_id

    TelemetrySample::value

    fn TelemetrySample::value(self : TelemetrySample) -> Float

    TelemetryState

    pub enum TelemetryState {
    GoodTelemetry
    DegradedTelemetry
    InvalidTelemetry
    } derive(Eq,
    Debug
    )

    Quality state normalized for downstream telemetry and alarm consumers.

    TelemetryState::usable

    fn TelemetryState::usable(self : TelemetryState) -> Bool

    TelemetrySubscription

    pub struct TelemetrySubscription {
    id : Int
    station : CommonAddress?
    first_address : InformationAddress?
    last_address : InformationAddress?
    minimum_state : TelemetryState
    include_unchanged : Bool
    } derive(Eq,
    Debug
    )

    Subscription route for stream consumers.

    TelemetrySubscription::first_address

    TelemetrySubscription::id

    TelemetrySubscription::include_unchanged

    fn TelemetrySubscription::include_unchanged(self : TelemetrySubscription) -> Bool

    TelemetrySubscription::last_address

    TelemetrySubscription::minimum_state

    TelemetrySubscription::new

    fn TelemetrySubscription::new(id : Int, station? : CommonAddress, first_address? : InformationAddress, last_address? : InformationAddress, minimum_state? : TelemetryState, include_unchanged? : Bool) -> Result[TelemetrySubscription, String]

    TelemetrySubscription::station

    TimeTag

    pub enum TimeTag {
    Short(Cp24Time)
    Long(Cp56Time)
    } derive(Eq,
    Debug
    )

    A tagged union used by event stores and application services.

    TimeTag::kind

    fn TimeTag::kind(self : TimeTag) -> TimeTagKind

    TimeTag::to_array

    fn TimeTag::to_array(self : TimeTag) -> Array[Byte]

    TimeTag::width

    fn TimeTag::width(self : TimeTag) -> Int

    TimeTagKind

    pub enum TimeTagKind {
    NoTimeTag
    Cp24TimeTag
    Cp56TimeTag
    } derive(Eq,
    Debug
    )

    Tag precision carried by a time-tagged application object.

    TimeTagKind::width

    fn TimeTagKind::width(self : TimeTagKind) -> Int

    TimerState

    pub enum TimerState {
    Inactive
    Running(Int)
    Expired
    } derive(Eq,
    Debug
    )

    State of a timer that is driven by a host monotonic clock.

    TraceEvent

    pub struct TraceEvent {
    timestamp : Int
    kind : TraceKind
    detail : String
    correlation : Int
    } derive(Eq,
    Debug
    )

    TraceEvent::correlation

    fn TraceEvent::correlation(self : TraceEvent) -> Int

    TraceEvent::detail

    fn TraceEvent::detail(self : TraceEvent) -> String

    TraceEvent::kind

    fn TraceEvent::kind(self : TraceEvent) -> TraceKind

    TraceEvent::new

    fn TraceEvent::new(timestamp : Int, kind : TraceKind, detail : String, correlation? : Int) -> TraceEvent

    TraceEvent::timestamp

    fn TraceEvent::timestamp(self : TraceEvent) -> Int

    TraceKind

    pub enum TraceKind {
    FrameSent
    FrameReceived
    StateChanged
    PointUpdated
    ServiceStarted
    ServiceCompleted
    DiagnosticRaised
    } derive(Eq,
    Debug
    )

    A trace event with a monotonic timestamp.

    TraceLog

    pub struct TraceLog {
    events : Array[TraceEvent]
    limit : Int
    } derive(
    Debug
    )

    TraceLog::all

    fn TraceLog::all(self : TraceLog) -> Array[TraceEvent]

    TraceLog::len

    fn TraceLog::len(self : TraceLog) -> Int

    TraceLog::new

    fn TraceLog::new(limit? : Int) -> Result[TraceLog, String]

    TraceLog::push

    fn TraceLog::push(self : TraceLog, event : TraceEvent) -> Unit

    TraceLog::since

    fn TraceLog::since(self : TraceLog, timestamp : Int) -> Array[TraceEvent]

    TransportEndpoint

    pub struct TransportEndpoint {
    id : Int
    station : CommonAddress
    parameters : ConnectionParameters
    window : SequenceWindow
    decoder : ApduStreamDecoder
    state : ManagedTransportState
    last_activity : Int
    last_send : Int
    last_receive : Int
    sent_frames : Int
    received_frames : Int
    malformed_frames : Int
    } derive(
    Debug
    )

    TransportEndpoint::close

    fn TransportEndpoint::close(self : TransportEndpoint, timestamp : Int) -> Unit

    TransportEndpoint::id

    fn TransportEndpoint::id(self : TransportEndpoint) -> Int

    TransportEndpoint::last_activity

    fn TransportEndpoint::last_activity(self : TransportEndpoint) -> Int

    TransportEndpoint::last_receive

    fn TransportEndpoint::last_receive(self : TransportEndpoint) -> Int

    TransportEndpoint::last_send

    fn TransportEndpoint::last_send(self : TransportEndpoint) -> Int

    TransportEndpoint::malformed_frames

    fn TransportEndpoint::malformed_frames(self : TransportEndpoint) -> Int

    TransportEndpoint::new

    fn TransportEndpoint::new(id : Int, station : CommonAddress, parameters : ConnectionParameters, window_capacity : Int, max_apdu? : Int) -> Result[TransportEndpoint, String]

    TransportEndpoint::open

    fn TransportEndpoint::open(self : TransportEndpoint, timestamp : Int) -> Result[Frame, String]

    TransportEndpoint::parameters

    TransportEndpoint::poll

    fn TransportEndpoint::poll(self : TransportEndpoint, timestamp : Int) -> Result[Unit, Diagnostic]

    TransportEndpoint::receive

    fn TransportEndpoint::receive(self : TransportEndpoint, data : Bytes, timestamp : Int) -> Result[Array[Frame], Diagnostic]

    TransportEndpoint::received_frames

    fn TransportEndpoint::received_frames(self : TransportEndpoint) -> Int

    TransportEndpoint::send

    fn TransportEndpoint::send(self : TransportEndpoint, payload : Bytes, timestamp : Int) -> Result[Bytes, Diagnostic]

    TransportEndpoint::sent_frames

    fn TransportEndpoint::sent_frames(self : TransportEndpoint) -> Int

    TransportEndpoint::start

    fn TransportEndpoint::start(self : TransportEndpoint, timestamp : Int) -> Result[Frame, String]

    TransportEndpoint::state

    TransportEndpoint::station

    TransportEndpoint::stop

    fn TransportEndpoint::stop(self : TransportEndpoint, timestamp : Int) -> Result[Frame, String]

    TransportEvent

    pub struct TransportEvent {
    sequence : Int
    timestamp : Int
    kind : TransportEventKind
    endpoint : Int
    frame_size : Int
    detail : String
    } derive(Eq,
    Debug
    )

    TransportEvent::detail

    fn TransportEvent::detail(self : TransportEvent) -> String

    TransportEvent::endpoint

    fn TransportEvent::endpoint(self : TransportEvent) -> Int

    TransportEvent::frame_size

    fn TransportEvent::frame_size(self : TransportEvent) -> Int

    TransportEvent::kind

    TransportEvent::sequence

    fn TransportEvent::sequence(self : TransportEvent) -> Int

    TransportEvent::timestamp

    fn TransportEvent::timestamp(self : TransportEvent) -> Int

    TransportEventKind

    pub enum TransportEventKind {
    TransportOpened
    TransportStartedEvent
    TransportFrameSent
    TransportFrameReceived
    TransportAcknowledged
    TransportTimerExpired
    TransportFault
    TransportClosedEvent
    } derive(Eq,
    Debug
    )

    TransportManager

    pub struct TransportManager {
    endpoints : Map[Int, TransportEndpoint]
    events : Array[TransportEvent]
    event_limit : Int
    next_event : Int
    metrics : TransportManagerMetrics
    } derive(
    Debug
    )

    TransportManager::add

    fn TransportManager::add(self : TransportManager, endpoint : TransportEndpoint) -> Result[Unit, String]

    TransportManager::close

    fn TransportManager::close(self : TransportManager, id : Int, timestamp : Int) -> Result[Unit, String]

    TransportManager::endpoint

    fn TransportManager::endpoint(self : TransportManager, id : Int) -> TransportEndpoint?

    TransportManager::endpoint_count

    fn TransportManager::endpoint_count(self : TransportManager) -> Int

    TransportManager::events

    TransportManager::metrics

    TransportManager::new

    fn TransportManager::new(event_limit? : Int) -> Result[TransportManager, String]

    TransportManager::open

    fn TransportManager::open(self : TransportManager, id : Int, timestamp : Int) -> Result[Bytes, String]

    TransportManager::poll

    fn TransportManager::poll(self : TransportManager, timestamp : Int) -> Array[Diagnostic]

    TransportManager::receive

    fn TransportManager::receive(self : TransportManager, id : Int, data : Bytes, timestamp : Int) -> Result[Array[Frame], Diagnostic]

    TransportManager::send

    fn TransportManager::send(self : TransportManager, id : Int, payload : Bytes, timestamp : Int) -> Result[Bytes, Diagnostic]

    TransportManagerMetrics

    pub struct TransportManagerMetrics {
    opened : Int
    sent : Int
    received : Int
    failures : Int
    closed : Int
    } derive(Eq,
    Debug
    )

    TransportManagerMetrics::closed

    TransportManagerMetrics::failures

    TransportManagerMetrics::new

    TransportManagerMetrics::opened

    TransportManagerMetrics::received

    TransportManagerMetrics::sent

    TransportMode

    pub enum TransportMode {
    Tcp
    SerialGateway
    ReplayFile
    InMemory
    } derive(Eq,
    Debug
    )

    TypeDescriptor

    pub struct TypeDescriptor {
    type_id : ApplicationType
    name : String
    direction : PointDirection
    time_tag : TimeTagKind
    value_width : Int
    supported : Bool
    command : Bool
    } derive(Eq,
    Debug
    )

    Machine-readable description of an IEC 104 application type.

    TypeDescriptor::direction

    TypeDescriptor::is_command

    fn TypeDescriptor::is_command(self : TypeDescriptor) -> Bool

    TypeDescriptor::name

    fn TypeDescriptor::name(self : TypeDescriptor) -> String

    TypeDescriptor::supported

    fn TypeDescriptor::supported(self : TypeDescriptor) -> Bool

    TypeDescriptor::time_tag

    fn TypeDescriptor::time_tag(self : TypeDescriptor) -> TimeTagKind

    TypeDescriptor::type_id

    TypeDescriptor::value_width

    fn TypeDescriptor::value_width(self : TypeDescriptor) -> Int

    TypeId

    pub enum TypeId {
    SinglePoint
    DoublePoint
    NormalizedValue
    ShortFloat
    BitString32
    Unknown(Int)
    } derive(Eq,
    Debug
    )

    Application type identifiers used by this library.

    TypeId::is_known

    fn TypeId::is_known(self : TypeId) -> Bool

    TypeId::name

    fn TypeId::name(self : TypeId) -> String

    TypeId::number

    fn TypeId::number(self : TypeId) -> Int

    UCommand

    pub enum UCommand {
    StartDataTransfer
    StopDataTransfer
    TestFrame
    Unknown(UInt16)
    } derive(Eq,
    Debug
    )

    IEC 104 U-frame commands.

    UCommand::control

    fn UCommand::control(self : UCommand) -> UInt16

    ValidationIssue

    pub struct ValidationIssue {
    kind : ValidationIssueKind
    path : String
    message : String
    address : InformationAddress?
    fatal : Bool
    } derive(Eq,
    Debug
    )

    ValidationIssue::address

    ValidationIssue::fatal

    fn ValidationIssue::fatal(self : ValidationIssue) -> Bool

    ValidationIssue::kind

    ValidationIssue::message

    fn ValidationIssue::message(self : ValidationIssue) -> String

    ValidationIssue::path

    fn ValidationIssue::path(self : ValidationIssue) -> String

    ValidationIssueKind

    pub enum ValidationIssueKind {
    ValidationMissing
    ValidationOutOfRange
    ValidationType
    ValidationCapacity
    ValidationQuality
    ValidationPolicy
    } derive(Eq,
    Debug
    )

    ValidationProfile

    pub struct ValidationProfile {
    max_points : Int
    max_history : Int
    require_time_tag_for_events : Bool
    reject_unknown_types : Bool
    require_non_global_station : Bool
    } derive(Eq,
    Debug
    )

    Validation profile for station and protocol admission checks.

    ValidationProfile::default

    ValidationProfile::max_history

    fn ValidationProfile::max_history(self : ValidationProfile) -> Int

    ValidationProfile::max_points

    fn ValidationProfile::max_points(self : ValidationProfile) -> Int

    ValidationProfile::new

    fn ValidationProfile::new(max_points? : Int, max_history? : Int, require_time_tag_for_events? : Bool, reject_unknown_types? : Bool, require_non_global_station? : Bool) -> Result[ValidationProfile, String]

    ValidationProfile::reject_unknown_types

    fn ValidationProfile::reject_unknown_types(self : ValidationProfile) -> Bool

    ValidationProfile::require_non_global_station

    fn ValidationProfile::require_non_global_station(self : ValidationProfile) -> Bool

    ValidationProfile::require_time_tag_for_events

    fn ValidationProfile::require_time_tag_for_events(self : ValidationProfile) -> Bool

    ValidationReport

    pub struct ValidationReport {
    subject : String
    valid : Bool
    issues : Array[ValidationIssue]
    checked : Int
    } derive(
    Debug
    )

    ValidationReport::checked

    fn ValidationReport::checked(self : ValidationReport) -> Int

    ValidationReport::issues

    ValidationReport::subject

    fn ValidationReport::subject(self : ValidationReport) -> String

    ValidationReport::valid

    fn ValidationReport::valid(self : ValidationReport) -> Bool

    VectorCatalog

    pub struct VectorCatalog {
    vectors : Array[ConformanceVector]
    names : Map[String, Bool]
    } derive(
    Debug
    )

    Add a caller-owned vector while preserving deterministic ordering.

    VectorCatalog::add

    fn VectorCatalog::add(self : VectorCatalog, vector : ConformanceVector) -> Result[Unit, String]

    VectorCatalog::add_all

    fn VectorCatalog::add_all(self : VectorCatalog, vectors : Array[ConformanceVector]) -> Result[Unit, String]

    VectorCatalog::len

    fn VectorCatalog::len(self : VectorCatalog) -> Int

    VectorCatalog::new

    VectorCatalog::vectors

    VectorCategory

    pub enum VectorCategory {
    ApciVector
    AsduVector
    SequenceVector
    BoundaryVector
    NegativeVector
    } derive(Eq,
    Debug
    )

    Vector category used by the protocol regression runner.

    VectorExpectation

    pub enum VectorExpectation {
    ExpectDecode
    ExpectReject
    } derive(Eq,
    Debug
    )

    Expected outcome of a conformance vector.

    VectorMismatch

    pub struct VectorMismatch {
    vector : String
    field : String
    expected : String
    actual : String
    } derive(Eq,
    Debug
    )

    Diagnostic detail produced for a vector failure.

    VectorMismatch::actual

    fn VectorMismatch::actual(self : VectorMismatch) -> String

    VectorMismatch::expected

    fn VectorMismatch::expected(self : VectorMismatch) -> String

    VectorMismatch::field

    fn VectorMismatch::field(self : VectorMismatch) -> String

    VectorMismatch::vector

    fn VectorMismatch::vector(self : VectorMismatch) -> String

    VectorReport

    pub struct VectorReport {
    total : Int
    passed : Int
    failed : Int
    rejected : Int
    bytes : Int
    results : Array[VectorResult]
    } derive(
    Debug
    )

    VectorReport::bytes

    fn VectorReport::bytes(self : VectorReport) -> Int

    VectorReport::failed

    fn VectorReport::failed(self : VectorReport) -> Int

    VectorReport::passed

    fn VectorReport::passed(self : VectorReport) -> Int

    VectorReport::rejected

    fn VectorReport::rejected(self : VectorReport) -> Int

    VectorReport::results

    VectorReport::total

    fn VectorReport::total(self : VectorReport) -> Int

    VectorResult

    pub struct VectorResult {
    name : String
    passed : Bool
    decoded : Bool
    encoded_size : Int
    mismatches : Array[VectorMismatch]
    message : String
    } derive(
    Debug
    )

    VectorResult::decoded

    fn VectorResult::decoded(self : VectorResult) -> Bool

    VectorResult::encoded_size

    fn VectorResult::encoded_size(self : VectorResult) -> Int

    VectorResult::message

    fn VectorResult::message(self : VectorResult) -> String

    VectorResult::mismatches

    fn VectorResult::mismatches(self : VectorResult) -> Array[VectorMismatch]

    VectorResult::name

    fn VectorResult::name(self : VectorResult) -> String

    VectorResult::passed

    fn VectorResult::passed(self : VectorResult) -> Bool

    VirtualClock

    pub struct VirtualClock {
    now : Int
    } derive(Eq,
    Debug
    )

    A deterministic monotonic clock for protocol simulations and tests.

    VirtualClock::advance

    fn VirtualClock::advance(self : VirtualClock, delta : Int) -> Result[Int, String]

    VirtualClock::new

    fn VirtualClock::new(start? : Int) -> Result[VirtualClock, String]

    VirtualClock::now

    fn VirtualClock::now(self : VirtualClock) -> Int

    VirtualClock::set

    fn VirtualClock::set(self : VirtualClock, timestamp : Int) -> Result[Unit, String]

    WorkloadResult

    pub struct WorkloadResult {
    workload : ApplicationBenchmarkWorkload
    iterations : Int
    accepted : Int
    rejected : Int
    bytes : Int
    checksum : UInt
    detail : String
    } derive(Eq,
    Debug
    )

    WorkloadResult::accepted

    fn WorkloadResult::accepted(self : WorkloadResult) -> Int

    WorkloadResult::bytes

    fn WorkloadResult::bytes(self : WorkloadResult) -> Int

    WorkloadResult::checksum

    fn WorkloadResult::checksum(self : WorkloadResult) -> UInt

    WorkloadResult::detail

    fn WorkloadResult::detail(self : WorkloadResult) -> String

    WorkloadResult::iterations

    fn WorkloadResult::iterations(self : WorkloadResult) -> Int

    WorkloadResult::rejected

    fn WorkloadResult::rejected(self : WorkloadResult) -> Int

    WorkloadResult::workload

    admit_envelope

    fn admit_envelope(envelope : AsduEnvelope, limits : ResourceLimits) -> AdmissionDecision

    admit_frame

    fn admit_frame(frame : Frame, limits : ResourceLimits) -> AdmissionDecision

    admit_inbound

    fn admit_inbound(data : Bytes, limits : ResourceLimits, replay : ReplayGuard, now : Int) -> Result[Frame, Diagnostic]

    Admission pipeline for an inbound APDU.

    alarm_journal_action_examples

    fn alarm_journal_action_examples() -> Array[AlarmJournalAction]

    alarm_lifecycle_examples

    fn alarm_lifecycle_examples() -> Array[AlarmLifecycle]

    alarm_severity_examples

    fn alarm_severity_examples() -> Array[AlarmSeverity]

    append_u24

    fn append_u24(out : Array[Byte], value : Int) -> Result[Unit, String]

    application_service_examples

    fn application_service_examples() -> Array[ServiceStatus]

    application_type

    fn application_type(value : Int) -> ApplicationType

    Decode all currently assigned standard IEC 104 type identifiers.

    application_type_catalog

    fn application_type_catalog() -> Array[TypeDescriptor]

    Return the standard catalog used to negotiate object capabilities.

    application_value_examples

    fn application_value_examples() -> Array[ApplicationValue]

    application_value_is_command

    fn application_value_is_command(value : ApplicationValue) -> Bool

    application_value_is_measurement

    fn application_value_is_measurement(value : ApplicationValue) -> Bool

    application_value_type

    fn application_value_type(value : ApplicationValue) -> ApplicationType

    application_value_width

    fn application_value_width(value : ApplicationValue) -> Int

    archive_policy_examples

    fn archive_policy_examples() -> Array[ArchivePolicy]

    assess_metrics

    fn assess_metrics(metrics : MetricsSnapshot) -> HealthReport

    assess_session

    fn assess_session(snapshot : SessionSnapshot) -> HealthReport

    assess_store

    fn assess_store(store : PointStore) -> HealthReport

    audit_action_examples

    fn audit_action_examples() -> Array[AuditAction]

    benchmark_fixture_checksums

    fn benchmark_fixture_checksums() -> Array[UInt]

    benchmark_result_table

    fn benchmark_result_table(results : Array[BenchmarkResult]) -> String

    benchmark_workload_examples

    fn benchmark_workload_examples() -> Array[ApplicationBenchmarkWorkload]

    binary_counter_object

    fn binary_counter_object(address : InformationAddress, value : UInt, sequence? : Int, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    bit_is_set

    fn bit_is_set(value : Int, bit : Int) -> Bool

    bit_string_object

    fn bit_string_object(address : InformationAddress, value : UInt, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    byte_statistics

    fn byte_statistics(data : Bytes) -> ByteStatistics

    bytes_equal_left

    fn bytes_equal_left(a : Bytes, b : Bytes) -> Bool

    calendar_weekday

    fn calendar_weekday(year : Int, month : Int, day : Int) -> Result[Int, String]

    Calculate ISO-like weekday for a Gregorian date: Monday is 1, Sunday is 7.

    cause

    fn cause(value : Int) -> Cause

    cause_category

    fn cause_category(value : Int) -> CauseCategory

    Decode a standard cause category without rejecting extension values.

    clock_sync_object

    fn clock_sync_object(address : InformationAddress, value : Cp56Time) -> Result[ApplicationObject, String]

    command_lifecycle_examples

    fn command_lifecycle_examples() -> Array[CommandLifecycle]

    command_priority_examples

    fn command_priority_examples() -> Array[CommandPriority]

    compatibility_examples

    fn compatibility_examples() -> Array[String]

    config_change_kind_examples

    fn config_change_kind_examples() -> Array[ConfigChangeKind]

    config_value_examples

    fn config_value_examples() -> Array[ConfigValue]

    conformance_examples

    fn conformance_examples() -> Array[TypeDescriptor]

    control_type_catalog

    fn control_type_catalog() -> Array[TypeDescriptor]

    counter_interrogation_object

    fn counter_interrogation_object(address : InformationAddress, qualifier : Int) -> Result[ApplicationObject, String]

    crc16_ibm

    fn crc16_ibm(data : Bytes) -> UInt

    CRC-16/IBM helper for gateways that wrap IEC APDUs in a framed channel.

    crc32_ieee

    fn crc32_ieee(data : Bytes) -> UInt

    CRC-32 used by fixture manifests and deterministic transport tests.

    create_interrogation_plan

    fn create_interrogation_plan(store : PointStore, request : InterrogationRequest, filter : PointFilter, batch_size? : Int) -> Result[InterrogationPlan, String]

    Build plans from a point store while retaining type and address boundaries.

    database_event_kind_examples

    fn database_event_kind_examples() -> Array[DatabaseEventKind]

    days_in_month

    fn days_in_month(year : Int, month : Int) -> Int?

    Return the number of days in a Gregorian month.

    days_in_year

    fn days_in_year(year : Int) -> Int

    Return the number of days in a year.

    decode_asdu

    fn decode_asdu(data : Bytes) -> Result[(AsduHeader, Array[InformationObject]), String]

    Decode an ASDU header and its information objects.

    decode_extended_asdu

    fn decode_extended_asdu(data : Bytes) -> Result[AsduEnvelope, Diagnostic]

    Decode a complete address-qualified ASDU.

    decode_frame

    fn decode_frame(data : Bytes) -> Result[Frame, String]

    Decode one complete APDU. Extra bytes after the declared APDU are rejected.

    decode_signed16

    fn decode_signed16(low : Int, high : Int) -> Result[Int, String]

    Return the signed value represented by a two-byte little-endian field.

    decode_time_tag

    fn decode_time_tag(kind : TimeTagKind, data : Bytes, offset? : Int) -> Result[TimeTag, String]

    Decode the selected tag precision from a byte sequence.

    default_benchmark_suite

    fn default_benchmark_suite() -> BenchmarkSuite

    Produce the standard local suite used by README benchmark commands.

    diagnostic_kind_examples

    fn diagnostic_kind_examples() -> Array[DiagnosticKind]

    Keep all diagnostic categories available to host-side telemetry adapters.

    diagnostic_kind_name

    fn diagnostic_kind_name(kind : DiagnosticKind) -> String

    diagnostic_severity_examples

    fn diagnostic_severity_examples() -> Array[DiagnosticSeverity]

    diagnostics_examples

    fn diagnostics_examples() -> Array[DiagnosticKind]

    double_command_object

    fn double_command_object(address : InformationAddress, state : Int, qualifier : Int) -> Result[ApplicationObject, String]

    double_point_object

    fn double_point_object(address : InformationAddress, state : Int, quality? : StatusQuality, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    encode_application_object

    fn encode_application_object(object : ApplicationObject) -> Bytes

    Encode an IOA-qualified object without the ASDU header.

    encode_asdu

    fn encode_asdu(header : AsduHeader, objects : Array[InformationObject]) -> Bytes

    Encode an ASDU header followed by information objects.

    encode_extended_asdu

    fn encode_extended_asdu(envelope : AsduEnvelope) -> Result[Bytes, Diagnostic]

    Encode an address-qualified ASDU into its IEC 104 application payload.

    encode_frame

    fn encode_frame(frame : Frame) -> Bytes

    Encode one APCI frame, including the 0x68 start byte and length byte.

    encode_signed16

    fn encode_signed16(value : Int) -> Result[Array[Byte], String]

    Encode a signed value into a little-endian two-byte field.

    encode_time_tag

    fn encode_time_tag(tag : TimeTag) -> Bytes

    encoded_frame_size

    fn encoded_frame_size(frame : Frame) -> Int

    Return the number of octets that an encoded frame will occupy.

    end_of_initialization_object

    fn end_of_initialization_object(address : InformationAddress, value : Int) -> Result[ApplicationObject, String]

    evaluate_command

    fn evaluate_command(policy : CommandPolicy, object : ApplicationObject) -> CommandOutcome

    extended_asdu_examples

    fn extended_asdu_examples() -> Array[AsduEnvelope]

    failover_reason_examples

    fn failover_reason_examples() -> Array[FailoverReason]

    file_transfer_direction_examples

    fn file_transfer_direction_examples() -> Array[FileTransferDirection]

    file_transfer_state_examples

    fn file_transfer_state_examples() -> Array[FileTransferState]

    frame_fits_apdu

    fn frame_fits_apdu(frame : Frame, maximum : Int) -> Bool

    Return a conservative APDU limit check for gateways.

    frame_kind_name

    fn frame_kind_name(kind : FrameKind) -> String

    health_state_examples

    fn health_state_examples() -> Array[HealthState]

    health_state_name

    fn health_state_name(state : HealthState) -> String

    hex_decode

    fn hex_decode(text : String) -> Result[Bytes, String]

    hex_digit

    fn hex_digit(value : Int) -> Char

    Convert a hexadecimal nibble to a display character.

    hex_encode

    fn hex_encode(data : Bytes) -> String

    hex_value

    fn hex_value(value : Char) -> Int?

    implementation_version

    fn implementation_version() -> String

    information_frame

    fn information_frame(send_sequence : Int, receive_sequence : Int, payload : Bytes) -> Frame

    Create an I frame from a sequence pair and an ASDU payload.

    interrogation_object

    fn interrogation_object(address : InformationAddress, qualifier : Int) -> Result[ApplicationObject, String]

    is_leap_year

    fn is_leap_year(year : Int) -> Bool

    Whether a year is a Gregorian leap year.

    managed_transport_state_examples

    fn managed_transport_state_examples() -> Array[ManagedTransportState]

    mask_bits

    fn mask_bits(value : Int, mask : Int) -> Int

    measurement_state

    fn measurement_state(quality : QualityDescriptor) -> MeasurementState

    measurement_state_examples

    fn measurement_state_examples() -> Array[MeasurementState]

    milliseconds_since_midnight

    fn milliseconds_since_midnight(hour : Int, minute : Int, second : Int, millisecond : Int) -> Result[Int, String]

    Sum milliseconds since midnight, used by deterministic simulations.

    monitoring_type_catalog

    fn monitoring_type_catalog() -> Array[TypeDescriptor]

    negotiate_profiles

    fn negotiate_profiles(local_profile : StationProfile, remote : StationProfile) -> NegotiationDecision

    normalize_quality

    fn normalize_quality(value : Int) -> Int

    Clamp a quality byte to the protocol's low eight bits.

    normalized_object

    fn normalized_object(address : InformationAddress, value : Int, quality? : QualityDescriptor, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    normalized_set_point_object

    fn normalized_set_point_object(address : InformationAddress, value : Int, qualifier : Int) -> Result[ApplicationObject, String]

    normalized_value_asdu

    fn normalized_value_asdu(cause : Int, common_address : Int, value : Int, quality : Int) -> Bytes

    Build a normalized telemetry value.

    observe_frame_length

    fn observe_frame_length(histogram : LengthHistogram, frame : Frame) -> Unit

    Record an APDU length observation.

    operational_permission_examples

    fn operational_permission_examples() -> Array[OperationalPermission]

    ordinal_day

    fn ordinal_day(year : Int, month : Int, day : Int) -> Result[Int, String]

    Convert a month/day pair to a one-based ordinal day.

    pad_bytes

    fn pad_bytes(data : Bytes, length : Int, fill : Byte) -> Result[Bytes, String]

    parse_apdu_prefix

    fn parse_apdu_prefix(data : Bytes) -> ApduParseResult

    Parse one APDU from a byte view without requiring a socket implementation.

    parse_vsq

    fn parse_vsq(value : Int) -> Result[(Int, Bool), String]

    Validate a VSQ byte and return its count/sequence pair.

    point_change_kind_examples

    fn point_change_kind_examples() -> Array[PointChangeKind]

    point_direction

    fn point_direction(type_id : ApplicationType) -> PointDirection

    point_store_examples

    fn point_store_examples() -> Array[PointDirection]

    profile_examples

    fn profile_examples() -> Array[StationProfile]

    protocol_event_examples

    fn protocol_event_examples() -> Array[ProtocolEvent]

    Standard event constructors for host integrations.

    protocol_name

    fn protocol_name() -> String

    quality_disposition_text

    fn quality_disposition_text(disposition : QualityDisposition) -> String

    quality_finding_examples

    fn quality_finding_examples() -> Array[QualityFinding]

    quality_finding_text

    fn quality_finding_text(finding : QualityFinding) -> String

    quality_for_state

    fn quality_for_state(state : MeasurementState) -> QualityDescriptor

    Build a quality descriptor from a measurement state.

    quality_policy_examples

    fn quality_policy_examples() -> Array[QualityDisposition]

    read_object

    fn read_object(address : InformationAddress) -> Result[ApplicationObject, String]

    read_u24

    fn read_u24(data : Bytes, offset : Int) -> Result[Int, String]

    regulating_step_command_object

    fn regulating_step_command_object(address : InformationAddress, step : Int, qualifier : Int) -> Result[ApplicationObject, String]

    reset_command_object

    fn reset_command_object(address : InformationAddress, value : Int) -> Result[ApplicationObject, String]

    role_permissions

    fn role_permissions(role : OperatorRole) -> Array[OperationalPermission]

    routing_action_examples

    fn routing_action_examples() -> Array[RoutingAction]

    run_application_workloads

    fn run_application_workloads(iterations : Int) -> Result[Array[WorkloadResult], String]

    run_benchmark_workload

    fn run_benchmark_workload(rounds : Int, payload_size : Int) -> Result[BenchmarkWorkload, String]

    run_conformance_suite

    fn run_conformance_suite(vectors : Array[ConformanceVector]) -> VectorReport

    run_conformance_vector

    fn run_conformance_vector(vector : ConformanceVector) -> VectorResult

    run_database_workload

    fn run_database_workload(iterations : Int) -> Result[WorkloadResult, String]

    run_file_workload

    fn run_file_workload(iterations : Int) -> Result[WorkloadResult, String]

    run_scenario_workload

    fn run_scenario_workload(iterations : Int) -> Result[WorkloadResult, String]

    run_scheduler_workload

    fn run_scheduler_workload(iterations : Int) -> Result[WorkloadResult, String]

    run_telemetry_workload

    fn run_telemetry_workload(iterations : Int) -> Result[WorkloadResult, String]

    runtime_event_kind_examples

    fn runtime_event_kind_examples() -> Array[RuntimeEventKind]

    safe_apdu_payload

    fn safe_apdu_payload(data : Bytes) -> Result[Bytes, Diagnostic]

    scaled_object

    fn scaled_object(address : InformationAddress, value : Int, quality? : QualityDescriptor, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    scaled_set_point_object

    fn scaled_set_point_object(address : InformationAddress, value : Int, qualifier : Int) -> Result[ApplicationObject, String]

    scenario_action_examples

    fn scenario_action_examples() -> Array[ScenarioAction]

    security_examples

    fn security_examples() -> Array[AdmissionDecision]

    sequence_acknowledges

    fn sequence_acknowledges(send_cursor : Int, acknowledgement : Int) -> Bool

    Whether a sequence acknowledgement is valid for a send cursor.

    sequence_before

    fn sequence_before(start : Int, candidate : Int, limit : Int) -> Bool

    Whether candidate is strictly before limit from start.

    sequence_distance

    fn sequence_distance(start : Int, end : Int) -> Int

    Distance from start to end on the 15-bit sequence ring.

    sequence_next

    fn sequence_next(value : Int) -> Int

    Return the next sequence number on the IEC ring.

    sequence_normalize

    fn sequence_normalize(value : Int) -> Int

    Sequence numbers are modulo 32768 in IEC 104.

    sequence_previous

    fn sequence_previous(value : Int) -> Int

    Return the previous sequence number on the IEC ring.

    service_event_kind_text

    fn service_event_kind_text(kind : ServiceEventKind) -> String

    service_health_text

    fn service_health_text(health : ServiceHealth) -> String

    service_kind_examples

    fn service_kind_examples() -> Array[ServiceKind]

    service_kind_text

    fn service_kind_text(kind : SupervisorServiceKind) -> String

    service_lifecycle_text

    fn service_lifecycle_text(state : ServiceLifecycle) -> String

    service_registry_examples

    fn service_registry_examples() -> Array[SupervisorServiceKind]

    service_status_examples

    fn service_status_examples() -> Array[ServiceStatus]

    service_status_name

    fn service_status_name(status : ServiceStatus) -> String

    session_action_examples

    fn session_action_examples() -> Array[SessionAction]

    set_bit

    fn set_bit(value : Int, bit : Int, enabled : Bool) -> Int

    short_float_object

    fn short_float_object(address : InformationAddress, value : Float, quality? : QualityDescriptor, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    short_float_set_point_object

    fn short_float_set_point_object(address : InformationAddress, value : Float, qualifier : Int) -> Result[ApplicationObject, String]

    simulation_action_examples

    fn simulation_action_examples() -> Array[SimulationAction]

    simulation_event_examples

    fn simulation_event_examples() -> Array[SimulationEvent]

    single_command_object

    fn single_command_object(address : InformationAddress, state : Bool, qualifier : Int) -> Result[ApplicationObject, String]

    single_object_asdu

    fn single_object_asdu(object : ApplicationObject, cause : CauseOfTransmission, common_address : CommonAddress) -> Result[AsduEnvelope, Diagnostic]

    Build an ASDU containing one object.

    single_point_asdu

    fn single_point_asdu(cause : Int, common_address : Int, ioa : Int, status : Bool, quality : Int) -> Bytes

    Build a single-point status ASDU.

    single_point_object

    fn single_point_object(address : InformationAddress, state : Bool, quality? : StatusQuality, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    split_apdus

    fn split_apdus(data : Bytes) -> Result[(Array[Frame], Bytes), Diagnostic]

    Split a byte stream into complete APDUs and retain incomplete tails.

    split_file_segments

    fn split_file_segments(file : StoredFile, segment_size : Int) -> Result[Array[FileSegment], String]

    Generate ordered download segments from an immutable file.

    split_milliseconds_since_midnight

    fn split_milliseconds_since_midnight(value : Int) -> Result[(Int, Int, Int, Int), String]

    Split milliseconds since midnight into hour, minute, second and remainder.

    standard_conformance_vectors

    fn standard_conformance_vectors() -> Array[ConformanceVector]

    Built-in vectors cover all APCI frame families and malformed boundaries.

    station_state_reason_examples

    fn station_state_reason_examples() -> Array[StationStateReason]

    station_status_examples

    fn station_status_examples() -> Array[StationStatus]

    step_position_object

    fn step_position_object(address : InformationAddress, position : Int, transient? : Bool, quality? : StatusQuality, time_tag? : TimeTag) -> Result[ApplicationObject, String]

    supervisory_frame

    fn supervisory_frame(receive_sequence : Int) -> Frame

    Create an S frame acknowledging received I frames.

    supported_type_catalog

    fn supported_type_catalog() -> Array[TypeDescriptor]

    telemetry_state_examples

    fn telemetry_state_examples() -> Array[TelemetryState]

    test_command_object

    fn test_command_object(address : InformationAddress, value : Int) -> Result[ApplicationObject, String]

    time_tag_examples

    fn time_tag_examples() -> Array[TimeTag]

    time_tag_kind_for_type

    fn time_tag_kind_for_type(type_id : ApplicationType) -> TimeTagKind

    timer_state_examples

    fn timer_state_examples() -> Array[TimerState]

    trace_kind_examples

    fn trace_kind_examples() -> Array[TraceKind]

    transport_event_kind_examples

    fn transport_event_kind_examples() -> Array[TransportEventKind]

    transport_examples

    fn transport_examples() -> Array[ApduParseResult]

    transport_mode_examples

    fn transport_mode_examples() -> Array[TransportMode]

    transport_mode_name

    fn transport_mode_name(mode : TransportMode) -> String

    trim_trailing_bytes

    fn trim_trailing_bytes(data : Bytes, value : Byte) -> Bytes

    type_descriptor

    fn type_descriptor(type_id : ApplicationType) -> TypeDescriptor

    type_id

    fn type_id(value : Int) -> TypeId

    type_id_examples

    fn type_id_examples() -> Array[TypeId]

    type_is_supported

    fn type_is_supported(type_id : ApplicationType) -> Bool

    type_name

    fn type_name(type_id : ApplicationType) -> String

    type_wire_width

    fn type_wire_width(type_id : ApplicationType) -> Int

    u_command

    fn u_command(control : UInt16) -> UCommand

    unnumbered_frame

    fn unnumbered_frame(control : UInt16) -> Frame

    Create a U frame. The low six control bits are retained by the encoder.

    validate_application_object

    fn validate_application_object(object : ApplicationObject, profile : ValidationProfile) -> ValidationReport

    validate_common_address

    fn validate_common_address(value : Int) -> Result[CommonAddress, Diagnostic]

    validate_envelope

    fn validate_envelope(envelope : AsduEnvelope) -> ConformanceReport

    validate_frame

    fn validate_frame(frame : Frame) -> Result[Unit, String]

    Validate invariants that are independent of a concrete transport.

    validate_information_address

    fn validate_information_address(value : Int) -> Result[InformationAddress, Diagnostic]

    validate_point_store

    fn validate_point_store(store : PointStore, profile : ValidationProfile) -> ValidationReport

    validate_station_config

    fn validate_station_config(config : StationConfig, profile : ValidationProfile) -> ValidationReport

    validate_transport_frame

    fn validate_transport_frame(frame : Frame) -> Result[Unit, Diagnostic]

    Validate a frame against transport-level limits before sending it.

    validate_transport_frame_admission

    fn validate_transport_frame_admission(data : Bytes, limits : ResourceLimits) -> ValidationReport

    validation_issue_kind_examples

    fn validation_issue_kind_examples() -> Array[ValidationIssueKind]

    vector_category_examples

    fn vector_category_examples() -> Array[VectorCategory]

    vector_expectation_examples

    fn vector_expectation_examples() -> Array[VectorExpectation]

    wire_tool_examples

    fn wire_tool_examples() -> Array[Bytes]

    xor_checksum

    fn xor_checksum(data : Bytes) -> Byte