v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::UsbCounters Struct Reference

Diagnostic counters for the USB subsystem. More...

#include <sifteo/usb.h>

Public Member Functions

void capture ()
 Update the state of all counters.
 
uint32_t receivedBytes ()
 Total received bytes.
 
uint32_t receivedPackets ()
 Total received packets.
 
void reset ()
 Reset all counters back to zero. More...
 
uint32_t sentBytes ()
 Total sent bytes.
 
uint32_t sentPackets ()
 Total sent packets.
 
uint32_t userPacketsDropped ()
 Total user-defined packets dropped. More...
 

Detailed Description

Diagnostic counters for the USB subsystem.

This object is a container for counter values that are tracked by the USB subsystem.

The default constructor leaves UsbCounters uninitialized. Call reset() once before the event you want to measure, and call capture() to grab the latest counter values. Other accessors in this structure will compare the latest counters with the reference values read by reset().

Member Function Documentation

void Sifteo::UsbCounters::reset ( )
inline

Reset all counters back to zero.

This captures a baseline value for all counters. This must be called once before using the counters to measure changes.

uint32_t Sifteo::UsbCounters::userPacketsDropped ( )
inline

Total user-defined packets dropped.

This measures the number of received packets that have been dropped due to either having no UsbPipe attached, or having a UsbPipe with a full receive buffer.


The documentation for this struct was generated from the following file: