Référence
NimbyClient
Connexion, captures, lectures ciblées et commandes du client Kotlin/JVM.
Contexte d’utilisation
| Module | Package | Source SDK |
|---|---|---|
| Kotlin/JVM | fr.nimby.sdk | kotlin-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
class NimbyClient : ObservationClientOwns 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
fun open(libraryPath: Path, processId: Int): NimbyClientNimbyClient.readTrain
@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
@Synchronized fun prepareConstruction(sourceSignal: Long): ConstructionResult =Explicitly loads the experimental construction bridge. Capture alone never does.
NimbyClient.createSignals
@Synchronized fun createSignals(token: Long, sourceSignal: Long, positions: List<Position>): ConstructionResult =NimbyClient.undoConstruction
@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
@Synchronized fun pollConstruction(token: Long): ConstructionResultRefuses if another command replaced the series at the top of native undo history.
NimbyClient.capture
@Synchronized override fun capture(selectedTrainId: Long?): ObservationNimbyClient.setSimulationDateTime
@Synchronized fun setSimulationDateTime(utc: java.time.Instant, recalculateTrains: Boolean = false): SimulationTimeChangeExplicit 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
@Synchronized fun showSignalTextureFor(signal: Long, catalogue: String, path: String, durationMillis: Int)Visual override only. Does not change signalling permissions or mod decisions.
NimbyClient.restoreSignalTexture
@Synchronized fun restoreSignalTexture(signal: Long)NimbyClient.modControl
@Synchronized fun modControl(modId: String, request: ControlRequest): ControlResponseSends exactly once to the mod already hosted in this explicit game PID.
NimbyClient.acquireModControl
@Synchronized fun acquireModControl(modId: String, leaseMillis: Int = 5000): ModControlSessionNimbyClient.close
@Synchronized override fun close()