LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
systemevent.h
Go to the documentation of this file.
1
5#ifndef SYSTEMEVENT_H
6#define SYSTEMEVENT_H
7
8#include "sr/types.h"
9#include <stdint.h>
10
11#ifdef __cplusplus
12enum SR_eventType : uint64_t {
13 Info = 0,
27 LensOn = 14,
28 LensOff = 15,
29 UserFound = 16,
30 UserLost = 17
31};
32#else
33typedef uint64_t SR_eventType;
34#endif //__cplusplus
35
41typedef struct {
42 uint64_t time;
44 uint64_t messageLength;
45 const char* message;
47
48#ifdef __cplusplus
49#include <string>
50
51namespace SR {
52
61public:
62 uint64_t time;
64 std::string message;
65
66 operator SR_systemEvent() {
67 return {
68 time,
70 static_cast<uint64_t>(message.length()),
71 message.c_str(),
72 };
73 }
74};
75
76}
77#endif //__cplusplus
78
79#endif //SYSTEMEVENT_H
Class containing dynamic-length event messages.
Definition: systemevent.h:60
uint64_t time
Time since epoch in microseconds.
Definition: systemevent.h:62
SR_eventType eventType
Type of the event.
Definition: systemevent.h:63
std::string message
Full description of the event.
Definition: systemevent.h:64
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:20
C-compatible struct containing a system-wide event.
Definition: systemevent.h:41
uint64_t time
Time since epoch in microseconds.
Definition: systemevent.h:42
SR_eventType eventType
Type of the event.
Definition: systemevent.h:43
const char * message
Start of full string message.
Definition: systemevent.h:45
uint64_t messageLength
Full message string length.
Definition: systemevent.h:44
SR_eventType
Definition: systemevent.h:12
@ USBNotConnectedResolved
SR Device's USB cable has been successfully connected after an occurance of SR_eventType::USBNotConne...
Definition: systemevent.h:18
@ USBNotConnected
SR Device's USB cable is not connected.
Definition: systemevent.h:17
@ Info
The application is being informed of some changes to or within the system that do not affect it direc...
Definition: systemevent.h:13
@ SRUnavailable
Application should only display 2D content because SR content will not be experienced as intended (Th...
Definition: systemevent.h:15
@ LensOn
The lens of the SR device has been enabled.
Definition: systemevent.h:27
@ DeviceDisconnected
SR Device is disconnected and can not be used.
Definition: systemevent.h:26
@ DuplicatedResolved
SR Display is in extended mode and can now be used by SR applications to show SR content after an occ...
Definition: systemevent.h:22
@ SRRestored
Application can display SR content again after an occurrence of SR_eventType::SRUnavailable.
Definition: systemevent.h:16
@ UserFound
The user is being tracked by the Eyetracker.
Definition: systemevent.h:29
@ UserLost
The user has been lost by the Eyetracker.
Definition: systemevent.h:30
@ NonNativeResolutionResolved
SR Display is configured to use the correct resolution and can now be used by SR applications to show...
Definition: systemevent.h:24
@ DisplayNotConnectedResolved
SR Device's display cable has been successfully connected after an occurrence of SR_eventType::Displa...
Definition: systemevent.h:20
@ ContextInvalid
Context needs to be re-initialized for the application to recover.
Definition: systemevent.h:14
@ LensOff
The lens of the SR device has been disabled.
Definition: systemevent.h:28
@ DeviceConnectedAndReady
SR Device is connected and ready to use.
Definition: systemevent.h:25
@ Duplicated
SR Display is in duplicated mode and can not be used by SR applications to show SR content.
Definition: systemevent.h:21
@ DisplayNotConnected
SR Device's display cable is not connected.
Definition: systemevent.h:19
@ NonNativeResolution
SR Display is configured to use a non-native resolution and can not be used by SR applications to sho...
Definition: systemevent.h:23