Trait uavcan::storage::Storage [−][src]
pub trait Storage<F: TransferFrame> { type SubscriberStorageHandle: SubscriberStorageHandle<F>; type InterfaceStorageHandle: InterfaceStorageHandle<F>; fn new() -> Self; fn subscribe_to(
&self,
filter: TransferFrameIDFilter
) -> Self::SubscriberStorageHandle; fn new_interface(&self) -> Self::InterfaceStorageHandle; fn insert_subscriber_queue(&self, frame: F) -> Result<(), StorageError>; fn insert_interface_queue(&self, frame: F) -> Result<(), StorageError>; }
Associated Types
type SubscriberStorageHandle: SubscriberStorageHandle<F>
type InterfaceStorageHandle: InterfaceStorageHandle<F>
Required Methods
fn new() -> Self
Create a new storage container.
fn subscribe_to(
&self,
filter: TransferFrameIDFilter
) -> Self::SubscriberStorageHandle
&self,
filter: TransferFrameIDFilter
) -> Self::SubscriberStorageHandle
Create a subscription on all frames matching a filter.
fn new_interface(&self) -> Self::InterfaceStorageHandle
Creates an interface queue for a new interface.
fn insert_subscriber_queue(&self, frame: F) -> Result<(), StorageError>
Insert a frame to storage and route it to the correct subscribers.
If there are no relevant subscribers frame
will be dropped.
If there are multiple relevant subscribers frame
will be routed to all of them.
fn insert_interface_queue(&self, frame: F) -> Result<(), StorageError>
Insert a frame to storage and route it to the interface for transmission.
If there are multiple interface storage queues the frame will be added to all of them.