aboutsummaryrefslogtreecommitdiff
path: root/apps/power_test/common/include/generated/chre_power_test_generated.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/power_test/common/include/generated/chre_power_test_generated.h')
-rw-r--r--apps/power_test/common/include/generated/chre_power_test_generated.h220
1 files changed, 9 insertions, 211 deletions
diff --git a/apps/power_test/common/include/generated/chre_power_test_generated.h b/apps/power_test/common/include/generated/chre_power_test_generated.h
index b843d206..70ef4582 100644
--- a/apps/power_test/common/include/generated/chre_power_test_generated.h
+++ b/apps/power_test/common/include/generated/chre_power_test_generated.h
@@ -33,9 +33,6 @@ struct BreakItMessageBuilder;
struct NanoappResponseMessage;
struct NanoappResponseMessageBuilder;
-struct GnssMeasurementMessage;
-struct GnssMeasurementMessageBuilder;
-
/// Indicates which of the following messages is being sent to / from the
/// nanoapp. Use uint as the base type to match the message type in
/// chreMessageFromHostData.
@@ -57,13 +54,11 @@ enum class MessageType : uint32_t {
BREAK_IT_TEST = 7,
/// Should be used with NanoappResponseMessage
NANOAPP_RESPONSE = 8,
- /// Should be used with GnssMeasurementMessage
- GNSS_MEASUREMENT_TEST = 9,
MIN = UNSPECIFIED,
- MAX = GNSS_MEASUREMENT_TEST
+ MAX = NANOAPP_RESPONSE
};
-inline const MessageType (&EnumValuesMessageType())[10] {
+inline const MessageType (&EnumValuesMessageType())[9] {
static const MessageType values[] = {
MessageType::UNSPECIFIED,
MessageType::TIMER_TEST,
@@ -73,14 +68,13 @@ inline const MessageType (&EnumValuesMessageType())[10] {
MessageType::AUDIO_REQUEST_TEST,
MessageType::SENSOR_REQUEST_TEST,
MessageType::BREAK_IT_TEST,
- MessageType::NANOAPP_RESPONSE,
- MessageType::GNSS_MEASUREMENT_TEST
+ MessageType::NANOAPP_RESPONSE
};
return values;
}
inline const char * const *EnumNamesMessageType() {
- static const char * const names[11] = {
+ static const char * const names[10] = {
"UNSPECIFIED",
"TIMER_TEST",
"WIFI_SCAN_TEST",
@@ -90,127 +84,17 @@ inline const char * const *EnumNamesMessageType() {
"SENSOR_REQUEST_TEST",
"BREAK_IT_TEST",
"NANOAPP_RESPONSE",
- "GNSS_MEASUREMENT_TEST",
nullptr
};
return names;
}
inline const char *EnumNameMessageType(MessageType e) {
- if (flatbuffers::IsOutRange(e, MessageType::UNSPECIFIED, MessageType::GNSS_MEASUREMENT_TEST)) return "";
+ if (flatbuffers::IsOutRange(e, MessageType::UNSPECIFIED, MessageType::NANOAPP_RESPONSE)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesMessageType()[index];
}
-/// All the various WiFi scan types that can be interacted with inside the
-/// nanoapp. The values used here map directly to values from the CHRE API.
-enum class WifiScanType : uint8_t {
- ACTIVE = 0,
- ACTIVE_PLUS_PASSIVE_DFS = 1,
- PASSIVE = 2,
- NO_PREFERENCE = 3,
- MIN = ACTIVE,
- MAX = NO_PREFERENCE
-};
-
-inline const WifiScanType (&EnumValuesWifiScanType())[4] {
- static const WifiScanType values[] = {
- WifiScanType::ACTIVE,
- WifiScanType::ACTIVE_PLUS_PASSIVE_DFS,
- WifiScanType::PASSIVE,
- WifiScanType::NO_PREFERENCE
- };
- return values;
-}
-
-inline const char * const *EnumNamesWifiScanType() {
- static const char * const names[5] = {
- "ACTIVE",
- "ACTIVE_PLUS_PASSIVE_DFS",
- "PASSIVE",
- "NO_PREFERENCE",
- nullptr
- };
- return names;
-}
-
-inline const char *EnumNameWifiScanType(WifiScanType e) {
- if (flatbuffers::IsOutRange(e, WifiScanType::ACTIVE, WifiScanType::NO_PREFERENCE)) return "";
- const size_t index = static_cast<size_t>(e);
- return EnumNamesWifiScanType()[index];
-}
-
-/// All the various WiFi radio chain preferences that can be interacted with
-/// inside the nanoapp. The values used here map directly to values from the
-/// CHRE API.
-enum class WifiRadioChain : uint8_t {
- DEFAULT = 0,
- LOW_LATENCY = 1,
- LOW_POWER = 2,
- HIGH_ACCURACY = 3,
- MIN = DEFAULT,
- MAX = HIGH_ACCURACY
-};
-
-inline const WifiRadioChain (&EnumValuesWifiRadioChain())[4] {
- static const WifiRadioChain values[] = {
- WifiRadioChain::DEFAULT,
- WifiRadioChain::LOW_LATENCY,
- WifiRadioChain::LOW_POWER,
- WifiRadioChain::HIGH_ACCURACY
- };
- return values;
-}
-
-inline const char * const *EnumNamesWifiRadioChain() {
- static const char * const names[5] = {
- "DEFAULT",
- "LOW_LATENCY",
- "LOW_POWER",
- "HIGH_ACCURACY",
- nullptr
- };
- return names;
-}
-
-inline const char *EnumNameWifiRadioChain(WifiRadioChain e) {
- if (flatbuffers::IsOutRange(e, WifiRadioChain::DEFAULT, WifiRadioChain::HIGH_ACCURACY)) return "";
- const size_t index = static_cast<size_t>(e);
- return EnumNamesWifiRadioChain()[index];
-}
-
-/// All the various WiFi channel sets that can be interacted with inside the
-/// nanoapp. The values used here map directly to values from the CHRE API.
-enum class WifiChannelSet : uint8_t {
- NON_DFS = 0,
- ALL = 1,
- MIN = NON_DFS,
- MAX = ALL
-};
-
-inline const WifiChannelSet (&EnumValuesWifiChannelSet())[2] {
- static const WifiChannelSet values[] = {
- WifiChannelSet::NON_DFS,
- WifiChannelSet::ALL
- };
- return values;
-}
-
-inline const char * const *EnumNamesWifiChannelSet() {
- static const char * const names[3] = {
- "NON_DFS",
- "ALL",
- nullptr
- };
- return names;
-}
-
-inline const char *EnumNameWifiChannelSet(WifiChannelSet e) {
- if (flatbuffers::IsOutRange(e, WifiChannelSet::NON_DFS, WifiChannelSet::ALL)) return "";
- const size_t index = static_cast<size_t>(e);
- return EnumNamesWifiChannelSet()[index];
-}
-
/// All the various sensors that can be interacted with inside the nanoapp.
/// The values used here map directly to values from the CHRE API
enum class SensorType : uint8_t {
@@ -226,7 +110,6 @@ enum class SensorType : uint8_t {
LIGHT = 12,
PROXIMITY = 13,
STEP_DETECT = 23,
- STEP_COUNTER = 24,
UNCALIBRATED_ACCELEROMETER = 55,
ACCELEROMETER_TEMPERATURE = 56,
GYROSCOPE_TEMPERATURE = 57,
@@ -235,7 +118,7 @@ enum class SensorType : uint8_t {
MAX = GEOMAGNETIC_FIELD_TEMPERATURE
};
-inline const SensorType (&EnumValuesSensorType())[17] {
+inline const SensorType (&EnumValuesSensorType())[16] {
static const SensorType values[] = {
SensorType::UNKNOWN,
SensorType::ACCELEROMETER,
@@ -249,7 +132,6 @@ inline const SensorType (&EnumValuesSensorType())[17] {
SensorType::LIGHT,
SensorType::PROXIMITY,
SensorType::STEP_DETECT,
- SensorType::STEP_COUNTER,
SensorType::UNCALIBRATED_ACCELEROMETER,
SensorType::ACCELEROMETER_TEMPERATURE,
SensorType::GYROSCOPE_TEMPERATURE,
@@ -284,7 +166,7 @@ inline const char * const *EnumNamesSensorType() {
"",
"",
"STEP_DETECT",
- "STEP_COUNTER",
+ "",
"",
"",
"",
@@ -390,10 +272,7 @@ struct WifiScanMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef WifiScanMessageBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_ENABLE = 4,
- VT_SCAN_INTERVAL_NS = 6,
- VT_SCAN_TYPE = 8,
- VT_RADIO_CHAIN = 10,
- VT_CHANNEL_SET = 12
+ VT_SCAN_INTERVAL_NS = 6
};
bool enable() const {
return GetField<uint8_t>(VT_ENABLE, 0) != 0;
@@ -401,22 +280,10 @@ struct WifiScanMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
uint64_t scan_interval_ns() const {
return GetField<uint64_t>(VT_SCAN_INTERVAL_NS, 0);
}
- chre::power_test::WifiScanType scan_type() const {
- return static_cast<chre::power_test::WifiScanType>(GetField<uint8_t>(VT_SCAN_TYPE, 0));
- }
- chre::power_test::WifiRadioChain radio_chain() const {
- return static_cast<chre::power_test::WifiRadioChain>(GetField<uint8_t>(VT_RADIO_CHAIN, 0));
- }
- chre::power_test::WifiChannelSet channel_set() const {
- return static_cast<chre::power_test::WifiChannelSet>(GetField<uint8_t>(VT_CHANNEL_SET, 0));
- }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint8_t>(verifier, VT_ENABLE) &&
VerifyField<uint64_t>(verifier, VT_SCAN_INTERVAL_NS) &&
- VerifyField<uint8_t>(verifier, VT_SCAN_TYPE) &&
- VerifyField<uint8_t>(verifier, VT_RADIO_CHAIN) &&
- VerifyField<uint8_t>(verifier, VT_CHANNEL_SET) &&
verifier.EndTable();
}
};
@@ -431,15 +298,6 @@ struct WifiScanMessageBuilder {
void add_scan_interval_ns(uint64_t scan_interval_ns) {
fbb_.AddElement<uint64_t>(WifiScanMessage::VT_SCAN_INTERVAL_NS, scan_interval_ns, 0);
}
- void add_scan_type(chre::power_test::WifiScanType scan_type) {
- fbb_.AddElement<uint8_t>(WifiScanMessage::VT_SCAN_TYPE, static_cast<uint8_t>(scan_type), 0);
- }
- void add_radio_chain(chre::power_test::WifiRadioChain radio_chain) {
- fbb_.AddElement<uint8_t>(WifiScanMessage::VT_RADIO_CHAIN, static_cast<uint8_t>(radio_chain), 0);
- }
- void add_channel_set(chre::power_test::WifiChannelSet channel_set) {
- fbb_.AddElement<uint8_t>(WifiScanMessage::VT_CHANNEL_SET, static_cast<uint8_t>(channel_set), 0);
- }
explicit WifiScanMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
@@ -455,15 +313,9 @@ struct WifiScanMessageBuilder {
inline flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(
flatbuffers::FlatBufferBuilder &_fbb,
bool enable = false,
- uint64_t scan_interval_ns = 0,
- chre::power_test::WifiScanType scan_type = chre::power_test::WifiScanType::ACTIVE,
- chre::power_test::WifiRadioChain radio_chain = chre::power_test::WifiRadioChain::DEFAULT,
- chre::power_test::WifiChannelSet channel_set = chre::power_test::WifiChannelSet::NON_DFS) {
+ uint64_t scan_interval_ns = 0) {
WifiScanMessageBuilder builder_(_fbb);
builder_.add_scan_interval_ns(scan_interval_ns);
- builder_.add_channel_set(channel_set);
- builder_.add_radio_chain(radio_chain);
- builder_.add_scan_type(scan_type);
builder_.add_enable(enable);
return builder_.Finish();
}
@@ -806,60 +658,6 @@ inline flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(
return builder_.Finish();
}
-/// Represents a message to ask the nanoapp to start or stop Gnss measurement
-/// sampling at the requested interval
-struct GnssMeasurementMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
- typedef GnssMeasurementMessageBuilder Builder;
- enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
- VT_ENABLE = 4,
- VT_MIN_INTERVAL_MILLIS = 6
- };
- bool enable() const {
- return GetField<uint8_t>(VT_ENABLE, 0) != 0;
- }
- uint32_t min_interval_millis() const {
- return GetField<uint32_t>(VT_MIN_INTERVAL_MILLIS, 0);
- }
- bool Verify(flatbuffers::Verifier &verifier) const {
- return VerifyTableStart(verifier) &&
- VerifyField<uint8_t>(verifier, VT_ENABLE) &&
- VerifyField<uint32_t>(verifier, VT_MIN_INTERVAL_MILLIS) &&
- verifier.EndTable();
- }
-};
-
-struct GnssMeasurementMessageBuilder {
- typedef GnssMeasurementMessage Table;
- flatbuffers::FlatBufferBuilder &fbb_;
- flatbuffers::uoffset_t start_;
- void add_enable(bool enable) {
- fbb_.AddElement<uint8_t>(GnssMeasurementMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
- }
- void add_min_interval_millis(uint32_t min_interval_millis) {
- fbb_.AddElement<uint32_t>(GnssMeasurementMessage::VT_MIN_INTERVAL_MILLIS, min_interval_millis, 0);
- }
- explicit GnssMeasurementMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
- : fbb_(_fbb) {
- start_ = fbb_.StartTable();
- }
- GnssMeasurementMessageBuilder &operator=(const GnssMeasurementMessageBuilder &);
- flatbuffers::Offset<GnssMeasurementMessage> Finish() {
- const auto end = fbb_.EndTable(start_);
- auto o = flatbuffers::Offset<GnssMeasurementMessage>(end);
- return o;
- }
-};
-
-inline flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(
- flatbuffers::FlatBufferBuilder &_fbb,
- bool enable = false,
- uint32_t min_interval_millis = 0) {
- GnssMeasurementMessageBuilder builder_(_fbb);
- builder_.add_min_interval_millis(min_interval_millis);
- builder_.add_enable(enable);
- return builder_.Finish();
-}
-
} // namespace power_test
} // namespace chre