#include <file_server.hpp>
Public Types | |
enum | { ReadSize = protocol::file::Read::Response::FieldTypes::data::MaxSize } |
typedef protocol::file::EntryType | EntryType |
typedef protocol::file::Error | Error |
typedef protocol::file::Path::FieldTypes::path | Path |
Public Member Functions | |
virtual int16_t | getDirectoryEntryInfo (const Path &directory_path, const uint32_t entry_index, EntryType &out_type, Path &out_entry_full_path) |
virtual int16_t | getInfo (const Path &path, uint64_t &out_size, EntryType &out_type)=0 |
virtual int16_t | read (const Path &path, const uint64_t offset, uint8_t *out_buffer, uint16_t &inout_size)=0 |
virtual int16_t | remove (const Path &path) |
virtual int16_t | write (const Path &path, const uint64_t offset, const uint8_t *buffer, const uint16_t size) |
virtual | ~IFileServerBackend () |
Static Public Member Functions | |
static char | getPathSeparator () |
The file server backend should implement this interface. Note that error codes returned by these methods are defined in uavcan.protocol.file.Error; these are not the same as libuavcan-internal error codes defined in uavcan.error.hpp.
Definition at line 26 of file file_server.hpp.
typedef protocol::file::EntryType uavcan::IFileServerBackend::EntryType |
Definition at line 30 of file file_server.hpp.
typedef protocol::file::Error uavcan::IFileServerBackend::Error |
Definition at line 31 of file file_server.hpp.
typedef protocol::file::Path::FieldTypes::path uavcan::IFileServerBackend::Path |
Definition at line 29 of file file_server.hpp.
anonymous enum |
All read operations must return this number of bytes, unless end of file is reached.
Enumerator | |
---|---|
ReadSize |
Definition at line 36 of file file_server.hpp.
|
inlinevirtual |
Definition at line 103 of file file_server.hpp.
|
inlinevirtual |
Backend for uavcan.protocol.file.GetDirectoryEntryInfo. Refer to uavcan.protocol.file.EntryType for the list of available bit flags. Implementation of this method is NOT required; by default it returns uavcan.protocol.file.Error.NOT_IMPLEMENTED. On success the method must return zero.
Definition at line 93 of file file_server.hpp.
|
pure virtual |
Backend for uavcan.protocol.file.GetInfo. Refer to uavcan.protocol.file.EntryType for the list of available bit flags. Implementation of this method is required. On success the method must return zero.
|
inlinestatic |
Shortcut for uavcan.protocol.file.Path.SEPARATOR.
Definition at line 41 of file file_server.hpp.
|
pure virtual |
Backend for uavcan.protocol.file.Read. Implementation of this method is required. inout_size is set to ReadSize; read operation is required to return exactly this amount, except if the end of file is reached. On success the method must return zero.
Backend for uavcan.protocol.file.Delete. ('delete' is a C++ keyword, so 'remove' is used instead) Implementation of this method is NOT required; by default it returns uavcan.protocol.file.Error.NOT_IMPLEMENTED. On success the method must return zero.
Definition at line 81 of file file_server.hpp.
|
inlinevirtual |
Backend for uavcan.protocol.file.Write. Implementation of this method is NOT required; by default it returns uavcan.protocol.file.Error.NOT_IMPLEMENTED. On success the method must return zero.
Definition at line 67 of file file_server.hpp.