Lely core libraries  2.3.4
lely::canopen::LssMaster Class Reference

The base class for CANopen LSS masters. More...

#include <lss_master.hpp>

Inheritance diagram for lely::canopen::LssMaster:
Collaboration diagram for lely::canopen::LssMaster:

Data Structures

struct  Impl_
 

Public Member Functions

 LssMaster (ev_exec_t *exec, Node &node, io::CanControllerBase *ctrl=nullptr)
 Creates a new CANopen LSS master. More...
 
 LssMaster (Node &node, io::CanControllerBase *ctrl=nullptr)
 Creates a new CANopen LSS master.
 
ev::Executor GetExecutor () const noexcept
 Returns the default executor used to execute completion tasks of LSS requests.
 
NodeGetNode () const noexcept
 Returns the CANopen master node.
 
io::CanControllerBaseGetController () const noexcept
 Returns the pointer to the CAN controller for this node passed to the constructor (may be a null pointer).
 
::std::chrono::microseconds GetInhibit () const
 Returns the inhibit time between successive CAN frames. More...
 
void SetInhibit (const ::std::chrono::microseconds &inhibit)
 Sets the inhibit time between successive CAN frames. More...
 
::std::chrono::milliseconds GetTimeout () const
 Returns the timeout when waiting for a slave to respond to an LSS request. More...
 
void SetTimeout (const ::std::chrono::milliseconds &timeout)
 Sets the timeout when waiting for a slave to respond to an LSS request. More...
 
void SubmitSwitch (detail::LssSwitchRequestBase &req, LssState state=LssState::WAITING)
 Queues an LSS 'switch state global' request. More...
 
template<class F >
void SubmitSwitch (ev_exec_t *exec, LssState state, F &&con)
 Creates and queues an LSS 'switch state global' request. More...
 
template<class F >
void SubmitSwitch (LssState state, F &&con)
 Equivalent to SubmitSwitch(nullptr, state, con).
 
bool CancelSwitch (detail::LssSwitchRequestBase &req)
 Cancels an LSS 'switch state global' request. More...
 
bool AbortSwitch (detail::LssSwitchRequestBase &req)
 Aborts an LSS 'switch state global' request. More...
 
LssFuture< void > AsyncSwitch (ev_exec_t *exec, LssState state=LssState::WAITING, detail::LssSwitchRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'switch state global' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< void > AsyncSwitch (LssState state=LssState::WAITING, detail::LssSwitchRequestBase **preq=nullptr)
 Equivalent to AsyncSwitch(nullptr, state, preq).
 
void SubmitSwitchSelective (detail::LssSwitchSelectiveRequestBase &req, const LssAddress &address)
 Queues an LSS 'switch state selective' request. More...
 
template<class F >
void SubmitSwitchSelective (ev_exec_t *exec, const LssAddress &address, F &&con)
 Creates and queues an LSS 'switch state selective' request. More...
 
template<class F >
void SubmitSwitchSelective (const LssAddress &address, F &&con)
 Equivalent to SubmitSwitchSelective(nullptr, state, con).
 
bool CancelSwitchSelective (detail::LssSwitchSelectiveRequestBase &req)
 Cancels an LSS 'switch state selective' request. More...
 
bool AbortSwitchSelective (detail::LssSwitchSelectiveRequestBase &req)
 Aborts an LSS 'switch state selective' request. More...
 
LssFuture< void > AsyncSwitchSelective (ev_exec_t *exec, const LssAddress &address, detail::LssSwitchSelectiveRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'switch state selective' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< void > AsyncSwitchSelective (const LssAddress &address, detail::LssSwitchSelectiveRequestBase **preq=nullptr)
 Equivalent to AsyncSwitchSelective(nullptr, address, preq).
 
void SubmitSetId (detail::LssSetIdRequestBase &req, uint8_t id)
 Queues an LSS 'configure node-ID' request. More...
 
template<class F >
void SubmitSetId (ev_exec_t *exec, uint8_t id, F &&con)
 Creates and queues an LSS 'configure node-ID' request. More...
 
template<class F >
void SubmitSetId (uint8_t id, F &&con)
 Equivalent to SubmitSetId(nullptr, id, con).
 
bool CancelSetId (detail::LssSetIdRequestBase &req)
 Cancels an LSS 'configure node-ID' request. More...
 
bool AbortSetId (detail::LssSetIdRequestBase &req)
 Aborts an LSS 'configure node-ID' request. More...
 
LssFuture< void > AsyncSetId (ev_exec_t *exec, uint8_t id, detail::LssSetIdRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'configure node-ID' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< void > AsyncSetId (uint8_t id, detail::LssSetIdRequestBase **preq=nullptr)
 Equivalent to AsyncSetId(nullptr, id, preq).
 
void SubmitSetBitrate (detail::LssSetBitrateRequestBase &req, int bitrate)
 Queues an LSS 'configure bit timing parameters' request. More...
 
template<class F >
void SubmitSetBitrate (ev_exec_t *exec, int bitrate, F &&con)
 Creates and queues an LSS 'configure bit timing parameters' request. More...
 
template<class F >
void SubmitSetBitrate (int bitrate, F &&con)
 Equivalent to SubmitSetBitrate(nullptr, id, con).
 
bool CancelSetBitrate (detail::LssSetBitrateRequestBase &req)
 Cancels an LSS 'configure bit timing parameters' request. More...
 
bool AbortSetBitrate (detail::LssSetBitrateRequestBase &req)
 Aborts an LSS 'configure bit timing parameters' request. More...
 
LssFuture< void > AsyncSetBitrate (ev_exec_t *exec, int bitrate, detail::LssSetBitrateRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'configure bit timing parameters' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< void > AsyncSetBitrate (int bitrate, detail::LssSetBitrateRequestBase **preq=nullptr)
 Equivalent to AsyncSetBitrate(nullptr, id, preq).
 
void SubmitSwitchBitrate (detail::LssSwitchBitrateRequestBase &req, int delay)
 Queues an LSS 'activate bit timing parameters' request. More...
 
template<class F >
void SubmitSwitchBitrate (ev_exec_t *exec, int delay, F &&con)
 Creates and queues an LSS 'activate bit timing parameters' request. More...
 
template<class F >
void SubmitSwitchBitrate (int delay, F &&con)
 Equivalent to SubmitSwitchBitrate(nullptr, id, con).
 
bool CancelSwitchBitrate (detail::LssSwitchBitrateRequestBase &req)
 Cancels an LSS 'activate bit timing parameters' request. More...
 
bool AbortSwitchBitrate (detail::LssSwitchBitrateRequestBase &req)
 Aborts an LSS 'activate bit timing parameters' request. More...
 
LssFuture< void > AsyncSwitchBitrate (ev_exec_t *exec, int delay, detail::LssSwitchBitrateRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'activate bit timing parameters' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< void > AsyncSwitchBitrate (int delay, detail::LssSwitchBitrateRequestBase **preq=nullptr)
 Equivalent to AsyncSwitchBitrate(nullptr, id, preq).
 
void SubmitStore (detail::LssStoreRequestBase &req)
 Queues an LSS 'store configuration' request. More...
 
template<class F >
void SubmitStore (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'store configuration' request. More...
 
template<class F >
void SubmitStore (F &&con)
 Equivalent to SubmitStore(nullptr, con).
 
bool CancelStore (detail::LssStoreRequestBase &req)
 Cancels an LSS 'store configuration' request. More...
 
bool AbortStore (detail::LssStoreRequestBase &req)
 Aborts an LSS 'store configuration' request. More...
 
LssFuture< void > AsyncStore (ev_exec_t *exec, detail::LssStoreRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'store configuration' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< void > AsyncStore (detail::LssStoreRequestBase **preq=nullptr)
 Equivalent to AsyncStore(nullptr, preq).
 
void SubmitGetVendorId (detail::LssGetVendorIdRequestBase &req)
 Queues an LSS 'inquire identity vendor-ID' request. More...
 
template<class F >
void SubmitGetVendorId (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'inquire identity vendor-ID' request. More...
 
template<class F >
void SubmitGetVendorId (F &&con)
 Equivalent to SubmitGetVendorId(nullptr, con).
 
bool CancelGetVendorId (detail::LssGetVendorIdRequestBase &req)
 Cancels an LSS 'inquire identity vendor-ID' request. More...
 
bool AbortGetVendorId (detail::LssGetVendorIdRequestBase &req)
 Aborts an LSS 'inquire identity vendor-ID' request. More...
 
LssFuture< uint32_t > AsyncGetVendorId (ev_exec_t *exec, detail::LssGetVendorIdRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'inquire identity vendor-ID' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< uint32_t > AsyncGetVendorId (detail::LssGetVendorIdRequestBase **preq=nullptr)
 Equivalent to AsyncGetVendorId(nullptr, preq).
 
void SubmitGetProductCode (detail::LssGetProductCodeRequestBase &req)
 Queues an LSS 'inquire identity product-code' request. More...
 
template<class F >
void SubmitGetProductCode (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'inquire identity product-code' request. More...
 
template<class F >
void SubmitGetProductCode (F &&con)
 Equivalent to SubmitGetProductCode(nullptr, con).
 
bool CancelGetProductCode (detail::LssGetProductCodeRequestBase &req)
 Cancels an LSS 'inquire identity product-code' request. More...
 
bool AbortGetProductCode (detail::LssGetProductCodeRequestBase &req)
 Aborts an LSS 'inquire identity product-code' request. More...
 
LssFuture< uint32_t > AsyncGetProductCode (ev_exec_t *exec, detail::LssGetProductCodeRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'inquire identity product-code' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< uint32_t > AsyncGetProductCode (detail::LssGetProductCodeRequestBase **preq=nullptr)
 Equivalent to AsyncGetProductCode(nullptr, preq).
 
void SubmitGetRevision (detail::LssGetRevisionRequestBase &req)
 Queues an LSS 'inquire identity revision-number' request. More...
 
template<class F >
void SubmitGetRevision (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'inquire identity revision-number' request. More...
 
template<class F >
void SubmitGetRevision (F &&con)
 Equivalent to SubmitGetRevision(nullptr, con).
 
bool CancelGetRevision (detail::LssGetRevisionRequestBase &req)
 Cancels an LSS 'inquire identity revision-number' request. More...
 
bool AbortGetRevision (detail::LssGetRevisionRequestBase &req)
 Aborts an LSS 'inquire identity revision-number' request. More...
 
LssFuture< uint32_t > AsyncGetRevision (ev_exec_t *exec, detail::LssGetRevisionRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'inquire identity revision-number' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< uint32_t > AsyncGetRevision (detail::LssGetRevisionRequestBase **preq=nullptr)
 Equivalent to AsyncGetRevision(nullptr, preq).
 
void SubmitGetSerialNr (detail::LssGetSerialNrRequestBase &req)
 Queues an LSS 'inquire identity serial-number' request. More...
 
template<class F >
void SubmitGetSerialNr (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'inquire identity serial-number' request. More...
 
template<class F >
void SubmitGetSerialNr (F &&con)
 Equivalent to SubmitGetSerialNr(nullptr, con).
 
bool CancelGetSerialNr (detail::LssGetSerialNrRequestBase &req)
 Cancels an LSS 'inquire identity serial-number' request. More...
 
bool AbortGetSerialNr (detail::LssGetSerialNrRequestBase &req)
 Aborts an LSS 'inquire identity serial-number' request. More...
 
LssFuture< uint32_t > AsyncGetSerialNr (ev_exec_t *exec, detail::LssGetSerialNrRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'inquire identity serial-number' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< uint32_t > AsyncGetSerialNr (detail::LssGetSerialNrRequestBase **preq=nullptr)
 Equivalent to AsyncGetSerialNr(nullptr, preq).
 
void SubmitGetId (detail::LssGetIdRequestBase &req)
 Queues an LSS 'inquire node-ID' request. More...
 
template<class F >
void SubmitGetId (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'inquire node-ID' request. More...
 
template<class F >
void SubmitGetId (F &&con)
 Equivalent to SubmitGetId(nullptr, con).
 
bool CancelGetId (detail::LssGetIdRequestBase &req)
 Cancels an LSS 'inquire node-ID' request. More...
 
bool AbortGetId (detail::LssGetIdRequestBase &req)
 Aborts an LSS 'inquire node-ID' request. More...
 
LssFuture< uint8_t > AsyncGetId (ev_exec_t *exec, detail::LssGetIdRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'inquire node-ID' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< uint8_t > AsyncGetId (detail::LssGetIdRequestBase **preq=nullptr)
 Equivalent to AsyncGetId(nullptr, preq).
 
void SubmitIdNonConfig (detail::LssIdNonConfigRequestBase &req)
 Queues an LSS 'identify non-configured remote slave' request. More...
 
template<class F >
void SubmitIdNonConfig (ev_exec_t *exec, F &&con)
 Creates and queues an LSS 'identify non-configured remote slave' request. More...
 
template<class F >
void SubmitIdNonConfig (F &&con)
 Equivalent to SubmitIdNonConfig(nullptr, con).
 
bool CancelIdNonConfig (detail::LssIdNonConfigRequestBase &req)
 Cancels an LSS 'identify non-configured remote slave' request. More...
 
bool AbortIdNonConfig (detail::LssIdNonConfigRequestBase &req)
 Aborts an LSS 'identify non-configured remote slave' request. More...
 
LssFuture< bool > AsyncIdNonConfig (ev_exec_t *exec, detail::LssIdNonConfigRequestBase **preq=nullptr)
 Queues an asynchronous LSS 'identify non-configured remote slave' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< bool > AsyncIdNonConfig (detail::LssIdNonConfigRequestBase **preq=nullptr)
 Equivalent to AsyncIdNonConfig(nullptr, preq).
 
void SubmitSlowscan (detail::LssSlowscanRequestBase &req, const LssAddress &lo, const LssAddress &hi)
 Queues an 'LSS Slowscan' request. More...
 
template<class F >
void SubmitSlowscan (ev_exec_t *exec, const LssAddress &lo, const LssAddress &hi, F &&con)
 Creates and queues an 'LSS Slowscan' request. More...
 
template<class F >
void SubmitSlowscan (F &&con)
 Equivalent to SubmitSlowscan(nullptr, con).
 
bool CancelSlowscan (detail::LssSlowscanRequestBase &req)
 Cancels an 'LSS Slowscan' request. More...
 
bool AbortSlowscan (detail::LssSlowscanRequestBase &req)
 Aborts an 'LSS Slowscan' request. More...
 
LssFuture< LssAddressAsyncSlowscan (ev_exec_t *exec, const LssAddress &lo, const LssAddress &hi, detail::LssSlowscanRequestBase **preq=nullptr)
 Queues an asynchronous 'LSS Slowscan' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< LssAddressAsyncSlowscan (const LssAddress &lo, const LssAddress &hi, detail::LssSlowscanRequestBase **preq=nullptr)
 Equivalent to AsyncSlowscan(nullptr, lo, hi, preq).
 
void SubmitFastscan (detail::LssFastscanRequestBase &req, const LssAddress &address, const LssAddress &mask)
 Queues an 'LSS Fastscan' request. More...
 
template<class F >
void SubmitFastscan (ev_exec_t *exec, const LssAddress &address, const LssAddress &mask, F &&con)
 Creates and queues an 'LSS Fastscan' request. More...
 
template<class F >
void SubmitFastscan (F &&con)
 Equivalent to SubmitFastscan(nullptr, con).
 
bool CancelFastscan (detail::LssFastscanRequestBase &req)
 Cancels an 'LSS Fastscan' request. More...
 
bool AbortFastscan (detail::LssFastscanRequestBase &req)
 Aborts an 'LSS Fastscan' request. More...
 
LssFuture< LssAddressAsyncFastscan (ev_exec_t *exec, const LssAddress &address={0, 0, 0, 0}, const LssAddress &mask={0, 0, 0, 0}, detail::LssFastscanRequestBase **preq=nullptr)
 Queues an asynchronous 'LSS Fastscan' request and creates a future which becomes ready once the request completes (or is canceled). More...
 
LssFuture< LssAddressAsyncFastscan (const LssAddress &address={0, 0, 0, 0}, const LssAddress &mask={0, 0, 0, 0}, detail::LssFastscanRequestBase **preq=nullptr)
 Equivalent to AsyncFastscan(nullptr, address, mask, preq).
 
void Submit (detail::LssRequestBase &req)
 Queues an LSS request.
 
bool Cancel (detail::LssRequestBase &req)
 Cancels a pending LSS request. More...
 
::std::size_t CancelAll ()
 Cancels all pending LSS requests and stops the ongoing request, if any. More...
 
bool Abort (detail::LssRequestBase &req)
 Aborts a pending LSS request. More...
 
::std::size_t AbortAll ()
 Aborts all pending LSS requests. More...
 
virtual void OnStart (::std::function< void(::std::error_code ec)> res) noexcept
 The function invoked when the LSS master services are executed during the NMT startup process. More...
 
virtual void OnSwitchBitrate (int bitrate, ::std::chrono::milliseconds delay, ::std::function< void(::std::error_code ec)> res) noexcept
 The function invoked when the master activates the bit rate of all CANopen devices in the network. More...
 

Protected Member Functions

void lock () final
 Blocks until a lock can be obtained for the current execution agent (thread, process, task). More...
 
void unlock () final
 Releases the lock held by the execution agent. Throws no exceptions.
 
void SetTime ()
 Update the CAN network time. More...
 

Detailed Description

The base class for CANopen LSS masters.

This class inherits the mutex protecting the corresponding CANopen master node.

Definition at line 1350 of file lss_master.hpp.

Constructor & Destructor Documentation

◆ LssMaster()

lely::canopen::LssMaster::LssMaster ( ev_exec_t exec,
Node node,
io::CanControllerBase ctrl = nullptr 
)
explicit

Creates a new CANopen LSS master.

Parameters
execthe executor used to execute LSS requests. If exec is a null pointer, the executor of the CANopen node is used.
nodea CANopen master node.
ctrla pointer to the CAN controller for node (can be a null pointer).

Definition at line 190 of file lss_master.cpp.

Member Function Documentation

◆ GetInhibit()

std::chrono::microseconds lely::canopen::LssMaster::GetInhibit ( ) const

Returns the inhibit time between successive CAN frames.

See also
SetInhibit()

Definition at line 211 of file lss_master.cpp.

◆ SetInhibit()

void lely::canopen::LssMaster::SetInhibit ( const ::std::chrono::microseconds &  inhibit)

Sets the inhibit time between successive CAN frames.

See also
GetInhibit()

Definition at line 218 of file lss_master.cpp.

◆ GetTimeout()

std::chrono::milliseconds lely::canopen::LssMaster::GetTimeout ( ) const

Returns the timeout when waiting for a slave to respond to an LSS request.

See also
SetTimeout()

Definition at line 232 of file lss_master.cpp.

◆ SetTimeout()

void lely::canopen::LssMaster::SetTimeout ( const ::std::chrono::milliseconds &  timeout)

Sets the timeout when waiting for a slave to respond to an LSS request.

See also
SetTimeout()

Definition at line 238 of file lss_master.cpp.

◆ SubmitSwitch() [1/2]

void lely::canopen::LssMaster::SubmitSwitch ( detail::LssSwitchRequestBase req,
LssState  state = LssState::WAITING 
)
inline

Queues an LSS 'switch state global' request.

This function switches all slave devices to the specified LSS state.

Parameters
reqthe request to be submitted.
statethe desired state of the LSS slave devices.

Definition at line 1431 of file lss_master.hpp.

◆ SubmitSwitch() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitSwitch ( ev_exec_t exec,
LssState  state,
F &&  con 
)
inline

Creates and queues an LSS 'switch state global' request.

This function switches all slave devices to the specified LSS state.

Parameters
execthe executor used to execute the completion task.
statethe desired state of the LSS slave devices.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1448 of file lss_master.hpp.

◆ CancelSwitch()

bool lely::canopen::LssMaster::CancelSwitch ( detail::LssSwitchRequestBase req)
inline

Cancels an LSS 'switch state global' request.

See also
Cancel()

Definition at line 1461 of file lss_master.hpp.

◆ AbortSwitch()

bool lely::canopen::LssMaster::AbortSwitch ( detail::LssSwitchRequestBase req)
inline

Aborts an LSS 'switch state global' request.

See also
Abort()

Definition at line 1467 of file lss_master.hpp.

◆ AsyncSwitch()

LssFuture< void > lely::canopen::LssMaster::AsyncSwitch ( ev_exec_t exec,
LssState  state = LssState::WAITING,
detail::LssSwitchRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'switch state global' request and creates a future which becomes ready once the request completes (or is canceled).

Parameters
execthe executor used to execute the completion task.
statethe desired state of the LSS slave devices.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
an empty future on success, or a future containing an std::system_error on failure.

Definition at line 251 of file lss_master.cpp.

◆ SubmitSwitchSelective() [1/2]

void lely::canopen::LssMaster::SubmitSwitchSelective ( detail::LssSwitchSelectiveRequestBase req,
const LssAddress address 
)
inline

Queues an LSS 'switch state selective' request.

This function switches the slave device with the specified LSS address to the LSS configuration state.

Parameters
reqthe request to be submitted.
addressthe address of the LSS slave device to be switched into the configuration state.

Definition at line 1503 of file lss_master.hpp.

◆ SubmitSwitchSelective() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitSwitchSelective ( ev_exec_t exec,
const LssAddress address,
F &&  con 
)
inline

Creates and queues an LSS 'switch state selective' request.

This function switches the slave device with the specified LSS address to the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
addressthe address of the LSS slave device to be switched into the configuration state.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1522 of file lss_master.hpp.

◆ CancelSwitchSelective()

bool lely::canopen::LssMaster::CancelSwitchSelective ( detail::LssSwitchSelectiveRequestBase req)
inline

Cancels an LSS 'switch state selective' request.

See also
Cancel()

Definition at line 1536 of file lss_master.hpp.

◆ AbortSwitchSelective()

bool lely::canopen::LssMaster::AbortSwitchSelective ( detail::LssSwitchSelectiveRequestBase req)
inline

Aborts an LSS 'switch state selective' request.

See also
Abort()

Definition at line 1542 of file lss_master.hpp.

◆ AsyncSwitchSelective()

LssFuture< void > lely::canopen::LssMaster::AsyncSwitchSelective ( ev_exec_t exec,
const LssAddress address,
detail::LssSwitchSelectiveRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'switch state selective' request and creates a future which becomes ready once the request completes (or is canceled).

Parameters
execthe executor used to execute the completion task.
addressthe address of the LSS slave device to be switched into the configuration state.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
an empty future on success, or a future containing an std::system_error on failure.

Definition at line 266 of file lss_master.cpp.

◆ SubmitSetId() [1/2]

void lely::canopen::LssMaster::SubmitSetId ( detail::LssSetIdRequestBase req,
uint8_t  id 
)
inline

Queues an LSS 'configure node-ID' request.

This function configures the pending node-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
reqthe request to be submitted.
idthe requested pending node-ID of the LSS slave device.

Definition at line 1580 of file lss_master.hpp.

◆ SubmitSetId() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitSetId ( ev_exec_t exec,
uint8_t  id,
F &&  con 
)
inline

Creates and queues an LSS 'configure node-ID' request.

This function configures the pending node-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
idthe requested pending node-ID of the LSS slave device.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1598 of file lss_master.hpp.

◆ CancelSetId()

bool lely::canopen::LssMaster::CancelSetId ( detail::LssSetIdRequestBase req)
inline

Cancels an LSS 'configure node-ID' request.

See also
Cancel()

Definition at line 1611 of file lss_master.hpp.

◆ AbortSetId()

bool lely::canopen::LssMaster::AbortSetId ( detail::LssSetIdRequestBase req)
inline

Aborts an LSS 'configure node-ID' request.

See also
Abort()

Definition at line 1617 of file lss_master.hpp.

◆ AsyncSetId()

LssFuture< void > lely::canopen::LssMaster::AsyncSetId ( ev_exec_t exec,
uint8_t  id,
detail::LssSetIdRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'configure node-ID' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
idthe requested pending node-ID of the LSS slave device.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
an empty future on success, or a future containing an std::system_error on failure.

Definition at line 281 of file lss_master.cpp.

◆ SubmitSetBitrate() [1/2]

void lely::canopen::LssMaster::SubmitSetBitrate ( detail::LssSetBitrateRequestBase req,
int  bitrate 
)
inline

Queues an LSS 'configure bit timing parameters' request.

This function configures the pending bit rate of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
reqthe request to be submitted.
bitratethe requested pending bit rate (in bit/s) of the LSS slave device.

Definition at line 1655 of file lss_master.hpp.

◆ SubmitSetBitrate() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitSetBitrate ( ev_exec_t exec,
int  bitrate,
F &&  con 
)
inline

Creates and queues an LSS 'configure bit timing parameters' request.

This function configures the pending bit rate of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
bitratethe requested pending bit rate (in bit/s) of the LSS slave device.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1674 of file lss_master.hpp.

◆ CancelSetBitrate()

bool lely::canopen::LssMaster::CancelSetBitrate ( detail::LssSetBitrateRequestBase req)
inline

Cancels an LSS 'configure bit timing parameters' request.

See also
Cancel()

Definition at line 1688 of file lss_master.hpp.

◆ AbortSetBitrate()

bool lely::canopen::LssMaster::AbortSetBitrate ( detail::LssSetBitrateRequestBase req)
inline

Aborts an LSS 'configure bit timing parameters' request.

See also
Abort()

Definition at line 1694 of file lss_master.hpp.

◆ AsyncSetBitrate()

LssFuture< void > lely::canopen::LssMaster::AsyncSetBitrate ( ev_exec_t exec,
int  bitrate,
detail::LssSetBitrateRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'configure bit timing parameters' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
bitratethe requested pending bit rate (in bit/s) of the LSS slave device.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
an empty future on success, or a future containing an std::system_error on failure.

Definition at line 296 of file lss_master.cpp.

◆ SubmitSwitchBitrate() [1/2]

void lely::canopen::LssMaster::SubmitSwitchBitrate ( detail::LssSwitchBitrateRequestBase req,
int  delay 
)
inline

Queues an LSS 'activate bit timing parameters' request.

This function configures the pending bit rate of an LSS slave device. It is the responsibility of the caller to ensure that all slave devices are in the LSS configuration state.

Parameters
reqthe request to be submitted.
delaythe requested pending bit rate (in bit/s) of the LSS slave device.

Definition at line 1735 of file lss_master.hpp.

◆ SubmitSwitchBitrate() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitSwitchBitrate ( ev_exec_t exec,
int  delay,
F &&  con 
)
inline

Creates and queues an LSS 'activate bit timing parameters' request.

This function activates the bit rate of all CANopen devices in the network. It is the responsibility of the caller to ensure that all slave devices are in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
delaythe delay (in milliseconds) before and after the switch, during which CAN frames MUST NOT be sent.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1754 of file lss_master.hpp.

◆ CancelSwitchBitrate()

bool lely::canopen::LssMaster::CancelSwitchBitrate ( detail::LssSwitchBitrateRequestBase req)
inline

Cancels an LSS 'activate bit timing parameters' request.

See also
Cancel()

Definition at line 1768 of file lss_master.hpp.

◆ AbortSwitchBitrate()

bool lely::canopen::LssMaster::AbortSwitchBitrate ( detail::LssSwitchBitrateRequestBase req)
inline

Aborts an LSS 'activate bit timing parameters' request.

See also
Abort()

Definition at line 1774 of file lss_master.hpp.

◆ AsyncSwitchBitrate()

LssFuture<void> lely::canopen::LssMaster::AsyncSwitchBitrate ( ev_exec_t exec,
int  delay,
detail::LssSwitchBitrateRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'activate bit timing parameters' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that all slave devices are in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
delaythe delay (in milliseconds) before and after the switch, during which CAN frames MUST NOT be sent.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
an empty future on success, or a future containing an std::system_error on failure.

◆ SubmitStore() [1/2]

void lely::canopen::LssMaster::SubmitStore ( detail::LssStoreRequestBase req)
inline

Queues an LSS 'store configuration' request.

This function configures the pending node-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Definition at line 1811 of file lss_master.hpp.

◆ SubmitStore() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitStore ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'store configuration' request.

This function configures the pending node-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1827 of file lss_master.hpp.

◆ CancelStore()

bool lely::canopen::LssMaster::CancelStore ( detail::LssStoreRequestBase req)
inline

Cancels an LSS 'store configuration' request.

See also
Cancel()

Definition at line 1840 of file lss_master.hpp.

◆ AbortStore()

bool lely::canopen::LssMaster::AbortStore ( detail::LssStoreRequestBase req)
inline

Aborts an LSS 'store configuration' request.

See also
Abort()

Definition at line 1846 of file lss_master.hpp.

◆ AsyncStore()

LssFuture< void > lely::canopen::LssMaster::AsyncStore ( ev_exec_t exec,
detail::LssStoreRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'store configuration' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
an empty future on success, or a future containing an std::system_error on failure.

Definition at line 311 of file lss_master.cpp.

◆ SubmitGetVendorId() [1/2]

void lely::canopen::LssMaster::SubmitGetVendorId ( detail::LssGetVendorIdRequestBase req)
inline

Queues an LSS 'inquire identity vendor-ID' request.

This function inquires the vendor-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Definition at line 1879 of file lss_master.hpp.

◆ SubmitGetVendorId() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitGetVendorId ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'inquire identity vendor-ID' request.

This function inquires the vendor-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1895 of file lss_master.hpp.

◆ CancelGetVendorId()

bool lely::canopen::LssMaster::CancelGetVendorId ( detail::LssGetVendorIdRequestBase req)
inline

Cancels an LSS 'inquire identity vendor-ID' request.

See also
Cancel()

Definition at line 1908 of file lss_master.hpp.

◆ AbortGetVendorId()

bool lely::canopen::LssMaster::AbortGetVendorId ( detail::LssGetVendorIdRequestBase req)
inline

Aborts an LSS 'inquire identity vendor-ID' request.

See also
Abort()

Definition at line 1914 of file lss_master.hpp.

◆ AsyncGetVendorId()

LssFuture< uint32_t > lely::canopen::LssMaster::AsyncGetVendorId ( ev_exec_t exec,
detail::LssGetVendorIdRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'inquire identity vendor-ID' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the vendor-ID on success, or an std::system_error on failure.

Definition at line 323 of file lss_master.cpp.

◆ SubmitGetProductCode() [1/2]

void lely::canopen::LssMaster::SubmitGetProductCode ( detail::LssGetProductCodeRequestBase req)
inline

Queues an LSS 'inquire identity product-code' request.

This function inquires the product code of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Definition at line 1947 of file lss_master.hpp.

◆ SubmitGetProductCode() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitGetProductCode ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'inquire identity product-code' request.

This function inquires the product code of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1963 of file lss_master.hpp.

◆ CancelGetProductCode()

bool lely::canopen::LssMaster::CancelGetProductCode ( detail::LssGetProductCodeRequestBase req)
inline

Cancels an LSS 'inquire identity product-code' request.

See also
Cancel()

Definition at line 1976 of file lss_master.hpp.

◆ AbortGetProductCode()

bool lely::canopen::LssMaster::AbortGetProductCode ( detail::LssGetProductCodeRequestBase req)
inline

Aborts an LSS 'inquire identity product-code' request.

See also
Abort()

Definition at line 1982 of file lss_master.hpp.

◆ AsyncGetProductCode()

LssFuture< uint32_t > lely::canopen::LssMaster::AsyncGetProductCode ( ev_exec_t exec,
detail::LssGetProductCodeRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'inquire identity product-code' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the product code on success, or an std::system_error on failure.

Definition at line 340 of file lss_master.cpp.

◆ SubmitGetRevision() [1/2]

void lely::canopen::LssMaster::SubmitGetRevision ( detail::LssGetRevisionRequestBase req)
inline

Queues an LSS 'inquire identity revision-number' request.

This function inquires the revision number of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Definition at line 2015 of file lss_master.hpp.

◆ SubmitGetRevision() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitGetRevision ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'inquire identity revision-number' request.

This function inquires the revision number of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 2031 of file lss_master.hpp.

◆ CancelGetRevision()

bool lely::canopen::LssMaster::CancelGetRevision ( detail::LssGetRevisionRequestBase req)
inline

Cancels an LSS 'inquire identity revision-number' request.

See also
Cancel()

Definition at line 2044 of file lss_master.hpp.

◆ AbortGetRevision()

bool lely::canopen::LssMaster::AbortGetRevision ( detail::LssGetRevisionRequestBase req)
inline

Aborts an LSS 'inquire identity revision-number' request.

See also
Abort()

Definition at line 2050 of file lss_master.hpp.

◆ AsyncGetRevision()

LssFuture< uint32_t > lely::canopen::LssMaster::AsyncGetRevision ( ev_exec_t exec,
detail::LssGetRevisionRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'inquire identity revision-number' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the revision number on success, or an std::system_error on failure.

Definition at line 357 of file lss_master.cpp.

◆ SubmitGetSerialNr() [1/2]

void lely::canopen::LssMaster::SubmitGetSerialNr ( detail::LssGetSerialNrRequestBase req)
inline

Queues an LSS 'inquire identity serial-number' request.

This function inquires the serial number of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Definition at line 2083 of file lss_master.hpp.

◆ SubmitGetSerialNr() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitGetSerialNr ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'inquire identity serial-number' request.

This function inquires the serial number of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 2099 of file lss_master.hpp.

◆ CancelGetSerialNr()

bool lely::canopen::LssMaster::CancelGetSerialNr ( detail::LssGetSerialNrRequestBase req)
inline

Cancels an LSS 'inquire identity serial-number' request.

See also
Cancel()

Definition at line 2112 of file lss_master.hpp.

◆ AbortGetSerialNr()

bool lely::canopen::LssMaster::AbortGetSerialNr ( detail::LssGetSerialNrRequestBase req)
inline

Aborts an LSS 'inquire identity serial-number' request.

See also
Abort()

Definition at line 2118 of file lss_master.hpp.

◆ AsyncGetSerialNr()

LssFuture< uint32_t > lely::canopen::LssMaster::AsyncGetSerialNr ( ev_exec_t exec,
detail::LssGetSerialNrRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'inquire identity serial-number' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the serial number on success, or an std::system_error on failure.

Definition at line 374 of file lss_master.cpp.

◆ SubmitGetId() [1/2]

void lely::canopen::LssMaster::SubmitGetId ( detail::LssGetIdRequestBase req)
inline

Queues an LSS 'inquire node-ID' request.

This function inquires the active node-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Definition at line 2150 of file lss_master.hpp.

◆ SubmitGetId() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitGetId ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'inquire node-ID' request.

This function inquires the active node-ID of an LSS slave device. It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 2166 of file lss_master.hpp.

◆ CancelGetId()

bool lely::canopen::LssMaster::CancelGetId ( detail::LssGetIdRequestBase req)
inline

Cancels an LSS 'inquire node-ID' request.

See also
Cancel()

Definition at line 2179 of file lss_master.hpp.

◆ AbortGetId()

bool lely::canopen::LssMaster::AbortGetId ( detail::LssGetIdRequestBase req)
inline

Aborts an LSS 'inquire node-ID' request.

See also
Abort()

Definition at line 2185 of file lss_master.hpp.

◆ AsyncGetId()

LssFuture< uint8_t > lely::canopen::LssMaster::AsyncGetId ( ev_exec_t exec,
detail::LssGetIdRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'inquire node-ID' request and creates a future which becomes ready once the request completes (or is canceled).

It is the responsibility of the caller to ensure that a single slave device is in the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the node-ID on success, or an std::system_error on failure.

Definition at line 391 of file lss_master.cpp.

◆ SubmitIdNonConfig() [1/2]

void lely::canopen::LssMaster::SubmitIdNonConfig ( detail::LssIdNonConfigRequestBase req)
inline

Queues an LSS 'identify non-configured remote slave' request.

This function checks if there is an LSS slave device with an invalid (255) pending node-ID and no active node-ID.

Definition at line 2217 of file lss_master.hpp.

◆ SubmitIdNonConfig() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitIdNonConfig ( ev_exec_t exec,
F &&  con 
)
inline

Creates and queues an LSS 'identify non-configured remote slave' request.

This function checks if there is an LSS slave device with an invalid (255) pending node-ID and no active node-ID.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 2232 of file lss_master.hpp.

◆ CancelIdNonConfig()

bool lely::canopen::LssMaster::CancelIdNonConfig ( detail::LssIdNonConfigRequestBase req)
inline

Cancels an LSS 'identify non-configured remote slave' request.

See also
Cancel()

Definition at line 2249 of file lss_master.hpp.

◆ AbortIdNonConfig()

bool lely::canopen::LssMaster::AbortIdNonConfig ( detail::LssIdNonConfigRequestBase req)
inline

Aborts an LSS 'identify non-configured remote slave' request.

See also
Abort()

Definition at line 2255 of file lss_master.hpp.

◆ AsyncIdNonConfig()

LssFuture< bool > lely::canopen::LssMaster::AsyncIdNonConfig ( ev_exec_t exec,
detail::LssIdNonConfigRequestBase **  preq = nullptr 
)

Queues an asynchronous LSS 'identify non-configured remote slave' request and creates a future which becomes ready once the request completes (or is canceled).

Parameters
execthe executor used to execute the completion task.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds a boolean specfying whether a non-configured slave was found on success, or an std::system_error on failure.

Definition at line 407 of file lss_master.cpp.

◆ SubmitSlowscan() [1/2]

void lely::canopen::LssMaster::SubmitSlowscan ( detail::LssSlowscanRequestBase req,
const LssAddress lo,
const LssAddress hi 
)
inline

Queues an 'LSS Slowscan' request.

This function performs a binary search using the 'identify remote slave' service to obtain a single LSS address, followed by the 'switch state selective' service if a slave was found.

Parameters
reqthe request to be submitted.
lothe lower bound of the LSS address of the slave device.
hithe upper bound of the LSS address of the slave device. The vendor-ID and product code MUST be equal to those in lo.

Definition at line 2291 of file lss_master.hpp.

◆ SubmitSlowscan() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitSlowscan ( ev_exec_t exec,
const LssAddress lo,
const LssAddress hi,
F &&  con 
)
inline

Creates and queues an 'LSS Slowscan' request.

This function performs a binary search using the 'identify remote slave' service to obtain a single LSS address, followed by the 'switch state selective' service if a slave was found.

Parameters
execthe executor used to execute the completion task.
lothe lower bound of the LSS address of the slave device.
hithe upper bound of the LSS address of the slave device. The vendor-ID and product code MUST be equal to those in lo.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 2313 of file lss_master.hpp.

◆ CancelSlowscan()

bool lely::canopen::LssMaster::CancelSlowscan ( detail::LssSlowscanRequestBase req)
inline

Cancels an 'LSS Slowscan' request.

See also
Cancel()

Definition at line 2327 of file lss_master.hpp.

◆ AbortSlowscan()

bool lely::canopen::LssMaster::AbortSlowscan ( detail::LssSlowscanRequestBase req)
inline

Aborts an 'LSS Slowscan' request.

See also
Abort()

Definition at line 2333 of file lss_master.hpp.

◆ AsyncSlowscan()

LssFuture< LssAddress > lely::canopen::LssMaster::AsyncSlowscan ( ev_exec_t exec,
const LssAddress lo,
const LssAddress hi,
detail::LssSlowscanRequestBase **  preq = nullptr 
)

Queues an asynchronous 'LSS Slowscan' request and creates a future which becomes ready once the request completes (or is canceled).

Parameters
execthe executor used to execute the completion task.
lothe lower bound of the LSS address of the slave device.
hithe upper bound of the LSS address of the slave device. The vendor-ID and product code MUST be equal to those in lo.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the LSS address of the slave if found, or an std::system_error if not (containing the std::errc::timed_out error code) or if an error occurred.

Definition at line 424 of file lss_master.cpp.

◆ SubmitFastscan() [1/2]

void lely::canopen::LssMaster::SubmitFastscan ( detail::LssFastscanRequestBase req,
const LssAddress address,
const LssAddress mask 
)
inline

Queues an 'LSS Fastscan' request.

This function scans the bits in an LSS address to find a single matching slave. If a slave is identified, it is switched to the LSS configuration state.

Parameters
reqthe request to be submitted.
addressthe bits of the LSS address of a slave device which are already known and can be skipped during scanning.
maska mask specifying which bits in address are already known and can be skipped during scanning. If a bit in the mask is 1, the corresponding bit in address is not checked.

Definition at line 2377 of file lss_master.hpp.

◆ SubmitFastscan() [2/2]

template<class F >
void lely::canopen::LssMaster::SubmitFastscan ( ev_exec_t exec,
const LssAddress address,
const LssAddress mask,
F &&  con 
)
inline

Creates and queues an 'LSS Fastscan' request.

This function scans the bits in an LSS address to find a single matching slave. If a slave is identified, it is switched to the LSS configuration state.

Parameters
execthe executor used to execute the completion task.
addressthe bits of the LSS address of a slave device which are already known and can be skipped during scanning.
maska mask specifying which bits in address are already known and can be skipped during scanning. If a bit in the mask is 1, the corresponding bit in address is not checked.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 2401 of file lss_master.hpp.

◆ CancelFastscan()

bool lely::canopen::LssMaster::CancelFastscan ( detail::LssFastscanRequestBase req)
inline

Cancels an 'LSS Fastscan' request.

See also
Cancel()

Definition at line 2416 of file lss_master.hpp.

◆ AbortFastscan()

bool lely::canopen::LssMaster::AbortFastscan ( detail::LssFastscanRequestBase req)
inline

Aborts an 'LSS Fastscan' request.

See also
Abort()

Definition at line 2422 of file lss_master.hpp.

◆ AsyncFastscan()

LssFuture< LssAddress > lely::canopen::LssMaster::AsyncFastscan ( ev_exec_t exec,
const LssAddress address = {0, 0, 0, 0},
const LssAddress mask = {0, 0, 0, 0},
detail::LssFastscanRequestBase **  preq = nullptr 
)

Queues an asynchronous 'LSS Fastscan' request and creates a future which becomes ready once the request completes (or is canceled).

Parameters
execthe executor used to execute the completion task.
addressthe bits of the LSS address of a slave device which are already known and can be skipped during scanning.
maska mask specifying which bits in address are already known and can be skipped during scanning. If a bit in the mask is 1, the corresponding bit in address is not checked.
preqthe address at which to store a pointer to the request (can be a null pointer).
Returns
a future which holds the LSS address of the slave if found, or an std::system_error if not (containing the std::errc::timed_out error code) or if an error occurred.

Definition at line 443 of file lss_master.cpp.

◆ Cancel()

bool lely::canopen::LssMaster::Cancel ( detail::LssRequestBase req)

Cancels a pending LSS request.

If the request was canceled, the completion task is submitted for execution with ec == std::errc::operation_canceled.

Returns
true if the request was canceled, and false if it is ongoing or already completed.

Definition at line 468 of file lss_master.cpp.

◆ CancelAll()

std::size_t lely::canopen::LssMaster::CancelAll ( )

Cancels all pending LSS requests and stops the ongoing request, if any.

The completion tasks of canceled requests are submitted for execution with ec == std::errc::operation_canceled

Returns
the number of canceled requests.

Definition at line 475 of file lss_master.cpp.

◆ Abort()

bool lely::canopen::LssMaster::Abort ( detail::LssRequestBase req)

Aborts a pending LSS request.

The completion task is not submitted for execution.

Returns
true if the request was aborted, and false if it is ongoing or already completed.

Definition at line 482 of file lss_master.cpp.

◆ AbortAll()

std::size_t lely::canopen::LssMaster::AbortAll ( )

Aborts all pending LSS requests.

The completion tasks of aborted requests are not submitted for execution.

Returns
the number of aborted requests.

Definition at line 488 of file lss_master.cpp.

◆ OnStart()

virtual void lely::canopen::LssMaster::OnStart ( ::std::function< void(::std::error_code ec)>  res)
inlinevirtualnoexcept

The function invoked when the LSS master services are executed during the NMT startup process.

The startup process is halted until all LSS requests complete.

The default implementation issues no LSS requests.

Parameters
resthe function to onvoke on completion of the LSS requests. The arggument to res is the result: 0 on succes, or an error code on failure.

Definition at line 2507 of file lss_master.hpp.

◆ OnSwitchBitrate()

void lely::canopen::LssMaster::OnSwitchBitrate ( int  bitrate,
::std::chrono::milliseconds  delay,
::std::function< void(::std::error_code ec)>  res 
)
virtualnoexcept

The function invoked when the master activates the bit rate of all CANopen devices in the network.

If GetController() returns a valid pointer to a CAN controller, the default implementation stops the controller after half a delay period has passed (to give the CAN channel time to send the LSS requests), sets the bit rate after another half of the delay period, and finally restarts the CAN controller after the second delay period.

Parameters
bitratethe new bit rate (in bit/s).
delaythe delay before and after the switch, during which CAN frames MUST NOT be sent.
resthe function to invoke once the new bit rate has been activated and the delay periods have passed. The argument to res is the result: 0 on succes, or an error code on failure.

Definition at line 494 of file lss_master.cpp.

◆ lock()

void lely::canopen::LssMaster::lock ( )
finalprotectedvirtual

Blocks until a lock can be obtained for the current execution agent (thread, process, task).

If an exception is thrown, no lock is obtained.

Implements lely::util::BasicLockable.

Definition at line 542 of file lss_master.cpp.

◆ SetTime()

void lely::canopen::LssMaster::SetTime ( )
protected

Update the CAN network time.

The mutex inherited by this class MUST be locked for the duration of this call.

Definition at line 552 of file lss_master.cpp.


The documentation for this class was generated from the following files: