NRF SDK 0.9

Reference

Observation

Observed trains, tracks, signals, services, clock and collections.

Usage context

ModulePackageSDK source
Kotlin/JVMfr.nimby.sdkkotlin-client/src/main/kotlin/fr/nimby/sdk/Observation.kt

Public API for SDK 0.9.0-alpha.2. Each entry provides the Kotlin signature and its contract: what the value means, conditions of use and effects to understand. Choose imports from the module shown above.

Imports on this page
import fr.nimby.sdk.Train
import fr.nimby.sdk.Position
import fr.nimby.sdk.Track
import fr.nimby.sdk.Station
import fr.nimby.sdk.TrackNode
import fr.nimby.sdk.TrackJunction
import fr.nimby.sdk.TrackUsage
import fr.nimby.sdk.Signal
import fr.nimby.sdk.Service
import fr.nimby.sdk.TrainDetails
import fr.nimby.sdk.Platform
import fr.nimby.sdk.LineStop
import fr.nimby.sdk.SimulationClock
import fr.nimby.sdk.SimulationTimeChange
import fr.nimby.sdk.Observation
import fr.nimby.sdk.ObservationClient
import fr.nimby.sdk.GameProcess
import fr.nimby.sdk.GameProcesses
import fr.nimby.sdk.SdkException

Choose a read and interpret its results

In a mod, use ToolContext.trains(query). In a JVM application, use game.trains.snapshot(query = query); selecting a train also requests its line plan. One query batches all trains: do not create a snapshot per train. Clock reads and targeted single-train reads are separate.

TrainQuery optionDefaultRequested data
includeServicetrueObserved state, service and assignment.
includeLocationstruePositions and required location references.
includeCharacteristicsfalseConfigured and current material profiles.
includeTimetablesfalseAvailable timetable information; implies includeService.
includeTagsfalseDeclared tags and inheritance references; implies includeLines.
includePassengersfalseObserved occupants, distinct from capacity.
includeLinesfalseLine catalog, including lines with no assigned train.
includeCompositionfalseOrdered vehicles of configured and current compositions and referenced models.
ValueUnit and contract
Train.speedMps / Train.speedKmhCurrent speed. Native: an unavailable measurement remains null. JVM: also check speedDefaulted before treating a fallback value as a measurement.
maximumSpeedMps / maximumSpeedKmhMaterial maximum speed, in m/s or km/h; distinct from current speed and the track speed limit.
lengthM / emptyMassKg / maximumAccelerationMps2Metres, kilograms, metres per second squared.
powerW / tractiveForceNWatts and newtons.
passengers / passengerCapacity / carCountOccupants, capacity and vehicle count: three distinct quantities.
configured / current / compositionIndependent profiles, without filling missing values from one another. Null composition: unknown or unrequested; empty list: observed empty composition.
predictedArrivalDelayUs / predictedArrivalDelaySecondsSigned estimate in microseconds or seconds; negative for predicted early arrival. Neither deadline age nor priority.
arrivalOffsetSeconds / departureOffsetSecondsValidated offsets in seconds from the line-plan origin. Do not convert them into a train’s absolute date.
arrivalTimeUs / departureTimeUs / dispatchRetryTimeUsMicroseconds from the simulation origin, not 1970. Use calendar helpers; dates remain null when the origin is unknown.
capturedAtMillis / ageMillisComputer UTC time / monotonic age when copying; distinct from the game calendar.

Typed identifiers are opaque. TimetableShiftId is unique only together with its TimetableId. LineType distinguishes only Depot and Other; no passenger/freight category is inferred. An unavailable timetable name remains null. Tags are labels without automatic priority; incomplete or cyclic inheritance remains unknown. VehicleModel.nameEnglish retains the English catalog name.

TrainVehicle describes a vehicle within a composition. The nimby.Vehicle type used in driving calculations is a different contract. Do not mix identically named classes from nimby and fr.nimby.sdk.

Train

fr.nimby.sdk · class
data class Train(val id: Long, val name: String, val position: Position?, val speedKmh: Double?, val speedDefaulted: Boolean)

Basic train observation in a JVM snapshot. Use snapshot.train(trainId) to join service, locations and metadata from that same snapshot.

Train.id

fr.nimby.sdk · val
val id: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

Train.name

