nx_server_plugin_sdk 1.0 Server Plugin SDK

i_attribute.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <nx/sdk/interface.h>
6
7 namespace nx::sdk {
8
9 class IAttribute: public Interface<IAttribute>
10 {
11 public:
12 enum class Type: int
13 {
14 undefined,
15 number,
16 boolean,
17 string,
18 // TODO: Consider adding other specific types like Coordinates, Temperature.
19 };
20
21 static auto interfaceId() { return makeId("nx::sdk::IAttribute"); }
22
23 virtual Type type() const = 0;
24
28 virtual const char* name() const = 0;
29
30 virtual const char* value() const = 0;
31
32 virtual float confidence() const = 0;
33 };
34 using IAttribute0 = IAttribute;
35
36 } // namespace nx::sdk
nx::sdk::Interface
Definition: interface.h:48
nx::sdk::IAttribute
Definition: i_attribute.h:9
nx::sdk
Definition: device_agent.h:12
nx::sdk::IAttribute::name
virtual const char * name() const =0
nx::sdk::IRefCountable::makeId
static const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:77