vcontrol 0.5.0

A library for communication with Viessmann heating controllers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::Command;

mod codegen {
  include!(concat!(env!("OUT_DIR"), "/commands.rs"));
  include!(concat!(env!("OUT_DIR"), "/system_commands.rs"));
}

pub use self::codegen::*;

/// Get a system command by name.
pub fn system_command(name: impl AsRef<str>) -> Option<&'static Command> {
  SYSTEM_COMMANDS.get(name.as_ref()).copied()
}

/// Iterate over system commands.
pub fn system_commands() -> &'static phf::Map<&'static str, &'static Command> {
  &SYSTEM_COMMANDS
}