Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Built-in Modules

Optional modules that extend the kernel with additional GClasses. Each module is controlled by a CONFIG_MODULE_* option in .config (enable/disable via menuconfig). All are enabled by default.

Source: modules/c/

ModuleKconfigGClassesDescription
ConsoleCONFIG_MODULE_CONSOLEC_EDITLINEInteractive terminal line editing with history (based on linenoise). Used by ycli.
ModbusCONFIG_MODULE_MODBUSC_PROT_MODBUS_MModbus protocol master — reads/writes device registers (coils, discrete inputs, input/holding registers). For industrial IoT.
MQTTCONFIG_MODULE_MQTTC_PROT_MQTT, C_PROT_MQTT2, C_MQTT_BROKERFull MQTT protocol implementation (v3.1.1 + v5.0) with a persistent message broker backed by TreeDB.
PostgresCONFIG_MODULE_POSTGRESC_POSTGRESPostgreSQL integration — async query execution with automatic JSON-to-SQL type mapping. Requires libpq.
TestCONFIG_MODULE_TESTC_PEPON, C_TESTONPaired test server/client for functional testing and traffic generation.

Module GClasses detail

C_EDITLINE (Console)

Line editor with keyboard input handling, cursor movement, text manipulation, completion, and history navigation. Provides the input layer for the ncurses-based ycli terminal UI.

C_PROT_MODBUS_M (Modbus)

Modbus master protocol — supports four object types:

ObjectAccessSize
Coilsread-write1 bit
Discrete Inputsread-only1 bit
Input Registersread-only16 bits
Holding Registersread-write16 bits

Address range 0x00000xFFFF. Configuration-driven slave device mapping with data-format conversion and multiplier support.

C_PROT_MQTT / C_PROT_MQTT2 (MQTT)

MQTT protocol with publish, subscribe, QoS levels, and event-driven message handling. C_PROT_MQTT2 is the current implementation; C_PROT_MQTT is the legacy version kept for backward compatibility.

C_MQTT_BROKER (MQTT)

Full MQTT message broker — subscriber management, message routing, session handling, and persistent storage using TreeDB on timeranger2. Used by the mqtt_broker yuno.

C_POSTGRES (Postgres)

Async PostgreSQL client with an internal query queue. Maps JSON types to PostgreSQL types:

JSON typePostgreSQL type
stringtext
integerbigint
realdouble precision
booleanboolean
objecttext (JSON serialized)

Requires libpq-dev and CONFIG_MODULE_POSTGRES=y.

C_PEPON / C_TESTON (Test)

Paired test components: C_PEPON is a test server that responds to requests, C_TESTON is a test client that generates traffic (via EV_START_TRAFFIC). Used for functional testing and validation of Yuneta transport and protocol stacks.