2. Data transmission

Tanuden TIMS accepts data in the OpenTetsu API format via the POST method at http://127.0.0.1:58680/plugins/data.

Sending data

The following method allows you to send data to the Tanuden TIMS API. This method essentially acts as a patch above any data originally provided by TrainCrew.

TanudenTIMSAPI.SendData()

Acceptable objects

  • Tanuden.Common.OpenTetsu

    • For data that conforms with OpenTetsu API standard

  • Tanuden.Common.PluginState

    • For additional data that is not in the OpenTetsu API standard. This includes the TASC lamps.

Examples

Custom speed limit

var gameData = new OpenTetsuData
{
    TrainState = new TrainState
    {
        SpeedLimit = 60,
    }
};

TanudenTIMSAPI.SendData(gameData);

Move the ATC/ATS needle

TASC lamp operation

最終更新