Table des matières

TNY-360 Documentation

System

System module of the TNY-360 API (code 0x00).

This module contains actions related to the system of the robot, such as settings, configuration, internal status checks.


List of actions

Here's a list of all the actions available in the system module:

0x00 - 0x00

system.ping

Pings the robot to check connection status.


No arguments


No return values

0x00 - 0x01

system.reboot

Reboots the robot.


No arguments


No return values

Not Implemented

system.setSettings

Sets the robot's configuration.


Arguments

  • settingsstring

    -

    New settings to apply.


No return values

Not Implemented

system.getSettings

Gets the robot's configuration.


No arguments


Return Values

  • settingsstring

    -

    Current settings.

0x00 - 0x04

system.setAutolifeLevel

Sets the autolife level.


Arguments

  • leveluint8

    -

    New autolife level (0-100).


No return values

0x00 - 0x05

system.getAutolifeLevel

Gets the current autolife level.


No arguments


Return Values

  • leveluint8

    -

    Current autolife level (0-100).

0x00 - 0x06

system.getStatistics

Gets system statistics including temperature, CPU usage, and RAM usage.


No arguments


Return Values

  • temp_cfloat32

    -

    Current temperature in Celsius.

  • cpu_usageCPUUsage

    -

    Current CPU usage statistics.

  • ram_usageRAMUsage

    -

    Current RAM usage statistics.

0x00 - 0x07

system.getNbLogLines

Gets the number of log lines.


No arguments


Return Values

  • countuint8

    -

    Number of log lines.

0x00 - 0x08

system.getLogLine

Gets a specific log line by index.


Arguments

  • indexuint8

    -

    Index of the log line to retrieve (0-based).


Return Values

  • timestampMsuint32

    -

    Timestamp of the log line in milliseconds since boot.

  • leveluint8

    -

    Log level (0=Debug, 1=Info, 2=Warning, 3=Error).

  • indentuint8

    -

    Indentation level of the log line.

  • tagstring

    -

    Tag associated with the log line.

  • messagestring

    -

    Log message.

0x00 - 0x09

system.setControlLoopEnabled

Sets the enabled status of the control loop.


Arguments

  • enabledbool

    -

    Whether the control loop should be enabled.


No return values

0x00 - 0x0A

system.getControlLoopEnabled

Gets whether the control loop is currently enabled.


No arguments


Return Values

  • enabledbool

    -

    Whether the control loop is currently enabled.

0x00 - 0x0B

system.setDecisionLoopEnabled

Sets the enabled status of the decision loop.


Arguments

  • enabledbool

    -

    Whether the decision loop should be enabled.


No return values

0x00 - 0x0C

system.getDecisionLoopEnabled

Gets whether the decision loop is currently enabled.


No arguments


Return Values

  • enabledbool

    -

    Whether the decision loop is currently enabled.

List of types

Here's a list of all the types used in the system module:

CPUUsage

Statistics about the CPU usage of the robot.


Fields

  • core0float32

    -

    CPU usage percentage of core 0 (0-100).

  • core1float32

    -

    CPU usage percentage of core 1 (0-100).

RAMUsage

Statistics about the robot's memory usage.


Fields

  • internal_totaluint32

    -

    Total number of bytes in internal RAM.

  • internal_useduint32

    -

    Number of bytes used in internal RAM.

  • psram_totaluint32

    -

    Total number of bytes in PSRAM.

  • psram_useduint32

    -

    Number of bytes used in PSRAM.