38#include "profiler/Profiler.h"
57 PROFILER_EVENT_DISCONNECTED = 0x0001,
58 PROFILER_EVENT_ALL = 0xFFFF,
61 using EventCallback = std::function<void(Event event,
void* pUser)>;
79 "Please use @ref registerProfilerEventCallback(Profiler& profiler, Event event, const "
80 "ProfilerEventCallback& callback) instead.")]]
static ErrorStatus
89 std::string eventName{};
90 uint16_t eventId{0x0000};
93 EventInfo(
const std::string& eventName, uint16_t eventId)
94 : eventName(eventName), eventId(eventId)
110 std::vector<EventInfo>& eventInfos);
115 std::string eventName{};
116 int64_t timestamp{0};
137 uint32_t uint32Value;
143 std::string stringValue;
148 using Payload = std::vector<PayloadMember>;
156 std::function<void(
const EventData* eventData,
const void* extraPayload)>;
Describes the event of profiler. Use ProfilerEvent::registerProfilerEventCallback to register an even...
static ErrorStatus getSupportedEvents(const Profiler &profiler, std::vector< EventInfo > &eventInfos)
Get supported events by the profiler.
std::function< void(const EventData *eventData, const void *extraPayload)> ProfilerEventCallback
callback function for a camera event.
static ErrorStatus registerProfilerEventCallback(Profiler &profiler, uint16_t event, const ProfilerEventCallback &callback)
Registers a callback function to be executed when the specified Event occurs on the specified Profile...
static ErrorStatus registerProfilerEventCallback(Profiler &profiler, EventCallback callback, void *pUser, unsigned int events)
Registers a profiler event of interest.
static ErrorStatus unregisterProfilerEventCallback(Profiler &profiler, uint16_t event)
Cancels the registration of a callback function for the specified event and Profiler object.
Event
Describes the types of Event.
Operates the laser profiler. Use Profiler::connect to connect an available laser profiler,...
Describes the types of errors.
Describes the event information.
Describes the data member of the event's payload.
std::string name
Member name.
MemberValue value
Member value.