The TST-Protocol Variables is designed for communication between devices in embedded systems and PC applications. It supports any interface.
/*TSTVARIABLESSTART*/
/*TSTVARIABLESEND*/
#define TSTNAME "your_device_name"
Function | Description | Example |
---|---|---|
tstProtocolRegister | Registers a device in the TST protocol system | tstProtocolRegister(&TST_Device); |
tstProtocolRx | Processes received data from an interface | tstProtocolRx("DEVICE", "INTERFACE", data, size); |
tstProtocolTx | Transmits data through the specified interface | tstProtocolTx("DEVICE", "INTERFACE", data, size); |
tstProtocolVariablesGet | Retrieves variable values from another device | tstProtocolVariablesGet("DEVICE", "INTERFACE", VARIABLE, sizeof(VARIABLE)); |
tstProtocolVariablesSet | Sets a variable value on another device | tstProtocolVariablesSet("DEVICE", "INTERFACE", &VARIABLE, sizeof(VARIABLE), VALUE); |
tstMonitor | Sends a text message to the monitor | tstMonitor("DEVICE", "INTERFACE", TEXT); |
Type | Size (bytes) | Description |
---|---|---|
bool | 1 | Boolean value (true/false) |
int8_t | 1 | 8-bit signed integer |
uint8_t | 1 | 8-bit unsigned integer |
int16_t | 2 | 16-bit signed integer |
uint16_t | 2 | 16-bit unsigned integer |
int32_t | 4 | 32-bit signed integer |
uint32_t | 4 | 32-bit unsigned integer |
int64_t | 8 | 64-bit signed integer |
uint64_t | 8 | 64-bit unsigned integer |
float | 4 | Single-precision floating-point |
double | 8 | Double-precision floating-point |
char[] | Variable | Character array (string) |
struct | Variable | Custom data structure (packed) |
array | Variable | Array of any supported type |
This guide explains how to operate the application across its different communication interfaces. Follow these steps for a smooth experience.
The application implements a protocol that lets users read and update internal variables of the device. The device supports several communication methods (I2C, BLE, Serial, and WebSocket). This manual explains how to interact with the device using these methods.
ws://<device_ip>/ws
.Version | Changes |
---|---|
v3.0.0 |
|
v2.0.0 |
|
v1.0.1 |
|
v1.0.0 |
|