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