MotionLib  1.0.0
SamBuCa motion library
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
grbl::GrblSim Class Reference
Inheritance diagram for grbl::GrblSim:
Inheritance graph
[legend]
Collaboration diagram for grbl::GrblSim:
Collaboration graph
[legend]

Public Member Functions

void flush ()
 
void read () override
 fill LineBuffer with incoming bytes
 
void write (const std::string &data) override
 raw write some bytes More...
 
bool wait (const std::chrono::milliseconds &timeout) override
 wait for input More...
 
void wake () override
 wake thread waiting for input
 
- Public Member Functions inherited from grbl::GrblDeviceBase
void fetch (const std::chrono::milliseconds &timeout)
 wait for data and process it More...
 
virtual grbl::ErrorCode send (const std::string &cmd, std::function< bool(const std::string &)> msg={}, const std::chrono::milliseconds &timeout=defaultSendTimeout)
 send a command wait for reply More...
 
virtual grbl::ErrorCode sendRealtime (const std::string &cmd, std::function< bool(const std::string &)> msg={}, const std::chrono::milliseconds &timeout=defaultSendTimeout)
 send a realtime-command wait for reply More...
 
virtual bool takeLine (std::string &line)
 consume line from buffer More...
 

Static Public Attributes

static const std::chrono::milliseconds defaultExpectTimeout
 
- Static Public Attributes inherited from grbl::GrblDeviceBase
static const std::chrono::milliseconds defaultSendTimeout
 

Protected Member Functions

void sendCmd (const std::string &command)
 

Protected Attributes

int m_in
 
int m_out
 
int m_wakeFd [2]
 
pid_t m_simPid
 
- Protected Attributes inherited from grbl::GrblDeviceBase
ccut::LineBuffer m_buffer
 

Friends

class mgrbl::MGrblSim
 

Additional Inherited Members

- Public Attributes inherited from grbl::GrblDeviceBase
ccut::Signal< std::string > dataSignal
 

Detailed Description

Definition at line 47 of file GrblSim.hpp.

Member Function Documentation

◆ wait()

bool GrblSim::wait ( const std::chrono::milliseconds &  timeout)
overridevirtual

wait for input

Parameters
timeoutwait timeout
Returns
true if data is available
Exceptions
Exception(IO)on IO error

Implements grbl::GrblDeviceBase.

Definition at line 181 of file GrblSim.cpp.

◆ write()

void GrblSim::write ( const std::string &  data)
overridevirtual

raw write some bytes

Parameters
[in]databytes to write

Implements grbl::GrblDeviceBase.

Definition at line 164 of file GrblSim.cpp.


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