libxr
1.0
Want to be the best embedded framework
|
Data Structures | |
class | ADC |
模拟数字转换器(ADC)基类 More... | |
class | Application |
应用模块抽象类,需实现 OnMonitor 方法 More... | |
class | ApplicationManager |
应用模块管理器 More... | |
class | Assert |
运行时错误检查的断言工具类。 Provides assertion mechanisms for runtime error checking. More... | |
class | ASync |
异步任务处理类。 Asynchronous task processing class. More... | |
class | Axis |
三维坐标轴类,继承自 Eigen::Matrix<Scalar, 3, 1>。 A 3D axis class, inheriting from Eigen::Matrix<Scalar, 3, 1>. More... | |
class | BaseQueue |
基础队列类,提供固定大小的循环缓冲区 (Base queue class providing a fixed-size circular buffer). More... | |
class | Callback |
提供一个通用的回调包装,支持动态参数传递。 Provides a generic callback wrapper, supporting dynamic argument passing. More... | |
class | CallbackBlock |
提供一个回调函数的封装,实现参数绑定和回调执行。 Provides a wrapper for callback functions, enabling argument binding and invocation. More... | |
class | CAN |
CAN通信接口,定义标准CAN通信结构,支持不同类型的消息 (CAN communication interface that defines a standard CAN structure supporting different message types). More... | |
class | CenterOfMass |
质心信息表示类。Represents the center of mass information. More... | |
class | CH32GPIO |
class | CH32Timebase |
class | CH32UART |
class | ConstRawData |
常量原始数据封装类。 A class for encapsulating constant raw data. More... | |
class | CRC16 |
16 位循环冗余校验(CRC-16)计算类 / CRC-16 checksum computation class More... | |
class | CRC32 |
32 位循环冗余校验(CRC-32)计算类 / CRC-32 checksum computation class More... | |
class | CRC8 |
8 位循环冗余校验(CRC-8)计算类 / CRC-8 checksum computation class More... | |
class | CycleValue |
角度循环处理类,用于处理周期性角度计算。 A cyclic angle handling class for periodic angle calculations. More... | |
class | Database |
数据库接口,提供键值存储和管理功能 (Database interface providing key-value storage and management). More... | |
class | DatabaseRaw |
适用于最小写入单元受限的 Flash 存储的数据库实现 (Database implementation for Flash storage with minimum write unit restrictions). More... | |
class | DatabaseRawSequential |
适用于不支持逆序写入的 Flash 存储的数据库实现 (Database implementation for Flash storage that does not support reverse writing). More... | |
class | DoubleBuffer |
双缓冲区管理类 / Double buffer manager class More... | |
struct | Entry |
class | ESP32ADC |
class | ESP32GPIO |
class | ESP32NvsFlashDatabase |
class | ESP32PWM |
class | ESP32Timebase |
基于 esp_timer 的时间基准实现(微秒与毫秒) Timebase implementation using esp_timer (microseconds and milliseconds) More... | |
class | ESP32UART |
class | ESP32UARTReadPort |
class | ESP32UARTWritePort |
class | ESP32VirtualUART |
class | ESP32WifiClient |
ESP32 平台的 WiFi 客户端实现 / WiFi client implementation for ESP32. More... | |
class | EulerAngle |
表示欧拉角的类,用于描述3D旋转。Class representing Euler angles for 3D rotation. More... | |
class | Event |
事件管理系统,允许基于事件 ID 注册和触发回调函数。 Event management system that allows registration and triggering of callbacks based on event IDs. More... | |
class | FDCAN |
FDCAN 通信接口,扩展 CAN 功能,支持灵活数据速率(FD)CAN 消息 (FDCAN communication interface that extends CAN functionality by supporting Flexible Data-Rate (FD) CAN messages). More... | |
class | Flash |
Abstract base class representing a flash memory interface. 抽象基类,表示闪存接口。 More... | |
struct | FlashSector |
STM32Flash 通用类,构造时传入扇区列表,自动判断编程粒度。 More... | |
class | FloatEncoder |
浮点数编码器,将浮点值映射到定长无符号整数。 A generic float encoder mapping a float value to N-bit unsigned integer. More... | |
class | GPIO |
通用输入输出(GPIO)接口类。General Purpose Input/Output (GPIO) interface class. More... | |
class | HardwareContainer |
class | I2C |
I2C(Inter-Integrated Circuit)接口类。 I2C (Inter-Integrated Circuit) interface class. More... | |
class | Inertia |
表示刚体的惯性张量和质量信息的类。Provides a class to represent the inertia tensor and mass of a rigid body. More... | |
struct | IPAddressRaw |
原始 IPv4 地址 / Raw IPv4 address More... | |
struct | IPAddressStr |
字符串形式 IPv4 地址 / IPv4 address as string More... | |
class | LinuxBinaryFileFlash |
LinuxBinaryFileFlash 类,用于从二进制文件加载闪存数据 LinuxBinaryFileFlash class for loading flash data from a binary file. More... | |
class | LinuxPowerManager |
基于 Linux 的电源管理器实现 / Linux implementation of PowerManager More... | |
class | LinuxTimebase |
LinuxTimebase 类,用于获取 Linux 系统的时间基准。Provides a timebase for Linux systems. More... | |
class | LinuxUART |
class | List |
链表实现,用于存储和管理数据节点。 A linked list implementation for storing and managing data nodes. More... | |
class | LockFreeList |
链表实现,用于存储和管理数据节点。 A linked list implementation for storing and managing data nodes. More... | |
class | LockFreeQueue |
无锁队列实现 / Lock-free queue implementation More... | |
class | LockQueue |
线程安全的锁队列类,提供同步和异步操作支持 Thread-safe lock queue class with synchronous and asynchronous operation support More... | |
struct | LogData |
日志数据结构体 / Log data structure More... | |
class | Logger |
日志管理器 / LibXR Logger Manager More... | |
struct | MACAddressRaw |
原始 MAC 地址 / Raw MAC address More... | |
struct | MACAddressStr |
字符串形式 MAC 地址 / MAC address as string More... | |
class | Mutex |
互斥锁类,提供线程同步机制 (Mutex class providing thread synchronization mechanisms). More... | |
class | NetworkInterface |
抽象网络接口类 / Abstract base for network interfaces More... | |
class | Operation |
Defines an operation with different execution modes. More... | |
class | PID |
通用 PID 控制器类。 Generic PID controller. More... | |
class | Position |
三维空间中的位置向量 / 3D position vector More... | |
class | PowerManager |
电源管理器基类 / Abstract base class for Power Manager More... | |
class | PWM |
Abstract base class for PWM (Pulse Width Modulation) control. PWM(脉冲宽度调制)控制的抽象基类。 More... | |
class | Quaternion |
四元数表示与运算,继承自 Eigen::Quaternion / Quaternion representation and operations, inheriting from Eigen::Quaternion More... | |
class | Queue |
基于 BaseQueue 的泛型队列模板类 (Generic queue template class based on BaseQueue). More... | |
class | RamFS |
轻量级的内存文件系统,实现基本的文件、目录和设备管理 A lightweight in-memory file system implementing basic file, directory, and device management More... | |
class | RawData |
原始数据封装类。 A class for encapsulating raw data. More... | |
class | RBTree |
红黑树实现,支持泛型键和值,并提供线程安全操作 (Red-Black Tree implementation supporting generic keys and values with thread-safe operations). More... | |
struct | ReadInfoBlock |
Read information block structure. More... | |
class | ReadPort |
ReadPort class for handling read operations. More... | |
class | RotationMatrix |
旋转矩阵类,继承自 Eigen::Matrix<Scalar, 3, 3>。 Rotation matrix class, inheriting from Eigen::Matrix<Scalar, 3, 3>. More... | |
class | Semaphore |
信号量类,实现线程同步机制 Semaphore class implementing thread synchronization More... | |
class | SPI |
串行外设接口(SPI)抽象类。Abstract class for Serial Peripheral Interface (SPI). More... | |
class | Stack |
线程安全的栈数据结构 / Thread-safe stack data structure More... | |
class | STDIO |
STDIO interface for read/write ports. More... | |
class | STM32ADC |
STM32ADC 类,用于处理 STM32 系统的 ADC 通道。 Provides handling for STM32 ADC channels. More... | |
class | STM32CAN |
STM32CAN 类,用于处理 STM32 系统的 CAN 通道。 Provides handling for STM32 CAN channels. More... | |
class | STM32CANFD |
STM32CANFD 类,用于处理 STM32 系统的 CANFD 通道。 Provides handling for STM32 CANFD. More... | |
class | STM32Flash |
STM32Flash 通用类,构造时传入扇区列表,自动判断编程粒度。 More... | |
class | STM32GPIO |
class | STM32I2C |
class | STM32PowerManager |
class | STM32PWM |
class | STM32SPI |
class | STM32Timebase |
获取基于STM32 SysTick计数器的时间基准(微秒与毫秒) / Provides a timebase using STM32 SysTick timer (microseconds and milliseconds) More... | |
class | STM32TimerTimebase |
基于硬件定时器的时间基准类 / Provides a timebase using hardware timer (TIM) More... | |
class | STM32UART |
class | STM32VirtualUART |
class | STM32Watchdog |
STM32 IWDG 独立看门狗 / Independent Watchdog. More... | |
class | String |
A fixed-length string class with safe operations. More... | |
class | Terminal |
终端类,实现一个基于 RamFS 的基本命令行接口 Terminal class implementing a basic command-line interface based on RamFS More... | |
class | Thread |
线程管理类,封装 POSIX 线程创建和调度 Thread management class encapsulating POSIX thread creation and scheduling More... | |
class | Timebase |
时间基类,用于提供高精度时间戳。 Timebase class for providing high-precision timestamps. More... | |
class | Timer |
定时器类,实现周期性任务调度 Timer class for scheduling periodic tasks More... | |
class | TimestampMS |
表示毫秒级时间戳的类。Class representing a timestamp in milliseconds. More... | |
class | TimestampUS |
表示微秒级时间戳的类。Class representing a timestamp in microseconds. More... | |
class | TinyUSBUARTReadPort |
class | TinyUSBUARTWritePort |
class | TinyUSBVirtualUART |
class | Topic |
主题(Topic)管理类 / Topic management class More... | |
class | Transform |
表示三维空间中的刚体变换,包括旋转和位移。Represents rigid body transformations in 3D space, including rotation and translation. More... | |
class | TypeID |
类型标识符生成器,替代 typeid More... | |
class | UART |
通用异步收发传输(UART)基类 / Abstract base class for Universal Asynchronous Receiver-Transmitter (UART) More... | |
class | Watchdog |
通用看门狗(Watchdog)抽象接口 General Watchdog interface for both thread and task style usage More... | |
class | WebAsmTimebase |
WebAsmTimebase 类,用于获取 WebAssembly 系统的时间基准。 More... | |
class | WifiClient |
WiFi 客户端接口 / WiFi Client Interface. More... | |
struct | WriteInfoBlock |
class | WritePort |
WritePort class for handling write operations. More... | |
Typedefs | |
typedef pthread_mutex_t | libxr_mutex_handle |
typedef sem_t * | libxr_semaphore_handle |
typedef pthread_t | libxr_thread_handle |
typedef Operation< ErrorCode > | ReadOperation |
Read operation type. | |
typedef Operation< ErrorCode > | WriteOperation |
Write operation type. | |
typedef ErrorCode(* | WriteFun) (WritePort &port) |
Function pointer type for write operations. | |
typedef ErrorCode(* | ReadFun) (ReadPort &port) |
Function pointer type for read operations. | |
using | DefaultScalar = double |
Enumerations | |
enum | ch32_gpio_group_t { CH32_GPIO_NUMBER } |
enum class | Format : uint8_t { NONE = 0 , RESET , BOLD , DARK , UNDERLINE , BLINK , REVERSE , CONCEALED , CLEAR_LINE , COUNT } |
Terminal text format (Format) / 终端文本格式 (Format) More... | |
enum class | Font : uint8_t { NONE = 0 , BLACK , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , WHITE , COUNT } |
Terminal font color (Font) / 终端字体颜色 (Font) More... | |
enum class | Background : uint8_t { NONE = 0 , BLACK , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , WHITE , COUNT } |
Terminal background color (Background) / 终端背景颜色 (Background) More... | |
enum class | Bold : uint8_t { NONE = 0 , YELLOW , RED , ON_RED , COUNT } |
Terminal bold style (Bold) / 终端粗体样式 (Bold) More... | |
enum class | LogLevel : uint8_t { XR_LOG_LEVEL_DEBUG = 0 , XR_LOG_LEVEL_INFO , XR_LOG_LEVEL_PASS , XR_LOG_LEVEL_WARN , XR_LOG_LEVEL_ERROR } |
日志级别枚举 / Log level enumeration More... | |
Functions | |
static uint32_t | CH32GetGPIOPeriph (GPIO_TypeDef *port) |
void | PlatformInit () |
平台初始化函数 Platform initialization function | |
template<typename T1 , typename T2 > | |
constexpr auto | max (T1 a, T2 b) -> typename std::common_type< T1, T2 >::type |
计算两个数的最大值 | |
template<typename T1 , typename T2 > | |
constexpr auto | min (T1 a, T2 b) -> typename std::common_type< T1, T2 >::type |
计算两个数的最小值 | |
Variables | |
constexpr const char * | LIBXR_FORMAT_STR [] |
ANSI escape sequences for text format / ANSI转义序列 - 文本格式 | |
constexpr const char * | LIBXR_FONT_STR [] |
ANSI escape sequences for font color / ANSI转义序列 - 字体颜色 | |
constexpr const char * | LIBXR_BACKGROUND_STR [] |
ANSI escape sequences for background color / ANSI转义序列 - 背景颜色 | |
constexpr const char * | LIBXR_BOLD_STR [] |
ANSI escape sequences for bold styles / ANSI转义序列 - 粗体样式 | |
constexpr size_t | IPADDR_STRLEN = 16 |
constexpr size_t | MACADDR_STRLEN = 18 |
static constexpr uint16_t | LIBXR_DATABASE_VERSION = 2 |
constexpr DefaultScalar | PID_SIGMA = 1e-6f |
typedef double LibXR::DefaultScalar = double |
Definition at line 10 of file cycle_value.hpp.
typedef pthread_mutex_t LibXR::libxr_mutex_handle |
Definition at line 8 of file libxr_system.hpp.
typedef sem_t* LibXR::libxr_semaphore_handle |
Definition at line 9 of file libxr_system.hpp.
typedef pthread_t LibXR::libxr_thread_handle |
Definition at line 10 of file libxr_system.hpp.
typedef ErrorCode(* LibXR::ReadFun) (ReadPort &port) |
Function pointer type for read operations.
读取操作的函数指针类型。
Definition at line 247 of file libxr_rw.hpp.
typedef Operation<ErrorCode> LibXR::ReadOperation |
typedef ErrorCode(* LibXR::WriteFun) (WritePort &port) |
Function pointer type for write operations.
写入操作的函数指针类型。
Definition at line 243 of file libxr_rw.hpp.
typedef Operation<ErrorCode> LibXR::WriteOperation |
|
strong |
Terminal background color (Background) / 终端背景颜色 (Background)
Definition at line 48 of file libxr_color.hpp.
|
strong |
Terminal bold style (Bold) / 终端粗体样式 (Bold)
Optional bold styles like yellow bold, red bold, red background bold. 可选粗体样式,包括黄色粗体、红色粗体、红色背景粗体等。
Definition at line 67 of file libxr_color.hpp.
enum LibXR::ch32_gpio_group_t |
Definition at line 11 of file ch32_gpio.hpp.
|
strong |
Terminal font color (Font) / 终端字体颜色 (Font)
Definition at line 31 of file libxr_color.hpp.
|
strong |
Terminal text format (Format) / 终端文本格式 (Format)
Defines text styles like NONE, RESET, BOLD, DARK, UNDERLINE, etc. 定义文本样式,如NONE(无格式)、RESET(重置)、BOLD(加粗)、DARK(暗色)、UNDERLINE(下划线)等。
Definition at line 14 of file libxr_color.hpp.
|
strong |
日志级别枚举 / Log level enumeration
Definition at line 18 of file logger.hpp.
|
static |
Definition at line 43 of file ch32_gpio.hpp.
|
constexpr |
计算两个数的最大值
Computes the maximum of two numbers
T1 | 第一个数的类型 | Type of the first number |
T2 | 第二个数的类型 | Type of the second number |
a | 第一个数 | First number |
b | 第二个数 | Second number |
Definition at line 150 of file libxr_def.hpp.
|
constexpr |
计算两个数的最小值
Computes the minimum of two numbers
T1 | 第一个数的类型 | Type of the first number |
T2 | 第二个数的类型 | Type of the second number |
a | 第一个数 | First number |
b | 第二个数 | Second number |
Definition at line 165 of file libxr_def.hpp.
void LibXR::PlatformInit | ( | ) |
平台初始化函数 Platform initialization function
该函数用于初始化 POSIX 线程相关的资源,例如互斥锁、信号量和条件变量。 在使用 LibXR
线程库之前,应调用该函数进行必要的系统初始化。
This function initializes POSIX thread-related resources such as mutexes, semaphores, and condition variables. It should be called before using the LibXR
threading library for proper system setup.
Definition at line 88 of file libxr_system.cpp.
|
inlineconstexpr |
ANSI escape sequences for background color / ANSI转义序列 - 背景颜色
Definition at line 93 of file libxr_color.hpp.
|
inlineconstexpr |
ANSI escape sequences for bold styles / ANSI转义序列 - 粗体样式
Definition at line 100 of file libxr_color.hpp.
|
staticconstexpr |
Definition at line 14 of file database.hpp.
|
inlineconstexpr |
ANSI escape sequences for font color / ANSI转义序列 - 字体颜色
Definition at line 86 of file libxr_color.hpp.
|
inlineconstexpr |
ANSI escape sequences for text format / ANSI转义序列 - 文本格式
Definition at line 79 of file libxr_color.hpp.