fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
fastcat::JsdDeviceBase Class Reference

#include "jsd_device_base.h"

Inheritance diagram for fastcat::JsdDeviceBase:
Inheritance graph
[legend]
Collaboration diagram for fastcat::JsdDeviceBase:
Collaboration graph
[legend]

Public Types

enum  AsyncSdoRetVal { SDO_RET_VAL_FAILURE , SDO_RET_VAL_SUCCESS , SDO_RET_VAL_NOT_APPLICABLE }
 

Public Member Functions

bool Write (DeviceCmd &cmd) override
 
void SetSlaveId (uint16_t slave_id)
 
uint16_t GetSlaveId ()
 
void SetContext (jsd_t *context)
 
void RegisterSdoResponseQueue (std::shared_ptr< std::queue< SdoResponse > > sdo_response_queue)
 
void SetOffline (bool is_offline)
 
bool IsOffline ()
 
- Public Member Functions inherited from fastcat::DeviceBase
virtual ~DeviceBase ()
 
virtual bool ConfigFromYaml (const YAML::Node &node)=0
 
virtual bool Read ()=0
 
virtual FaultType Process ()
 
virtual void Fault ()
 
virtual void Reset ()
 
virtual void SetInitializationTime (double time_sec, double monotonic_time_sec)
 
void RegisterCmdQueue (std::shared_ptr< ThreadSafeQueue< DeviceCmd > > cmd_queue)
 
std::string GetName ()
 
std::shared_ptr< DeviceState > GetState ()
 
void SetTime (double time, double monotonic_time)
 
void SetLoopPeriod (double loop_period)
 

Protected Member Functions

AsyncSdoRetVal WriteAsyncSdoRequest (DeviceCmd &cmd)
 
AsyncSdoRetVal WriteAsyncSdoRequestOnline (DeviceCmd &cmd)
 
AsyncSdoRetVal WriteAsyncSdoRequestOffline (DeviceCmd &cmd)
 

Protected Attributes

bool is_offline_ = false
 If is an offline version.
 
jsd_t * context_ = NULL
 JSD context.
 
int slave_id_ = 0
 EtherCAT Slave Index.
 
std::shared_ptr< std::queue< SdoResponse > > sdo_response_queue_
 
- Protected Attributes inherited from fastcat::DeviceBase
std::string name_
 unique device name
 
double last_monotonic_time_ = 0.0
 
double loop_period_ = 0.0
 only some devices need
 
double initialization_time_sec_ = -1
 only some devices need
 
double monotonic_initialization_time_sec_ = -1
 only some devices need
 
bool device_fault_active_ = false
 device-level fault, manager also has fault status flag
 
std::shared_ptr< DeviceState > state_
 Fastcat state data.
 
std::shared_ptr< ThreadSafeQueue< DeviceCmd > > cmd_queue_
 for intra-device commands
 

Additional Inherited Members

- Public Attributes inherited from fastcat::DeviceBase
std::vector< Signal > signals_
 

Member Enumeration Documentation

◆ AsyncSdoRetVal

Enumerator
SDO_RET_VAL_FAILURE 
SDO_RET_VAL_SUCCESS 
SDO_RET_VAL_NOT_APPLICABLE 

Member Function Documentation

◆ GetSlaveId()

uint16_t fastcat::JsdDeviceBase::GetSlaveId ( )

◆ IsOffline()

bool fastcat::JsdDeviceBase::IsOffline ( )
inline

◆ RegisterSdoResponseQueue()

void fastcat::JsdDeviceBase::RegisterSdoResponseQueue ( std::shared_ptr< std::queue< SdoResponse > >  sdo_response_queue)

◆ SetContext()

void fastcat::JsdDeviceBase::SetContext ( jsd_t *  context)

◆ SetOffline()

void fastcat::JsdDeviceBase::SetOffline ( bool  is_offline)

◆ SetSlaveId()

void fastcat::JsdDeviceBase::SetSlaveId ( uint16_t  slave_id)

◆ Write()

bool fastcat::JsdDeviceBase::Write ( DeviceCmd &  cmd)
overridevirtual

Reimplemented from fastcat::DeviceBase.

Here is the call graph for this function:

◆ WriteAsyncSdoRequest()

fastcat::JsdDeviceBase::AsyncSdoRetVal fastcat::JsdDeviceBase::WriteAsyncSdoRequest ( DeviceCmd &  cmd)
protected
Here is the caller graph for this function:

◆ WriteAsyncSdoRequestOffline()

fastcat::JsdDeviceBase::AsyncSdoRetVal fastcat::JsdDeviceBase::WriteAsyncSdoRequestOffline ( DeviceCmd &  cmd)
protected

◆ WriteAsyncSdoRequestOnline()

fastcat::JsdDeviceBase::AsyncSdoRetVal fastcat::JsdDeviceBase::WriteAsyncSdoRequestOnline ( DeviceCmd &  cmd)
protected

Member Data Documentation

◆ context_

jsd_t* fastcat::JsdDeviceBase::context_ = NULL
protected

JSD context.

◆ is_offline_

bool fastcat::JsdDeviceBase::is_offline_ = false
protected

If is an offline version.

◆ sdo_response_queue_

std::shared_ptr<std::queue<SdoResponse> > fastcat::JsdDeviceBase::sdo_response_queue_
protected

provided so that offline devices can push to this queue with SDO response stubs

◆ slave_id_

int fastcat::JsdDeviceBase::slave_id_ = 0
protected

EtherCAT Slave Index.


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