The light bus is the main communications system for interactions between the main controller (MC) and compatible hardware. It was originally designed for use with attached devices (peripherals) and carried information relevant to lighting effects, such as the system's illumination color and the power state. Although still mostly stateless, it has over time grown into an elaborate protocol that can be used to mediate everything from recharging weapons (see separate article on combat-related protocols) to user authentication for control via a device.
Light bus messages are processed on a user-specific channel, generated by the following rule:
channel_lights = 105 - (integer)("0x" + llGetSubString(llGetOwner(), 29, 35));
There are two general categories of devices, passive and active. A passive device is one that simply listens on this channel for relevant messages and reacts accordingly. Status lights, eyes, and reactive clothing are good examples of passive devices, as they do not generally need to request specific system information, obtain permission for user interaction, or instruct the controller to carry out a task.
Active devices are those that have sent an add <device> message and received an add-confirm message in response. (See below.) Once a device has been marked as active, it may use the messages listed under the 'active (device to MC)' section. Devices belonging to the unit, such as attachments, can expect to be confirmed as active devices immediately; other devices, called foreign devices, must be granted access according to the local access permissions of their owner.
Unless otherwise specified, tokens on the light bus are separated exclusively by spaces. For some messages, this may mean that llParseString2List()-based parsing is inadequate, as e.g. unquoted and unescaped string arguments may follow; for these messages, when the initial keyword is detected, switch to using llGetSubString() to extract the remaining text, or llDumpList2String(llList2List(...), " ") to re-concatenate the parameters.
<device> in the messages below represents the short, one-word description of the device's component role, e.g. 'horns' or 'icon'. It must not contain spaces. This is sometimes known as the device name, but should not be confused with the object name of the device. See note at name <name> regarding recommended object name formats.
New in Companion 8.4 and ATOS 12.1 is the ability to connect to ports. These are particle targets used to enhance the unit's appearance when connected to other devices. The supported port types are: power, data-1, data-2, audio-in, and audio-out. Some controllers may include some or all of these port types by default, but peripherals can specify replacements using the port message much like they use the add message (in response to probe, attach, etc.)
passive messages
These messages are sent automatically by the controller over the light bus channel. They are available even to devices that have not authenticated.
bolts on|off
This message is sent to newly-authenticated active devices immediately following the add-confirm message.
broken|fixed
carrier
<device>
<key>
<key>
using the handle device at address point <device>
. If no handle applies, then <device>
will be "none", and <key>
will be NULL_KEY.
charge start|stop
color
<r>
<g>
<b>
color-2
<r>
<g>
<b>
color-3
<r>
<g>
<b>
color-4
<r>
<g>
<b>
device
<device>
<key>
<device>
with the key <key>
. This is normally only sent to the HUD, either in response to a device addition or in bulk when the HUD is installed. This message is deprecated in 8.6 in favor of device-list, which is more efficient.
fan
<level>
follow
<target>
<target>
. This can be requested with the follow-q message. Devices such as collars may desire this information so they can send leash particles. If the unit is not following anyone or anything, then <target>
will be NULL_KEY.
freeze|unfreeze
gender
<topic>
<value>
<topic>
. Supported topics are physical, mental, or voice. For <value>
, the format varies by topic; physical and mental genders will describe a full set of comma-separated pronouns and the name of the gender, while voice gender only supplies the name of the gender.Examples:
- The unit's physical gender is 'inanimate': gender physical its,its,it,it,itself,inanimate
- The unit's mental gender is 'female': gender mental hers,her,she,her,herself,female
- The unit's voice gender is 'male': gender voice male
<physical possessive pronoun>
charger., and the mental gender be used when the unit speaks about itself, e.g. /me says, "This unit is <mental subject pronoun>
whom you seek.". Voice gender should be used only to decide what sort of vocalizations to play; e.g. a grunt of pain or pleasure might be based on voice gender.Less obviously, Speech Standard 1 dictates that physical gender be used when speaking about another, not mental gender; units abiding by SS1 regard their physical gender as the "truth" and mental gender (especially if inanimate) as a form of subjugation. While this is contrary to the experience of organic gender minorities, it synergizes well with gender transformation fantasies: in most such scenarios, a physical change may precede a mental one if they are not simultaneous, and the very act of assuming another's physical gender to be accurate plays into the reinforcement process of the acceptance of change. Personas and other scripts may elect to use such "forward-looking" or "objective" pronouns to refer to the unit in canned speech if it facilitates an intentional change in identity.
interference-state
<type>
<type>
field is a string consisting of the single-character constants for each class of interference, concatenated together. For practical reasons, these are indicated based on the types of function impairment they cause.class | effects |
---|---|
M | Impairment of motor control |
C | Impairment of cortex operation |
S | Impairment of sound (speech) output |
N | Impairment of sensory functions |
Y | Impairment of memory access |
For example, a type of "MCY" indicates that motor control, cortex operation, and memory access are all impaired. At the conclusion of interference, "interference-state " is sent, with a trailing space.
name
<name>
For example, the chromatic communicator icon attached to an SXD unit named vi0let should take the unit's full name (SXD vi0let) and append " (icon)" to the end, resulting in the full name SXD vi0let (icon). This provides a consistent interface when interacting with a unit's peripherals. However, vi0let's battery does not need to rename itself, as it is not part of the unit's body and does not have any interactive features during regular use.
on|off
persona
<name>
<name>
. Sent in response to persona-q, or when the persona changes. If no persona is active, then <name>
is default.
power
<level>
rate
<amount>
subsystem
<SS> 0|1
<SS>
is either on (1) or off (0), where <SS>
is a numeric value indicating:subsystem | numeric value |
---|---|
VIDEO | 1 |
AUDIO | 2 |
MOVE | 4 |
TELEPORT | 8 |
RAPID | 16 |
VOICE | 32 |
MIND | 64 |
PREAMP | 128 |
POWER_AMP | 256 |
RADIO_IN | 512 |
RADIO_OUT | 1024 |
GPS | 2048 |
IDENTIFY | 4096 |
These values were changed in Companion 8.4 to be more consistent. See practical breakdown here.
wait-teleport
<time>
<time>
more seconds. Sent every second.
working|done
active messages (device to MC)
add
<device>
<device>
, where <device>
is a one-word mnemonic describing the class of peripheral or machine, e.g. icon or battery. No two connected devices may have the same address at the same time. For peripherals, the add message should be sent in response to an on_rez() or attach() event, or in response to the probe message. The controller will respond with either add-confirm or add-fail.
add
<device>
<version>
<version>
syntax used.This syntax is used to block old, incompatible devices from being used with newer OSes, which usually do not send a
<version>
at all. Consequently this syntax is required for HUD and shield devices, and it has also been used to block incompatible battery devices in earlier versions.
add
<device>
<version>
<PIN>
<device>
_<version>
. This message syntax is required for the chassis device, as the CSU syntax changed significantly during 8.5, and the EXB-8505 is firmware-update capable.During the firmware update process,
<PIN>
will be passed by the package manager to the package installer in cleartext, along with the root UUID of the device. The package installer is responsible for translating this into the actual secret number. See Packaging for more information on version syntax and how to create an updatable device.
add-command
<command>
auth
<device>
<key>
<key>
has local access. If the user is authorized, then the controller will respond with accept <key>
. This message may take some time to process if consent is required. If the user is not authorized, then the controller will notify him or her directly, and the device will not receive any response. Devices should obtain permission for the user to act immediately upon user contact and avoid caching any commands or actions that may require authorization.For more complex security interactions, see 205 SEC_PROGRAMMABLE_LOCAL and 210 SEC_PROGRAMMABLE_REMOTE, which may be utilized through the internal message.
See support article for relevant definitions pertaining to access types, user ranks, and consent.
auth-compare
<device>
<user1>
<user2>
carrier
<device>
<key>
<key>
using the handle <device>
. When carrying stops, the message will be sent with <key>
= NULL_KEY. This message should be accepted from any attachment. The controller will send it in response to carrier-q.
conf-delete
<setting-name>
conf-get
<setting-name>
<setting-name>
from the configuration manager (_balance/SettingsService). If the setting exists, a conf message is returned. Multiple settings may be retrieved by separating their names with a linebreak, e.g.boot.serial
These will be returned with a single conf message, such as:
boot.serial 998123456
conf-set
<setting-name>
<value>
mydevice.otherfeature myvalue
devices
gender-q
<topic>
<topic>
must be one of physical, mental, or voice. Sends gender in response; see that entry for recommended usage of each gender topic.
internal
<device>
<number>
<key>
<message>
<number>
value of 0 and the <key>
of the user interacting with the device, or the unit's own key (from llGetOwner()) if no such user applies. Most system commands will accept NULL_KEY as a root user.For example, to turn off the unit, try: internal
<device>
0 00000000-0000-0000-0000-000000000000 offThis command is guaranteed to not work unless the device has first authenticated with add.
In Companion 8.5 and later, all internal calls are wrapped as TASK_START messages (see best practices for 8.5 application development) to ensure backward compatibility.
load
<device>
<task>
<W>
<device>
is currently using <W>
watts of power to perform the task named <task>
. Loads must be uniquely named, so re-sending a message with the same task name will update the usage for that device/task combination. When the task is completed, send this message with a wattage of 0 to remove the load; loads are also removed when the device is detached.Task names should be a single word reflecting the reason why the device needs the power, for example load shield recharge 100. These burdens are shown by the power system command, under the section 'external loads.'
policy-q
<policy>
Possible policies for Companion 8.6.4 are: subsystems, radio, persona, apparel, vox, curfew
Possible policies for ARES 0.4.1 are: curfew, autolock, beacon, apparel ( == outfit), locked, radio
port
<type>
<key>
<key>
can provide port functionality of the type <type>
. This means that it should be used as a particle target for wires emitted by base stations. Port types supported by Nanoconnectivity 1.6:class |
---|
power |
audio-in |
audio-out |
data-1 |
data-2 |
Note that if the controller sends this message, it instead indicates a redirect to another device; see port-real and the entries above it.
port-connect
<type>
- If it responds with port
<type>
<key>
, then the accessor should re-send the port-connect query to<key>
, which is the actual port host responsible for managing connections. This occurs most often if the host can handle many simultaneous connections of the same type.
- If it responds with port-real
<type>
<key>
, then the accessor should accept the key provided as the particle destination and begin effects as appropriate.
port-disconnect
<type>
remove
<device>
<device>
name must be registered to the UUID sending the message.
subsystem-q
<subsystem>
version
<device>
<version>
<PIN>
<version>
release of its code, and can be updated with a package using the PIN provided. Updater packages and device firmware should both apply salt to the PIN in some manner, and send only the portion of the PIN that excludes the salt.
active (MC to device)
accept
<key>
add-confirm
add-fail
command
<user key>
<command>
<parameters>
<command>
<parameters>
; handle accordingly.
conf
<setting-name>
<value>
device-list[\n
<device-address>
<device-key>[\n
<device-address>
<device-key>[...]]]
peek
<id>
<id>
has requested the device's status. Send chat containing this information to <id>
on channel 0.
poke
<id>
<id>
has requested access to the device's menu interface. Present some form of UI (llDialog(), hotlinked text, Facet welcome, etc.) to <id>
. If using a nonstandard presentation mode (e.g. Facet), warn the user on channel 0. Note also that hotlinked text is incompatible with the controller's chat forwarding mode; depending on the device in question it may be sensible to warn users of this, too.
policy
<name>
<state>
The curfew policy will provide additional information:
<state>
<time>
<triggered>
<home_sim>
<home_pos>
Supported policies vary between operating systems; see policy-q for examples. If a policy is unsupported, an empty string will be returned for
<state>
.
port
<type>
<key>
<key>
. This message is sent in response to a port-connect query by hardware that wishes to connect a cable to the system.
port-connect
<type>
port-disconnect
<type>
port-real
<type>
<key>
<key>
. This message is sent in response to port-connect if the controller itself has ports on it.
probe
remove-confirm
remove-fail
session-ready
<key>
<session-number>
<session-number>
has been created for <key>
.
device-to-device messages
block-holo
- Maintain a list of holo-blockers. This is a collection of keys that are preventing ("blocking") the holographic elements from being shown.
- Check the list of holo-blockers in a timer and whenever the unit is powered on. Keys stay on this list while they are either:
- the OBJECT_ROOT of the unit (i.e., its chair), or
- in the attachment list of the unit.
- the OBJECT_ROOT of the unit (i.e., its chair), or
- When the list of holo-blockers is empty, the holographic elements can be shown again, and it is no longer necessary to periodically check the list. Remember to ensure that holographic elements are not visible while the unit is powered down.
connected
<device>
<device>
is the device's one-word name, not its key. Implementation of this message is mandatory for batteries, but is not otherwise used.
disconnected
<device>
<device>
is the device's one-word name, not its key. Implementation of this message is mandatory for batteries, but is not otherwise used.
icon
<uuid>
<uuid>
should be the UUID of a texture icon to use, ideally a 32x32 pixel image or larger that has been designed to look good at 16x16 pixels, and consists of only white, transparent, and translucent white pixels.Only works if using Native 8.6.3 and later. Builds before Oct 6, 2021 do not support this feature. Screen does not support this feature (see add-section instead.)
icon messages should generally be sent in response to the icon-q message, back to the key that sent the icon-q message. You can also determine the correct target for this message by sending devices to the controller.
icon-q
port-connect
<type>
port-disconnect
<type>
port-real
<type>
<key>
<key>
.
reconnected
<device>
<device>
is the device's one-word name, not its key. Implementation of this message is mandatory for batteries, but is not otherwise used.
device-specific active messages
add-button
<section-name>
<icon>
<command ...>
<section-name>
on the Screen Console Manager HUD. The section must have previously been created using add-section. <icon>
should be the UUID for a white-and-transparent texture not exceeding 128x128 px. <command ...>
may be multiple words, space-separated; in the event the button is pressed, it will be sent as a 1 COMMAND system command message to the controller with the console as the executing user.If add-button fails, the device will be sent an add-button-fail message; otherwise it will receive add-button-confirm.
There is no way to remove or modify a button or section from the Screen Console Manager once it has been added.
add-button-confirm
<section-name>
<section-name>
by that device using add-button.
add-button-fail
<section-name>
<section-name>
by that device using add-button. This error message is sent only if the section is already full; no error is produced if the section does not exist. If you are uncertain as to whether the section exists or not, send add-section again; the message will be ignored if the section already exists.
add-section
<name>
<width>
<name>
should be a short unique identifier, such as the device address; <width>
is the number of icons that the device intends to display. Not supported by the Native Console (_native) HUD; see icon-q instead.It is not possible to add custom gauges or meters to the Screen HUD. There is no way to remove or modify a button or section from the Screen Console Manager once it has been added.
add-section-confirm
<name>
config-q
config-update
hatch open|close
hatch-blocked
hatch-blocked-q
interference
<type>
<intensity>
<duration>
<source_key>
shield
<duration>
<intensity>
<id>
<type>
<type>
has been received from source <id>
. Mitigate what is possible, and return an interference message with the remaining impact.
sign
<string>
<string>
. The special string "cancel" (e.g. sign cancel) will deactivate any sign currently being displayed.