Device: Add logical disk size accessor

This commit is contained in:
Paul Hollinsky
2022-02-28 01:49:50 -05:00
parent 0b27e88da1
commit f8a46b7196
12 changed files with 155 additions and 4 deletions
+22
View File
@@ -176,6 +176,28 @@ public:
optional<uint64_t> writeLogicalDisk(uint64_t pos, const uint8_t* from, uint64_t amount,
std::chrono::milliseconds timeout = Disk::DefaultTimeout);
/**
* Check if the logical disk is connected. This means the disk is inserted,
* and if required (for instance for multi-card configurations), configured
* properly.
*
* This method is synchronous and contacts the device for the latest status.
*
* `icsneo::nullopt` will be returned if the device does not respond in a
* timely manner.
*/
optional<bool> isLogicalDiskConnected();
/**
* Get the size of the connected logical disk in bytes.
*
* This method is synchronous and contacts the device for the latest status.
*
* `icsneo::nullopt` will be returned if the device does not respond in a
* timely manner, or if the disk is disconnected/improperly configured.
*/
optional<uint64_t> getLogicalDiskSize();
/**
* Retrieve the number of Ethernet (DoIP) Activation lines present
* on this device.