Engage Engine API  1.246.9086
Loading...
Searching...
No Matches
AppConfigurationObjects::PresenceDescriptor Class Reference

Represents an endpoints presence properties. Used in engageUpdatePresenceDescriptor API and PFN_ENGAGE_GROUP_NODE events. More...

#include <ConfigurationObjects.h>

Inherits AppConfigurationObjects::ConfigurationObjectBase.

Public Member Functions

void clear ()
 
virtual void initForDocumenting ()
 
- Public Member Functions inherited from AppConfigurationObjects::ConfigurationObjectBase
virtual std::string toString ()
 
virtual bool isDocumenting () const
 

Public Attributes

bool self
 [Read Only] Indicates that this presence declaration was generated by the Engage Engine the application currently connected to.
 
uint32_t ts
 [Read Only, Unix timestamp - Zulu/UTC] Indicates the timestamp that the message was originally sent.
 
uint32_t nextUpdate
 [Read Only, Unix timestamp - Zulu/UTC] Indicates the next time the presence descriptor will be sent.
 
Identity identity
 [Optional, Default see Identity] Endpoint's identity information.
 
std::string comment
 [Optional] No defined limit on size but the total size of the serialized JSON object must fit inside the current network transport's MTU.
 
uint32_t disposition
 [Optional] Indicates the users disposition
 
std::vector< PresenceDescriptorGroupItemgroupAliases
 [Read Only] List of group items associated with this presence descriptor.
 
Location location
 [Optional, Default: see Location] Location information
 
std::string custom
 [Optional, Default: empty string] Custom string application can use of presence descriptor. TODO: Whats the max length.
 
bool announceOnReceive
 [Read Only] Indicates that the Engine will announce its PresenceDescriptor in response to this message.
 
Connectivity connectivity
 [Optional, Default: see Connectivity] Device connectivity information like wifi/cellular, strength etc.
 
Power power
 [Optional, Default: see Power] Device power information like charging state, battery level, etc.
 
- Public Attributes inherited from AppConfigurationObjects::ConfigurationObjectBase
nlohmann::json _attached
 

Additional Inherited Members

- Protected Attributes inherited from AppConfigurationObjects::ConfigurationObjectBase
bool _documenting
 

Detailed Description

Represents an endpoints presence properties. Used in engageUpdatePresenceDescriptor API and PFN_ENGAGE_GROUP_NODE events.

Helper C++ class to serialize and de-serialize PresenceDescriptor JSON

Example:

{
"announceOnReceive": true,
"comment": "This is a comment",
"connectivity": {
"rating": 3,
"strength": 2,
"type": 1
},
"custom": "{}",
"disposition": 123,
"groupAliases": [
{
"alias": "",
"groupId": ""
}
],
"identity": {
"avatar": "",
"displayName": "",
"nodeId": "",
"userId": ""
},
"location": {
"altitude": 123.0,
"direction": 1.0,
"latitude": 123.456,
"longitude": 456.789,
"speed": 1234.0,
"ts": 123456
},
"nextUpdate": 0,
"power": {
"level": 0,
"source": 0,
"state": 0
},
"self": true,
"ts": 123
}
See also
engageUpdatePresenceDescriptor, PFN_ENGAGE_GROUP_NODE_DISCOVERED, PFN_ENGAGE_GROUP_NODE_REDISCOVERED

Definition at line 1836 of file ConfigurationObjects.h.

Constructor & Destructor Documentation

◆ PresenceDescriptor()

AppConfigurationObjects::PresenceDescriptor::PresenceDescriptor ( )
inline

Definition at line 1903 of file ConfigurationObjects.h.

Member Function Documentation

◆ clear()

void AppConfigurationObjects::PresenceDescriptor::clear ( )
inline

Definition at line 1908 of file ConfigurationObjects.h.

◆ initForDocumenting()

virtual void AppConfigurationObjects::PresenceDescriptor::initForDocumenting ( )
inlinevirtual

Reimplemented from AppConfigurationObjects::ConfigurationObjectBase.

Definition at line 1924 of file ConfigurationObjects.h.

Member Data Documentation

◆ announceOnReceive

bool AppConfigurationObjects::PresenceDescriptor::announceOnReceive

[Read Only] Indicates that the Engine will announce its PresenceDescriptor in response to this message.

Definition at line 1895 of file ConfigurationObjects.h.

◆ comment

std::string AppConfigurationObjects::PresenceDescriptor::comment

[Optional] No defined limit on size but the total size of the serialized JSON object must fit inside the current network transport's MTU.

Definition at line 1868 of file ConfigurationObjects.h.

◆ connectivity

Connectivity AppConfigurationObjects::PresenceDescriptor::connectivity

[Optional, Default: see Connectivity] Device connectivity information like wifi/cellular, strength etc.

Definition at line 1898 of file ConfigurationObjects.h.

◆ custom

std::string AppConfigurationObjects::PresenceDescriptor::custom

[Optional, Default: empty string] Custom string application can use of presence descriptor. TODO: Whats the max length.

Definition at line 1892 of file ConfigurationObjects.h.

◆ disposition

uint32_t AppConfigurationObjects::PresenceDescriptor::disposition

[Optional] Indicates the users disposition

This may be any value set by the application. Such as:

Value Description
0x00000000 Undefined
0x00000001 Emergency
0x00000002 Available
0x00000004 Busy
etc etc

Definition at line 1883 of file ConfigurationObjects.h.

◆ groupAliases

std::vector<PresenceDescriptorGroupItem> AppConfigurationObjects::PresenceDescriptor::groupAliases

[Read Only] List of group items associated with this presence descriptor.

Definition at line 1886 of file ConfigurationObjects.h.

◆ identity

Identity AppConfigurationObjects::PresenceDescriptor::identity

[Optional, Default see Identity] Endpoint's identity information.

Definition at line 1865 of file ConfigurationObjects.h.

◆ location

Location AppConfigurationObjects::PresenceDescriptor::location

[Optional, Default: see Location] Location information

See also
Location for more info.

Definition at line 1889 of file ConfigurationObjects.h.

◆ nextUpdate

uint32_t AppConfigurationObjects::PresenceDescriptor::nextUpdate

[Read Only, Unix timestamp - Zulu/UTC] Indicates the next time the presence descriptor will be sent.

This attributed together with the ts attribute is used by the Engage Engage Engine to "timeout" the endpoint. (Unix timestamp - Zulu/UTC)

Definition at line 1862 of file ConfigurationObjects.h.

◆ power

Power AppConfigurationObjects::PresenceDescriptor::power

[Optional, Default: see Power] Device power information like charging state, battery level, etc.

Definition at line 1901 of file ConfigurationObjects.h.

◆ self

bool AppConfigurationObjects::PresenceDescriptor::self

[Read Only] Indicates that this presence declaration was generated by the Engage Engine the application currently connected to.

NOTE: This is useful in identifying the nodeId that is automatically generated by the Engage Engine when the application does not provide the nodeId.

Definition at line 1848 of file ConfigurationObjects.h.

◆ ts

uint32_t AppConfigurationObjects::PresenceDescriptor::ts

[Read Only, Unix timestamp - Zulu/UTC] Indicates the timestamp that the message was originally sent.

Use this property and the nextUpdate attribute to determine if the endpoint is still on the network.

Definition at line 1855 of file ConfigurationObjects.h.


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