Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
mm::node::OsCommandFsBuffer Struct Reference

An OS command's fs-buffer transfer — the data that does not fit in the 8 command bytes. More...

#include <somanet_drive.h>

Collaboration diagram for mm::node::OsCommandFsBuffer:
[legend]

Public Attributes

FsBufferTransfer transfer {FsBufferTransfer::kNone}
 What to move; kNone moves nothing.
 
std::vector< uint8_t > payload
 What to send. Read by kWrite, ignored otherwise.
 

Detailed Description

An OS command's fs-buffer transfer — the data that does not fit in the 8 command bytes.

**fs-buffer is not a file, and the difference is not cosmetic.** The firmware routes the transfer to 2024 bytes of memory shared with the command that is running. The command writes into that memory as the master reads it out, or reads out of it as the master writes in. Three rules follow, and none of them is the caller's choice:

  • The transfer runs while the command runs. It is issued after the write to 0x1023:01 and before the response is read, because the command does not report a terminal status until all the data has moved. More data than 2024 bytes cannot be held: the drive stops and waits for the master to move the next part. A transfer that waited for the command to finish would therefore never finish either, on exactly the commands that need one.
  • You cannot ask for part of the memory, and it does not last. The transfer carries no offset and no length: what it moves is whatever the running command put there. The firmware clears the memory 2.5 seconds after the command stops using it. So a transfer belongs to one run of one command, and is not a step a caller can take afterwards.
  • It needs firmware 5.2 or newer. Older firmware cannot move data while a command runs. It requires the data to be written before the command instead, and that older way is deliberately not implemented here.

A failed transfer does not, on its own, end the command: see SomanetDrive::runOsCommand.

Member Data Documentation

◆ payload

std::vector<uint8_t> mm::node::OsCommandFsBuffer::payload

What to send. Read by kWrite, ignored otherwise.

◆ transfer

FsBufferTransfer mm::node::OsCommandFsBuffer::transfer {FsBufferTransfer::kNone}

What to move; kNone moves nothing.


The documentation for this struct was generated from the following file: