Files
PX4-Autopilot/dsdl/uavcan/protocol/file/584.Write.uavcan
T
2014-06-15 21:10:36 +04:00

26 lines
1.1 KiB
Plaintext

#
# Write a remote file.
# The server shall place the contents of the field 'data' into the file pointed by 'path' at the offset specified by
# the field 'offset'.
#
# When writing a file, the client should repeatedly call this service with data while advancing offset until the file
# is written completely. Then the client shall call the service one last time, with the offset equal the size of the
# file and the data field empty, which will signal the server that the write operation is complete.
#
# When the write operation is complete, the server shall truncate the resulting file past the specified offset.
#
# Server implementation advice:
# It is recommended to implement proper handling of concurrent writes to the same file from different clients, for
# example by means of creating a staging area for uncompleted writes (like FTP servers do). Then the write-complete
# calls (with empty data fields, as described above) will trigger the server to move the file from the staging area
# to the proper location specified by 'path'.
#
uint32 offset
Path path
uint8[<=200] data
---
Error error