Home
last modified time | relevance | path

Searched refs:std (Results 1 – 25 of 222) sorted by relevance

123456789

/tools/netsim/src/hci/
Dasync_manager.cc111 std::unique_lock<std::recursive_mutex> guard(internal_mutex_); in WatchFdForNonBlockingReads()
129 std::unique_lock<std::recursive_mutex> guard(internal_mutex_); in StopWatchingFileDescriptor()
140 if (!std::atomic_exchange(&running_, false)) { in stopThread()
146 if (std::this_thread::get_id() != thread_.get_id()) { in stopThread()
154 std::unique_lock<std::recursive_mutex> guard(internal_mutex_); in stopThread()
165 if (std::atomic_exchange(&running_, true)) { in tryStartThread()
180 thread_ = std::thread([this]() { ThreadRoutine(); }); in tryStartThread()
203 std::unique_lock<std::recursive_mutex> guard(internal_mutex_); in setUpFileDescriptorSet()
227 std::vector<decltype(watched_shared_fds_)::value_type> fds; in runAppropriateCallbacks()
228 std::unique_lock<std::recursive_mutex> guard(internal_mutex_); in runAppropriateCallbacks()
[all …]
Dbluetooth_facade.cc55 using namespace std::literals;
77 const std::list<std::shared_ptr<rootcanal::PhyDevice>> &phy_devices) { in Contains()
78 return std::any_of( in Contains()
84 void Send(std::vector<uint8_t> const &packet, int8_t tx_power, in Send()
106 std::unique_ptr<rootcanal::PhyLayer> CreatePhyLayer( in CreatePhyLayer()
108 return std::make_unique<SimPhyLayer>(id, type); in CreatePhyLayer()
116 std::shared_ptr<rootcanal::AsyncManager> gAsyncManager;
118 std::shared_ptr<SimTestModel> gTestModel;
119 std::shared_ptr<rootcanal::configuration::Controller> controller_proto_;
123 std::unique_ptr<rootcanal::TestCommandHandler> gTestChannel;
[all …]
Dhci_packet_transport.cc33 std::unordered_map<uint32_t, std::shared_ptr<HciPacketTransport>>
43 uint32_t chip_id, std::shared_ptr<rootcanal::AsyncManager> async_manager) in HciPacketTransport()
44 : rootcanalId(std::nullopt), in HciPacketTransport()
46 mAsyncManager(std::move(async_manager)) {} in HciPacketTransport()
63 const std::vector<uint8_t> &data) { in Send()
90 const std::shared_ptr<std::vector<uint8_t>> &packet) { in Request()
96 auto beforeScheduleTime = std::chrono::steady_clock::now(); in Request()
100 std::chrono::duration_cast<std::chrono::milliseconds>( in Request()
101 std::chrono::steady_clock::now() - beforeScheduleTime) in Request()
109 "Delayed packet with " + std::to_string(elapsedTime) + in Request()
[all …]
Drust_device.h33 const std::string &type, const std::string &address) in RustDevice()
34 : callbacks_(std::move(callbacks)), TYPE(type) { in RustDevice()
40 std::string GetTypeString() const override { return TYPE; } in GetTypeString()
41 std::string ToString() const override { return TYPE; } in ToString()
45 void SetRustBluetoothChip(std::unique_ptr<RustBluetoothChip>);
49 const std::string TYPE;
55 RustBluetoothChip(std::shared_ptr<RustDevice> rust_device) in RustBluetoothChip()
56 : rust_device(std::move(rust_device)) {} in RustBluetoothChip()
62 std::shared_ptr<RustDevice> rust_device;
/tools/netsim/src/util/
Dstring_utils.h28 std::string ToHexString(uint8_t x, uint8_t y);
29 std::string ToHexString(uint8_t x);
30 std::string ToHexString(const uint8_t *, size_t);
31 std::string ToHexString(const std::vector<uint8_t> &data, int max_length);
33 std::string_view LTrim(const std::string_view);
34 std::string_view RTrim(const std::string_view);
35 std::string_view Trim(const std::string_view);
36 std::vector<std::string_view> Split(const std::string_view,
37 const std::string_view &);
38 std::vector<std::string> Split(const std::string, const std::string &);
[all …]
Dstring_utils.cc27 const std::string WHITESPACE = " \n\r\t\f\v";
32 std::string_view LTrim(const std::string_view s) { in LTrim()
34 return (start == std::string::npos) ? "" : s.substr(start); in LTrim()
37 std::string_view RTrim(const std::string_view s) { in RTrim()
39 return (end == std::string::npos) ? "" : s.substr(0, end + 1); in RTrim()
42 std::string_view Trim(const std::string_view s) { return RTrim(LTrim(s)); } in Trim()
44 std::vector<std::string_view> Split(const std::string_view s, in Split()
45 const std::string_view &delimiters) { in Split()
46 std::vector<std::string_view> result; in Split()
48 while ((start = s.find_first_not_of(delimiters, end)) != std::string::npos) { in Split()
[all …]
Dini_file.cc35 std::ifstream inFile(filepath); in Read()
41 std::string line; in Read()
42 while (std::getline(inFile, line)) { in Read()
59 std::ofstream outFile(filepath); in Write()
67 outFile << pair.first << "=" << pair.second << std::endl; in Write()
72 bool IniFile::HasKey(const std::string &key) const { in HasKey()
73 return data.find(key) != std::end(data); in HasKey()
76 std::optional<std::string> IniFile::Get(const std::string &key) const { in Get()
78 return (citer == std::end(data)) ? std::nullopt in Get()
79 : std::optional(citer->second); in Get()
[all …]
Dini_file.h32 explicit IniFile(std::string filepath = "") : filepath(std::move(filepath)) {} in filepath()
42 bool HasKey(const std::string &key) const;
45 std::optional<std::string> Get(const std::string &key) const;
48 void Set(const std::string &key, std::string_view value);
51 std::unordered_map<std::string, std::string> data;
52 std::string filepath;
Dblocking_queue.h40 std::mutex mutex;
41 std::condition_variable condition;
42 std::queue<T> queue;
56 std::unique_lock<std::mutex> lock(this->mutex); in Stop()
69 std::unique_lock<std::mutex> lock(this->mutex); in Push()
82 std::unique_lock<std::mutex> lock(this->mutex); in Push()
83 this->queue.push(std::move(value)); in Push()
96 std::unique_lock<std::mutex> lock(this->mutex); in WaitAndPop()
Dos_utils.cc57 std::string GetDiscoveryDirectory() { in GetDiscoveryDirectory()
59 const char *test_env_p = std::getenv("TMPDIR"); in GetDiscoveryDirectory()
61 return std::string(test_env_p); in GetDiscoveryDirectory()
63 const char *env_p = std::getenv(discovery.root_env); in GetDiscoveryDirectory()
68 return std::string(env_p) + netsim::filesystem::slash + discovery.subdir; in GetDiscoveryDirectory()
71 std::string GetNetsimIniFilepath(uint16_t instance_num) { in GetNetsimIniFilepath()
78 : "netsim_" + std::to_string(instance_num) + ".ini"; in GetNetsimIniFilepath()
83 std::optional<std::string> GetServerAddress(uint16_t instance_num) { in GetServerAddress()
87 return std::nullopt; in GetServerAddress()
91 return std::nullopt; in GetServerAddress()
/tools/netsim/rust/proto/src/
Dstats.rs33 pub reason: ::std::option::Option<::protobuf::EnumOrUnknown<invalid_packet::Reason>>,
35 pub description: ::std::option::Option<::std::string::String>,
37 pub packet: ::std::option::Option<::std::vec::Vec<u8>>,
43 impl<'a> ::std::default::Default for &'a InvalidPacket {
51 ::std::default::Default::default() in new()
64 self.reason = ::std::option::Option::None; in clear_reason()
73 self.reason = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); in set_reason()
86 self.description = ::std::option::Option::None; in clear_description()
94 pub fn set_description(&mut self, v: ::std::string::String) { in set_description()
95 self.description = ::std::option::Option::Some(v); in set_description()
[all …]
Dpacket_streamer.rs32 pub request_type: ::std::option::Option<packet_request::Request_type>,
38 impl<'a> ::std::default::Default for &'a PacketRequest {
46 ::std::default::Default::default() in new()
53 ::std::option::Option::Some(packet_request::Request_type::InitialInfo(ref v)) => v, in initial_info()
59 self.request_type = ::std::option::Option::None; in clear_initial_info()
64 ::std::option::Option::Some(packet_request::Request_type::InitialInfo(..)) => true, in has_initial_info()
71 … self.request_type = ::std::option::Option::Some(packet_request::Request_type::InitialInfo(v)) in set_initial_info()
76 …if let ::std::option::Option::Some(packet_request::Request_type::InitialInfo(_)) = self.request_ty… in mut_initial_info()
78 …self.request_type = ::std::option::Option::Some(packet_request::Request_type::InitialInfo(super::s… in mut_initial_info()
81 ::std::option::Option::Some(packet_request::Request_type::InitialInfo(ref mut v)) => v, in mut_initial_info()
[all …]
Dconfiguration.rs33 pub le_extended_advertising: ::std::option::Option<bool>,
35 pub le_periodic_advertising: ::std::option::Option<bool>,
37 pub ll_privacy: ::std::option::Option<bool>,
39 pub le_2m_phy: ::std::option::Option<bool>,
41 pub le_coded_phy: ::std::option::Option<bool>,
43 pub le_connected_isochronous_stream: ::std::option::Option<bool>,
49 impl<'a> ::std::default::Default for &'a ControllerFeatures {
57 ::std::default::Default::default() in new()
67 self.le_extended_advertising = ::std::option::Option::None; in clear_le_extended_advertising()
76 self.le_extended_advertising = ::std::option::Option::Some(v); in set_le_extended_advertising()
[all …]
Dconfig.rs35 pub ipv4: ::std::option::Option<bool>,
39 pub vnet: ::std::string::String,
41 pub vhost: ::std::string::String,
43 pub vmask: ::std::string::String,
45 pub ipv6: ::std::option::Option<bool>,
47 pub vprefix6: ::std::string::String,
51 pub vhost6: ::std::string::String,
53 pub vhostname: ::std::string::String,
55 pub tftpath: ::std::string::String,
57 pub bootfile: ::std::string::String,
[all …]
Dmodel.rs43 impl<'a> ::std::default::Default for &'a Position {
51 ::std::default::Default::default() in new()
55 let mut fields = ::std::vec::Vec::with_capacity(3); in generated_message_descriptor_data()
56 let mut oneofs = ::std::vec::Vec::with_capacity(0); in generated_message_descriptor_data()
104 ::std::result::Result::Ok(()) in merge_from()
136 ::std::result::Result::Ok(()) in write_to_with_cached_sizes()
176 impl ::std::fmt::Display for Position {
177 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { in fmt()
201 impl<'a> ::std::default::Default for &'a Orientation {
209 ::std::default::Default::default() in new()
[all …]
Dfrontend.rs33 pub version: ::std::string::String,
39 impl<'a> ::std::default::Default for &'a VersionResponse {
47 ::std::default::Default::default() in new()
51 let mut fields = ::std::vec::Vec::with_capacity(1); in generated_message_descriptor_data()
52 let mut oneofs = ::std::vec::Vec::with_capacity(0); in generated_message_descriptor_data()
84 ::std::result::Result::Ok(()) in merge_from()
104 ::std::result::Result::Ok(()) in write_to_with_cached_sizes()
126 version: ::std::string::String::new(), in default_instance()
140 impl ::std::fmt::Display for VersionResponse {
141 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { in fmt()
[all …]
/tools/test/graphicsbenchmark/functional_tests/native/
DglExtensions_test.cpp92 std::vector<std::string> neededExts {"GL_EXT_color_buffer_half_float", in TEST()
97 std::string extString(reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); in TEST()
99 std::istringstream iss(extString); in TEST()
101 std::vector<std::string> availableExts(std::istream_iterator<std::string>{iss}, in TEST()
102 std::istream_iterator<std::string>()); in TEST()
105 if (std::find(availableExts.begin(), availableExts.end(), ext) == availableExts.end()) in TEST()
121 std::vector<std::string> neededExts {"EGL_ANDROID_get_frame_timestamps", in TEST()
127 std::string extString(eglQueryString(eglDisp, EGL_EXTENSIONS)); in TEST()
129 std::istringstream iss(extString); in TEST()
131 std::vector<std::string> availableExts(std::istream_iterator<std::string>{iss}, in TEST()
[all …]
/tools/netsim/src/backend/
Dpacket_streamer_client.cc42 const std::chrono::duration kConnectionDeadline = std::chrono::seconds(1);
43 std::string custom_packet_stream_endpoint = "";
44 std::shared_ptr<grpc::Channel> packet_stream_channel;
45 std::mutex channel_mutex;
47 std::shared_ptr<grpc::Channel> CreateGrpcChannel() { in CreateGrpcChannel()
58 std::vector< in CreateGrpcChannel()
59 std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>> in CreateGrpcChannel()
61 interceptors.emplace_back(std::make_unique<MetricsInterceptorFactory>()); in CreateGrpcChannel()
65 std::move(interceptors)); in CreateGrpcChannel()
68 bool GrpcChannelReady(const std::shared_ptr<grpc::Channel> &channel) { in GrpcChannelReady()
[all …]
Dgrpc_client.cc41 const std::chrono::duration kConnectionDeadline = std::chrono::seconds(5);
46 std::mutex mutex_;
50 std::unordered_map<uint32_t, std::unique_ptr<Stream>> streams_;
51 std::unordered_map<uint32_t, grpc::ClientContext> contexts_;
54 std::string server_;
55 std::shared_ptr<grpc::Channel> channel_;
57 std::unique_ptr<netsim::packet::PacketStreamer::Stub> stub_;
66 std::unique_lock<std::mutex> lock(mutex_); in StreamPackets()
67 auto server = std::string(server_rust); in StreamPackets()
71 auto deadline = std::chrono::system_clock::now() + kConnectionDeadline; in StreamPackets()
[all …]
/tools/dexter/slicer/
Dcommon.cc29 static void log_(const std::string& msg) { in log_()
42 std::stringstream ss; in _checkFailed()
43 ss << std::endl << "SLICER_CHECK failed ["; in _checkFailed()
45 ss << std::endl << std::endl; in _checkFailed()
52 std::stringstream ss; in _checkFailedOp()
53 ss << std::endl << "SLICER_CHECK_" << suffix << " failed ["; in _checkFailedOp()
62 std::stringstream ss; in _checkFailedOp()
63 ss << std::endl << "SLICER_CHECK_" << suffix << " failed ["; in _checkFailedOp()
71 thread_local std::set<std::pair<int, const char*>> weak_failures;
78 auto failure_id = std::make_pair(line, file); in _weakCheckFailed()
[all …]
/tools/netsim/src/frontend/
Dfrontend_client.h29 enum class GrpcMethod : ::std::uint8_t;
34 ClientResult(bool is_ok, const std::string &err, in ClientResult()
35 const std::vector<unsigned char> &byte_vec) in ClientResult()
40 const std::vector<unsigned char> &ByteVec() const { return byte_vec_; }; in ByteVec()
44 std::string err_;
45 const std::vector<unsigned char> byte_vec_;
51 virtual std::unique_ptr<ClientResult> SendGrpc(
54 virtual std::unique_ptr<ClientResult> GetVersion() const = 0;
55 virtual std::unique_ptr<ClientResult> ListDevice() const = 0;
56 virtual std::unique_ptr<ClientResult> PatchDevice(
[all …]
Dfrontend_client.cc40 const std::chrono::duration kConnectionDeadline = std::chrono::seconds(1);
42 std::unique_ptr<frontend::FrontendService::Stub> NewFrontendStub( in NewFrontendStub()
43 std::string server) { in NewFrontendStub()
47 std::shared_ptr<grpc::Channel> channel = in NewFrontendStub()
50 auto deadline = std::chrono::system_clock::now() + kConnectionDeadline; in NewFrontendStub()
62 FrontendClientImpl(std::unique_ptr<frontend::FrontendService::Stub> stub) in FrontendClientImpl()
63 : stub_(std::move(stub)) {} in FrontendClientImpl()
65 std::unique_ptr<ClientResult> make_result( in make_result()
68 std::vector<unsigned char> message_vec(message.ByteSizeLong()); in make_result()
71 return std::make_unique<ClientResult>(false, status.error_message(), in make_result()
[all …]
/tools/netsim/src/core/
Dserver.cc43 constexpr std::chrono::seconds InactivityCheckInterval(5);
45 std::pair<std::unique_ptr<grpc::Server>, uint32_t> RunGrpcServer( in RunGrpcServer()
49 builder.AddListeningPort("0.0.0.0:" + std::to_string(netsim_grpc_port), in RunGrpcServer()
58 std::string vsock_uri = in RunGrpcServer()
59 "vsock:" + std::to_string(VMADDR_CID_ANY) + ":" + std::to_string(vsock); in RunGrpcServer()
68 std::unique_ptr<grpc::Server> server(builder.BuildAndStart()); in RunGrpcServer()
70 return std::make_pair(nullptr, static_cast<uint32_t>(selected_port)); in RunGrpcServer()
74 std::to_string(selected_port).c_str()); in RunGrpcServer()
76 return std::make_pair(std::move(server), in RunGrpcServer()
81 std::unique_ptr<GrpcServer> RunGrpcServerCxx(uint32_t netsim_grpc_port, in RunGrpcServerCxx()
[all …]
/tools/dexter/slicer/export/slicer/
Ddex_ir.h55 using own = std::unique_ptr<T>;
157 std::vector<EncodedValue*> values;
181 std::string Decl() const;
188 std::vector<Type*> types;
198 std::string Signature() const;
230 std::vector<String*> param_names;
276 std::vector<AnnotationElement*> elements;
283 std::vector<Annotation*> annotations;
289 std::vector<AnnotationSet*> annotations;
317 std::vector<FieldAnnotation*> field_annotations;
[all …]
/tools/security/remote_provisioning/hwtrust/cxxbridge/
Dhwtrust.cpp16 DiceChain::DiceChain(std::unique_ptr<BoxedDiceChain> chain, size_t size) noexcept in DiceChain()
17 : chain_(std::move(chain)), size_(size) {} in DiceChain()
19 Result<DiceChain> DiceChain::Verify(const std::vector<uint8_t>& chain, DiceChain::Kind kind) noexce… in Verify()
37 return Error() << static_cast<std::string>(res.error); in Verify()
39 BoxedDiceChain boxedChain = { std::move(res.chain) }; in Verify()
40 auto diceChain = std::make_unique<BoxedDiceChain>(std::move(boxedChain)); in Verify()
41 return DiceChain(std::move(diceChain), res.len); in Verify()
44 Result<std::vector<std::vector<uint8_t>>> DiceChain::CosePublicKeys() const noexcept { in CosePublicKeys()
45 std::vector<std::vector<uint8_t>> result; in CosePublicKeys()

123456789