MakerLabs ACM
acm_helpers.h
Go to the documentation of this file.
1 #pragma once
6 
7 #include "acm_generated.h"
8 #include "display_generated.h"
9 
10 #include "timestamp.h"
11 
12 #include <experimental/string_view>
13 
14 using DisplayIntentFlatbuffer = flatbuffers::DetachedBuffer;
15 using ActivityFlatbuffer = flatbuffers::DetachedBuffer;
16 using LogFlatbuffer = flatbuffers::DetachedBuffer;
17 using UserFlatbuffer = flatbuffers::DetachedBuffer;
18 
20  const std::experimental::string_view machine_id_str,
21  const ACM::ActivityType activity_type,
22  const std::experimental::string_view tag_id_str,
23  const int usage_seconds = 0
25 
26 auto generate_log(
27  const std::experimental::string_view machine_id_str,
28  const ACM::LogSeverity severity,
29  const std::experimental::string_view message_str
30 ) -> LogFlatbuffer;
31 
33  const ACM::User* user
35 
37  const std::experimental::string_view message,
38  const uint32_t progress,
39  const TimeDuration duration,
40  const Display::Icon icon = Display::Icon::None
42 
44  const std::experimental::string_view message,
46  const std::experimental::string_view makerlabs_id,
LogSeverity
Definition: acm.fbs:61
auto generate_progress_bar(const std::experimental::string_view message, const uint32_t progress, const TimeDuration duration, const Display::Icon icon=Display::Icon::None) -> DisplayIntentFlatbuffer
ActivityType
Definition: acm.fbs:13
flatbuffers::DetachedBuffer DisplayIntentFlatbuffer
Definition: acm_helpers.h:14
std::experimental::string_view string_view
Definition: actor_model.cpp:16
auto generate_log(const std::experimental::string_view machine_id_str, const ACM::LogSeverity severity, const std::experimental::string_view message_str) -> LogFlatbuffer
flatbuffers::DetachedBuffer LogFlatbuffer
Definition: acm_helpers.h:16
std::chrono::microseconds TimeDuration
Definition: timestamp.h:19
auto generate_activity(const std::experimental::string_view machine_id_str, const ACM::ActivityType activity_type, const std::experimental::string_view tag_id_str, const int usage_seconds=0) -> ActivityFlatbuffer
auto generate_show_user_details(const std::experimental::string_view message, const std::experimental::string_view email, const std::experimental::string_view makerlabs_id, const std::experimental::string_view tag_id) -> DisplayIntentFlatbuffer
Definition: acm_helpers.cpp:118
flatbuffers::DetachedBuffer ActivityFlatbuffer
Definition: acm_helpers.h:15
Icon
Definition: display.fbs:10
flatbuffers::DetachedBuffer UserFlatbuffer
Definition: acm_helpers.h:17
auto generate_show_user_details_from_user(const ACM::User *user) -> DisplayIntentFlatbuffer
Definition: acm_helpers.cpp:65