-/* Copyright (c) 2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2019-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
xbt::signal<void(Disk const&)> Disk::on_destruction;
xbt::signal<void(Disk const&)> Disk::on_state_change;
-Disk::Disk(const std::string& name, kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl), name_(name)
+double Disk::get_read_bandwidth() const
{
- Engine::get_instance()->disk_register(name_, this);
+ return this->pimpl_->get_read_bandwidth();
}
-Disk* Disk::by_name(const std::string& name)
+double Disk::get_write_bandwidth() const
{
- return Engine::get_instance()->disk_by_name(name);
+ return pimpl_->get_write_bandwidth();
}
-Disk* Disk::by_name_or_null(const std::string& name)
+Host* Disk::get_host() const
{
- return Engine::get_instance()->disk_by_name_or_null(name);
+ return pimpl_->get_host();
}
const std::unordered_map<std::string, std::string>* Disk::get_properties() const
IoPtr Disk::write_async(sg_size_t size)
{
-
return IoPtr(io_init(size, Io::OpType::WRITE)->start());
}