fr.nimby.sdk · val
val name: String

Observed train name; renames do not change its identity.

Train.position

fr.nimby.sdk · val
val position: Position?

Observable position; null when unavailable.

Train.speedKmh

fr.nimby.sdk · val
val speedKmh: Double?

Measured speed in km/h; null for unavailable or fallback measurements.

Train.speedDefaulted

fr.nimby.sdk · val
val speedDefaulted: Boolean

Indicates a fallback game speed. Measured speed remains unknown in this case; it does not prove a stop.

Train.trainId

fr.nimby.sdk · val
val trainId: TrainId

The same identity as a TrainId.

Position

fr.nimby.sdk · class
data class Position(val trackId: Long, val fraction: Double, val direction: Int)

Position on a track: longitudinal fraction and direction. For construction, use observed identities and a fraction strictly inside the track.

Position.trackId

fr.nimby.sdk · val
val trackId: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

Position.fraction

fr.nimby.sdk · val
val fraction: Double

Longitudinal fraction: 0 at track origin, 1 at its end. Direction does not change this origin.

Position.direction

fr.nimby.sdk · val
val direction: Int

Observed direction; -1 or 1 required for construction. Do not infer a geographic orientation from this value.

Position.track

fr.nimby.sdk · val
val track: TrackId

The same identity as a TrackId.

Track

fr.nimby.sdk · class
data class Track(val id: Long, val stationId: Long?, val speedLimitKmh: Double)

Observed track with its possible station and speed limit. Its length belongs to TrackMetric.

Track.id

fr.nimby.sdk · val
val id: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

Track.stationId

fr.nimby.sdk · val
val stationId: Long?

Observed associated station, when available.

Track.speedLimitKmh

fr.nimby.sdk · val
val speedLimitKmh: Double

Track speed limit in km/h, distinct from the material limit.

Track.trackId

fr.nimby.sdk · val
val trackId: TrackId

The same identity as a TrackId.

Track.station

fr.nimby.sdk · val
val station: StationId?

stationId in typed form; null if no identity is available.

Station

fr.nimby.sdk · class
data class Station(val id: Long, val name: String)

Station from the copied catalogue. Use its identity for joins and its name for display.

Station.id

fr.nimby.sdk · val
val id: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

Station.name

fr.nimby.sdk · val
val name: String

Station name copied during capture.

Station.stationId

fr.nimby.sdk · val
val stationId: StationId

The same identity as a StationId.

TrackNode

fr.nimby.sdk · class
data class TrackNode(val id: Long, val linkA: Long?, val linkB: Long?, val x: Double, val y: Double)

Element of the observed track graph. Links may be incomplete or non-reciprocal; they prove neither switch state nor a reserved route.

TrackNode.id

fr.nimby.sdk · val
val id: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

TrackNode.linkA

fr.nimby.sdk · val
val linkA: Long?

Observed link on side A; null means unknown/absent, not a proven buffer stop.

TrackNode.linkB

fr.nimby.sdk · val
val linkB: Long?

Observed link on side B; null means unknown/absent, not a proven buffer stop.

TrackNode.x

fr.nimby.sdk · val
val x: Double

Projected game coordinate; not longitude or track length.

TrackNode.y

fr.nimby.sdk · val
val y: Double

Projected game coordinate; not latitude or track length.

TrackJunction

fr.nimby.sdk · class
data class TrackJunction(val branchTrackId: Long, val mainTrackId: Long, val fraction: Double, val mainDirection: Int, val branchDirection: Int)

Observed branch attachment to a main track. Describes connection geometry without guaranteeing passage permission.

TrackJunction.branchTrackId

fr.nimby.sdk · val
val branchTrackId: Long

Branch-track identity.

TrackJunction.mainTrackId

fr.nimby.sdk · val
val mainTrackId: Long

Main-track identity.

TrackJunction.fraction

fr.nimby.sdk · val
val fraction: Double

Attachment fraction on the main track.

TrackJunction.mainDirection

fr.nimby.sdk · val
val mainDirection: Int

Direction approaching the attachment on the main track.

TrackJunction.branchDirection

fr.nimby.sdk · val
val branchDirection: Int

Direction leaving the attachment onto the branch, without reversal.

TrackUsage

fr.nimby.sdk · class
data class TrackUsage(val trainId: Long, val trackId: Long, val from: Double, val to: Double)

