Object.Subtypes.ActuatorObject (object v0.1.2)
Object for environmental manipulation and action execution.
Summary
Functions
Executes a physical action and updates actuator state.
Creates a new Actuator Object for environmental manipulation.
Queues an action for later execution with priority ordering.
Functions
Executes a physical action and updates actuator state.
Performs the specified action, calculates energy consumption and wear, then updates the actuator's internal state and metrics.
Parameters
actuator
- ActuatorObject structaction_command
- Command specifying the action to execute
Returns
Tuple with execution result and updated actuator with wear/energy updates
Creates a new Actuator Object for environmental manipulation.
Parameters
opts
- Configuration options::id
- Actuator identifier:actuator_type
- Type of actuator (:motor
,:hydraulic
,:pneumatic
):action_range
- Valid action range as tuple:precision
- Action precision (0.0-1.0):response_time
- Response time in seconds
Returns
ActuatorObject struct configured for action execution and queuing
Queues an action for later execution with priority ordering.
Adds an action to the execution queue, sorted by priority and timestamp. Higher priority actions are executed first.
Parameters
actuator
- ActuatorObject structaction_command
- Command to queue for executionpriority
- Priority level (:critical
,:high
,:normal
,:low
)
Returns
Updated ActuatorObject with action added to sorted queue