Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOT FOR MERGE] Feature/coe parametrization #12

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
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