Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions soem_master/soem_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ class SoemDriver
return (ec_state)(m_datap->state);
};

virtual int getInputByteLength(){
return (int)(m_datap->Ibytes);
};

virtual int getOutputByteLength(){
return (int)(m_datap->Obytes);
};

virtual int getInputBitLength(){
return (int)(m_datap->Ibits);
};

virtual int getOutputBitLength(){
return (int)(m_datap->Obits);
};

protected:
SoemDriver(ec_slavet* mem_loc) :
m_datap(mem_loc), m_name("Slave_" + to_string(m_datap->configadr,
Expand All @@ -114,6 +130,10 @@ class SoemDriver
m_service->addOperation("checkState",&SoemDriver::checkState,this).doc("check the slaves state").arg("state","state value to check");
m_service->addOperation("getState",&SoemDriver::getState,this).doc("request slave state");
m_service->addOperation("configure",&SoemDriver::configure,this).doc("Configure slave");
m_service->addOperation("getInputByteLength",&SoemDriver::getInputByteLength,this).doc("retrieve the length of the input cyclic data in bytes");
m_service->addOperation("getOutputByteLength",&SoemDriver::getOutputByteLength,this).doc("retrieve the length of the output cyclic data in bytes");
m_service->addOperation("getInputBitLength",&SoemDriver::getInputBitLength,this).doc("retrieve the length of the input cyclic data in bits");
m_service->addOperation("getOutputBitLength",&SoemDriver::getOutputBitLength,this).doc("retrieve the length of the output cyclic data in bits");
}
;
ec_slavet* m_datap;
Expand Down
Loading