Observed reservation or occupation interval, according to its source table. Intervals may overlap; this is neither a permission nor an ordered route.

TrackUsage.trainId

fr.nimby.sdk · val
val trainId: Long

Train associated with this interval.

TrackUsage.trackId

fr.nimby.sdk · val
val trackId: Long

Track carrying this interval.

TrackUsage.from

fr.nimby.sdk · val
val from: Double

Lower track-fraction bound; less than or equal to to.

TrackUsage.to

fr.nimby.sdk · val
val to: Double

Upper track-fraction bound; does not indicate travel direction.

Signal

fr.nimby.sdk · class
data class Signal(val id: Long, val position: Position, val kind: Int, val textureState: Int?, val specificState: String?, val texturePath: String?)

Copied signal with its position and available display information. An image is not proof of movement permission.

Signal.id

fr.nimby.sdk · val
val id: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

Signal.position

fr.nimby.sdk · val
val position: Position

Observed signal position.

Signal.kind

fr.nimby.sdk · val
val kind: Int

Kind code reported by the game; do not confuse it with aspect or priority.

Signal.textureState

fr.nimby.sdk · val
val textureState: Int?

Observed image index, when available; belongs to the signal catalogue.

Signal.specificState

fr.nimby.sdk · val
val specificState: String?

Observed specific state in system:state form; null when unavailable.

Signal.texturePath

fr.nimby.sdk · val
val texturePath: String?

Observed image path; null when unavailable. Does not describe a driving rule.

Service

fr.nimby.sdk · class
data class Service(
    val trainId: Long, val lineName: String?, val status: Int?, val stationId: Long?, val flags: Int,
    val lineId: Long? = null, val stopStationId: Long? = null, val stopIndex: Int? = null,
    val gameEpochSeconds: Long? = null, val gameTimeUs: Long? = null,
    val arrivalTimeUs: Long? = null, val departureTimeUs: Long? = null, val dispatchTimeUs: Long? = null,
    val motionFlags: Int? = null, val alert: Int? = null, val locationTrackId: Long? = null,
    val stopTrackId: Long? = null, val lineKind: Int? = null,
    val arrivalRemainingSeconds: Double? = null, val departureRemainingSeconds: Double? = null,
    val dispatchRemainingSeconds: Double? = null,
)

Copied service data. Use state, alertState, hidden, onNetwork and converted dates to interpret results; raw values remain available for diagnostics.

Service.trainId

fr.nimby.sdk · val
val trainId: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

Service.lineName

fr.nimby.sdk · val
val lineName: String?

Optional observed line name.

Service.status

fr.nimby.sdk · val
val status: Int?

Observed state code; prefer the typed state property.

Service.stationId

fr.nimby.sdk · val
val stationId: Long?

Service-location station identity when available; distinct from stopStationId.

Service.flags

fr.nimby.sdk · val
val flags: Int

Availability indicators for this record. Prefer optional and typed properties in application logic.

Service.lineId

fr.nimby.sdk · val
val lineId: Long? = null

Optional service-line identity.

Service.stopStationId

fr.nimby.sdk · val
val stopStationId: Long? = null

Optional target-stop station identity.

Service.stopIndex

fr.nimby.sdk · val
val stopIndex: Int? = null

Zero-based current stop index; null when unknown.

Service.gameEpochSeconds

fr.nimby.sdk · val
val gameEpochSeconds: Long? = null

UTC simulation-calendar origin in seconds since 1970; null when unknown.

Service.gameTimeUs

fr.nimby.sdk · val
val gameTimeUs: Long? = null

Observed counter in microseconds from the simulation origin; not a Unix date.

Service.arrivalTimeUs

fr.nimby.sdk · val
val arrivalTimeUs: Long? = null

Optional active arrival deadline in microseconds from the simulation origin.

Service.departureTimeUs

fr.nimby.sdk · val
val departureTimeUs: Long? = null

Optional active departure deadline in microseconds from the simulation origin.

Service.dispatchTimeUs

fr.nimby.sdk · val
val dispatchTimeUs: Long? = null

Dispatch-retry deadline in microseconds from the simulation origin.

Service.motionFlags

fr.nimby.sdk · val
val motionFlags: Int? = null

Observed presence indicators; prefer hidden and onNetwork.

Service.alert

fr.nimby.sdk · val
val alert: Int? = null

Observed alert code; prefer alertState.

Service.locationTrackId

fr.nimby.sdk · val
val locationTrackId: Long? = null

Optional service-location track; distinct from the train’s geometric position.

Service.stopTrackId

fr.nimby.sdk · val
val stopTrackId: Long? = null

Optional target-stop track.

Service.lineKind

fr.nimby.sdk · val
val lineKind: Int? = null

Raw line classification; prefer isDepotLine or Line.type.

Service.arrivalRemainingSeconds

fr.nimby.sdk · val
val arrivalRemainingSeconds: Double? = null

Seconds remaining to the arrival deadline; may be negative. Not predicted commercial delay.

Service.departureRemainingSeconds

fr.nimby.sdk · val
val departureRemainingSeconds: Double? = null

Seconds remaining to the departure deadline, clamped to zero; null when unknown.

Service.dispatchRemainingSeconds

fr.nimby.sdk · val
val dispatchRemainingSeconds: Double? = null

Seconds remaining before a dispatch retry, clamped to zero; null when unknown.

Service.train

fr.nimby.sdk · val
val train: TrainId

Typed identity of this service’s train.

Service.line

fr.nimby.sdk · val
val line: LineId?

lineId in typed form, without another read.

Service.state

fr.nimby.sdk · val
val state: TrainState?

Typed state derived from the observed code; null remains unavailable, an unrecognised code becomes Other.

Service.alertState

fr.nimby.sdk · val
val alertState: TrainAlert?

Typed alert derived from the observed code; null remains unavailable.

Service.hidden

fr.nimby.sdk · val
val hidden: Boolean?

Reported hidden presence, validated independently of complete service data; null when unknown.

Service.onNetwork

fr.nimby.sdk · val
val onNetwork: Boolean?

Optional reported network presence; does not prove permission.

Service.isDepotLine

fr.nimby.sdk · val
val isDepotLine: Boolean?

true for a depot line, false for another known classification; null when unknown.

Service.observedAt

fr.nimby.sdk · val
val observedAt: java.time.Instant?

Observed counter converted to the game UTC calendar; null if origin/counter is missing or conversion is out of range.

Service.arrival

fr.nimby.sdk · val
val arrival: java.time.Instant?

UTC date of the active arrival deadline. null if conversion is impossible; not necessarily the commercial timetable.

Service.departure

fr.nimby.sdk · val
val departure: java.time.Instant?

UTC date of the active departure deadline. null if conversion is impossible; not necessarily the commercial timetable.

Service.dispatchRetry

fr.nimby.sdk · val
val dispatchRetry: java.time.Instant?

UTC dispatch-retry date; not a commercial departure time. null when not convertible.

TrainDetails

fr.nimby.sdk · class
data class TrainDetails(val trainId: Long, val passengers: Int?, val scheduleId: Long?, val shiftId: Long?,
                        val orderIndex: Int? = null, val orderMode: Int? = null)

Assignment and occupants copied according to requested groups. Typed properties do not calculate a next scheduled time.

TrainDetails.trainId

fr.nimby.sdk · val
val trainId: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

TrainDetails.passengers

fr.nimby.sdk · val
val passengers: Int?

Observed occupants; null when unknown or unrequested. Not capacity.

TrainDetails.scheduleId

fr.nimby.sdk · val
val scheduleId: Long?

Opaque assigned timetable identity; null when unavailable.

TrainDetails.shiftId

fr.nimby.sdk · val
val shiftId: Long?

Shift key within scheduleId; do not compare it alone across timetables.

TrainDetails.orderIndex

fr.nimby.sdk · val
val orderIndex: Int? = null

Observed zero-based order index; null when unavailable.

TrainDetails.orderMode

fr.nimby.sdk · val
val orderMode: Int? = null

Observed order mode; prefer isMothballed for mothballing.

TrainDetails.train

fr.nimby.sdk · val
val train: TrainId

Typed train identity.

TrainDetails.timetable

fr.nimby.sdk · val
val timetable: Timetable?

Timetable built from scheduleId, with identity only; null if scheduleId is missing.

TrainDetails.shift

fr.nimby.sdk · val
val shift: TimetableShiftId?

Composite identity available only when timetable and shift key are known.

