![]() |
4S Device Communication Module Collection
Version 0.6-SNAPSHOT
Full documentation of the modules in the 4SDC collection (aimed at 4SDC module developers)
|
|
The base interface of a personal health device seen from the perspective of a transport module. More...
#include <personalhealthdevice.h>
Public Member Functions | |
VirtualPHD () | |
Default constructor. More... | |
VirtualPHD (FSYS::Handle &h) | |
Constructor used to clone the handle. More... | |
virtual | ~VirtualPHD () |
Virtual destructor. | |
virtual PhysicalPHD & | getPhysicalDevice () noexcept=0 |
virtual const PhysicalPHD & | getPhysicalDevice () const noexcept=0 |
virtual uint16_t | getDatatype () const noexcept=0 |
The IEEE MDC_DEV_SPEC_PROFILE_ datatype implemented by this device. More... | |
virtual std::string | getDisplayName () const noexcept=0 |
A user-friendly name of the device. More... | |
![]() | |
Handle (void) | |
Default constructor. More... | |
Handle (Handle &ref) | |
Copy constructor for handle object. More... | |
Handle (const Handle &ref) | |
Copy constructor for handle object. More... | |
Handle & | operator= (Handle const &theOtherOne) |
bool | operator== (Handle const &compareTo) const |
Equality comparator. More... | |
bool | operator!= (Handle const &compareTo) const |
Not equalify operator. More... | |
bool | operator> (Handle const &compareTo) const |
Greater than operator ('>') More... | |
bool | operator< (Handle const &compareTo) const |
Less than operator ('<') More... | |
Additional Inherited Members | |
![]() | |
static Handle & | broadCastHandle (void) |
Generic broadcast handle. More... | |
static Handle & | null (void) |
The null handle. More... | |
This class is implemented by the transport components in the PAL layer to model a connected device. Each transport type (USB, Bluetooth, ZigBee) implements different subclasses of this class, each adding the characteristics of that particular transport type.
Objects deriving from this class are always created by components in the PAL layer and managed by smart references (std::shared_ptr). The objects are then communicated back and forth between the PAL and session layers using the PersonalHealthDeviceConnector interfaces. Notice that the object appearing at the session layer will be a by-value copy (a proxy) of the original object.
This class derives from FSYS::Handle so that upper layers and applications may compare these device objects (and proxies) with objects/proxies obtained from other PAL layer interfaces (e.g. Bluetooth pairing, ZigBee network monitors and the like). Hence, two (different) proxy-objects representing the same device will always turn out to be equal when compared (==) as they will be clones of the same FSYS::Handle.
|
inline |
The default constructor will create a PersonalHealthDevice object with a new unique FSYS::Handle.
|
inline |
This alternative constructor will create a PersonalHealthDevice object with a cloned FSYS::Handle.
|
pure virtualnoexcept |
This getter will return the datatype implemented by this device. The datatype is a 16-bit unsigned integer – one of the MDC_DEV_SPEC_PROFILE_
codes belonging to the MDC_PART_INFRA
partition.
Implemented in anonymous_namespace{bluedroid.cpp}::VirtualDevice, and anonymous_namespace{personalhealthdevice.cpp}::PHDProxy.
|
pure virtualnoexcept |
This getter will return a user-friendly (or at least user-recognizable) name of the virtual device, suitable for use in the user interface. Implementing classes should enforce consistent naming across other PAL layer interfaces (e.g. Bluetooth pairing, ZigBee network monitors and the like).
Bluetooth devices may (should?) grab the name from the optional MDEP Description field of the SDP record, if available; while USB devices may (should?) grab the name from the interface descriptor's iInterface field. If no name is available (including the case when the PAL component is not allowed to read these names), this name should be set to the empty string, and the user interface should be able to generate a default text based on the getDatatype() value.
Implemented in anonymous_namespace{bluedroid.cpp}::VirtualDevice, and anonymous_namespace{personalhealthdevice.cpp}::PHDProxy.