pub const fn derive_cmd_id(name: &str, args_type: &str, ret_type: &str) -> u16Expand description
Derives a stable 16-bit cmd_id from the command’s textual signature.
Pre-image: name || 0x1F || args_type || 0x1F || ret_type (UTF-8 bytes).
The three segments are hashed sequentially without heap allocation, so this
function is safe to call from no_std firmware and const proc-macro contexts.
If the result would equal CMD_ID_DISCOVERY (0x0000) or
CMD_ID_METRICS (0xFFFE), the function loops over descending salt bytes
(0xFF, 0xFE, …) until the result avoids all reserved IDs —
guaranteeing that neither reserved value is ever returned.