Skip to content
Snippets Groups Projects
Commit 89b2fa2b authored by Beat Küng's avatar Beat Küng
Browse files

microRTPS_transport.h: add clarifying comment for Transport_node::write()

parent 13a3791c
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,22 @@ public:
virtual int init() {return 0;}
virtual uint8_t close() {return 0;}
ssize_t read(uint8_t *topic_ID, char out_buffer[], size_t buffer_len);
/**
* write a buffer
* @param topic_ID
* @param buffer buffer to write: it must leave get_header_length() bytes free at the beginning. This will be
* filled with the header. length does not include get_header_length(). So buffer looks like this:
* -------------------------------------------------
* | header (leave free) | payload data |
* | get_header_length() bytes | length bytes |
* -------------------------------------------------
* @param length buffer length excluding header length
* @return length on success, <0 on error
*/
ssize_t write(const uint8_t topic_ID, char buffer[], size_t length);
/* Get the Length of struct Header to make headroom for the size of struct Header alongwith payload*/
/** Get the Length of struct Header to make headroom for the size of struct Header along with payload */
ssize_t get_header_length();
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment