DccService

Struct DccService 

Source
pub struct DccService { /* private fields */ }
Expand description

The Dynamic Context Core service.

Manages the cold-path analysis loop, GORNA arbitration, and agent coordination.

Implementations§

Source§

impl DccService

Source

pub fn new(config: DccConfig) -> (Self, Receiver<TelemetryEvent>)

Creates a new DCC service.

Source

pub fn register_agent(&self, agent: Arc<Mutex<dyn Agent>>, priority: f32)

Registers an agent with a priority value.

Higher priority values mean the agent is updated first in each frame.

Source

pub fn start(&mut self, event_rx: Receiver<TelemetryEvent>)

Starts the DCC background thread.

Source

pub fn stop(&mut self)

Stops the DCC background thread.

Source

pub fn event_sender(&self) -> Sender<TelemetryEvent>

Returns a sender handle to submit events to the DCC.

Source

pub fn get_context(&self) -> Context

Returns the current context.

Source

pub fn update_agents(&self, context: &mut EngineContext<'_>)

Updates all registered agents in priority order.

This is called each frame by the engine loop.

Source

pub fn execute_agents(&self)

Executes all registered agents in priority order.

Called each frame after update_agents. Each agent performs its primary work (e.g., the RenderAgent renders).

Source

pub fn agent_count(&self) -> usize

Returns the number of registered agents.

Source

pub fn get_agent(&self, id: AgentId) -> Option<Arc<Mutex<dyn Agent>>>

Returns a reference to the agent with the given ID, if registered.

Trait Implementations§

Source§

impl Drop for DccService

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to the inner value as &dyn Any.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.