Skip to main content

Counters

Struct Counters 

Source
#[non_exhaustive]
pub struct Counters {
Show 16 fields pub address_length_drops: u64, pub global_broadcast_dadr_drops: u64, pub broadcast_pdu_type_drops: u64, pub group_dadr_drops: u64, pub malformed: u64, pub bad_messages: u64, pub unknown_port: u64, pub hop_count_drops: u64, pub denied: u64, pub unroutable_rejects: u64, pub rejects: u64, pub solicitations: u64, pub write_failures: u64, pub egress_too_long: u64, pub refused: u64, pub undrained: u64,
}
Expand description

The engine’s counts, as BACnetRouter::counters reads them. Counts of what the router dropped, sent and was refused. They saturate, never change a decision, and name no peer. The table’s own counts are Table::claim_counters.

It is #[non_exhaustive], so a new count isn’t a breaking change. Outside this crate, build one from Counters::default() and set its fields.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§address_length_drops: u64

Frames refused because the link source, the DLEN or the SLEN was past MAX_MAC_LEN (#1141, #1198).

§global_broadcast_dadr_drops: u64

Frames dropped for a DADR beside DNET 0xFFFF (#1379).

§broadcast_pdu_type_drops: u64

Broadcasts dropped for carrying an APDU other than an Unconfirmed-Request (#1491).

§group_dadr_drops: u64

Frames dropped for a DADR that is a group address on its delivery port: an APDU other than an Unconfirmed-Request, a network message, or anything for a Group::Refuse address (#1504, #1677). An Unconfirmed-Request sent as the port’s broadcast instead isn’t counted.

§malformed: u64

Frames that didn’t parse as an NPDU for any other reason.

§bad_messages: u64

Network messages whose data or addressing the router refused.

§unknown_port: u64

Frames that came on a port the router doesn’t have, or whose route names one.

§hop_count_drops: u64

Relays not sent because the hop count had run out.

§denied: u64

Protected network messages Host::authorize refused.

§unroutable_rejects: u64

Received rejects that were neither for this router nor routable.

§rejects: u64

Rejects this router queued.

§solicitations: u64

Who-Is-Router searches for unknown networks queued.

§write_failures: u64

Outputs that couldn’t be written: longer than the scratch, or with a field no NPDU may carry, such as an SNET of 0.

§egress_too_long: u64

Sends left out because their egress port can’t carry them: by the router’s own check (R1), or refused by the port as too long.

§refused: u64

Sends the caller reported refused.

§undrained: u64

Actions dropped because a call came before they were polled.

Trait Implementations§

Source§

impl Clone for Counters

Source§

fn clone(&self) -> Counters

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Counters

Source§

impl Debug for Counters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Counters

Source§

fn default() -> Counters

Returns the “default value” for a type. Read more
Source§

impl Eq for Counters

Source§

impl PartialEq for Counters

Source§

fn eq(&self, other: &Counters) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Counters

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
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more