pub struct FeagiAgentHandler { /* private fields */ }Implementations§
Source§impl FeagiAgentHandler
impl FeagiAgentHandler
pub fn new(agent_auth_backend: Box<dyn AgentAuth>) -> FeagiAgentHandler
Sourcepub fn new_with_liveness_config(
agent_auth_backend: Box<dyn AgentAuth>,
liveness_config: AgentLivenessConfig,
) -> FeagiAgentHandler
pub fn new_with_liveness_config( agent_auth_backend: Box<dyn AgentAuth>, liveness_config: AgentLivenessConfig, ) -> FeagiAgentHandler
Create a handler with explicit liveness configuration.
This constructor is preferred in FEAGI runtime code paths where values
come from centralized configuration (feagi_configuration.toml).
pub fn get_all_registered_agents( &self, ) -> &HashMap<AgentID, (AgentDescriptor, Vec<AgentCapabilities>)>
pub fn get_all_registered_sensors(&self) -> HashSet<AgentID>
pub fn get_all_registered_motors(&self) -> HashSet<AgentID>
pub fn get_all_registered_visualizations(&self) -> HashSet<AgentID>
pub fn get_command_control_server_info( &self, ) -> Vec<Box<dyn FeagiServerRouterProperties>>
Sourcepub fn get_device_registrations_by_agent(
&self,
agent_id: AgentID,
) -> Option<&Value>
pub fn get_device_registrations_by_agent( &self, agent_id: AgentID, ) -> Option<&Value>
Get device registrations by AgentID
Sourcepub fn set_device_registrations_by_descriptor(
&mut self,
agent_id_base64: String,
agent_descriptor: AgentDescriptor,
device_registrations: Value,
)
pub fn set_device_registrations_by_descriptor( &mut self, agent_id_base64: String, agent_descriptor: AgentDescriptor, device_registrations: Value, )
Store device registrations by AgentDescriptor (REST API - before connection) Also stores the original agent_id for later WebSocket→REST bridging
Sourcepub fn get_device_registrations_by_descriptor(
&self,
agent_descriptor: &AgentDescriptor,
) -> Option<&Value>
pub fn get_device_registrations_by_descriptor( &self, agent_descriptor: &AgentDescriptor, ) -> Option<&Value>
Get device registrations by AgentDescriptor (REST API queries)
Sourcepub fn set_device_registrations_by_agent(
&mut self,
agent_id: AgentID,
device_registrations: Value,
)
pub fn set_device_registrations_by_agent( &mut self, agent_id: AgentID, device_registrations: Value, )
Store device registrations by AgentID (active connection)
Sourcepub fn get_visualization_info_for_agent(
&self,
agent_id: AgentID,
) -> Option<(String, f64)>
pub fn get_visualization_info_for_agent( &self, agent_id: AgentID, ) -> Option<(String, f64)>
Check if a agent has visualization capability configured Returns (agent_id_base64, rate_hz) for registration with RuntimeService
Sourcepub fn add_and_start_command_control_server(
&mut self,
router_property: Box<dyn FeagiServerRouterProperties>,
) -> Result<(), FeagiAgentError>
pub fn add_and_start_command_control_server( &mut self, router_property: Box<dyn FeagiServerRouterProperties>, ) -> Result<(), FeagiAgentError>
Add a poll-based command/control server (ZMQ/WS). The router is wrapped in a
[CommandControlWrapper] that only exposes messages.
pub fn add_publisher_server( &mut self, publisher: Box<dyn FeagiServerPublisherProperties>, )
pub fn add_puller_server( &mut self, puller: Box<dyn FeagiServerPullerProperties>, )
Sourcepub fn poll_command_and_control(
&mut self,
) -> Result<Option<(AgentID, FeagiMessage)>, FeagiAgentError>
pub fn poll_command_and_control( &mut self, ) -> Result<Option<(AgentID, FeagiMessage)>, FeagiAgentError>
Poll all command and control servers. Messages for registration request and heartbeat are handled internally here. Others are raised for FEAGI to act upon
Sourcepub fn send_message_to_agent(
&mut self,
agent_id: AgentID,
message: FeagiMessage,
increment_counter: u16,
) -> Result<(), FeagiAgentError>
pub fn send_message_to_agent( &mut self, agent_id: AgentID, message: FeagiMessage, increment_counter: u16, ) -> Result<(), FeagiAgentError>
Send a command and control message to a specific agent
pub fn send_motor_data_to_agent( &mut self, agent_id: AgentID, data: &FeagiByteContainer, ) -> Result<(), FeagiAgentError>
pub fn send_visualization_data_to_agent( &mut self, agent_id: AgentID, data: &FeagiByteContainer, ) -> Result<(), FeagiAgentError>
pub fn poll_agent_sensors( &mut self, ) -> Result<Option<&FeagiByteContainer>, FeagiAgentError>
pub fn poll_agent_motors(&mut self) -> Result<(), FeagiAgentError>
pub fn poll_agent_visualizers(&mut self) -> Result<(), FeagiAgentError>
pub fn send_motor_data( &mut self, agent_id: AgentID, motor_data: &FeagiByteContainer, ) -> Result<(), FeagiAgentError>
Sourcepub fn send_visualization_data(
&mut self,
agent_id: AgentID,
viz_data: &FeagiByteContainer,
) -> Result<(), FeagiAgentError>
pub fn send_visualization_data( &mut self, agent_id: AgentID, viz_data: &FeagiByteContainer, ) -> Result<(), FeagiAgentError>
Send visualization data to a specific agent via dedicated visualization channel
Auto Trait Implementations§
impl Freeze for FeagiAgentHandler
impl !RefUnwindSafe for FeagiAgentHandler
impl Send for FeagiAgentHandler
impl !Sync for FeagiAgentHandler
impl Unpin for FeagiAgentHandler
impl UnsafeUnpin for FeagiAgentHandler
impl !UnwindSafe for FeagiAgentHandler
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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