Home
last modified time | relevance | path

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

12345678910>>...28

/device/google/cuttlefish/host/libs/config/
Dcuttlefish_config.h69 bool SaveToFile(const std::string& file) const;
71 std::string assembly_dir() const;
72 void set_assembly_dir(const std::string& assembly_dir);
74 std::string AssemblyPath(const std::string&) const;
76 std::string composite_disk_path() const;
78 std::string vm_manager() const;
79 void set_vm_manager(const std::string& name);
81 std::string gpu_mode() const;
82 void set_gpu_mode(const std::string& name);
106 std::string kernel_image_path() const;
[all …]
Dcuttlefish_config.cpp46 const char* instance_str = std::getenv(kInstanceEnvironmentVariable); in InstanceFromEnvironment()
49 instance_str = std::getenv("USER"); in InstanceFromEnvironment()
51 if (!instance_str || std::strncmp(instance_str, cuttlefish::kVsocUserPrefix, in InstanceFromEnvironment()
63 int instance = std::atoi(instance_str); in InstanceFromEnvironment()
176 std::string DefaultEnvironmentPath(const char* environment_key, in DefaultEnvironmentPath()
182 std::string CuttlefishConfig::assembly_dir() const { in assembly_dir()
185 void CuttlefishConfig::set_assembly_dir(const std::string& assembly_dir) { in set_assembly_dir()
189 std::string CuttlefishConfig::vm_manager() const { in vm_manager()
192 void CuttlefishConfig::set_vm_manager(const std::string& name) { in set_vm_manager()
196 std::string CuttlefishConfig::gpu_mode() const { in gpu_mode()
[all …]
/device/google/cuttlefish/host/commands/fetcher/
Dbuild_api.h31 std::string name;
34 std::string md5;
35 std::string content_type;
36 std::string revision;
41 Artifact(const std::string& name) : name(name) {} in Artifact()
43 const std::string& Name() const { return name; } in Name()
46 const std::string& Md5() const { return md5; } in Md5()
47 const std::string& ContentType() const { return content_type; } in ContentType()
48 const std::string& Revision() const { return revision; } in Revision()
54 DeviceBuild(const std::string& id, const std::string& target) { in DeviceBuild()
[all …]
Dbuild_api.cc34 const std::string BUILD_API =
37 bool StatusIsTerminal(const std::string& status) { in StatusIsTerminal()
38 const static std::set<std::string> terminal_statuses = { in StatusIsTerminal()
53 size = std::stol(json_artifact["size"].asString()); in Artifact()
54 last_modified_time = std::stol(json_artifact["lastModifiedTime"].asString()); in Artifact()
58 creation_time = std::stol(json_artifact["creationTime"].asString()); in Artifact()
62 std::ostream& operator<<(std::ostream& out, const DeviceBuild& build) { in operator <<()
66 std::ostream& operator<<(std::ostream& out, const DirectoryBuild& build) { in operator <<()
71 std::ostream& operator<<(std::ostream& out, const Build& build) { in operator <<()
72 std::visit([&out](auto&& arg) { out << arg; }, build); in operator <<()
[all …]
Dfetch_cvd.cc39 const std::string DEFAULT_BRANCH = "aosp-master";
40 const std::string DEFAULT_BUILD_TARGET = "aosp_cf_x86_phone-userdebug";
66 const std::string HOST_TOOLS = "cvd-host_package.tar.gz";
67 const std::string OTA_TOOLS = "otatools.zip";
68 const std::string OTA_TOOLS_DIR = "/otatools/";
75 std::string TargetBuildZipFromArtifacts( in TargetBuildZipFromArtifacts()
76 const Build& build, const std::string& name, in TargetBuildZipFromArtifacts()
77 const std::vector<Artifact>& artifacts) { in TargetBuildZipFromArtifacts()
78 std::string product = std::visit([](auto&& arg) { return arg.product; }, build); in TargetBuildZipFromArtifacts()
79 auto id = std::visit([](auto&& arg) { return arg.id; }, build); in TargetBuildZipFromArtifacts()
[all …]
/device/google/cuttlefish/host/frontend/gcastv2/https/include/https/
DHTTPServer.h34 std::shared_ptr<RunLoop> runLoop,
39 const std::optional<std::string> &certificate_pem_path =
40 std::nullopt,
41 const std::optional<std::string> &private_key_pem_path =
42 std::nullopt);
58 std::optional<std::string> mimeType = std::nullopt);
64 std::optional<std::string> mimeType = std::nullopt);
67 std::function<std::pair<int32_t, std::shared_ptr<WebSocketHandler>>()>;
72 std::optional<std::string> certificate_pem_path() const;
73 std::optional<std::string> private_key_pem_path() const;
[all …]
/device/google/cuttlefish/host/libs/vm_manager/
Dvm_manager.h37 static VmManager* Get(const std::string& vm_manager_name,
39 static bool IsValidName(const std::string& name);
40 static std::vector<std::string> ConfigureGpuMode(
41 const std::string& vmm_name, const std::string& gpu_mode);
42 static std::vector<std::string> ConfigureBootDevices(
43 const std::string& vmm_name);
44 static bool IsVmManagerSupported(const std::string& name);
45 static std::vector<std::string> GetValidNames();
50 virtual void WithKernelCommandLine(const std::string&);
56 virtual std::vector<cuttlefish::Command> StartCommands() = 0;
[all …]
/device/google/cuttlefish/host/commands/modem_simulator/unittest/
Dservice_test.cpp28 namespace fs = std::filesystem;
34 static const std::string tmp_test_dir = std::string(fs::temp_directory_path()) +
35 std::string("/cuttlefish_modem_test");
43 std::string config_file = tmp_test_dir + "/.cuttlefish_config.json"; in SetUpTestSuite()
44 std::string instance_dir = tmp_test_dir + "/cuttlefish_runtime.1"; in SetUpTestSuite()
47 std::vector<int> instance_nums; in SetUpTestSuite()
65 std::string icfilename = instance_dir + "/iccprofile_for_sim0.xml"; in SetUpTestSuite()
66 std::ofstream offile(icfilename, std::ofstream::out); in SetUpTestSuite()
67 offile << std::string(myiccfile); in SetUpTestSuite()
88 std::make_unique<ChannelMonitor>(modem_simulator_, server); in SetUpTestSuite()
[all …]
/device/google/cuttlefish/host/commands/modem_simulator/
Dmodem_service.h41 using f_func = std::function<void(const Client&)>; // Full match
42 using p_func = std::function<void(const Client&, std::string&)>; // Partial match
46 CommandHandler(const std::string& command, f_func handler);
47 CommandHandler(const std::string& command, p_func handler);
51 int Compare(const std::string& command) const;
52 void HandleCommand(const Client& client, std::string& command) const;
57 std::string command_prefix;
60 std::optional<f_func> f_command_handler;
61 std::optional<p_func> p_command_handler;
72 bool HandleModemCommand(const Client& client, std::string command);
[all …]
Dpdu_parser.cpp28 static const std::string kWithoutServiceCenterAddress = "00";
29 static const std::string kStatusReportIndicator = "06";
30 static const std::string kSRIAndMMSIndicator = "24"; /* SRI is 1 && MMS is 1*/
31 static const std::string kUDHIAndSRIAndMMSIndicator = "64"; /* UDHI is 1 && SRI is 1 && MMS …
33 PDUParser::PDUParser(std::string &pdu) { in PDUParser()
48 bool PDUParser::DecodePDU(std::string& pdu) { in DecodePDU()
55 std::string_view pdu_view = pdu; in DecodePDU()
59 std::string temp = pdu.substr(0, 2); in DecodePDU()
67 pdu_type_ = pdu_view.substr(std::min(pos, pdu_total_length), 2); in DecodePDU()
71 message_reference_ = pdu_view.substr(std::min(pos, pdu_total_length), 2); in DecodePDU()
[all …]
Dmodem_service.cpp24 const std::string ModemService::kCmeErrorOperationNotAllowed = "+CME ERROR: 3";
25 const std::string ModemService::kCmeErrorOperationNotSupported = "+CME ERROR: 4";
26 const std::string ModemService::kCmeErrorSimNotInserted = "+CME ERROR: 10";
27 const std::string ModemService::kCmeErrorSimPinRequired = "+CME ERROR: 11";
28 const std::string ModemService::kCmeErrorSimPukRequired = "+CME ERROR: 12";
29 const std::string ModemService::kCmeErrorSimBusy = "+CME ERROR: 14";
30 const std::string ModemService::kCmeErrorIncorrectPassword = "+CME ERROR: 16";
31 const std::string ModemService::kCmeErrorMemoryFull = "+CME ERROR: 20";
32 const std::string ModemService::kCmeErrorInvalidIndex = "+CME ERROR: 21";
33 const std::string ModemService::kCmeErrorNotFound = "+CME ERROR: 22";
[all …]
Dmisc_service.cpp28 std::vector<CommandHandler> MiscService::InitializeCommandHandlers() { in InitializeCommandHandlers()
29 std::vector<CommandHandler> command_handlers = { in InitializeCommandHandlers()
65 [this](const Client& client, std::string& cmd) { in InitializeCommandHandlers()
72 void MiscService::HandleGetIMEI(const Client& client, std::string& command) { in HandleGetIMEI()
73 const std::string identityGsmImei = "12345678902468"; in HandleGetIMEI()
74 const std::string identityGsmSvn = "01"; in HandleGetIMEI()
75 const std::string information = "modem simulator"; in HandleGetIMEI()
77 std::vector<std::string> responses; in HandleGetIMEI()
109 auto now = std::time(0); in TimeUpdate()
111 auto local_time = *std::localtime(&now); in TimeUpdate()
[all …]
Dpdu_parser.h24 explicit PDUParser(std::string &pdu);
29 std::string CreatePDU();
30 std::string CreateRemotePDU(std::string& host_port);
31 std::string CreateStatuReport(int message_reference);
32 std::string GetPhoneNumberFromAddress();
34 static std::string BCDToString(std::string& data);
37 bool DecodePDU(std::string& pdu);
38 int Hex2ToByte(const std::string& hex);
40 std::string IntToHexString(int value);
41 std::string GetCurrentTimeStamp();
[all …]
/device/google/cuttlefish/host/frontend/gcastv2/https/
DHTTPServer.cpp39 std::shared_ptr<RunLoop> runLoop, in HTTPServer()
43 const std::optional<std::string> &certificate_pem_path, in HTTPServer()
44 const std::optional<std::string> &private_key_pem_path) in HTTPServer()
48 std::make_shared<ServerSocket>( in HTTPServer()
73 static const std::unordered_map<int32_t, std::string> kStatusMessage { in handleSingleRequest()
87 std::string body; in handleSingleRequest()
88 std::unordered_map<std::string, std::string> responseHeaders; in handleSingleRequest()
101 std::string query; in handleSingleRequest()
104 if (separatorPos != std::string::npos) { in handleSingleRequest()
114 std::lock_guard autoLock(mContentLock); in handleSingleRequest()
[all …]
/device/generic/opengl-transport/host/commands/emugen/
DVar.h29 Var(const std::string & name, in Var()
31 const std::string & lenExpression, in Var()
33 const std::string &packExpression, in Var()
34 const std::string &unpackExpression, in Var()
35 const std::string &writeExpression) : in Var()
49 void init(const std::string name, const VarType * vartype, in init()
50 std::string lenExpression, in init()
52 std::string packExpression, in init()
53 std::string unpackExpression, in init()
54 std::string writeExpression) { in init()
[all …]
DParser.cpp29 static bool parseTypeTokens(const std::string& input, in parseTypeTokens()
30 std::vector<std::string>* out, in parseTypeTokens()
31 std::string* error) { in parseTypeTokens()
40 if (pos == std::string::npos) { in parseTypeTokens()
47 out->push_back(std::string("*")); in parseTypeTokens()
54 if (end == std::string::npos) { in parseTypeTokens()
58 std::string str = input.substr(pos, end - pos); in parseTypeTokens()
80 std::string& token = (*out)[n]; in parseTypeTokens()
95 static std::string buildTypeString(const std::vector<std::string>& tokens, in buildTypeString()
97 std::string result; in buildTypeString()
[all …]
/device/google/cuttlefish/common/libs/utils/
Dnetwork.cpp39 static std::string DefaultHostArtifactsPath(const std::string& file_name) { in DefaultHostArtifactsPath()
60 bool ParseAddress(const std::string& address, const std::string& separator, in ParseAddress()
61 const std::size_t expected_size, int base, std::uint8_t* out) { in ParseAddress()
69 auto out_part = std::stoi(components[i], nullptr, base); in ParseAddress()
75 out[i] = (std::uint8_t) out_part; in ParseAddress()
80 bool ParseMacAddress(const std::string& address, std::uint8_t mac[6]) { in ParseMacAddress()
84 bool ParseIpAddress(const std::string& address, std::uint8_t ip[4]) { in ParseIpAddress()
90 SharedFD OpenTapInterface(const std::string& interface_name) { in OpenTapInterface()
138 std::set<std::string> TapInterfacesInUse() { in TapInterfacesInUse()
142 std::string stdin, stdout, stderr; in TapInterfacesInUse()
[all …]
/device/google/coral/vibrator/tests/
Dtest-hwapi.cpp46 auto name = std::filesystem::path(n); in SetUp()
47 auto path = std::filesystem::path(mFilesDir.path) / name; in SetUp()
48 std::ofstream touch{path}; in SetUp()
52 mHwApi = std::make_unique<HwApi>(); in SetUp()
55 auto name = std::filesystem::path(n); in SetUp()
56 auto path = std::filesystem::path(mEmptyDir.path) / name; in SetUp()
59 mNoApi = std::make_unique<HwApi>(); in SetUp()
67 void expectContent(const std::string &name, const T &value) { in expectContent()
68 mExpectedContent[name] << value << std::endl; in expectContent()
73 void updateContent(const std::string &name, const T &value) { in updateContent()
[all …]
Dtest-hwcal.cpp36 static constexpr std::array<uint32_t, 6> V_DEFAULT = {60, 70, 80, 90, 100, 76};
42 static void pack(std::ostream &stream, const uint32_t &value, std::string lpad, in pack()
43 std::string rpad) { in pack()
47 template <typename T, typename std::array<T, 0>::size_type N>
48 static void pack(std::ostream &stream, const std::array<T, N> &value, std::string lpad, in pack()
49 std::string rpad) { in pack()
56 void createHwCal() { mHwCal = std::make_unique<HwCal>(); } in createHwCal()
59 void write(const std::string key, const T &value, std::string lpad = " ", in write()
60 std::string rpad = "") { in write()
61 std::ofstream calfile{mCalFile.path, std::ios_base::app}; in write()
[all …]
/device/google/wahoo/vibrator/
Dservice.cpp53 static std::string trim(const std::string& str, in trim()
54 const std::string& whitespace = " \t") { in trim()
56 if (str_begin == std::string::npos) { in trim()
67 std::map<std::string, std::string> config_data; in loadCalibrationData()
69 std::ofstream autocal{AUTOCAL_FILEPATH}; in loadCalibrationData()
77 std::ofstream ol_lra_period{OL_LRA_PERIOD_FILEPATH}; in loadCalibrationData()
85 std::ifstream cal_data{CALIBRATION_FILEPATH}; in loadCalibrationData()
93 std::string line; in loadCalibrationData()
95 while (std::getline(cal_data, line)) { in loadCalibrationData()
99 std::istringstream is_line(line); in loadCalibrationData()
[all …]
/device/amlogic/yukawa/hal/bootctrl/
Dbootloader_message.h190 std::string get_bootloader_message_blk_device(std::string* err);
193 bool read_bootloader_message(bootloader_message* boot, std::string* err);
196 bool read_bootloader_message_from(bootloader_message* boot, const std::string& misc_blk_device,
197 std::string* err);
200 bool read_bootloader_control_from(bootloader_control* boot_ctrl, const std::string& misc_blk_device,
201 std::string* err);
204 bool write_bootloader_message(const bootloader_message& boot, std::string* err);
208 const std::string& misc_blk_device, std::string* err);
212 bool write_bootloader_message(const std::vector<std::string>& options, std::string* err);
215 bool write_bootloader_control_to(const bootloader_control* boot_ctrl, const std::string& misc_blk_d…
[all …]
/device/google/cuttlefish/host/frontend/webrtc/lib/
Dws_connection.cpp24 public std::enable_shared_from_this<WsConnectionImpl> {
28 std::weak_ptr<WsConnectionImpl> weak_this;
31 WsConnectionImpl(int port, const std::string& addr, const std::string& path,
33 std::weak_ptr<WsConnectionObserver> observer,
34 std::shared_ptr<WsConnectionContextImpl> context);
43 void OnError(const std::string& error);
62 std::vector<uint8_t> buffer_;
69 const std::string addr_;
70 const std::string path_;
73 std::weak_ptr<WsConnectionObserver> observer_;
[all …]
/device/google/cuttlefish/host/frontend/vnc_server/
Dvnc_client_connection.h39 std::shared_ptr<VirtualInputs> virtual_inputs,
49 std::uint8_t bits_per_pixel;
50 std::uint8_t depth;
51 std::uint8_t big_endian;
52 std::uint8_t true_color;
53 std::uint16_t red_max;
54 std::uint16_t green_max;
55 std::uint16_t blue_max;
56 std::uint8_t red_shift;
57 std::uint8_t green_shift;
[all …]
/device/google/cuttlefish/host/commands/assemble_cvd/
Dimage_aggregator.cc57 MasterBootRecord ProtectiveMbr(std::uint64_t size) { in ProtectiveMbr()
62 .num_sectors = (std::uint32_t) size / SECTOR_SIZE, in ProtectiveMbr()
70 std::uint8_t signature[8];
71 std::uint8_t revision[4];
72 std::uint32_t header_size;
73 std::uint32_t header_crc32;
74 std::uint32_t reserved;
75 std::uint64_t current_lba;
76 std::uint64_t backup_lba;
77 std::uint64_t first_usable_lba;
[all …]
/device/google/crosshatch/vibrator/
Dimpl.cpp47 static std::string trim(const std::string &str, const std::string &whitespace = " \t") { in trim()
49 if (str_begin == std::string::npos) { in trim()
60 std::map<std::string, std::string> config_data; in loadCalibrationData()
62 std::ofstream f0{F0_FILEPATH}; in loadCalibrationData()
67 std::ofstream redc{REDC_FILEPATH}; in loadCalibrationData()
72 std::ifstream cal_data{CALIBRATION_FILEPATH}; in loadCalibrationData()
78 for (std::string line; std::getline(cal_data, line);) { in loadCalibrationData()
82 std::istringstream is_line(line); in loadCalibrationData()
83 std::string key; in loadCalibrationData()
84 if (std::getline(is_line, key, ':')) { in loadCalibrationData()
[all …]

12345678910>>...28