Search
Preparing search index...
The search index is not available
@mobsya/thymio-api
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"thymio"
Client
Class Client
Hierarchy
Client
Implements
IClient
Index
Constructors
constructor
Properties
_flex
_nodes
_requests
_socket
on
Nodes
Changed
Accessors
nodes
Methods
_create_
node_
id
_emit_
events
_gen_
request_
id
_get_
request
_group_
from_
id
_id
_lock_
node
_nodes_
changed_
as_
node_
list
_nodes_
from_
id
_onmessage
_onopen
_prepare_
request
_rename_
node
_request_
aseba_
vm_
description
_send_
program
_serialize_
event_
description
_serialize_
events_
descriptions
_serialize_
variable
_serialize_
variables
_set_
events_
descriptions
_set_
variables
_set_
vm_
execution_
state
_unlock_
node
_unserialize_
aseba_
vm_
description
_watch
_wrap_
message_
and_
send
Constructors
constructor
new
Client
(
url
:
string
)
:
Client
@param {external:String} url : Web socket address @see lock
Parameters
url:
string
Returns
Client
Properties
Private
_flex
_flex
:
FlexBuffers
Private
_nodes
_nodes
:
Map
<
string
,
Node
>
Private
_requests
_requests
:
Map
<
number
,
Request
>
Private
_socket
_socket
:
WebSocket
on
Nodes
Changed
on
Nodes
Changed
:
function
= undefined
Type declaration
(
nodes
:
Node
[]
)
:
void
Parameters
nodes:
Node
[]
Returns
void
Accessors
nodes
get
nodes
(
)
:
Node
[]
Returns
Node
[]
Methods
Private
_create_
node_
id
_create_
node_
id
(
builder
:
Builder
, id
:
NodeId
)
:
number
Parameters
builder:
Builder
id:
NodeId
Returns
number
_emit_
events
_emit_
events
(
id
:
NodeId
, variables
:
Variables
)
:
Promise
<
any
>
Parameters
id:
NodeId
variables:
Variables
Returns
Promise
<
any
>
Private
_gen_
request_
id
_gen_
request_
id
(
)
:
number
Returns
number
Private
_get_
request
_get_
request
(
id
:
number
)
:
Request
Parameters
id:
number
Returns
Request
_group_
from_
id
_group_
from_
id
(
id
:
NodeId
)
:
Group
Parameters
id:
NodeId
Returns
Group
Private
_id
_id
(
fb_id
:
NodeId
)
:
NodeId
Parameters
fb_id:
NodeId
Returns
NodeId
_lock_
node
_lock_
node
(
id
:
NodeId
)
:
Promise
<
any
>
Parameters
id:
NodeId
Returns
Promise
<
any
>
Private
_nodes_
changed_
as_
node_
list
_nodes_
changed_
as_
node_
list
(
msg
:
NodesChanged
)
:
any
[]
Parameters
msg:
NodesChanged
Returns
any
[]
_nodes_
from_
id
_nodes_
from_
id
(
id
:
NodeId
)
:
Node
[]
Parameters
id:
NodeId
Returns
Node
[]
Private
_onmessage
_onmessage
(
event
:
MessageEvent
)
:
void
Parameters
event:
MessageEvent
Returns
void
Private
_onopen
_onopen
(
)
:
void
Returns
void
Private
_prepare_
request
_prepare_
request
(
req_id
:
number
)
:
Promise
<
any
>
Parameters
req_id:
number
Returns
Promise
<
any
>
_rename_
node
_rename_
node
(
id
:
NodeId
, name
:
string
)
:
Promise
<
any
>
Parameters
id:
NodeId
name:
string
Returns
Promise
<
any
>
_request_
aseba_
vm_
description
_request_
aseba_
vm_
description
(
id
:
NodeId
)
:
Promise
<
any
>
Parameters
id:
NodeId
Returns
Promise
<
any
>
_send_
program
_send_
program
(
id
:
NodeId
, code
:
string
, language
:
ProgrammingLanguage
)
:
Promise
<
any
>
Parameters
id:
NodeId
code:
string
language:
ProgrammingLanguage
Returns
Promise
<
any
>
Private
_serialize_
event_
description
_serialize_
event_
description
(
builder
:
Builder
, name
:
string
, fixed_size
:
number
)
:
number
Parameters
builder:
Builder
name:
string
fixed_size:
number
Returns
number
Private
_serialize_
events_
descriptions
_serialize_
events_
descriptions
(
builder
:
Builder
, events
:
EventDescription
[]
)
:
number
Parameters
builder:
Builder
events:
EventDescription
[]
Returns
number
Private
_serialize_
variable
_serialize_
variable
(
builder
:
Builder
, name
:
string
, value
:
any
)
:
number
Parameters
builder:
Builder
name:
string
value:
any
Returns
number
Private
_serialize_
variables
_serialize_
variables
(
builder
:
Builder
, variables
:
Variables
)
:
number
Parameters
builder:
Builder
variables:
Variables
Returns
number
_set_
events_
descriptions
_set_
events_
descriptions
(
id
:
NodeId
, events
:
EventDescription
[]
)
:
Promise
<
any
>
Parameters
id:
NodeId
events:
EventDescription
[]
Returns
Promise
<
any
>
_set_
variables
_set_
variables
(
id
:
NodeId
, variables
:
Variables
)
:
Promise
<
any
>
Parameters
id:
NodeId
variables:
Variables
Returns
Promise
<
any
>
_set_
vm_
execution_
state
_set_
vm_
execution_
state
(
id
:
NodeId
, command
:
VMExecutionStateCommand
)
:
Promise
<
any
>
Parameters
id:
NodeId
command:
VMExecutionStateCommand
Returns
Promise
<
any
>
_unlock_
node
_unlock_
node
(
id
:
NodeId
)
:
Promise
<
any
>
Parameters
id:
NodeId
Returns
Promise
<
any
>
Private
_unserialize_
aseba_
vm_
description
_unserialize_
aseba_
vm_
description
(
msg
:
NodeAsebaVMDescription
)
:
AsebaVMDescription
Parameters
msg:
NodeAsebaVMDescription
Returns
AsebaVMDescription
_watch
_watch
(
id
:
NodeId
, monitoring_flags
:
number
)
:
Promise
<
any
>
Parameters
id:
NodeId
monitoring_flags:
number
Returns
Promise
<
any
>
Private
_wrap_
message_
and_
send
_wrap_
message_
and_
send
(
builder
:
Builder
, offset
:
flatbuffers.Offset
, type
:
number
)
:
void
Parameters
builder:
Builder
offset:
flatbuffers.Offset
type:
number
Returns
void
Globals
Internals
"thymio"
Externals
"thymio_
generated"
AsebaVMDescription
Basic
Node
Client
constructor
_flex
_nodes
_requests
_socket
on
Nodes
Changed
nodes
_create_
node_
id
_emit_
events
_gen_
request_
id
_get_
request
_group_
from_
id
_id
_lock_
node
_nodes_
changed_
as_
node_
list
_nodes_
from_
id
_onmessage
_onopen
_prepare_
request
_rename_
node
_request_
aseba_
vm_
description
_send_
program
_serialize_
event_
description
_serialize_
events_
descriptions
_serialize_
variable
_serialize_
variables
_set_
events_
descriptions
_set_
variables
_set_
vm_
execution_
state
_unlock_
node
_unserialize_
aseba_
vm_
description
_watch
_wrap_
message_
and_
send
Event
Description
Group
Invalid
NodeIDException
Node
Node
Id
Request
IBasic
Node
IClient
IGroup
INode
Events
Variables
MIN_
PROTOCOL_
VERSION
PROTOCOL_
VERSION
create
Client
Generated using
TypeDoc