Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Node

Hierarchy

Implements

Index

Constructors

constructor

Properties

Status

Status: NodeStatus = mobsya.fb.NodeStatus

Type

Type: NodeType = mobsya.fb.NodeType

VMExecutionState

VMExecutionState: VMExecutionState = mobsya.fb.VMExecutionState

Protected _client

_client: Client

Private _desc

_desc: AsebaVMDescription = null

Private _group

_group: Group

Protected _id

_id: NodeId

Protected _monitoring_flags

_monitoring_flags: number

_name

_name: string

Private _on_events_cb

_on_events_cb: function

Type declaration

    • Parameters

      Returns void

Private _on_vars_changed_cb

_on_vars_changed_cb: function

Type declaration

Private _status

_status: NodeStatus

Private _type

_type: NodeType

onGroupChanged

onGroupChanged: function

Type declaration

    • Parameters

      Returns void

onNameChanged

onNameChanged: function

Type declaration

    • (newStatus: string): void
    • Parameters

      • newStatus: string

      Returns void

onStatusChanged

onStatusChanged: function

Type declaration

onVmExecutionStateChanged

onVmExecutionStateChanged: function

Type declaration

    • (...args: any): void
    • Parameters

      • Rest ...args: any

      Returns void

Accessors

eventsDescriptions

  • get eventsDescriptions(): any

group

id

isReady

  • get isReady(): boolean
  • Whether the node is ready (connected, and locked) @type {boolean}

    Returns boolean

name

  • get name(): string
  • The node name @type {mobsya.fb.NodeStatus}

    Returns string

onEvents

  • get onEvents(): function
  • set onEvents(cb: function): void

onEventsDescriptionsChanged

  • get onEventsDescriptionsChanged(): function
  • set onEventsDescriptionsChanged(cb: function): void

onSharedVariablesChanged

  • get onSharedVariablesChanged(): function
  • set onSharedVariablesChanged(cb: function): void

onVariablesChanged

  • get onVariablesChanged(): function
  • set onVariablesChanged(cb: function): void

sharedVariables

  • get sharedVariables(): any

status

statusAsString

  • get statusAsString(): "connected" | "ready" | "available" | "busy" | "disconnected" | "unknown"
  • The node status converted to string. @type {string}

    Returns "connected" | "ready" | "available" | "busy" | "disconnected" | "unknown"

type

typeAsString

  • get typeAsString(): "unknown" | "Thymio 2" | "Thymio Wireless" | "Simulated Thymio 2" | "Dummy Node"
  • The node type converted to string. @type {string}

    Returns "unknown" | "Thymio 2" | "Thymio Wireless" | "Simulated Thymio 2" | "Dummy Node"

Methods

_set_group

  • _set_group(group: Group): void

_set_monitoring_flags

  • _set_monitoring_flags(flag: any, set: any): Promise<any>

_set_name

  • _set_name(name: string): void

_set_status

asebaVMDescription

  • asebaVMDescription(): Promise<any>

emitEvents

  • emitEvents(map_or_key: string | Events, value?: any): Promise<any>

lock

  • lock(): Promise<any>

rename

  • rename(new_name: string): Promise<any>

runProgram

  • runProgram(): Promise<any>

sendAsebaProgram

  • sendAsebaProgram(code: string): Promise<any>

send_aesl_program

  • send_aesl_program(code: any): Promise<any>
  • Load an aesl program on the VM The device must be locked & ready before calling this function @param {external:String} code - the aseba code to load @throws {mobsya.fb.Error} @see lock

    Parameters

    • code: any

    Returns Promise<any>

setEventsDescriptions

  • setEventsDescriptions(events: any): Promise<any>
  • Parameters

    • events: any

    Returns Promise<any>

setSharedVariables

  • setSharedVariables(variables: any): Promise<any>
  • Parameters

    • variables: any

    Returns Promise<any>

setVariables

  • setVariables(map: any): Promise<any>
  • Parameters

    • map: any

    Returns Promise<any>

unlock

  • unlock(): Promise<any>

watchSharedVariablesAndEvents

  • watchSharedVariablesAndEvents(flags: number): Promise<any>

Generated using TypeDoc