Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "thymio"

Index

Type aliases

Events

Events: Map<string, any>

Each event has a name an a value When communication with a Thymio 2, event are always an array 0 or more int16. The arity of the event must match EventDescription.fixed_size Sending a event of an unexpected type or size will raise an exception.

Variables

Variables: Map<string, any>

Each variable has a name an a value When communication with a Thymio 2, variables are always an array of int16. Sending an unique value to a Thymio 2 is equivalent to sending an array of size 1. Sending a value of an expected type will raise an exception.

Variables

Private Const MIN_PROTOCOL_VERSION

MIN_PROTOCOL_VERSION: 1 = 1

Private Const PROTOCOL_VERSION

PROTOCOL_VERSION: 1 = 1

Functions

createClient

  • createClient(url: string): IClient
  • Connects to a Thymio Device Manager or a Thymio 3

    This Function is the main entry point of the API

    Parameters

    • url: string

      WebSocket server to connect to. The of the url is ws://<server>:<port> This url need to be obtained by an implementation-defined manner.

      The server must be a Thymio Device Manger or a Thymio 3 Or otherwise implement the Thymio Device Manager protocol

    Returns IClient

Generated using TypeDoc