Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The VictorMockDeviceManager manages all mock VictoR device connection interfaces through VictorMockDevice objects that it creates, maintains, and destroys as needed. This class acts as the primary interface for end-users to “discover” (create) mock devices and manage connections to them. In addition, the VictorMockDeviceManager provides a wrapper around the functions that the VictorMockDevice class offers, requiring only that the end-user provide the ID for the specific mock device that they are interested in interacting with, so that they don’t need to have any knowledge of the underlying organization of the devices within the manager. The class diagram in Figure 1 illustrates the architecture of the Mock Communications API.

...

VictorMockDevice

MockDevice VictorMockDevice represents an “internal” device, i.e. it is simply a data structure containing data fields (“attributes”, “characteristics”) that can be read from/written to, held in system memory.

Additionally, MockDevice VictorMockDevice maintains a dictionary that maps attributes to callbacks. The callbacks should be triggered with the associated attribute whenever the attribute is written to, or on state changes.

GetDeviceIDGetDevice

  • Returns the device ID information as a stringVictorDeviceInfo structure

Connect

  • Flags device as “connected”

  • Retrieves a list of services

  • For each service, retrieve a list of offered characteristics

...