Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Generic Component Wrapper

James Coon edited this page Mar 21, 2017 · 1 revision

The build in Generic Wrapper for components. Allows you to get component information and call component methods.

Local Address Description
$00 Status/Command
$01 Command I/O
$02 Command Flag
$04-$13 Component UUID
$14-$33 Component Name
$34 Component Slot

Status/Command:
Read: Get Status of last executed command
Write: Execute a command using data from buffer.

Commands:
0: Invoke method (String/Value, arguments for method...)
Status: 0=Method invoked, 1=Method errored, 2=No such method, 3=Bad I/O
Invokes a method on the mapped component, using the TSF serialized data as arguments for the method.

Call Value methods with the appopriate component, Thistle currently allows you to use a Value on any Generic Wrapper but this will change in the future.

1: Get device info (buffer ignored)
Status: 0=Info available, 1=No device info
Returns a list of TSF serialized String pairs containing various device information for the mapped component.

2: Get list of component methods (buffer ignored)
Status: Count of how many methods are available
Returns a list of TSF serialized Strings of the available methods the mapped component provides.

3: Get component method documentation (String)
Status: 0=Documentation available, 1=No Documentation, 2=No such method, 3=Bad I/O
Retrieves the documentation for the specified method

Status is set to 255 if the command is invalid.

Command I/O:
Read: Retrieve TSF serialized data from last executed command.
Write: Add TSF serialized data to command buffer.

Command Flag:
Data conversion flags used for invoking component methods and receiving invoke results. See TSF page for more info. Defaults to converting UUID tags to Strings.

Component UUID:
16 big endian UUID of the component's address in the network.

Component Name:
32 bytes reserved for the name of the component, null terminated.

Clone this wiki locally