Motion Master 6.0.0-alpha.111
Next-generation motion control software
Loading...
Searching...
No Matches
soem_mailbox.h
Go to the documentation of this file.
1#pragma once
2
3#include <soem/soem.h>
4
5#include <cstdint>
6#include <vector>
7
9
10namespace mm::comm::soem {
11
31void drainMailbox(ecx_contextt* ctx, uint16_t slavePosition);
32
42void reportUnknownMailboxWrites(ecx_contextt* ctx, uint16_t slavePosition);
43
53std::vector<uint8_t> makeFoeAbortRequest(uint8_t counter);
54
69void abortFoeTransfer(ecx_contextt* ctx, uint16_t slavePosition);
70
84constexpr int kLateFrameTimeoutUs = 100'000;
85
93void updateMailboxSyncManagers(ecx_contextt* ctx, uint16_t slave, EtherCatState targetState);
94
95} // namespace mm::comm::soem
Definition soem_fieldbus_driver.cc:35
void reportUnknownMailboxWrites(ecx_contextt *ctx, uint16_t slavePosition)
Logs the mailbox writes to a slave that got no frame back, and resets their count.
Definition soem_mailbox.cc:27
void updateMailboxSyncManagers(ecx_contextt *ctx, uint16_t slave, EtherCatState targetState)
Programs the mailbox sync managers of a slave for targetState.
Definition soem_mailbox.cc:102
std::vector< uint8_t > makeFoeAbortRequest(uint8_t counter)
Builds an FoE ERROR request, which aborts a slave's FoE transfer.
Definition soem_mailbox.cc:38
void drainMailbox(ecx_contextt *ctx, uint16_t slavePosition)
Discards whatever is sitting in a slave's read mailbox, ignoring the contents.
Definition soem_mailbox.cc:12
void abortFoeTransfer(ecx_contextt *ctx, uint16_t slavePosition)
Ends the FoE transfer a slave may still have in progress.
Definition soem_mailbox.cc:66
constexpr int kLateFrameTimeoutUs
How long a register read or write that a state change depends on waits for its frame,...
Definition soem_mailbox.h:84
EtherCatState
EtherCAT Application Layer state values.
Definition fieldbus_driver.h:45