NDEVR
API Documentation
GNSSManager.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/SoftwareService.h>
4#include <NDEVR/PositionSensor.h>
5namespace NDEVR
6{
11 struct GNSSRole
12 {
13 GNSSRole(UUID id, const TranslatedString& role)
14 : role(role)
15 , id(id)
16 {}
19 };
20
25 {
26 public:
28 virtual UUID uuid() const = 0;
32 virtual PositionSensor* getGNSSDevice(const UUID& id) = 0;
35 };
36
41 class HARDWARE_API GNSSManager : public SoftwareServiceManager
42 {
43 public:
44 GNSSManager();
50 void removeGNSSInterface(const UUID& id);
52 static GNSSManager& DefaultInstance();
57 void addGNSSRole(const GNSSRole& role);
64 protected:
67 };
68}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
A GNSS interface provides logic for finding available GNSS devices.
Definition GNSSManager.h:25
virtual PositionSensor * getGNSSDevice(const UUID &id)=0
Returns the GNSS device matching the given identifier.
virtual Buffer< PositionSensor * > availableGNSSDevices() const =0
Returns all GNSS devices currently available through this interface.
virtual UUID uuid() const =0
Returns the unique identifier for this GNSS interface.
Buffer< PositionSensor * > availableGNSSDevices() const
Returns all GNSS devices available across all registered interfaces.
Dictionary< UUID, GNSSInterface * > m_interfaces
Map of interface UUIDs to their GNSSInterface pointers.
Definition GNSSManager.h:65
void addGNSSRole(const GNSSRole &role)
Registers a new GNSS role that devices can be assigned to.
void removeGNSSInterface(const UUID &id)
Removes a previously registered GNSS interface.
Buffer< GNSSRole > availableRoles() const
Returns all currently registered GNSS roles.
Buffer< GNSSRole > m_gnss_roles
The list of registered GNSS roles.
Definition GNSSManager.h:66
PositionSensor * getGNSSDevice(const UUID &id) const
Returns the GNSS device matching the given identifier across all interfaces.
static GNSSManager & DefaultInstance()
Returns the singleton GNSSManager instance.
void addGNSSInterface(GNSSInterface *)
Registers a GNSS interface with this manager.
Forward declaration for distance encoder device.
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.
A GNSS role describes how the user wants to use a particular GNSS Device.
Definition GNSSManager.h:12
TranslatedString role
The display name describing this GNSS role.
Definition GNSSManager.h:17
UUID id
The unique identifier for this role.
Definition GNSSManager.h:18