mokomoking2501/MoonECAT/runtime/simulation does not have a README file
pub(open) trait CoSimAdapter {
fn init_(Self, CoSimConfig) -> Unit
fn write_outputs(Self, ProcessImage, ProcessImageSlice) -> Unit
fn step(Self, SimTime, Int64) -> SimStepResult
fn read_inputs(Self, ProcessImage, ProcessImageSlice) -> Unit
fn shutdown(Self) -> Unit
}pub(open) trait Timebase {
fn domain(Self) -> ClockDomain
fn now_ns(Self) -> Int64
fn resolution_ns(Self) -> Int64
fn is_monotonic(Self) -> Bool
}pub(all) enum BridgeTransport {
UnixSocket(String)
NamedPipe(String)
SharedMemory(name~ : String, size~ : Int)
} derive(Debug)pub(all) struct CycleTimingReport {
nominal_period_ns : Int64
actual_period_ns : Int64
jitter_ns : Int64
domain : ClockDomain
} derive(Eq, Debug)pub(all) struct DriftCompensationReport {
update_count : Int64
last_error_ns : Int64
integral_error_ns : Int64
total_correction_ns : Int64
estimated_drift_ppb : Int64
converged : Bool
} derive(Debug)pub(all) struct DriftCompensator {
gains : DriftCompensationGains
target_offset_ns : Int64
integral_error_ns : Int64
last_error_ns : Int64
total_correction_ns : Int64
update_count : Int64
max_integral_ns : Int64
active : Bool
} derive(Debug)fn DriftCompensator::compensate(self : DriftCompensator, sync : TimebaseSync, reference_ns : Int64, local_ns : Int64) -> Int64fn DriftCompensator::new(gains? : DriftCompensationGains, target_offset_ns? : Int64, max_integral_ns? : Int64) -> DriftCompensatorfn DriftCompensator::report(self : DriftCompensator, sync : TimebaseSync) -> DriftCompensationReportpub(all) struct ExternalBridgeConfig {
transport : BridgeTransport
step_timeout_ns : Int64
auto_launch : Bool
launch_command : String
launch_cwd : String
} derive(Debug)pub(all) struct ExternalProcessBridge {
config : ExternalBridgeConfig
state : BridgeState
output_size : Int
input_size : Int
step_count : Int64
total_latency_ns : Int64
} derive(Debug)impl CoSimAdapter for LoopbackCoSimAdapterfn read_inputs(self : LoopbackCoSimAdapter, image : ProcessImage, slice : ProcessImageSlice) -> Unitfn write_outputs(self : LoopbackCoSimAdapter, _image : ProcessImage, _slice : ProcessImageSlice) -> Unitpub(all) struct TaskDescriptor {
name : String
priority : Int
cycle_divisor : Int
slice : ProcessImageSlice
} derive(Eq, Debug)pub(all) struct TaskSchedule {
base_period_ns : Int64
tasks : Array[TaskDescriptor]
} derive(Eq, Debug)pub(all) struct TimebaseSync {
reference_domain : ClockDomain
local_domain : ClockDomain
offset_ns : Int64
drift_ppb : Int64
sync_count : Int64
last_sync_ns : Int64
} derive(Eq, Debug)pub struct VirtualTimebase {
current_ns : Int64
}impl Timebase for VirtualTimebasefn cycle_timing_report(nominal_period_ns : Int64, prev_ns : Int64, curr_ns : Int64, domain : ClockDomain) -> CycleTimingReportfn decode_step_response(data : Bytes, input_size : Int) -> (Byte, Bytes)fn encode_step_request(sim_time_ns : Int64, dt_ns : Int64, outputs : Bytes, output_size : Int) -> Bytesfn slice_inputs_view(image : MutableProcessImage, slice : ProcessImageSlice) -> (FixedArray[Byte], Int, Int)fn validate_multi_rate(schedule : TaskSchedule, max_hyperperiod? : Int, max_tasks_per_cycle? : Int, max_io_bytes_per_cycle? : Int) -> Array[String]fn write_slice_outputs_inplace(image : MutableProcessImage, slice : ProcessImageSlice, src : FixedArray[Byte], src_offset : Int) -> Unit