pub struct AmbientOrchestrationManager { /* private fields */ }Expand description
Ambient Orchestration Manager
Implementations§
Source§impl AmbientOrchestrationManager
impl AmbientOrchestrationManager
Sourcepub fn register_device(
&mut self,
device: AmbientDevice,
) -> Result<(), AmbientError>
pub fn register_device( &mut self, device: AmbientDevice, ) -> Result<(), AmbientError>
Register ambient device
Sourcepub fn discover_devices(&mut self) -> Result<Vec<String>, AmbientError>
pub fn discover_devices(&mut self) -> Result<Vec<String>, AmbientError>
Discover ambient devices using sysinfo to enumerate real local hardware.
Sourcepub fn discover_devices_into(
&mut self,
out: &mut [AmbientDeviceHandle],
) -> Result<usize, AmbientError>
pub fn discover_devices_into( &mut self, out: &mut [AmbientDeviceHandle], ) -> Result<usize, AmbientError>
Zero-heap device discovery snapshots for hot-path schedulers.
Sourcepub fn submit_task(&mut self, task: Task) -> Result<String, AmbientError>
pub fn submit_task(&mut self, task: Task) -> Result<String, AmbientError>
Submit task for execution
Sourcepub fn execute_neural_inference(
&mut self,
device_id: &str,
model_data: &[u8],
input_data: &[u8],
) -> Result<Vec<u8>, AmbientError>
pub fn execute_neural_inference( &mut self, device_id: &str, model_data: &[u8], input_data: &[u8], ) -> Result<Vec<u8>, AmbientError>
Execute neural inference task
Sourcepub fn execute_neural_inference_into(
&mut self,
device_id: &str,
model_data: &[u8],
input_data: &[u8],
out: &mut [u8],
) -> Result<usize, AmbientError>
pub fn execute_neural_inference_into( &mut self, device_id: &str, model_data: &[u8], input_data: &[u8], out: &mut [u8], ) -> Result<usize, AmbientError>
Zero-heap neural inference API using caller-owned output storage.
Sourcepub fn execute_sub_threshold_computation(
&mut self,
device_id: &str,
computation: SubThresholdComputation,
) -> Result<ComputationResult, AmbientError>
pub fn execute_sub_threshold_computation( &mut self, device_id: &str, computation: SubThresholdComputation, ) -> Result<ComputationResult, AmbientError>
Execute sub-threshold computation
Sourcepub fn get_device_status(&self, device_id: &str) -> Option<DeviceStatus>
pub fn get_device_status(&self, device_id: &str) -> Option<DeviceStatus>
Get device status
Sourcepub fn get_performance_stats(&self) -> AmbientGlobalMetrics
pub fn get_performance_stats(&self) -> AmbientGlobalMetrics
Get performance statistics
Sourcepub fn set_orchestration_state(&mut self, state: AmbientOrchestrationState)
pub fn set_orchestration_state(&mut self, state: AmbientOrchestrationState)
Set the ambient orchestration state used for power estimation.
Callers (e.g. the TaskOrchestrator state machine in orchestrator.rs)
should push ModelLifecycle transitions here so the power manager can
track real power draw.
Sourcepub fn set_active_model_count(&mut self, count: usize)
pub fn set_active_model_count(&mut self, count: usize)
Set the number of models currently active on the managed device.
Sourcepub fn get_power_metrics(&self) -> PowerMetrics
pub fn get_power_metrics(&self) -> PowerMetrics
Get the aggregated power/thermal/battery snapshot.
Sourcepub fn estimate_battery_life_remaining(
&self,
current_battery_pct: f64,
battery_capacity_wh: f64,
) -> f64
pub fn estimate_battery_life_remaining( &self, current_battery_pct: f64, battery_capacity_wh: f64, ) -> f64
Estimate battery life remaining (hours) for the given charge and battery capacity.
Sourcepub fn should_throttle_inference(&self) -> bool
pub fn should_throttle_inference(&self) -> bool
Whether inference should be throttled due to thermal or battery pressure.
Sourcepub fn list_devices(&self) -> Vec<String>
pub fn list_devices(&self) -> Vec<String>
List all devices
pub fn list_devices_into( &self, out: &mut [AmbientDeviceHandle], ) -> Result<usize, AmbientError>
Sourcepub fn get_pending_tasks(&self) -> Vec<Task>
pub fn get_pending_tasks(&self) -> Vec<Task>
Get pending tasks
pub fn get_pending_tasks_into( &self, out: &mut [TaskHandle], ) -> Result<usize, AmbientError>
Sourcepub fn optimize_orchestration(&mut self) -> Result<(), AmbientError>
pub fn optimize_orchestration(&mut self) -> Result<(), AmbientError>
Optimize orchestration policy
Auto Trait Implementations§
impl Freeze for AmbientOrchestrationManager
impl RefUnwindSafe for AmbientOrchestrationManager
impl Send for AmbientOrchestrationManager
impl Sync for AmbientOrchestrationManager
impl Unpin for AmbientOrchestrationManager
impl UnsafeUnpin for AmbientOrchestrationManager
impl UnwindSafe for AmbientOrchestrationManager
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more