Skip to content
Snippets Groups Projects
Commit 9d3642db authored by Sonia Minolli's avatar Sonia Minolli
Browse files

Add logs in handle_xxx_buffer() functions (TANGODEVIC-1605)

parent 9663b3b3
No related branches found
No related tags found
No related merge requests found
......@@ -133,8 +133,8 @@ void BufferedCounterEvt::handle_data_lost()
void BufferedCounterEvt::handle_raw_buffer(ni660Xsl::InRawBuffer* buffer, long& _samples_read)
throw (Tango::DevFailed)
{
DEBUG_STREAM << "BufferedCounterEvt::handle_raw_buffer() entering..." << std::endl;
DEBUG_STREAM << "BufferedCounterEvt::handle_raw_buffer() - samples to read = " << _samples_read << std::endl;
DEBUG_STREAM << "BufferedCounterEvt::handle_raw_buffer() entering for counter: " << this->m_cfg.cnt.name << " ... "
<< " - samples to read = " << _samples_read << std::endl;
// check samples number is > 0
if (_samples_read <= 0)
......@@ -251,7 +251,8 @@ void BufferedCounterEvt::handle_raw_buffer(ni660Xsl::InRawBuffer* buffer, long&
//- All buffers have not been yet received
if (this->m_currentBufferNb < this->m_bufferNbToReceive)
{
DEBUG_STREAM << "buffer currently received = " << this->m_currentBufferNb + 1 << " on " << this->m_bufferNbToReceive << std::endl;
DEBUG_STREAM << "buffer currently received for counter " << this->m_cfg.cnt.name << " = " << this->m_currentBufferNb + 1
<< " on " << this->m_bufferNbToReceive << std::endl;
unsigned long nb_to_copy;
if (((unsigned long)this->m_cfg.acq.samplesNumber - this->m_firstPtReceivedBuff) < (unsigned long)_samples_read)
......@@ -262,7 +263,7 @@ void BufferedCounterEvt::handle_raw_buffer(ni660Xsl::InRawBuffer* buffer, long&
{
nb_to_copy = (unsigned long)_samples_read;
}
DEBUG_STREAM << "NB to copy : " << nb_to_copy << endl;
DEBUG_STREAM << "NB to copy for counter " << this->m_cfg.cnt.name << ": " << nb_to_copy << endl;
// add number to copy to current data
data.capacity(data.length() + nb_to_copy, true);
......@@ -304,6 +305,7 @@ void BufferedCounterEvt::handle_raw_buffer(ni660Xsl::InRawBuffer* buffer, long&
try
{
this->m_storage_mgr->pushNexusData(this->m_cfg.cnt.name, &bufNx[0], nb_to_copy);
DEBUG_STREAM << "Push data ok for counter: " << this->m_cfg.cnt.name << endl;
}
catch (Tango::DevFailed & df)
{
......
......@@ -143,8 +143,8 @@ void BufferedCounterPos::handle_raw_buffer(ni660Xsl::InRawBuffer* buffer, long&
void BufferedCounterPos::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffer, long& _samples_read)
throw (Tango::DevFailed)
{
DEBUG_STREAM << "BufferedCounterPos::handle_scaled_buffer() entering..." << std::endl;
DEBUG_STREAM << "BufferedCounterPos::handle_scaled_buffer() - samples to read = " << _samples_read << std::endl;
DEBUG_STREAM << "BufferedCounterPos::handle_scaled_buffer() entering for counter: " << this->m_cfg.cnt.name << " ... "
<< " - samples to read = " << _samples_read << std::endl;
// check samples number is > 0
if (_samples_read <= 0)
......@@ -283,7 +283,8 @@ void BufferedCounterPos::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffer,
//- All buffers have not been yet received
if (this->m_currentBufferNb < this->m_bufferNbToReceive)
{
DEBUG_STREAM << "buffer currently received = " << this->m_currentBufferNb + 1 << " on " << this->m_bufferNbToReceive << std::endl;
DEBUG_STREAM << "buffer currently received for counter " << this->m_cfg.cnt.name << " = " << this->m_currentBufferNb + 1
<< " on " << this->m_bufferNbToReceive << std::endl;
unsigned long nb_to_copy;
if (((unsigned long)this->m_cfg.acq.samplesNumber - this->m_firstPtReceivedBuff) < (unsigned long)_samples_read)
......@@ -294,7 +295,7 @@ void BufferedCounterPos::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffer,
{
nb_to_copy = (unsigned long)_samples_read;
}
DEBUG_STREAM << "NB to copy : " << nb_to_copy << endl;
DEBUG_STREAM << "NB to copy for counter " << this->m_cfg.cnt.name << ": " << nb_to_copy << endl;
// add number to copy to current data
pos.capacity(pos.length() + nb_to_copy, true);
......@@ -349,6 +350,7 @@ void BufferedCounterPos::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffer,
try
{
this->m_storage_mgr->pushNexusData(this->m_cfg.cnt.name, &bufNx[0], nb_to_copy);
DEBUG_STREAM << "Push data ok for counter: " << this->m_cfg.cnt.name << endl;
}
catch (Tango::DevFailed & df)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment