pub struct CoreNode<C, T, U, TR, D, const P: usize, const R: usize> where
    C: Clock,
    U: Receiver<C::Instant>,
    T: Transmitter<C::Instant>, 
{ /* private fields */ }
Expand description

Basic UAVCAN node functionality

Type parameters:

  • C: The clock used to get the current time
  • T: The transmitter used to send transfers
  • U: The receiver used to receive transfers
  • TR: The transfer ID tracker used to manage transfer IDs for outgoing transfers
  • D: The driver used to send and receive frames
  • P: The maximum number of topics that can be published This must be greater than 0, or the code will fail to compile. It also must be a power of two, or the software may behave incorrectly.
  • R: The maximum number of services for which requests can be sent This must be greater than 0, or the code will fail to compile. It also must be a power of two, or the software may behave incorrectly.

Implementations

Creates a node

  • clock: A clock to use for frame deadlines and timeouts
  • node_id: The ID of this node
  • transmitter: A transport transmitter
  • receiver: A transport receiver
  • driver: A driver compatible with receiver and transmitter

Returns a reference to the enclosed driver

Returns a mutable reference to the enclosed driver

Trait Implementations

Formats the value using the given formatter. Read more

Sets up to send requests for a service

This also subscribes to the corresponding responses.

Returns a reference to the enclosed clock

Returns a mutable reference to the enclosed clock

Returns the identifier of this node

The clock that this node uses

The instant that this node’s clock produces

The transport that this node uses

The transmitter that this node uses

The receiver that this node uses

Receives any available incoming frames and attempts ot reassemble them into a transfer Read more

Starts publishing messages on subject Read more

Stops publishing messages on a subject

Publishes a message Read more

Stops sending requests for a service

Sends a service request to another node Read more

Subscribes to messages on a topic

Subscribes to requests for a service

Responds to a service request Read more

Attempts to flush all outgoing frames

Returns a reference to the transport transmitter

Returns a mutable reference to the transport transmitter

Returns a reference to the transport receiver

Returns a mutable reference to the transport receiver

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.