TrainDetails.isMothballed

fr.nimby.sdk · val
val isMothballed: Boolean?

Indicates mothballing from a known order mode; null when uninterpretable.

Platform

fr.nimby.sdk · class
data class Platform(val trackId: Long, val stationId: Long?, val name: String?)

Platform information associated with a track. A missing name does not imply an absent platform.

Platform.trackId

fr.nimby.sdk · val
val trackId: Long

Observed track associated with the platform.

Platform.stationId

fr.nimby.sdk · val
val stationId: Long?

Associated station, when known.

Platform.name

fr.nimby.sdk · val
val name: String?

Optional observed platform name.

LineStop

fr.nimby.sdk · class
data class LineStop(val lineId: Long, val trackId: Long, val stationId: Long?, val index: Int, val arrivalOffsetSeconds: Int?, val departureOffsetSeconds: Int?)

Stop or waypoint in a line plan; times are offsets relative to the plan, not absolute dates for the selected train.

LineStop.lineId

fr.nimby.sdk · val
val lineId: Long

Opaque value to compare and pass unchanged; do not decode it or reuse it in another game.

LineStop.trackId

fr.nimby.sdk · val
val trackId: Long

Stop-track identity.

LineStop.stationId

fr.nimby.sdk · val
val stationId: Long?

Stop station; null for a waypoint outside stations or unknown data.

LineStop.index

fr.nimby.sdk · val
val index: Int

Zero-based stop index in the line plan.

LineStop.arrivalOffsetSeconds

fr.nimby.sdk · val
val arrivalOffsetSeconds: Int?

Arrival offset in seconds from the plan origin; null when unknown. Not an absolute train date.

LineStop.departureOffsetSeconds

fr.nimby.sdk · val
val departureOffsetSeconds: Int?

Departure offset in seconds from the plan origin; null when unknown.

LineStop.line

fr.nimby.sdk · val
val line: LineId

Typed line identity.

LineStop.track

fr.nimby.sdk · val
val track: TrackId

Typed track identity.

LineStop.station

fr.nimby.sdk · val
val station: StationId?

Typed station identity when known.

LineStop.plannedDwellSeconds

fr.nimby.sdk · val
val plannedDwellSeconds: Long?

departureOffsetSeconds minus arrivalOffsetSeconds, in seconds; null if either offset is missing.

SimulationClock

fr.nimby.sdk · class
data class SimulationClock(val epochSeconds: Long, val ticks: Long)

Copied simulation-calendar clock. Combine origin and counter with toInstant; do not confuse it with computer time.

SimulationClock.epochSeconds

fr.nimby.sdk · val
val epochSeconds: Long

Game-calendar origin in UTC seconds since 1970; may precede 1970.

SimulationClock.ticks

fr.nimby.sdk · val
val ticks: Long

Simulation counter in hundredths of a second from the origin; must be nonnegative for toInstant.

SimulationClock.toInstant

fr.nimby.sdk · fun
fun toInstant(): java.time.Instant

Adds origin and ticks while preserving hundredths. Rejects negative ticks and out-of-range dates; no game read.

SimulationTimeChange

fr.nimby.sdk · class
data class SimulationTimeChange(val clock: SimulationClock, val interventions: Long)

Result of an explicit date change. Contains the returned clock and intervention count for the requested recalculation.

SimulationTimeChange.clock

fr.nimby.sdk · val
val clock: SimulationClock

Clock returned after the command; read again later for new state.

SimulationTimeChange.interventions

fr.nimby.sdk · val
val interventions: Long

Recalculation intervention count; zero when no recalculation was requested.

Observation

fr.nimby.sdk · class
data class Observation(
    val capturedAtMillis: Long,
    val processId: Int,
    val gameHash: String,
    val trains: List<Train>,
    val tracks: List<Track>,
    val stations: List<Station>,
    val nodes: List<TrackNode>,
    val junctions: List<TrackJunction>,
    val signals: List<Signal>,
    val services: List<Service>,
    val details: List<TrainDetails>,
    val platforms: List<Platform>,
    val reservations: List<TrackUsage>?,
    val occupations: List<TrackUsage>?,
    val selectedPath: List<Long>?,
    val lineStops: List<LineStop>?,
    val clock: SimulationClock?,
    
    val trackMetrics: List<TrackMetric>? = null,
    
    val lines: List<Line>? = null, val tags: List<Tag>? = null, val trainMetadata: List<TrainMetadata>? = null,
    val vehicleModels: List<VehicleModel>? = null,
)

