-
Notifications
You must be signed in to change notification settings - Fork 91
write to robot
In DDE, robot.js, the Dexter.write_to_robot function writes file data to the Dexter filesystem via the capital 'W' oplet. The code currently starts at: https://github.com/cfry/dde/blob/master/robot.js#L1479
Subcommands:
- f: File name. e.g.
make_ins("W", "f", 0, file_name) - s: Start file data.
make_ins("W", "s", max_content_chars, a_string.substring(next_start_index, max_content_chars)) - m: Middle file data.
make_ins("W", "m", max_content_chars, a_string.substring(next_start_index, next_start_index + max_content_chars)) - e: End File data.
make_ins("W", "e", chars_left, a_string.substring(next_start_index, a_string.length))
In the original version, there is no function in the DexRun.c Firmware to process these commands on the Dexter side. That has been added in this release: https://github.com/HaddingtonDynamics/Dexter/commit/ef39cfe6effd36faeb9bd96b21a11a3dcd6b84ef
In the future, subcommands to retrieve file data will also be needed. Suggestions:
- f: File name. As above to set the file name or directory path to be read
- r: Read data. Reads the next block of data. Dexter will return an error when an attempt is made to read past end of file.
At this time, DexRun.c only returns the robot status data to DDE, and DDE only expects status data, so both will have to be extended to handle returned file data.
To search the Wiki, use the main search box in the black bar at the top, then select WiKi to filter the results or go to https://github.com/HaddingtonDynamics/Dexter/search?type=Wikis&q= and then add your search terms to the end of the URL.
To report errors, or request additional data, please chat with us on discord and/or raise a new issue