1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
use super::NanonisClient;
use crate::error::NanonisError;
use crate::types::NanonisValue;
impl NanonisClient {
// ==================== Multi-Pass ====================
/// Activate or deactivate Multi-Pass in the Scan Control module.
///
/// # Arguments
/// * `on` - True to activate, false to deactivate
///
/// # Errors
/// Returns `NanonisError` if communication fails.
pub fn mpass_activate(&mut self, on: bool) -> Result<(), NanonisError> {
self.quick_send(
"MPass.Activate",
vec![NanonisValue::U32(if on { 1 } else { 0 })],
vec!["I"],
vec![],
)?;
Ok(())
}
/// Load a Multi-Pass configuration file (.mpas).
///
/// # Arguments
/// * `file_path` - Path to the .mpas file (empty to load from session)
///
/// # Errors
/// Returns `NanonisError` if communication fails.
pub fn mpass_load(&mut self, file_path: &str) -> Result<(), NanonisError> {
self.quick_send(
"MPass.Load",
vec![NanonisValue::String(file_path.to_string())],
vec!["+*c"],
vec![],
)?;
Ok(())
}
/// Save the current Multi-Pass configuration to a file (.mpas).
///
/// # Arguments
/// * `file_path` - Path to save the .mpas file (empty to save to session)
///
/// # Errors
/// Returns `NanonisError` if communication fails.
pub fn mpass_save(&mut self, file_path: &str) -> Result<(), NanonisError> {
self.quick_send(
"MPass.Save",
vec![NanonisValue::String(file_path.to_string())],
vec!["+*c"],
vec![],
)?;
Ok(())
}
}