pub enum Action {
Show 23 variants
ReadSignal {
signal: SignalIndex,
wait_for_newest: bool,
},
ReadSignals {
signals: Vec<SignalIndex>,
wait_for_newest: bool,
},
ReadSignalNames,
ReadBias,
SetBias {
voltage: f32,
},
ReadOsci {
signal: SignalIndex,
trigger: Option<TriggerConfig>,
data_to_get: DataToGet,
is_stable: Option<fn(&[f64]) -> bool>,
},
ReadPiezoPosition {
wait_for_newest_data: bool,
},
SetPiezoPosition {
position: Position,
wait_until_finished: bool,
},
MovePiezoRelative {
delta: Position,
},
MoveMotor {
direction: MotorDirection,
steps: u16,
},
MoveMotorClosedLoop {
target: Position3D,
mode: MovementMode,
},
StopMotor,
AutoApproach {
wait_until_finished: bool,
timeout: Duration,
},
Withdraw {
wait_until_finished: bool,
timeout: Duration,
},
SetZSetpoint {
setpoint: f32,
},
ScanControl {
action: ScanAction,
},
ReadScanStatus,
BiasPulse {
wait_until_done: bool,
pulse_width: Duration,
bias_value_v: f32,
z_controller_hold: u16,
pulse_mode: u16,
},
TipShaper {
config: TipShaperConfig,
wait_until_finished: bool,
timeout: Duration,
},
PulseRetract {
pulse_width: Duration,
pulse_height_v: f32,
},
Wait {
duration: Duration,
},
Store {
key: String,
action: Box<Action>,
},
Retrieve {
key: String,
},
}Expand description
Enhanced Action enum representing all possible SPM operations Properly separates motor (step-based) and piezo (continuous) movements
Variants§
ReadSignal
Read single signal value
ReadSignals
Read multiple signal values
ReadSignalNames
Read all available signal names
ReadBias
Read current bias voltage
SetBias
Set bias voltage to specific value
ReadOsci
ReadPiezoPosition
Read current piezo position (continuous coordinates)
SetPiezoPosition
Set piezo position (absolute)
MovePiezoRelative
Move piezo position (relative to current)
MoveMotor
Move motor in steps (discrete positioning)
MoveMotorClosedLoop
Move motor using closed-loop to target position
StopMotor
Stop all motor movement
AutoApproach
Perform auto-approach with timeout
Withdraw
Withdraw tip with timeout
SetZSetpoint
Set Z-controller setpoint
ScanControl
Control scan operations
Fields
action: ScanActionReadScanStatus
Read scan status
BiasPulse
Execute bias pulse with parameters
Fields
TipShaper
Full tip shaper control with all parameters
PulseRetract
Simple pulse-retract with predefined safe values
Wait
Wait for a specific duration
Store
Store result value with key for later retrieval
Retrieve
Retrieve previously stored value
Implementations§
Source§impl Action
impl Action
Sourcepub fn is_positioning_action(&self) -> bool
pub fn is_positioning_action(&self) -> bool
Check if this is a positioning action
Sourcepub fn is_read_action(&self) -> bool
pub fn is_read_action(&self) -> bool
Check if this is a read-only action
Sourcepub fn is_control_action(&self) -> bool
pub fn is_control_action(&self) -> bool
Check if this is a control action
Sourcepub fn modifies_bias(&self) -> bool
pub fn modifies_bias(&self) -> bool
Check if this action modifies bias voltage
Sourcepub fn involves_motor(&self) -> bool
pub fn involves_motor(&self) -> bool
Check if this action involves motor movement
Sourcepub fn involves_piezo(&self) -> bool
pub fn involves_piezo(&self) -> bool
Check if this action involves piezo movement
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description of the action