Skip to content
Snippets Groups Projects
Commit 280d0b79 authored by Jacques Gouno's avatar Jacques Gouno
Browse files

TANGODEVIC-1676: updated code - CryoCoolerIneterface.cpp

parent aaba0bfd
Branches
Tags
No related merge requests found
......@@ -625,6 +625,59 @@ namespace CryoCooler_ns
//-----------------------------------------------
void CryoCoolerInterface::periodic_job_i (void)
{
DEBUG_STREAM << "CryoCoolerInterface::periodic_job_i trying to read PLC Data " << std::endl;
long l_com_error = 0;
#ifdef _DB_SEGMENTATION_BY_104_
//- hwp_rd_start is alive
if (hwp_rd_start)
{
l_com_error += hwp_rd_start->get_com_error();
this->com_state = hwp_rd_start->get_com_state();
if (com_state == HWProxy_ns::HWP_COMMUNICATION_ERROR)
{
this->com_status = hwp_rd_start->get_com_status();
this->last_error = hwp_rd_start->get_last_error();
return;
}
}
//- hwp_rd_end is alive
if (hwp_rd_end)
{
l_com_error += hwp_rd_end->get_com_error();
this->com_state = hwp_rd_end->get_com_state();
if (com_state == HWProxy_ns::HWP_COMMUNICATION_ERROR)
{
this->com_status = hwp_rd_end->get_com_status();
this->last_error = hwp_rd_end->get_last_error();
return;
}
}
#else
if (hwp)
{
l_com_error += hwp->get_com_error();
this->com_state = hwp->get_com_state();
if (com_state == HWProxy_ns::HWP_COMMUNICATION_ERROR)
{
this->com_status = hwp->get_com_status();
this->last_error = hwp->get_last_error();
return;
}
}
#endif
//- hwp_wr is alive
if (hwp_wr)
{
l_com_error += hwp_wr->get_com_error();
this->com_state = hwp_wr->get_com_state();
if (com_state == HWProxy_ns::HWP_COMMUNICATION_ERROR)
{
this->com_status = hwp_wr->get_com_status();
this->last_error = hwp_wr->get_last_error();
return;
}
}
this->com_error = l_com_error;
}
} //- namespace
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment