|
libxr
1.0
Want to be the best embedded framework
|
Namespaces | |
| namespace | Flag |
| 轻量标志位模块(Flag)/ Lightweight flag utilities for state signaling | |
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 |
| 通用回调包装,支持动态参数传递 / Generic callback wrapper supporting dynamic argument passing More... | |
| class | CallbackBlock |
| 回调函数封装块,提供重入保护与参数绑定 / Callback block with argument binding and reentrancy guard More... | |
| class | CAN |
| CAN 通信抽象类,定义经典 CAN 帧与订阅接口。 Abstract class for CAN communication with classic CAN frames and subscription API. More... | |
| class | CDCUartTxOpDequeueHelper |
| WritePort(info 队列 + data 队列)的“单 op 不跨界”出队辅助器 Dequeue helper for WritePort (info + data) without crossing op boundary. More... | |
| class | CenterOfMass |
| 质心信息表示类。Represents the center of mass information. More... | |
| class | CH32CAN |
| CH32 CAN 驱动实现 / CH32 CAN driver implementation. More... | |
| class | CH32Flash |
| CH32 闪存驱动实现 / CH32 flash driver implementation. More... | |
| class | CH32GPIO |
| CH32 GPIO 驱动实现 / CH32 GPIO driver implementation. More... | |
| class | CH32I2C |
| class | CH32PWM |
| CH32 PWM 驱动实现 / CH32 PWM driver implementation. More... | |
| class | CH32SPI |
| CH32 SPI 驱动实现 / CH32 SPI driver implementation. More... | |
| class | CH32Timebase |
| CH32 时间基准实现 / CH32 timebase implementation. More... | |
| class | CH32UART |
| CH32 UART 驱动实现 / CH32 UART driver implementation. More... | |
| class | CH32USBDevice |
| 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 | DAC |
| 数字模拟转换器(DAC)基类 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 |
| ESP32 多通道 ADC 驱动 / ESP32 multi-channel ADC driver. More... | |
| class | ESP32GPIO |
| ESP32 GPIO 驱动实现 / ESP32 GPIO driver implementation. More... | |
| class | ESP32NvsFlashDatabase |
| ESP32 NVS 数据库存储实现 / ESP32 NVS-backed database implementation. More... | |
| class | ESP32PWM |
| ESP32 PWM 驱动实现 / ESP32 PWM driver implementation. More... | |
| class | ESP32Timebase |
| ESP32 时间基准实现 / ESP32 timebase implementation. More... | |
| class | ESP32WifiClient |
| ESP32 Wi-Fi 客户端实现 / ESP32 Wi-Fi client implementation. 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 帧。 Abstract class for FDCAN communication with CAN FD frame support. More... | |
| class | Flash |
| Abstract base class representing a flash memory interface. 抽象基类,表示闪存接口。 More... | |
| struct | FlashSector |
| 闪存扇区描述 / Flash sector descriptor 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 |
| Linux 二进制文件闪存实现 / Linux binary-file flash implementation. More... | |
| class | LinuxPowerManager |
| Linux 电源管理实现 / Linux power manager implementation. More... | |
| class | LinuxTimebase |
| Linux 时间基准实现 / Linux timebase implementation. More... | |
| class | LinuxUART |
| Linux UART 串口驱动实现 / Linux UART driver implementation. More... | |
| 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 | LockFreePool |
| 无锁无序槽池 / Lock-free, unordered slot pool 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 | Memory |
| 内存操作类 / Memory operation class More... | |
| class | MicrosecondTimestamp |
| 表示微秒级时间戳的类。Class representing a timestamp in microseconds. More... | |
| class | MillisecondTimestamp |
| 表示毫秒级时间戳的类。Class representing a timestamp in milliseconds. 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 | Pipe |
| 基于共享队列,由 ReadPort + WritePort 组成的单向管道。 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 |
| STM32 ADC 驱动实现 / STM32 ADC driver implementation. More... | |
| class | STM32CAN |
| STM32 CAN 驱动实现 / STM32 CAN driver implementation. More... | |
| class | STM32CANFD |
| STM32 FDCAN 驱动实现 / STM32 FDCAN driver implementation. More... | |
| class | STM32Endpoint |
| STM32 USB 端点实现 / STM32 USB endpoint implementation. More... | |
| class | STM32Flash |
| STM32 闪存驱动实现 / STM32 flash driver implementation. More... | |
| class | STM32GPIO |
| STM32 GPIO 驱动实现 / STM32 GPIO driver implementation. More... | |
| class | STM32I2C |
| STM32 I2C 驱动实现 / STM32 I2C driver implementation. More... | |
| class | STM32PowerManager |
| STM32 电源管理实现 / STM32 power manager implementation. More... | |
| class | STM32PWM |
| STM32 PWM 驱动实现 / STM32 PWM driver implementation. More... | |
| class | STM32SPI |
| STM32 SPI 驱动实现 / STM32 SPI driver implementation. More... | |
| class | STM32Timebase |
| STM32 SysTick 时间基准实现 / STM32 SysTick-based timebase implementation. More... | |
| class | STM32TimerTimebase |
| STM32 硬件定时器时间基准实现 / STM32 timer-based timebase implementation. More... | |
| class | STM32UART |
| STM32 UART 驱动实现 / STM32 UART driver implementation. More... | |
| class | STM32USBDevice |
| STM32 USB 设备核心实现 / STM32 USB device core implementation. More... | |
| class | STM32Watchdog |
| STM32 IWDG 看门狗驱动 / STM32 independent watchdog driver. 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 | 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 |
| WebAssembly 时间基准实现 / WebAssembly timebase implementation. More... | |
| class | WebotsTimebase |
| Webots 时间基准实现 / Webots timebase implementation. 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 |
| using | ErrorCode = ErrorCode |
| using | SizeLimitMode = SizeLimitMode |
| typedef Operation< ErrorCode > | ReadOperation |
| Read operation type. | |
| typedef Operation< ErrorCode > | WriteOperation |
| Write operation type. | |
| typedef ErrorCode(* | WriteFun) (WritePort &port, bool in_isr) |
| Function pointer type for write operations. | |
| typedef ErrorCode(* | ReadFun) (ReadPort &port, bool in_isr) |
| Function pointer type for read operations. | |
| using | DefaultScalar = double |
Enumerations | |
| enum | ch32_gpio_group_t { CH32_GPIO_NUMBER } |
| enum | ch32_usb_dev_id_t : uint8_t { CH32_USB_DEV_ID_NUM } |
| CH32 USB 控制器编号 / CH32 USB controller identifiers. More... | |
| 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_ERROR = 0 , XR_LOG_LEVEL_WARN = 1 , XR_LOG_LEVEL_PASS = 2 , XR_LOG_LEVEL_INFO = 3 , XR_LOG_LEVEL_DEBUG = 4 } |
| 日志级别枚举 / Log level enumeration More... | |
Functions | |
| uint32_t | ch32_get_gpio_periph (GPIO_TypeDef *port) |
| uint32_t | STM32FlashBankOf (uint32_t) |
| void | PlatformInit (uint32_t timer_pri=2, uint32_t timer_stack_depth=65536) |
| 平台初始化函数 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 = 3 |
| constexpr DefaultScalar | PID_SIGMA = 1e-6f |
| typedef double LibXR::DefaultScalar = double |
Definition at line 10 of file cycle_value.hpp.
| using LibXR::ErrorCode = ErrorCode |
Definition at line 152 of file libxr_def.hpp.
| typedef pthread_mutex_t LibXR::libxr_mutex_handle |
Definition at line 10 of file libxr_system.hpp.
| typedef sem_t* LibXR::libxr_semaphore_handle |
Definition at line 11 of file libxr_system.hpp.
| typedef pthread_t LibXR::libxr_thread_handle |
Definition at line 12 of file libxr_system.hpp.
| typedef ErrorCode(* LibXR::ReadFun) (ReadPort &port, bool in_isr) |
Function pointer type for read operations.
读取操作的函数指针类型。
Definition at line 249 of file libxr_rw.hpp.
| typedef Operation<ErrorCode> LibXR::ReadOperation |
| using LibXR::SizeLimitMode = SizeLimitMode |
Definition at line 153 of file libxr_def.hpp.
| typedef ErrorCode(* LibXR::WriteFun) (WritePort &port, bool in_isr) |
Function pointer type for write operations.
写入操作的函数指针类型。
Definition at line 245 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.
| enum LibXR::ch32_usb_dev_id_t : uint8_t |
CH32 USB 控制器编号 / CH32 USB controller identifiers.
Definition at line 12 of file ch32_usb.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.
| uint32_t LibXR::ch32_get_gpio_periph | ( | GPIO_TypeDef * | port | ) |
Definition at line 6 of file ch32_gpio.cpp.
|
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 165 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 180 of file libxr_def.hpp.
| void LibXR::PlatformInit | ( | uint32_t | timer_pri = 2, |
| uint32_t | timer_stack_depth = 65536 ) |
平台初始化函数 Platform initialization function
| timer_pri | 定时器任务的优先级(默认值 2) Timer task priority (default: 2) |
| timer_stack_depth | 定时器任务的栈深度(默认值 65536) Timer task stack depth (default: 65536) |
该函数用于初始化 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 100 of file libxr_system.cpp.
|
inline |
Definition at line 43 of file stm32_flash.hpp.
|
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.