SimulatorInterface Class

  • java.lang.Object
    • microsoft.bonsai.simulatorapi.models.SimulatorInterface

public class SimulatorInterface

It contains all the registration/creation time properties of a simulator session.

Method Summary

Modifier and Type Method and Description
Object capabilities()

Get additional Capabilities for the session.

Object description()

Get schema descriptions of the simulator. Contains State, Action and Config schemas.

String name()

Get name of the simulator session.

String simulatorContext()

Get opaque string to the sim authors. It's used to connect simulator sessions to right brain.false For hosted sims, we automatically take care of setting the right environment variable for this. For Local sims, set it to empty string, and use Bonsai CLI's, `bonsai connect` command.

Double timeout()

Get this is the max time in seconds, within which simulator need to send advance request, else it will be timed out and unregistered from Bonsai platform. Set it to (SimulatorComputeTime + RTT network latency + few seconds) Default is 60s.

SimulatorInterface withCapabilities(Object capabilities)

Set additional Capabilities for the session.

SimulatorInterface withDescription(Object description)

Set schema descriptions of the simulator. Contains State, Action and Config schemas.

SimulatorInterface withName(String name)

Set name of the simulator session.

SimulatorInterface withSimulatorContext(String simulatorContext)

Set opaque string to the sim authors. It's used to connect simulator sessions to right brain.false For hosted sims, we automatically take care of setting the right environment variable for this. For Local sims, set it to empty string, and use Bonsai CLI's, `bonsai connect` command.

SimulatorInterface withTimeout(Double timeout)

Set this is the max time in seconds, within which simulator need to send advance request, else it will be timed out and unregistered from Bonsai platform. Set it to (SimulatorComputeTime + RTT network latency + few seconds) Default is 60s.

Method Details

capabilities

public Object capabilities()

Get additional Capabilities for the session.

Returns:

the capabilities value

description

public Object description()

Get schema descriptions of the simulator. Contains State, Action and Config schemas.

Returns:

the description value

name

public String name()

Get name of the simulator session.

Returns:

the name value

simulatorContext

public String simulatorContext()

Get opaque string to the sim authors. It's used to connect simulator sessions to right brain.false For hosted sims, we automatically take care of setting the right environment variable for this. For Local sims, set it to empty string, and use Bonsai CLI's, `bonsai connect` command.

Returns:

the simulatorContext value

timeout

public Double timeout()

Get this is the max time in seconds, within which simulator need to send advance request, else it will be timed out and unregistered from Bonsai platform. Set it to (SimulatorComputeTime + RTT network latency + few seconds) Default is 60s.

Returns:

the timeout value

withCapabilities

public SimulatorInterface withCapabilities(Object capabilities)

Set additional Capabilities for the session.

Parameters:

capabilities - the capabilities value to set

Returns:

the SimulatorInterface object itself.

withDescription

public SimulatorInterface withDescription(Object description)

Set schema descriptions of the simulator. Contains State, Action and Config schemas.

Parameters:

description - the description value to set

Returns:

the SimulatorInterface object itself.

withName

public SimulatorInterface withName(String name)

Set name of the simulator session.

Parameters:

name - the name value to set

Returns:

the SimulatorInterface object itself.

withSimulatorContext

public SimulatorInterface withSimulatorContext(String simulatorContext)

Set opaque string to the sim authors. It's used to connect simulator sessions to right brain.false For hosted sims, we automatically take care of setting the right environment variable for this. For Local sims, set it to empty string, and use Bonsai CLI's, `bonsai connect` command.

Parameters:

simulatorContext - the simulatorContext value to set

Returns:

the SimulatorInterface object itself.

withTimeout

public SimulatorInterface withTimeout(Double timeout)

Set this is the max time in seconds, within which simulator need to send advance request, else it will be timed out and unregistered from Bonsai platform. Set it to (SimulatorComputeTime + RTT network latency + few seconds) Default is 60s.

Parameters:

timeout - the timeout value to set

Returns:

the SimulatorInterface object itself.

Applies to