pub struct CommandCounters { /* private fields */ }Expand description
Per-command, per-address count of register-access commands received.
Counted on receipt, before the command is served or refused: the question a test asks is which command left the host, and a refused command did leave it. Without this nothing could assert how a value reached the device, only that it did — and READMEM and READREG deliver identical bytes.
Implementations§
Source§impl CommandCounters
impl CommandCounters
Sourcepub fn from(&self, peer: SocketAddr) -> Vec<(GvcpCommand, u64)>
pub fn from(&self, peer: SocketAddr) -> Vec<(GvcpCommand, u64)>
Every register-access command peer sent since the last
reset, in arrival order: what one application did,
when several talk to the camera.
Sourcepub fn sequence(&self) -> Vec<(GvcpCommand, u64)>
pub fn sequence(&self) -> Vec<(GvcpCommand, u64)>
Every register-access command received since the last
reset, in arrival order: for a test about the order in
which a controller configures the device.
Sourcepub fn total(&self, command: GvcpCommand) -> u64
pub fn total(&self, command: GvcpCommand) -> u64
How many commands have been received, at any address.
Sourcepub fn at(&self, command: GvcpCommand, addr: u64) -> u64
pub fn at(&self, command: GvcpCommand, addr: u64) -> u64
How many commands have been received for addr.
A READMEM or WRITEMEM counts at its start address; a multi-register READREG or WRITEREG counts once at each address it names.