NRF Guide

Référence

NimbyClient

Connexion, captures, lectures ciblées et commandes du client Kotlin/JVM.

Contexte d’utilisation

ModulePackageSource SDK
Kotlin/JVMfr.nimby.sdkkotlin-client/src/main/kotlin/fr/nimby/sdk/NimbyClient.kt

Signatures extraites de la version 0.8.0-alpha.1. Les paramètres, leurs valeurs par défaut et les propriétés de constructeur sont conservés. Les corps des méthodes ne font pas partie de cette référence.

NimbyClient

fr.nimby.sdk · class
class NimbyClient : ObservationClient

Owns one session. All returned observations are immutable JVM copies. Construction réservée au SDK : utilisez la fonction de création ou le contexte fourni.

NimbyClient.Companion.open

fr.nimby.sdk · fun
fun open(libraryPath: Path, processId: Int): NimbyClient

NimbyClient.readTrain

fr.nimby.sdk · fun
@Synchronized fun readTrain(trainId: Long): DrivingObservation?

Reads only this train. No network capture, hook installation or game write. Null means absent/unstable data; other native failures throw SdkException. Serialized with capture(), commands and close() on this connection. A result owns JVM values and remains usable after the client is closed.

NimbyClient.prepareConstruction

fr.nimby.sdk · fun
@Synchronized fun prepareConstruction(sourceSignal: Long): ConstructionResult =

Explicitly loads the experimental construction bridge. Capture alone never does.

NimbyClient.createSignals

fr.nimby.sdk · fun
@Synchronized fun createSignals(token: Long, sourceSignal: Long, positions: List<Position>): ConstructionResult =

NimbyClient.undoConstruction

fr.nimby.sdk · fun
@Synchronized fun undoConstruction(token: Long): ConstructionResult = construction(3,token,0,emptyList())

Refuses if another command replaced the series at the top of native undo history.

NimbyClient.pollConstruction

fr.nimby.sdk · fun
@Synchronized fun pollConstruction(token: Long): ConstructionResult

Refuses if another command replaced the series at the top of native undo history.

NimbyClient.capture

fr.nimby.sdk · fun
@Synchronized override fun capture(selectedTrainId: Long?): Observation

NimbyClient.setSimulationDateTime

fr.nimby.sdk · fun
@Synchronized fun setSimulationDateTime(utc: java.time.Instant, recalculateTrains: Boolean = false): SimulationTimeChange

Explicit mutation, never retried. A failure can follow partial native work; capture again before deciding on another action. Input uses whole UTC seconds; the native subsecond timer phase is preserved in the returned clock.

NimbyClient.showSignalTextureFor

fr.nimby.sdk · fun
@Synchronized fun showSignalTextureFor(signal: Long, catalogue: String, path: String, durationMillis: Int)

Visual override only. Does not change signalling permissions or mod decisions.

NimbyClient.restoreSignalTexture

fr.nimby.sdk · fun
@Synchronized fun restoreSignalTexture(signal: Long)

NimbyClient.modControl

fr.nimby.sdk · fun
@Synchronized fun modControl(modId: String, request: ControlRequest): ControlResponse

Sends exactly once to the mod already hosted in this explicit game PID.

NimbyClient.acquireModControl

fr.nimby.sdk · fun
@Synchronized fun acquireModControl(modId: String, leaseMillis: Int = 5000): ModControlSession

NimbyClient.close

fr.nimby.sdk · fun
@Synchronized override fun close()