-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collect dumpsys data from participating modules
Bug: 157647700 Test: atest --host bluetooth_test_gd Tag: #gd-refactor Change-Id: I8105f53e9792e5e4f0c27ae3e13091b99e21cd80
- Loading branch information
Chris Manton
committed
Jun 23, 2020
1 parent
a10b000
commit 57c205a
Showing
7 changed files
with
198 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
// Top level module dumpsys data schema | ||
include "module_unittest.fbs"; | ||
|
||
namespace bluetooth; | ||
|
||
attribute "privacy"; | ||
|
||
table DumpsysData { | ||
title:string; | ||
module_unittest_data:bluetooth.ModuleUnitTestData; // private | ||
} | ||
|
||
root_type DumpsysData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// module_unittest | ||
namespace bluetooth; | ||
|
||
attribute "privacy"; | ||
|
||
table ModuleUnitTestData { | ||
title:string (privacy:"Any"); | ||
} | ||
|
||
root_type ModuleUnitTestData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// automatically generated by the FlatBuffers compiler, do not modify | ||
|
||
#ifndef FLATBUFFERS_GENERATED_MODULEUNITTEST_BLUETOOTH_H_ | ||
#define FLATBUFFERS_GENERATED_MODULEUNITTEST_BLUETOOTH_H_ | ||
|
||
#include "flatbuffers/flatbuffers.h" | ||
|
||
namespace bluetooth { | ||
|
||
struct ModuleUnitTestData; | ||
struct ModuleUnitTestDataBuilder; | ||
|
||
struct ModuleUnitTestData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { | ||
typedef ModuleUnitTestDataBuilder Builder; | ||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_TITLE = 4 }; | ||
const flatbuffers::String* title() const { | ||
return GetPointer<const flatbuffers::String*>(VT_TITLE); | ||
} | ||
bool Verify(flatbuffers::Verifier& verifier) const { | ||
return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_TITLE) && verifier.VerifyString(title()) && | ||
verifier.EndTable(); | ||
} | ||
}; | ||
|
||
struct ModuleUnitTestDataBuilder { | ||
typedef ModuleUnitTestData Table; | ||
flatbuffers::FlatBufferBuilder& fbb_; | ||
flatbuffers::uoffset_t start_; | ||
void add_title(flatbuffers::Offset<flatbuffers::String> title) { | ||
fbb_.AddOffset(ModuleUnitTestData::VT_TITLE, title); | ||
} | ||
explicit ModuleUnitTestDataBuilder(flatbuffers::FlatBufferBuilder& _fbb) : fbb_(_fbb) { | ||
start_ = fbb_.StartTable(); | ||
} | ||
ModuleUnitTestDataBuilder& operator=(const ModuleUnitTestDataBuilder&); | ||
flatbuffers::Offset<ModuleUnitTestData> Finish() { | ||
const auto end = fbb_.EndTable(start_); | ||
auto o = flatbuffers::Offset<ModuleUnitTestData>(end); | ||
return o; | ||
} | ||
}; | ||
|
||
inline flatbuffers::Offset<ModuleUnitTestData> CreateModuleUnitTestData( | ||
flatbuffers::FlatBufferBuilder& _fbb, flatbuffers::Offset<flatbuffers::String> title = 0) { | ||
ModuleUnitTestDataBuilder builder_(_fbb); | ||
builder_.add_title(title); | ||
return builder_.Finish(); | ||
} | ||
|
||
inline flatbuffers::Offset<ModuleUnitTestData> CreateModuleUnitTestDataDirect( | ||
flatbuffers::FlatBufferBuilder& _fbb, const char* title = nullptr) { | ||
auto title__ = title ? _fbb.CreateString(title) : 0; | ||
return bluetooth::CreateModuleUnitTestData(_fbb, title__); | ||
} | ||
|
||
inline const bluetooth::ModuleUnitTestData* GetModuleUnitTestData(const void* buf) { | ||
return flatbuffers::GetRoot<bluetooth::ModuleUnitTestData>(buf); | ||
} | ||
|
||
inline const bluetooth::ModuleUnitTestData* GetSizePrefixedModuleUnitTestData(const void* buf) { | ||
return flatbuffers::GetSizePrefixedRoot<bluetooth::ModuleUnitTestData>(buf); | ||
} | ||
|
||
inline bool VerifyModuleUnitTestDataBuffer(flatbuffers::Verifier& verifier) { | ||
return verifier.VerifyBuffer<bluetooth::ModuleUnitTestData>(nullptr); | ||
} | ||
|
||
inline bool VerifySizePrefixedModuleUnitTestDataBuffer(flatbuffers::Verifier& verifier) { | ||
return verifier.VerifySizePrefixedBuffer<bluetooth::ModuleUnitTestData>(nullptr); | ||
} | ||
|
||
inline void FinishModuleUnitTestDataBuffer( | ||
flatbuffers::FlatBufferBuilder& fbb, flatbuffers::Offset<bluetooth::ModuleUnitTestData> root) { | ||
fbb.Finish(root); | ||
} | ||
|
||
inline void FinishSizePrefixedModuleUnitTestDataBuffer( | ||
flatbuffers::FlatBufferBuilder& fbb, flatbuffers::Offset<bluetooth::ModuleUnitTestData> root) { | ||
fbb.FinishSizePrefixed(root); | ||
} | ||
|
||
} // namespace bluetooth | ||
|
||
#endif // FLATBUFFERS_GENERATED_MODULEUNITTEST_BLUETOOTH_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters