|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
LibXR 命名空间 / LibXR namespace. More...
Namespaces | |
| namespace | Flag |
| 轻量标志位模块(Flag)/ Lightweight flag utilities for state signaling | |
Classes | |
| class | ADC |
| 模拟数字转换器(ADC)基类 Abstract base class for Analog-to-Digital Converter (ADC) More... | |
| class | ASync |
| 单任务异步执行器 / Single-job asynchronous executor. More... | |
| class | AsyncBlockWait |
| 同步驱动操作的阻塞等待器 / Blocking waiter for synchronous driver operations. More... | |
| class | Axis |
| 三维坐标轴类,继承自 Eigen::Matrix<Scalar, 3, 1>。 A 3D axis class, inheriting from Eigen::Matrix<Scalar, 3, 1>. More... | |
| class | Callback |
| 通用回调包装,支持动态参数传递 / Generic callback wrapper supporting dynamic argument passing More... | |
| class | CallbackBlock |
| 回调函数封装块,提供参数绑定与擦除调用入口 / Callback block with bound argument and erased invoke entry More... | |
| struct | CallbackBlockHeader |
| class | CAN |
| CAN 通信抽象类,定义经典 CAN 帧与订阅接口。 Abstract class for CAN communication with classic CAN frames and subscription API. More... | |
| class | CenterOfMass |
| 质心信息表示类 / Represents the center of mass information. More... | |
| class | CH32CAN |
| CH32 CAN 驱动实现 / CH32 CAN driver implementation. More... | |
| class | CH32EndpointDevFs |
| CH32 FSDEV 端点实现 / CH32 FSDEV endpoint implementation. More... | |
| class | CH32EndpointOtgFs |
| CH32 OTG FS 端点实现 / CH32 OTG FS endpoint implementation. More... | |
| class | CH32EndpointOtgHs |
| CH32 OTG HS 端点实现 / CH32 OTG HS endpoint implementation. More... | |
| class | CH32Flash |
| CH32 闪存驱动实现 / CH32 flash driver implementation. More... | |
| class | CH32GPIO |
| CH32 GPIO 驱动实现 / CH32 GPIO driver implementation. More... | |
| class | CH32I2C |
| class | CH32PowerManager |
| CH32 平台电源管理基类实现 / CH32 power-manager base implementation. More... | |
| class | CH32PWM |
| CH32 PWM 驱动实现 / CH32 PWM driver implementation. More... | |
| class | CH32SPI |
| CH32 SPI 驱动实现 / CH32 SPI driver implementation. More... | |
| class | CH32Timebase |
| CH32 硬件计数器时间基准 / CH32 hardware-counter timebase. More... | |
| class | CH32UART |
| 使用循环接收 DMA 和双缓冲发送的 CH32 串口 / CH32 UART with circular RX DMA and double-buffered TX. More... | |
| class | CH32USBDevice |
| class | CH32USBDeviceFS |
| CH32 FSDEV 设备驱动 / CH32 FSDEV device driver. More... | |
| class | CH32USBOtgFS |
| CH32 OTG FS 设备驱动 / CH32 OTG FS device driver. More... | |
| class | CH32USBOtgHS |
| CH32 OTG HS 设备驱动 / CH32 OTG HS device driver. More... | |
| class | ConstRawData |
| 只读原始数据视图 / Immutable raw data view More... | |
| class | CRC16 |
| 16 位循环冗余校验(CRC-16)计算类 / CRC-16 checksum computation class More... | |
| class | CRC32 |
| 32 位循环冗余校验(CRC-32)计算类 / CRC-32 checksum computation class More... | |
| class | CRC64 |
| 64 位循环冗余校验(CRC-64)计算类 / CRC-64 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)基类 Abstract base class for Digital-to-Analog Converter (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... | |
| class | ESP32ADC |
| class | ESP32CDCJtag |
| 直接使用硬件 FIFO 的 ESP USB Serial/JTAG 后端 / ESP USB Serial/JTAG backend using the hardware FIFO directly. More... | |
| class | ESP32CDCJtagReadPort |
| 通知 CDC-JTAG 恢复接收的读端口 / Read port that resumes CDC-JTAG RX. More... | |
| class | ESP32DAC |
| class | ESP32GPIO |
| ESP32 GPIO 驱动实现 / ESP32 GPIO driver implementation. More... | |
| class | ESP32I2C |
| class | ESP32NvsFlashDatabase |
| ESP32 NVS 数据库存储实现 / ESP32 NVS-backed database implementation. More... | |
| class | ESP32PWM |
| ESP32 PWM driver implementation. More... | |
| class | ESP32SPI |
| class | ESP32Timebase |
| ESP32 时间基准实现 / ESP32 timebase implementation. More... | |
| class | ESP32UART |
| 支持 FIFO 和 GDMA 的 ESP UART 后端 / ESP UART backend with FIFO and GDMA. More... | |
| class | ESP32UARTReadPort |
| ESP32 UART 读端口 / ESP32 UART read port. More... | |
| class | ESP32USBDevice |
| ESP32-S3 USB OTG 设备核心实现 / ESP32-S3 USB OTG device-core implementation. More... | |
| class | ESP32USBEndpoint |
| ESP32-S3 USB endpoint implementation. More... | |
| class | ESP32Watchdog |
| 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 | FlashRegion |
| 一段连续、大小相同的扇区 / A run of contiguous sectors of equal size More... | |
| class | FloatEncoder |
| 浮点数编码器,将浮点值映射到定长无符号整数。 A generic float encoder mapping a float value to N-bit unsigned integer. More... | |
| class | Format |
| class | GPIO |
| 通用输入输出(GPIO)接口类。 General Purpose Input/Output (GPIO) interface class. More... | |
| class | GuardedCallbackBlock |
| class | HPMDmaManager |
HPM SDK dma_mgr 一次性初始化入口 / One-time initialization entry for the HPM SDK dma_mgr. More... | |
| class | HPMGPIO |
| HPM 平台 GPIO 驱动实现 / GPIO driver implementation for HPM platform. More... | |
| class | HPMI2C |
| HPM SDK I2C 主机驱动,适配 LibXR I2C 接口 / HPM SDK based I2C master driver for the LibXR I2C interface. More... | |
| class | HPMPowerManager |
| HPM 电源管理实现 / HPM power manager implementation. More... | |
| class | HPMPWM |
| HPM 平台 PWM 驱动实现 / PWM driver implementation for HPM platform. More... | |
| class | HPMTimebase |
| HPM MCHTMR 时间基准实现 / HPM MCHTMR based timebase implementation. More... | |
| 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 | LatestSnapshot |
| 只保留最新一份完整值的单生产者、单消费者邮箱 / Single-producer, single-consumer mailbox that keeps only the latest complete value More... | |
| struct | libxr_linux_futex_semaphore |
| class | LinuxBinaryFileFlash |
| Linux 二进制文件闪存实现 / Linux binary-file flash implementation. More... | |
| class | LinuxGPIO |
| 基于 Linux GPIO character device uAPI 的 Linux GPIO 实现 Linux GPIO implementation based on the Linux GPIO character-device uAPI More... | |
| class | LinuxPowerManager |
| Linux 电源管理实现 / Linux power manager implementation. More... | |
| class | LinuxTimebase |
| Linux 时间基准实现 / Linux timebase implementation. More... | |
| class | LinuxUART |
| 使用单个 I/O 线程的 Linux 串口 / Linux UART with one I/O thread. More... | |
| class | LinuxWifiClient |
| Linux Wi-Fi 客户端实现 / Linux Wi-Fi client 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... | |
| 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 |
| 静态内存操作工具 / Static memory-operation utilities More... | |
| class | MicrosecondTimestamp |
| 微秒时间戳 / Microsecond timestamp More... | |
| class | MillisecondTimestamp |
| 毫秒时间戳 / Millisecond timestamp More... | |
| class | MPMCQueue |
| 带固定 payload 类型的有界 MPMC 队列。 Bounded MPMC queue with a fixed payload type. More... | |
| class | MPMCQueueBase |
| 有界 MPMC 字节队列内核 / Bounded MPMC byte-queue core More... | |
| class | MSPM0GPIO |
| MSPM0 GPIO / MSPM0 GPIO. More... | |
| class | MSPM0I2C |
| class | MSPM0PowerManager |
| MSPM0 电源管理实现 / MSPM0 power manager implementation. More... | |
| class | MSPM0PWM |
| class | MSPM0SPI |
| MSPM0 SPI 控制器 / MSPM0 SPI controller. More... | |
| class | MSPM0Timebase |
| class | MSPM0UART |
| 使用双缓冲 DMA 发送的 MSPM0 串口 / MSPM0 UART with double-buffered DMA TX. More... | |
| class | MSPM0UARTReadPort |
| 通知串口恢复接收的读端口 / Read port that resumes UART reception. More... | |
| class | Mutex |
| 互斥锁类,提供线程同步机制 Mutex class providing thread synchronization mechanisms. More... | |
| class | NetworkInterface |
| 抽象网络接口类 / Abstract base for network interfaces More... | |
| class | ObjectPool |
| 带引用计数的固定槽对象池 / Fixed-slot object pool with reference counting. More... | |
| class | Operation |
| 操作的完成通知描述符 / Completion notification descriptor for an operation. More... | |
| class | PID |
| 通用 PID 控制器类。 Generic PID controller. More... | |
| class | Pipe |
| 由读写端口组成的单向管道 / Unidirectional pipe connecting read and write ports. More... | |
| class | Position |
| 三维空间中的位置向量 / 3D position vector More... | |
| class | PowerManager |
| 电源管理器基类 / Abstract base class for Power Manager More... | |
| class | PWM |
| PWM(脉冲宽度调制)控制的抽象基类。 Abstract base class for PWM (Pulse Width Modulation) control. More... | |
| class | Quaternion |
| 四元数表示与运算,继承自 Eigen::Quaternion / Quaternion representation and operations, inheriting from Eigen::Quaternion More... | |
| class | Queue |
| 基于 QueueBase 的泛型队列模板类。 Generic queue template class based on QueueBase. More... | |
| class | QueueBase |
| 提供固定大小循环缓冲区的字节 FIFO 队列。 Byte FIFO queue providing a fixed-size circular buffer. More... | |
| class | QueueTypedBase |
| 强类型队列的公共薄包装 / Common thin wrapper for typed queues. More... | |
| class | RamFS |
| 轻量级内存文件系统 / Lightweight in-memory file system More... | |
| class | RawData |
| 可写原始数据视图 / Mutable raw data view More... | |
| class | RBTree |
| 红黑树实现,支持泛型键和值,并提供线程安全操作 Red-Black Tree implementation supporting generic keys and values with thread-safe operations. More... | |
| class | ReadPort |
| 基于 SPSC 字节队列的读端口 / Read endpoint backed by an SPSC byte queue. More... | |
| class | RotationMatrix |
| 旋转矩阵类,继承自 Eigen::Matrix<Scalar, 3, 3>。 Rotation matrix class, inheriting from Eigen::Matrix<Scalar, 3, 3>. More... | |
| class | RuntimeStringView |
| 运行期构造、长期保留的 NUL 结尾字符串视图。 Runtime-built retained NUL-terminated string view. More... | |
| class | Semaphore |
| 信号量类,实现线程同步机制 Semaphore class implementing thread synchronization More... | |
| class | SerializedService |
| 事件合并与回调串行化服务 / Event-coalescing serialized-callback service. More... | |
| class | SlotPool |
| 面向任务与中断的小容量消息槽池。 Small message slot pool shared between tasks and interrupts. More... | |
| class | SlotPoolBase |
| 槽池的无类型内核:槽状态机、发布序号与扫描逻辑。 Typeless core of the slot pool: slot state machine, publish sequence and scan logic. More... | |
| class | SPI |
| 串行外设接口(SPI)抽象类。 Abstract class for Serial Peripheral Interface (SPI). More... | |
| class | SPSCQueue |
| 单生产者单消费者无锁队列 / Single-producer single-consumer lock-free queue. More... | |
| class | SPSCQueueBase |
| 单生产者单消费者字节队列内核 / Single-producer single-consumer byte-queue core More... | |
| class | Stack |
| 线程安全的栈数据结构 / Thread-safe stack data structure More... | |
| class | STDIO |
| 提供静态全局的输入输出接口绑定与写会话管理 / STDIO interface for read and 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 | STM32DAC |
| STM32 DAC 驱动实现 / STM32 DAC driver implementation. More... | |
| class | STM32Endpoint |
| STM32 USB 端点实现 / STM32 USB endpoint implementation. More... | |
| class | STM32Flash |
| STM32 闪存驱动实现 / STM32 flash driver implementation. More... | |
| class | STM32GpdmaAdcAdapter |
| STM32 ADC 循环采样的 GPDMA 适配器 / GPDMA adapter for circular STM32 ADC sampling. More... | |
| class | STM32GpdmaUartAdapter |
| STM32 GPDMA 串口适配器 / STM32 GPDMA UART adapter. 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 |
| 使用循环接收 DMA 和双缓冲发送的 STM32 串口 / STM32 UART with circular RX DMA and double-buffered TX. More... | |
| class | STM32USBDevice |
| STM32 USB 设备核心实现 / STM32 USB device core implementation. More... | |
| class | STM32USBDeviceOtgFS |
| STM32 OTG FS 设备实现 / STM32 OTG FS device implementation. More... | |
| class | STM32USBDeviceOtgHS |
| STM32 OTG HS 设备实现 / STM32 OTG HS device implementation. More... | |
| class | STM32Watchdog |
| STM32 IWDG 看门狗驱动 / STM32 independent watchdog driver. More... | |
| class | Terminal |
| 基于 RamFS 的命令行终端 / Command-line terminal backed by 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 |
| 发布订阅主题 / Publish-subscribe topic More... | |
| class | Transform |
| 表示三维空间中的刚体变换,包括旋转和位移。 Represents rigid body transformations in 3D space, including rotation and translation. More... | |
| class | TypeID |
| 类型标识符生成器 / RTTI-free type identifier generator 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... | |
| class | WritePort |
| 基于 SPSC 字节队列的写端口 / Write endpoint backed by an SPSC byte queue. More... | |
Concepts | |
| concept | DCacheFunctionAcceptsVoidPtr |
D-Cache API 可直接接受 void* / D-Cache API accepts void* | |
| concept | DCacheFunctionAcceptsVolatileVoidPtr |
D-Cache API 可直接接受 volatile void* / D-Cache API accepts volatile void* | |
| concept | CallbackFunctionCompatible |
| 可转换为精确回调函数指针的可调用对象 Callable convertible to the exact callback function pointer | |
| concept | MemberObjectPointer |
| 指向非静态数据成员的成员指针 / Pointer to a non-static data member | |
| concept | CommonOrdered |
| 具有公共类型且可比较大小的类型对 / Type pair with a common type and ordering | |
| concept | TopicPayload |
| topic 可承载 payload 的类型约束 / Type constraint for payloads carried by one topic | |
Typedefs | |
| typedef pthread_mutex_t | libxr_mutex_handle |
| typedef libxr_linux_futex_semaphore * | libxr_semaphore_handle |
| typedef pthread_t | libxr_thread_handle |
| typedef Operation< ErrorCode > | ReadOperation |
| 读操作的完成通知描述符 / Read completion descriptor. | |
| typedef Operation< ErrorCode > | WriteOperation |
| 写操作的完成通知描述符 / Write completion descriptor. | |
| typedef void(* | WriteFun) (WritePort &port, bool in_isr) |
| 写入进度通知函数类型 / Write progress notification function type. | |
| 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 | TextStyle : uint8_t { NONE = 0 , BOLD , DIM , UNDERLINE , BLINK , REVERSE , CONCEALED , COUNT } |
| 终端文本样式 / Terminal text style More... | |
| enum class | TerminalControl : uint8_t { NONE = 0 , RESET , ERASE_LINE , COUNT } |
| 终端控制序列 / Terminal control sequence More... | |
| enum class | Foreground : uint8_t { NONE = 0 , BLACK , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , WHITE , COUNT } |
| 终端前景色 / Terminal foreground color More... | |
| enum class | Background : uint8_t { NONE = 0 , BLACK , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , WHITE , COUNT } |
| 终端背景色 / Terminal background color More... | |
| enum class | Preset : uint8_t { NONE = 0 , YELLOW_BOLD , RED_BOLD , BOLD_ON_RED , COUNT } |
| 终端文本预设 / Terminal text preset More... | |
| enum class | ErrorCode : int8_t { PENDING = 1 , OK = 0 , FAILED = -1 , INIT_ERR = -2 , ARG_ERR = -3 , STATE_ERR = -4 , SIZE_ERR = -5 , CHECK_ERR = -6 , NOT_SUPPORT = -7 , NOT_FOUND = -8 , NO_RESPONSE = -9 , NO_MEM = -10 , NO_BUFF = -11 , TIMEOUT = -12 , EMPTY = -13 , FULL = -14 , BUSY = -15 , PTR_NULL = -16 , OUT_OF_RANGE = -17 } |
| 定义错误码枚举 / Defines an enumeration for error codes More... | |
| enum class | SizeLimitMode : uint8_t { EQUAL = 0 , LESS = 1 , MORE = 2 , NONE = 3 } |
| 定义尺寸限制模式 / Defines size limit modes 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) |
| template<typename FunctionType > requires DCacheFunctionAcceptsVoidPtr<FunctionType> | |
| void | STM32_CallDCacheByAddr (FunctionType function, void *addr, int32_t dsize) |
| 按当前工具链接受的指针类型调用 CMSIS D-Cache 接口 Calls the CMSIS D-Cache helper with the pointer type accepted by the current toolchain | |
| template<typename FunctionType > requires (!DCacheFunctionAcceptsVoidPtr<FunctionType> && DCacheFunctionAcceptsVolatileVoidPtr<FunctionType>) | |
| void | STM32_CallDCacheByAddr (FunctionType function, void *addr, int32_t dsize) |
| template<typename FunctionType > requires (!DCacheFunctionAcceptsVoidPtr<FunctionType> && !DCacheFunctionAcceptsVolatileVoidPtr<FunctionType>) | |
| void | STM32_CallDCacheByAddr (FunctionType function, void *addr, int32_t dsize) |
| void | STM32_CleanDCacheByAddr (const void *addr, size_t size) |
| 清理指定内存范围覆盖的 D-Cache cache line Cleans D-Cache lines covering the specified memory range | |
| void | STM32_InvalidateDCacheByAddr (const void *addr, size_t size) |
| 失效指定内存范围覆盖的 D-Cache cache line Invalidates D-Cache lines covering the specified memory range | |
| uint32_t | STM32FlashBankOf (uint32_t) |
| constexpr size_t | STM32FlashMinWriteSize () |
由 HAL 的 FLASH_TYPEPROGRAM_* 宏确定的最小写入单位(字节) / Minimum write unit in bytes, determined from the HAL FLASH_TYPEPROGRAM_* macros | |
| void | PlatformInit (uint32_t timer_pri=2, uint32_t timer_stack_depth=65536) |
| 平台初始化函数 Platform initialization function | |
| template<typename OwnerType , typename MemberType > requires MemberObjectPointer<OwnerType, MemberType> | |
| size_t | OffsetOf (MemberType OwnerType::*member) noexcept |
| 计算成员在宿主对象中的偏移量 Computes the offset of a member within the owning object | |
| template<typename OwnerType , typename MemberType > requires MemberObjectPointer<OwnerType, MemberType> | |
| OwnerType * | ContainerOf (MemberType *ptr, MemberType OwnerType::*member) noexcept |
| 通过成员指针恢复其所属对象指针 Recover the owning object pointer from a member pointer | |
| template<typename OwnerType , typename MemberType > requires MemberObjectPointer<OwnerType, MemberType> | |
| const OwnerType * | ContainerOf (const MemberType *ptr, MemberType OwnerType::*member) noexcept |
| constexpr bool | SizeLimitCheck (SizeLimitMode mode, size_t limit, size_t size) noexcept |
| 尺寸约束的纯判断函数 / Pure predicate for size-limit comparisons | |
| template<typename LeftType , typename RightType > requires CommonOrdered<LeftType, RightType> | |
| constexpr auto | max (LeftType a, RightType b) -> std::common_type_t< LeftType, RightType > |
| 计算两个数的最大值 / Computes the maximum of two numbers | |
| template<typename LeftType , typename RightType > requires CommonOrdered<LeftType, RightType> | |
| constexpr auto | min (LeftType a, RightType b) -> std::common_type_t< LeftType, RightType > |
| 计算两个数的最小值 / Computes the minimum of two numbers | |
| RuntimeStringView (std::string_view) -> RuntimeStringView<> | |
| RuntimeStringView (const char *) -> RuntimeStringView<> | |
| template<typename First , typename Second , typename... Rest> | |
| RuntimeStringView (First &&, Second &&, Rest &&...) -> RuntimeStringView<> | |
| template<typename Data > | |
| constexpr void | CheckTopicPayload () |
| 在模板上下文里断言 payload 类型满足 topic 契约 / Assert in template context that one payload type satisfies the topic contract | |
Variables | |
| constexpr wdt_inst_t | ESP32_WATCHDOG_DEFAULT_INSTANCE = WDT_MWDT1 |
| constexpr uint8_t | MAX_PORTS = 1 |
| constexpr const char * | LIBXR_TEXT_STYLE_STR [] |
| ANSI转义序列 - 文本样式 / ANSI escape sequences for text styles. | |
| constexpr const char * | LIBXR_TERMINAL_CONTROL_STR [] = {"", "\033[m", "\033[K"} |
| ANSI转义序列 - 终端控制 / ANSI escape sequences for terminal controls. | |
| constexpr const char * | LIBXR_FOREGROUND_STR [] |
| ANSI转义序列 - 前景色 / ANSI escape sequences for foreground colors. | |
| constexpr const char * | LIBXR_BACKGROUND_STR [] |
| ANSI转义序列 - 背景颜色 / ANSI escape sequences for background color. | |
| constexpr const char * | LIBXR_PRESET_STR [] |
| ANSI转义序列 - 文本预设 / ANSI escape sequences for text presets. | |
| constexpr double | PI = 3.14159265358979323846 |
| PI 常量 / PI constant. | |
| constexpr double | TWO_PI = 2.0 * PI |
| 2PI 常量 / 2PI constant | |
| constexpr double | STANDARD_GRAVITY = 9.80665 |
| 标准重力加速度(m/s²) / Standard gravitational acceleration (m/s²) | |
| constexpr size_t | HW_CACHE_LINE_SIZE = (sizeof(void*) == 8) ? 64 : 32 |
| 真实硬件缓存行大小(用于 DMA / cache coherency) / Hardware cache-line size used for DMA/cache-coherency boundaries | |
| constexpr size_t | CONCURRENCY_ALIGNMENT = HW_CACHE_LINE_SIZE |
| 并发结构对齐粒度(用于降低多核伪共享) / Alignment policy used by concurrency-oriented structures | |
| constexpr size_t | CACHE_LINE_SIZE = HW_CACHE_LINE_SIZE |
| 兼容旧代码的缓存行别名 / Backward-compatible cache-line alias for existing code | |
| constexpr size_t | ALIGN_SIZE = sizeof(void*) |
| 平台自然对齐大小 / Native platform alignment size | |
| constexpr size_t | IPADDR_STRLEN = 16 |
| constexpr size_t | MACADDR_STRLEN = 18 |
| static constexpr uint16_t | LIBXR_DATABASE_VERSION = 3 |
| 数据库存储格式版本号 Database storage-format version. | |
| 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 10 of file libxr_system.hpp.
Definition at line 15 of file libxr_system.hpp.
| typedef pthread_t LibXR::libxr_thread_handle |
Definition at line 16 of file libxr_system.hpp.
| typedef Operation<ErrorCode> LibXR::ReadOperation |
读操作的完成通知描述符 / Read completion descriptor.
Definition at line 285 of file operation.hpp.
| typedef void(* LibXR::WriteFun) (WritePort &port, bool in_isr) |
写入进度通知函数类型 / Write progress notification function type.
数据已复制入队。普通后端通过 WriteQueue 消费并在析构时结算;Pipe 通知共享队列读端。 本函数只通知进展,不返回完成结果。 Payload is already queued. Queued backends consume via WriteQueue and settle on destruction; Pipe notifies its reader. This function returns no completion result.
Definition at line 303 of file operation.hpp.
| typedef Operation<ErrorCode> LibXR::WriteOperation |
写操作的完成通知描述符 / Write completion descriptor.
Definition at line 288 of file operation.hpp.
|
strong |
终端背景色 / Terminal background color
Definition at line 59 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 |
定义错误码枚举 / Defines an enumeration for error codes
| Enumerator | |
|---|---|
| PENDING | 等待中 / Pending |
| OK | 操作成功 / Operation successful |
| FAILED | 操作失败 / Operation failed |
| INIT_ERR | 初始化错误 / Initialization error |
| ARG_ERR | 参数错误 / Argument error |
| STATE_ERR | 状态错误 / State error |
| SIZE_ERR | 尺寸错误 / Size error |
| CHECK_ERR | 校验错误 / Check error |
| NOT_SUPPORT | 不支持 / Not supported |
| NOT_FOUND | 未找到 / Not found |
| NO_RESPONSE | 无响应 / No response |
| NO_MEM | 内存不足 / Insufficient memory |
| NO_BUFF | 缓冲区不足 / Insufficient buffer |
| TIMEOUT | 超时 / Timeout |
| EMPTY | 为空 / Empty |
| FULL | 已满 / Full |
| BUSY | 忙碌 / Busy |
| PTR_NULL | 空指针 / Null pointer |
| OUT_OF_RANGE | 超出范围 / Out of range |
Definition at line 131 of file libxr_def.hpp.
|
strong |
终端前景色 / Terminal foreground color
Definition at line 42 of file libxr_color.hpp.
|
strong |
日志级别枚举 / Log level enumeration
Definition at line 31 of file logger.hpp.
|
strong |
终端文本预设 / Terminal text preset
预组合的 ANSI 文本预设,例如黄色粗体、红色粗体、红底粗体等。 Precomposed ANSI presets such as yellow bold, red bold, and bold on red.
Definition at line 78 of file libxr_color.hpp.
|
strong |
定义尺寸限制模式 / Defines size limit modes
| Enumerator | |
|---|---|
| EQUAL | 尺寸必须相等 / Size must be equal |
| LESS | 尺寸必须小于等于 / Size must be less than or equal |
| MORE | 尺寸必须大于等于 / Size must be greater than or equal |
| NONE | 无限制 / No restriction |
Definition at line 158 of file libxr_def.hpp.
|
strong |
终端控制序列 / Terminal control sequence
定义 ANSI 终端控制命令,如 RESET(重置)和 ERASE_LINE(清除当前行)。 Defines ANSI terminal control commands such as RESET and ERASE_LINE.
Definition at line 31 of file libxr_color.hpp.
|
strong |
终端文本样式 / Terminal text style
定义 ANSI 文本样式,如 BOLD(加粗)、DIM(弱化)、UNDERLINE(下划线)等。 Defines ANSI text styles such as BOLD, DIM, and UNDERLINE.
Definition at line 14 of file libxr_color.hpp.
| uint32_t LibXR::ch32_get_gpio_periph | ( | GPIO_TypeDef * | port | ) |
Definition at line 6 of file ch32_gpio.cpp.
|
constexpr |
在模板上下文里断言 payload 类型满足 topic 契约 / Assert in template context that one payload type satisfies the topic contract
| Data | 待检查的 payload 类型 / Payload type to validate |
Definition at line 38 of file topic.hpp.
|
inlinenodiscardnoexcept |
Definition at line 120 of file libxr_def.hpp.
|
inlinenodiscardnoexcept |
通过成员指针恢复其所属对象指针 Recover the owning object pointer from a member pointer
| ptr | 指向成员的指针 / Pointer to the member |
| member | 指向成员的成员指针,如 &Type::member / Member pointer such as &Type::member |
Definition at line 111 of file libxr_def.hpp.
|
constexpr |
计算两个数的最大值 / Computes the maximum of two numbers
| LeftType | 第一个数的类型 / Type of the first number |
| RightType | 第二个数的类型 / Type of the second number |
| a | 第一个数 / First number |
| b | 第二个数 / Second number |
Definition at line 347 of file libxr_def.hpp.
|
constexpr |
计算两个数的最小值 / Computes the minimum of two numbers
| LeftType | 第一个数的类型 / Type of the first number |
| RightType | 第二个数的类型 / Type of the second number |
| a | 第一个数 / First number |
| b | 第二个数 / Second number |
Definition at line 362 of file libxr_def.hpp.
|
inlinenodiscardnoexcept |
计算成员在宿主对象中的偏移量 Computes the offset of a member within the owning object
| member | 指向成员的成员指针,如 &Type::member / Member pointer such as &Type::member |
Definition at line 95 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) |
该函数用于初始化 Linux 主机运行时,包括:
This function initializes the Linux host runtime, including:
LibXR components that depend on the host runtime. Definition at line 159 of file libxr_system.cpp.
| LibXR::RuntimeStringView | ( | const char * | ) | -> RuntimeStringView<> |
C 字符串构造推导为普通保留字符串 / C-string construction deduces a plain retained string.
| LibXR::RuntimeStringView | ( | First && | , |
| Second && | , | ||
| Rest && | ... ) -> RuntimeStringView<> |
多片段构造推导为普通拼接字符串 / Multi-part construction deduces a plain concatenated string.
| LibXR::RuntimeStringView | ( | std::string_view | ) | -> RuntimeStringView<> |
单参数文本构造推导为普通保留字符串 / Single text argument deduces a plain retained string.
|
nodiscardconstexprnoexcept |
尺寸约束的纯判断函数 / Pure predicate for size-limit comparisons
这个辅助函数只判断尺寸关系是否成立; 它本身不决定调用方应该断言、强约束终止,还是返回错误码。 This helper only answers whether the requested size relation holds. It does not decide whether the caller should assert, require, or return an error code.
Definition at line 175 of file libxr_def.hpp.
|
inline |
按当前工具链接受的指针类型调用 CMSIS D-Cache 接口 Calls the CMSIS D-Cache helper with the pointer type accepted by the current toolchain
Definition at line 31 of file stm32_dcache.hpp.
|
inline |
Definition at line 39 of file stm32_dcache.hpp.
|
inline |
Definition at line 47 of file stm32_dcache.hpp.
|
inline |
清理指定内存范围覆盖的 D-Cache cache line Cleans D-Cache lines covering the specified memory range
Definition at line 56 of file stm32_dcache.hpp.
|
inline |
失效指定内存范围覆盖的 D-Cache cache line Invalidates D-Cache lines covering the specified memory range
Definition at line 72 of file stm32_dcache.hpp.
|
inline |
Definition at line 36 of file stm32_flash.hpp.
|
constexpr |
由 HAL 的 FLASH_TYPEPROGRAM_* 宏确定的最小写入单位(字节) / Minimum write unit in bytes, determined from the HAL FLASH_TYPEPROGRAM_* macros
Definition at line 44 of file stm32_flash.hpp.
|
inlineconstexpr |
平台自然对齐大小 / Native platform alignment size
Definition at line 68 of file libxr_def.hpp.
|
inlineconstexpr |
兼容旧代码的缓存行别名 / Backward-compatible cache-line alias for existing code
Definition at line 65 of file libxr_def.hpp.
|
inlineconstexpr |
并发结构对齐粒度(用于降低多核伪共享) / Alignment policy used by concurrency-oriented structures
Definition at line 61 of file libxr_def.hpp.
|
constexpr |
Definition at line 30 of file esp_watchdog.hpp.
|
inlineconstexpr |
真实硬件缓存行大小(用于 DMA / cache coherency) / Hardware cache-line size used for DMA/cache-coherency boundaries
Definition at line 54 of file libxr_def.hpp.
|
inlineconstexpr |
ANSI转义序列 - 背景颜色 / ANSI escape sequences for background color.
Definition at line 108 of file libxr_color.hpp.
|
staticconstexpr |
数据库存储格式版本号 Database storage-format version.
Definition at line 17 of file interface.hpp.
|
inlineconstexpr |
ANSI转义序列 - 前景色 / ANSI escape sequences for foreground colors.
Definition at line 101 of file libxr_color.hpp.
|
inlineconstexpr |
ANSI转义序列 - 文本预设 / ANSI escape sequences for text presets.
Definition at line 115 of file libxr_color.hpp.
|
inlineconstexpr |
ANSI转义序列 - 终端控制 / ANSI escape sequences for terminal controls.
Definition at line 96 of file libxr_color.hpp.
|
inlineconstexpr |
ANSI转义序列 - 文本样式 / ANSI escape sequences for text styles.
Definition at line 90 of file libxr_color.hpp.
|
constexpr |
Definition at line 15 of file mspm0_gpio.hpp.
|
inlineconstexpr |
PI 常量 / PI constant.
Definition at line 44 of file libxr_def.hpp.
|
inlineconstexpr |
标准重力加速度(m/s²) / Standard gravitational acceleration (m/s²)
Definition at line 50 of file libxr_def.hpp.
|
inlineconstexpr |
2PI 常量 / 2PI constant
Definition at line 47 of file libxr_def.hpp.