Set of copied values, retainable after closing. Contents depend on capture mode and requested groups. Local joins refresh nothing; a snapshot does not guarantee an atomic tick.

Observation.capturedAtMillis

fr.nimby.sdk · val
val capturedAtMillis: Long

Computer UTC timestamp in milliseconds since 1970. It does not measure simulation time.

Observation.processId

fr.nimby.sdk · val
val processId: Int

PID of the game supplying this snapshot; explicitly choose the game when connecting.

Observation.gameHash

fr.nimby.sdk · val
val gameHash: String

Observed game-binary fingerprint, useful for compatibility diagnostics; not a save identity.

Observation.trains

fr.nimby.sdk · val
val trains: List<Train>

Basic observations of trains in the batch; selectedTrain does not filter this list.

Observation.tracks

fr.nimby.sdk · val
val tracks: List<Track>

Tracks requested by capture mode. A specialised query without locations can leave this list empty.

Observation.stations

fr.nimby.sdk · val
val stations: List<Station>

Stations requested by capture mode; an empty list does not prove a station-free world.

Observation.nodes

fr.nimby.sdk · val
val nodes: List<TrackNode>

Observed full-capture graph; empty in specialised train captures and possibly when unavailable.

Observation.junctions

fr.nimby.sdk · val
val junctions: List<TrackJunction>

Observed full-capture attachments; empty in specialised captures without proving there are no junctions.

Observation.signals

fr.nimby.sdk · val
val signals: List<Signal>

Observed full-capture signals; specialised train captures do not request them.

Observation.services

fr.nimby.sdk · val
val services: List<Service>

Requested, observable services; an empty list can also result from an unrequested or unavailable group.

Observation.details

fr.nimby.sdk · val
val details: List<TrainDetails>

Assignments/occupants according to read options; interpret each optional property separately.

Observation.platforms

fr.nimby.sdk · val
val platforms: List<Platform>

Full-capture platforms when observable; not requested in specialised captures.

Observation.reservations

fr.nimby.sdk · val
val reservations: List<TrackUsage>?

Reservation intervals when observable; null in a specialised capture. A reservation is not an occupation.

Observation.occupations

fr.nimby.sdk · val
val occupations: List<TrackUsage>?

Occupation intervals when observable; null in a specialised capture. An unknown table does not prove a clear track.

Observation.selectedPath

fr.nimby.sdk · val
val selectedPath: List<Long>?

Selected train path in a full capture; null when unrequested or unavailable. Not a passage permission.

Observation.lineStops

fr.nimby.sdk · val
val lineStops: List<LineStop>?

Line plan requested for selectedTrain; null when unrequested or unavailable. May extend beyond its partial run.

Observation.clock

fr.nimby.sdk · val
val clock: SimulationClock?

Simulation clock copied with the snapshot, when available.

Observation.trackMetrics

fr.nimby.sdk · val
val trackMetrics: List<TrackMetric>? = null

Observed full-capture track lengths; null when unavailable or unrequested. A missing row remains unknown.

Observation.lines

fr.nimby.sdk · val
val lines: List<Line>? = null

Explicitly requested line catalogue; null when unrequested or unavailable.

Observation.tags

fr.nimby.sdk · val
val tags: List<Tag>? = null

Explicitly requested tag catalogue; null when unrequested or unavailable.

Observation.trainMetadata

fr.nimby.sdk · val
val trainMetadata: List<TrainMetadata>? = null

Rich train metadata according to TrainQuery; null outside this capture or when unavailable.

Observation.vehicleModels

fr.nimby.sdk · val
val vehicleModels: List<VehicleModel>? = null

Models referenced by requested compositions; null when unrequested or unavailable.

Observation.train

fr.nimby.sdk · fun
fun train(id: Long): TrainRecord?

Indexed lookup of joined train record in this snapshot only. null if no matching data exists; no new game read.

Observation.service

fr.nimby.sdk · fun
fun service(trainId: Long): Service?

Indexed lookup of train service in this snapshot only. null if no matching data exists; no new game read.

Observation.train

