Skip to content
Snippets Groups Projects
Commit bfc2904c authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Add ARMARX_TRACE

parent e6fe4a4e
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,7 @@ EtherCAT::EtherCAT() : expectedWKC(-1),
*/
bool EtherCAT::startBus(bool createDevices)
{
ARMARX_TRACE;
//if the bus runs already do nothing
if (isSDOWorking)
{
......@@ -149,6 +150,7 @@ bool EtherCAT::startBus(bool createDevices)
return false;
}
ARMARX_TRACE;
//wait to be sure
osal_usleep(500000);
//we are up and running for SDO's
......@@ -189,6 +191,7 @@ bool EtherCAT::startBus(bool createDevices)
ARMARX_TRACE;
for (auto slave : slaves)
{
slave->prepareForSafeOp();
......@@ -259,6 +262,7 @@ bool EtherCAT::startBus(bool createDevices)
ec_send_processdata();
ec_receive_processdata(EC_TIMEOUTRET);
ARMARX_TRACE;
//request all slaves to transit to OP-Mode
int stateRet = ec_writestate(0);
if (stateRet == 1)
......@@ -298,6 +302,7 @@ bool EtherCAT::startBus(bool createDevices)
//returning with an error
return false;
}
ARMARX_TRACE;
ARMARX_INFO << "All Slaves in OP now!" << std::endl;
......@@ -321,6 +326,7 @@ bool EtherCAT::startBus(bool createDevices)
ARMARX_INFO << deactivateSpam(1) << "Waiting for " << (slaves.size() - slaveReadyCounter) << "/" << slaves.size() << " slaves to get ready: " << missingSlaves;
updatePDO();
}
ARMARX_TRACE;
ARMARX_DEBUG << "PDOs updated.";
std::stringstream slaveInfo;
for (AbstractSlavePtr& slave : slaves)
......@@ -374,6 +380,7 @@ std::string ec_errorToString(ec_errort const& error)
*/
bool EtherCAT::setPDOMappings()
{
ARMARX_TRACE;
bool retVal = true;
int byteSum = 0;
for (std::shared_ptr<AbstractSlave>& slave : slaves)
......@@ -425,6 +432,7 @@ bool EtherCAT::setPDOMappings()
*/
std::pair<std::vector<ControlDevicePtr>, std::vector<SensorDevicePtr>> EtherCAT::createDevices()
{
ARMARX_TRACE;
std::set<ControlDevicePtr> ctrlDevs;
std::set<SensorDevicePtr> sensDevs;
if (deviceContainerPtr == nullptr)
......@@ -518,6 +526,7 @@ void EtherCAT::setIfName(const std::string& ifname)
*/
bool EtherCAT::updateBus(bool doErrorHandling)
{
ARMARX_TRACE;
if (!isSDOWorking)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment