WEICZ20/moonbit-computer-interlocking/src/topology does not have a README file
pub(all) struct Signal {
id : SignalId
name : String
signal_type : SignalType
current_aspect : SignalAspect
requested_aspect : SignalAspect
is_locked : Bool
bound_node : NodeId
direction : TrackDirection
} derive(Debug)fn Signal::new(id : SignalId, name : String, signal_type : SignalType, bound_node : NodeId, direction : TrackDirection) -> Signalpub(all) struct Station {
name : String
graph : StationGraph
next_node_id : Int
next_edge_id : Int
next_track_id : Int
next_turnout_id : Int
next_signal_id : Int
} derive(Debug)fn Station::create_signal(self : Station, name : String, signal_type : SignalType, bound_node : NodeId, direction : TrackDirection) -> SignalIdfn Station::set_signal_aspect(self : Station, s_id : SignalId, aspect : SignalAspect) -> Result[Unit, String]fn Station::set_track_state(self : Station, tr_id : TrackId, state : TrackState, train_id : String) -> Result[Unit, String]fn Station::set_turnout_position(self : Station, t_id : TurnoutId, pos : TurnoutPosition) -> Result[Unit, String]fn StationGraph::find_all_paths(self : StationGraph, start : NodeId, target : NodeId, max_depth : Int) -> Array[GraphPath]fn StationGraph::is_turnout_path_active(self : StationGraph, from_node : NodeId, to_node : NodeId) -> Boolfn TopologyBuilder::add_signal_at(self : TopologyBuilder, name : String, signal_type : SignalType, node_name : String, direction : TrackDirection) -> SignalIdfn TopologyBuilder::add_track_section(self : TopologyBuilder, name : String, length : Double, speed : Double, start_name : String, end_name : String, direction : TrackDirection) -> TrackIdfn TopologyBuilder::add_turnout_node(self : TopologyBuilder, name : String, base_name : String, normal_name : String, reverse_name : String) -> TurnoutIdfn TopologyEdge::new(id : EdgeId, from_node : NodeId, to_node : NodeId, track_id : TrackId, weight : Double, direction : TrackDirection) -> TopologyEdgepub(all) struct TopologyIssue {
kind : TopologyIssueKind
resource : String
detail : String
} derive(Debug)fn TopologyIssue::new(kind : TopologyIssueKind, resource : String, detail : String) -> TopologyIssuepub(all) struct TopologyValidationReport {
issues : Array[TopologyIssue]
error_count_value : Int
} derive(Debug)pub(all) struct TrackSegment {
id : TrackId
name : String
length_meters : Double
speed_limit_kmh : Double
start_node : NodeId
end_node : NodeId
direction : TrackDirection
state : TrackState
occupying_train_id : String
} derive(Debug)fn TrackSegment::new(id : TrackId, name : String, length_meters : Double, speed_limit_kmh : Double, start_node : NodeId, end_node : NodeId, direction : TrackDirection) -> TrackSegmentpub(all) struct Turnout {
id : TurnoutId
name : String
position : TurnoutPosition
target_position : TurnoutPosition
is_locked : Bool
is_in_fault : Bool
normal_next_node : NodeId
reverse_next_node : NodeId
base_node : NodeId
} derive(Debug)Install
Download zipMoonBit Railway Computer Interlocking (CI) Safety Logic Engine