fr.nimby.sdk · fun
fun train(id: TrainId): TrainRecord?

Indexed lookup of joined train record in this snapshot only. null if no matching data exists; no new game read.

Observation.service

fr.nimby.sdk · fun
fun service(id: TrainId): Service?

Indexed lookup of train service in this snapshot only. null if no matching data exists; no new game read.

Observation.details

fr.nimby.sdk · fun
fun details(trainId: Long): TrainDetails?

Indexed lookup of train assignment/occupant details in this snapshot only. null if no matching data exists; no new game read.

Observation.details

fr.nimby.sdk · fun
fun details(id: TrainId): TrainDetails?

Indexed lookup of train assignment/occupant details in this snapshot only. null if no matching data exists; no new game read.

Observation.station

fr.nimby.sdk · fun
fun station(id: Long): Station?

Indexed lookup of station in this snapshot only. null if no matching data exists; no new game read.

Observation.station

fr.nimby.sdk · fun
fun station(id: StationId): Station?

Indexed lookup of station in this snapshot only. null if no matching data exists; no new game read.

Observation.track

fr.nimby.sdk · fun
fun track(id: Long): Track?

Indexed lookup of track in this snapshot only. null if no matching data exists; no new game read.

Observation.track

fr.nimby.sdk · fun
fun track(id: TrackId): Track?

Indexed lookup of track in this snapshot only. null if no matching data exists; no new game read.

Observation.platform

fr.nimby.sdk · fun
fun platform(trackId: Long): Platform?

Indexed lookup of platform information for this track in this snapshot only. null if no matching data exists; no new game read.

Observation.platform

fr.nimby.sdk · fun
fun platform(trackId: TrackId): Platform?

Indexed lookup of platform information for this track in this snapshot only. null if no matching data exists; no new game read.

Observation.line

fr.nimby.sdk · fun
fun line(id: LineId): Line?

Indexed lookup of catalogue line in this snapshot only. null if no matching data exists; no new game read.

Observation.tag

fr.nimby.sdk · fun
fun tag(id: TagId): Tag?

Indexed lookup of catalogue tag in this snapshot only. null if no matching data exists; no new game read.

Observation.metadata

fr.nimby.sdk · fun
fun metadata(id: TrainId): TrainMetadata?

Indexed lookup of rich train metadata in this snapshot only. null if no matching data exists; no new game read.

Observation.tagsForLine

fr.nimby.sdk · fun
fun tagsForLine(id: LineId): List<Tag>?

Combines declared tags of the line and its parents without duplicates. null if a line, parent or tags are unknown, a cycle occurs, or limits are exceeded. Produces no priority.

ObservationClient

fr.nimby.sdk · interface
interface ObservationClient : AutoCloseable

Closeable observation-source contract. Useful for injecting a controlled source into application tests; NimbyClient is the game-connected implementation.

ObservationClient.capture

fr.nimby.sdk · fun
fun capture(selectedTrainId: Long? = null): Observation

Captures network tables and ordinary observations. A selected train adds its path and line plan; it does not filter the train list. Tables are copied without guaranteeing an atomic tick.

GameProcess

fr.nimby.sdk · class
data class GameProcess(val pid: Int, val executable: String)

Discovered game process. Discovery proves neither a loaded game nor SDK compatibility.

GameProcess.pid

fr.nimby.sdk · val
val pid: Int

Process identity to pass explicitly to connect.

GameProcess.executable

fr.nimby.sdk · val
val executable: String

Executable path reported by the system.

GameProcesses

fr.nimby.sdk · object
object GameProcesses

Discovery of visible NIMBY Rails processes. Prefer Nimby.runningGames at the application entry point.

GameProcesses.discover

fr.nimby.sdk · fun
fun discover(): List<GameProcess>

Lists recognised game executables among visible processes. Returns an empty list when none is visible; neither selects nor opens a connection.

SdkException

fr.nimby.sdk · class
class SdkException(val status: Int, operation: String) : IllegalStateException

SDK operation failure. Retain message and status for diagnostics; distinguish it from an optional null result. Do not automatically repeat a write after an exception.

SdkException.status

fr.nimby.sdk · val
val status: Int

Failure code: notably 2 inaccessible process/file, 7 unsupported game, 8 unavailable data, 11 closed game. Retain other codes without inventing their meaning.