Skip to main content

mbus_core/function_codes/
mod.rs

1//! # Modbus Function Codes Module
2//!
3//! This module serves as the central definition point for all Modbus function codes
4//! supported by the stack. It categorizes function codes into two primary groups:
5//!
6//! - **[`public`]**: Contains standard function codes defined by the Modbus Application
7//!   Protocol Specification V1.1b3 (e.g., Read Coils, Write Holding Registers).
8//! - **[`user_defined`]**: Provides a space for vendor-specific or proprietary function
9//!   codes (ranges 65-72 and 100-110) as permitted by the standard.
10//!
11//! Function codes are the core of the Modbus PDU, determining the action to be
12//! performed by the server. This module ensures that these codes are handled
13//! in a type-safe manner, providing conversions between raw bytes and structured enums.
14//!
15//! This module is `no_std` compatible.
16
17/// Standard Modbus function codes and their associated sub-functions.
18pub mod public;
19
20/// Extension point for non-standard, vendor-specific function codes.
21pub mod user_defined;