Commit ab0fc5e9 authored by ahoms's avatar ahoms
Browse files

* changed DebMod Maxipix, Frelon and FrelonSerial by Camera and CameraCom

* changed DEB_XXXX_VARY(...) by DEB_XXXX() << VARY(...)
* added DebHex and DEB_HEX for hexadecimal int print
* continued adding debug to Frelon::Camera



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@182 45c4679d-1946-429d-baad-37912b19538b
parent 930caa58
...@@ -35,7 +35,7 @@ Acq *AcqEndCallback::getAcq() const ...@@ -35,7 +35,7 @@ Acq *AcqEndCallback::getAcq() const
void AcqEndCallback::setAcq(Acq *acq) void AcqEndCallback::setAcq(Acq *acq)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(acq); DEB_PARAM() << DEB_VAR1(acq);
if (acq && m_acq) { if (acq && m_acq) {
DEB_ERROR() << "Acquisition already set"; DEB_ERROR() << "Acquisition already set";
...@@ -53,7 +53,7 @@ Acq::Acq(Dev& dev) ...@@ -53,7 +53,7 @@ Acq::Acq(Dev& dev)
: m_dev(dev) : m_dev(dev)
{ {
DEB_CONSTRUCTOR(); DEB_CONSTRUCTOR();
DEB_PARAM_VAR1(dev.getDevNb()); DEB_PARAM() << DEB_VAR1(dev.getDevNb());
ostringstream os; ostringstream os;
if (dev.isMeta()) if (dev.isMeta())
...@@ -96,10 +96,10 @@ Dev& Acq::getDev() ...@@ -96,10 +96,10 @@ Dev& Acq::getDev()
int Acq::dispatchFrameCallback(struct espia_cb_data *cb_data) int Acq::dispatchFrameCallback(struct espia_cb_data *cb_data)
{ {
DEB_STATIC_FUNCT(); DEB_STATIC_FUNCT();
DEB_PARAM_VAR1(cb_data->cb_nr); DEB_PARAM() << DEB_VAR1(cb_data->cb_nr);
Acq *espia = (Acq *) cb_data->data; Acq *espia = (Acq *) cb_data->data;
DEB_TRACE_VAR1(DEB_OBJ_NAME(espia)); DEB_TRACE() << DEB_VAR1(DEB_OBJ_NAME(espia));
void (Acq::*method)(struct espia_cb_data *cb_data) = NULL; void (Acq::*method)(struct espia_cb_data *cb_data) = NULL;
...@@ -165,7 +165,7 @@ void Acq::disableFrameCallback() ...@@ -165,7 +165,7 @@ void Acq::disableFrameCallback()
void Acq::setFrameCallbackActive(bool cb_active) void Acq::setFrameCallbackActive(bool cb_active)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_active); DEB_PARAM() << DEB_VAR1(cb_active);
m_user_frame_cb_act = cb_active; m_user_frame_cb_act = cb_active;
} }
...@@ -185,7 +185,7 @@ void Acq::processFrameCallback(struct espia_cb_data *cb_data) ...@@ -185,7 +185,7 @@ void Acq::processFrameCallback(struct espia_cb_data *cb_data)
finished = (!endless && (cb_finfo.acq_frame_nr == last_frame)); finished = (!endless && (cb_finfo.acq_frame_nr == last_frame));
} }
DEB_TRACE_VAR2(aborted, finished); DEB_TRACE() << DEB_VAR2(aborted, finished);
if (finished) if (finished)
m_started = false; m_started = false;
...@@ -196,7 +196,7 @@ void Acq::processFrameCallback(struct espia_cb_data *cb_data) ...@@ -196,7 +196,7 @@ void Acq::processFrameCallback(struct espia_cb_data *cb_data)
if (!aborted) if (!aborted)
real2virtFrameInfo(cb_finfo, hw_finfo); real2virtFrameInfo(cb_finfo, hw_finfo);
DEB_TRACE_VAR1(hw_finfo); DEB_TRACE() << DEB_VAR1(hw_finfo);
if (m_user_frame_cb_act) { if (m_user_frame_cb_act) {
DEB_TRACE() << "Calling user FrameCallback"; DEB_TRACE() << "Calling user FrameCallback";
...@@ -213,7 +213,7 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames, ...@@ -213,7 +213,7 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames,
const FrameDim& frame_dim) const FrameDim& frame_dim)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR3(nb_buffers, nb_buffer_frames, frame_dim); DEB_PARAM() << DEB_VAR3(nb_buffers, nb_buffer_frames, frame_dim);
if (!frame_dim.isValid() || (nb_buffers <= 0) || if (!frame_dim.isValid() || (nb_buffers <= 0) ||
(nb_buffer_frames <= 0)) { (nb_buffer_frames <= 0)) {
...@@ -252,11 +252,12 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames, ...@@ -252,11 +252,12 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames,
real_buffers /= frame_factor; real_buffers /= frame_factor;
virt_buffers = real_buffers * frame_factor; virt_buffers = real_buffers * frame_factor;
DEB_TRACE_VAR3(frame_factor, virt_buffers, virt_frames); DEB_TRACE() << DEB_VAR3(frame_factor, virt_buffers,
virt_frames);
} }
DEB_TRACE() << "Calling espia_buffer_alloc"; DEB_TRACE() << "Calling espia_buffer_alloc";
DEB_TRACE_VAR3(real_buffers, real_frames, real_frame_size); DEB_TRACE() << DEB_VAR3(real_buffers, real_frames, real_frame_size);
CHECK_CALL(espia_buffer_alloc(m_dev, real_buffers, real_frames, CHECK_CALL(espia_buffer_alloc(m_dev, real_buffers, real_frames,
real_frame_size)); real_frame_size));
...@@ -266,7 +267,7 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames, ...@@ -266,7 +267,7 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames,
m_real_frame_factor = frame_factor; m_real_frame_factor = frame_factor;
m_real_frame_size = real_frame_size; m_real_frame_size = real_frame_size;
DEB_RETURN_VAR1(nb_buffers); DEB_RETURN() << DEB_VAR1(nb_buffers);
} }
void Acq::bufferFree() void Acq::bufferFree()
...@@ -291,55 +292,55 @@ void Acq::bufferFree() ...@@ -291,55 +292,55 @@ void Acq::bufferFree()
const FrameDim& Acq::getFrameDim() const FrameDim& Acq::getFrameDim()
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_RETURN_VAR1(m_frame_dim); DEB_RETURN() << DEB_VAR1(m_frame_dim);
return m_frame_dim; return m_frame_dim;
} }
void Acq::getNbBuffers(int& nb_buffers) void Acq::getNbBuffers(int& nb_buffers)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_RETURN_VAR1(nb_buffers); DEB_RETURN() << DEB_VAR1(nb_buffers);
nb_buffers = m_nb_buffers; nb_buffers = m_nb_buffers;
} }
void Acq::getNbBufferFrames(int& nb_buffer_frames) void Acq::getNbBufferFrames(int& nb_buffer_frames)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_RETURN_VAR1(nb_buffer_frames); DEB_RETURN() << DEB_VAR1(nb_buffer_frames);
nb_buffer_frames = m_nb_buffer_frames; nb_buffer_frames = m_nb_buffer_frames;
} }
void *Acq::getBufferFramePtr(int buffer_nb, int frame_nb) void *Acq::getBufferFramePtr(int buffer_nb, int frame_nb)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(buffer_nb, frame_nb); DEB_PARAM() << DEB_VAR2(buffer_nb, frame_nb);
int real_buffer = realBufferNb(buffer_nb, frame_nb); int real_buffer = realBufferNb(buffer_nb, frame_nb);
int real_frame = realFrameNb(buffer_nb, frame_nb); int real_frame = realFrameNb(buffer_nb, frame_nb);
void *ptr; void *ptr;
DEB_TRACE() << "Calling espia_frame_address"; DEB_TRACE() << "Calling espia_frame_address";
CHECK_CALL(espia_frame_address(m_dev, real_buffer, real_frame, &ptr)); CHECK_CALL(espia_frame_address(m_dev, real_buffer, real_frame, &ptr));
DEB_RETURN_VAR1(ptr); DEB_RETURN() << DEB_VAR1(ptr);
return ptr; return ptr;
} }
void *Acq::getAcqFramePtr(int acq_frame_nb) void *Acq::getAcqFramePtr(int acq_frame_nb)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(acq_frame_nb); DEB_PARAM() << DEB_VAR1(acq_frame_nb);
unsigned long buffer_nb = ESPIA_ACQ_ANY; unsigned long buffer_nb = ESPIA_ACQ_ANY;
void *ptr; void *ptr;
DEB_TRACE() << "Calling espia_frame_address"; DEB_TRACE() << "Calling espia_frame_address";
CHECK_CALL(espia_frame_address(m_dev, buffer_nb, acq_frame_nb, &ptr)); CHECK_CALL(espia_frame_address(m_dev, buffer_nb, acq_frame_nb, &ptr));
DEB_RETURN_VAR1(ptr); DEB_RETURN() << DEB_VAR1(ptr);
return ptr; return ptr;
} }
void Acq::getFrameInfo(int acq_frame_nb, HwFrameInfoType& info) void Acq::getFrameInfo(int acq_frame_nb, HwFrameInfoType& info)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(acq_frame_nb); DEB_PARAM() << DEB_VAR1(acq_frame_nb);
struct img_frame_info finfo; struct img_frame_info finfo;
finfo.buffer_nr = ESPIA_ACQ_ANY; finfo.buffer_nr = ESPIA_ACQ_ANY;
...@@ -357,7 +358,7 @@ void Acq::getFrameInfo(int acq_frame_nb, HwFrameInfoType& info) ...@@ -357,7 +358,7 @@ void Acq::getFrameInfo(int acq_frame_nb, HwFrameInfoType& info)
CHECK_CALL(ret); CHECK_CALL(ret);
real2virtFrameInfo(finfo, info); real2virtFrameInfo(finfo, info);
DEB_RETURN_VAR1(info); DEB_RETURN() << DEB_VAR1(info);
} }
void Acq::real2virtFrameInfo(const struct img_frame_info& real_info, void Acq::real2virtFrameInfo(const struct img_frame_info& real_info,
...@@ -391,10 +392,10 @@ void Acq::resetFrameInfo(struct img_frame_info& frame_info) ...@@ -391,10 +392,10 @@ void Acq::resetFrameInfo(struct img_frame_info& frame_info)
void Acq::setNbFrames(int nb_frames) void Acq::setNbFrames(int nb_frames)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(nb_frames); DEB_PARAM() << DEB_VAR1(nb_frames);
if (nb_frames < 0) { if (nb_frames < 0) {
DEB_ERROR() << "Invalid nb_frames=" << nb_frames; DEB_ERROR() << "Invalid " << DEB_VAR1(nb_frames);
throw LIMA_HW_EXC(InvalidValue, "Invalid nb of frames"); throw LIMA_HW_EXC(InvalidValue, "Invalid nb of frames");
} }
...@@ -405,7 +406,7 @@ void Acq::getNbFrames(int& nb_frames) ...@@ -405,7 +406,7 @@ void Acq::getNbFrames(int& nb_frames)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
nb_frames = m_nb_frames; nb_frames = m_nb_frames;
DEB_RETURN_VAR1(nb_frames); DEB_RETURN() << DEB_VAR1(nb_frames);
} }
void Acq::start() void Acq::start()
...@@ -459,13 +460,13 @@ void Acq::getStatus(StatusType& status) ...@@ -459,13 +460,13 @@ void Acq::getStatus(StatusType& status)
status.run_nb = acq_run_nb; status.run_nb = acq_run_nb;
status.last_frame_nb = m_last_frame_info.acq_frame_nr; status.last_frame_nb = m_last_frame_info.acq_frame_nr;
DEB_RETURN_VAR1(status); DEB_RETURN() << DEB_VAR1(status);
} }
void Acq::registerAcqEndCallback(AcqEndCallback& acq_end_cb) void Acq::registerAcqEndCallback(AcqEndCallback& acq_end_cb)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(&acq_end_cb, m_acq_end_cb); DEB_PARAM() << DEB_VAR2(&acq_end_cb, m_acq_end_cb);
if (m_acq_end_cb) { if (m_acq_end_cb) {
DEB_ERROR() << "AcqEndCallback already registered"; DEB_ERROR() << "AcqEndCallback already registered";
...@@ -480,7 +481,7 @@ void Acq::registerAcqEndCallback(AcqEndCallback& acq_end_cb) ...@@ -480,7 +481,7 @@ void Acq::registerAcqEndCallback(AcqEndCallback& acq_end_cb)
void Acq::unregisterAcqEndCallback(AcqEndCallback& acq_end_cb) void Acq::unregisterAcqEndCallback(AcqEndCallback& acq_end_cb)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(&acq_end_cb, m_acq_end_cb); DEB_PARAM() << DEB_VAR2(&acq_end_cb, m_acq_end_cb);
if (m_acq_end_cb != &acq_end_cb) { if (m_acq_end_cb != &acq_end_cb) {
DEB_ERROR() << "Specified AcqEndCallback not registered"; DEB_ERROR() << "Specified AcqEndCallback not registered";
......
...@@ -13,7 +13,7 @@ BufferMgr::BufferMgr(Acq& acq) ...@@ -13,7 +13,7 @@ BufferMgr::BufferMgr(Acq& acq)
DEB_CONSTRUCTOR(); DEB_CONSTRUCTOR();
Dev& dev = acq.getDev(); Dev& dev = acq.getDev();
DEB_PARAM_VAR1(dev.getDevNb()); DEB_PARAM() << DEB_VAR1(dev.getDevNb());
ostringstream os; ostringstream os;
if (dev.isMeta()) if (dev.isMeta())
...@@ -37,14 +37,14 @@ int BufferMgr::getMaxNbBuffers(const FrameDim& frame_dim, ...@@ -37,14 +37,14 @@ int BufferMgr::getMaxNbBuffers(const FrameDim& frame_dim,
int nb_concat_frames) int nb_concat_frames)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(frame_dim, nb_concat_frames); DEB_PARAM() << DEB_VAR2(frame_dim, nb_concat_frames);
FrameDim buffer_frame_dim; FrameDim buffer_frame_dim;
getBufferFrameDim(frame_dim, nb_concat_frames, buffer_frame_dim); getBufferFrameDim(frame_dim, nb_concat_frames, buffer_frame_dim);
DEB_TRACE_VAR1(buffer_frame_dim); DEB_TRACE() << DEB_VAR1(buffer_frame_dim);
int max_nb_buffers = GetDefMaxNbBuffers(buffer_frame_dim); int max_nb_buffers = GetDefMaxNbBuffers(buffer_frame_dim);
DEB_RETURN_VAR1(max_nb_buffers); DEB_RETURN() << DEB_VAR1(max_nb_buffers);
return max_nb_buffers; return max_nb_buffers;
} }
...@@ -105,7 +105,7 @@ void BufferMgr::getStartTimestamp(Timestamp& start_ts) ...@@ -105,7 +105,7 @@ void BufferMgr::getStartTimestamp(Timestamp& start_ts)
void BufferMgr::setFrameCallbackActive(bool cb_active) void BufferMgr::setFrameCallbackActive(bool cb_active)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_active); DEB_PARAM() << DEB_VAR1(cb_active);
if (cb_active) if (cb_active)
m_acq.registerFrameCallback(m_frame_cb); m_acq.registerFrameCallback(m_frame_cb);
......
...@@ -17,7 +17,7 @@ map<string, int> lima::Espia::EspiaDrvOptMap; ...@@ -17,7 +17,7 @@ map<string, int> lima::Espia::EspiaDrvOptMap;
Dev::Dev(int dev_nb) Dev::Dev(int dev_nb)
{ {
DEB_CONSTRUCTOR(); DEB_CONSTRUCTOR();
DEB_PARAM_VAR1(dev_nb); DEB_PARAM() << DEB_VAR1(dev_nb);
ostringstream os; ostringstream os;
if (dev_nb == MetaDev) if (dev_nb == MetaDev)
...@@ -43,7 +43,7 @@ Dev::~Dev() ...@@ -43,7 +43,7 @@ Dev::~Dev()
void Dev::open(int dev_nb) void Dev::open(int dev_nb)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(dev_nb); DEB_PARAM() << DEB_VAR1(dev_nb);
if (dev_nb == m_dev_nb) { if (dev_nb == m_dev_nb) {
DEB_TRACE() << "Device already opened"; DEB_TRACE() << "Device already opened";
...@@ -74,11 +74,11 @@ void Dev::close() ...@@ -74,11 +74,11 @@ void Dev::close()
void Dev::registerCallback(struct espia_cb_data& cb_data, int& cb_nr) void Dev::registerCallback(struct espia_cb_data& cb_data, int& cb_nr)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_data.type); DEB_PARAM() << DEB_VAR1(cb_data.type);
DEB_TRACE() << "Calling espia_register_callback"; DEB_TRACE() << "Calling espia_register_callback";
CHECK_CALL(espia_register_callback(m_dev, &cb_data, &cb_nr)); CHECK_CALL(espia_register_callback(m_dev, &cb_data, &cb_nr));
DEB_TRACE_VAR1(cb_nr); DEB_TRACE() << "After espia_register_callback: " << DEB_VAR1(cb_nr);
try { try {
DEB_TRACE() << "Calling espia_callback_active"; DEB_TRACE() << "Calling espia_callback_active";
...@@ -88,13 +88,13 @@ void Dev::registerCallback(struct espia_cb_data& cb_data, int& cb_nr) ...@@ -88,13 +88,13 @@ void Dev::registerCallback(struct espia_cb_data& cb_data, int& cb_nr)
throw; throw;
} }
DEB_RETURN_VAR1(cb_nr); DEB_RETURN() << DEB_VAR1(cb_nr);
} }
void Dev::unregisterCallback(int& cb_nr) void Dev::unregisterCallback(int& cb_nr)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_nr); DEB_PARAM() << DEB_VAR1(cb_nr);
DEB_TRACE() << "Calling espia_unregister_callback"; DEB_TRACE() << "Calling espia_unregister_callback";
CHECK_CALL(espia_unregister_callback(m_dev, cb_nr)); CHECK_CALL(espia_unregister_callback(m_dev, cb_nr));
...@@ -122,7 +122,7 @@ void Dev::getCcdStatus(int& ccd_status) ...@@ -122,7 +122,7 @@ void Dev::getCcdStatus(int& ccd_status)
DEB_TRACE() << "Calling espia_ccd_status"; DEB_TRACE() << "Calling espia_ccd_status";
CHECK_CALL(espia_ccd_status(m_dev, &status, SCDXIPCI_NO_BLOCK)); CHECK_CALL(espia_ccd_status(m_dev, &status, SCDXIPCI_NO_BLOCK));
ccd_status = status; ccd_status = status;
DEB_RETURN_VAR1(ccd_status); DEB_RETURN() << DEB_VAR1(DEB_HEX(ccd_status));
} }
...@@ -140,7 +140,7 @@ void Dev::initEspiaDrvOptMap() ...@@ -140,7 +140,7 @@ void Dev::initEspiaDrvOptMap()
int nr_option = -1; int nr_option = -1;
DEB_TRACE() << "Getting number of options"; DEB_TRACE() << "Getting number of options";
CHECK_CALL(espia_get_option_data(m_dev, &nr_option, NULL)); CHECK_CALL(espia_get_option_data(m_dev, &nr_option, NULL));
DEB_TRACE_VAR1(nr_option); DEB_TRACE() << DEB_VAR1(nr_option);
for (int i = 0; i < nr_option; i++) { for (int i = 0; i < nr_option; i++) {
struct espia_option *eoption; struct espia_option *eoption;
...@@ -148,7 +148,7 @@ void Dev::initEspiaDrvOptMap() ...@@ -148,7 +148,7 @@ void Dev::initEspiaDrvOptMap()
CHECK_CALL(espia_get_option_data(m_dev, &i, &eoption)); CHECK_CALL(espia_get_option_data(m_dev, &i, &eoption));
string option_name = eoption->name; string option_name = eoption->name;
DEB_TRACE_VAR1(option_name); DEB_TRACE() << DEB_VAR1(option_name);
EspiaDrvOptMap[option_name] = eoption->option; EspiaDrvOptMap[option_name] = eoption->option;
} }
...@@ -159,7 +159,7 @@ void Dev::initEspiaDrvOptMap() ...@@ -159,7 +159,7 @@ void Dev::initEspiaDrvOptMap()
void Dev::getDrvOption(const string& opt_name, int& val) void Dev::getDrvOption(const string& opt_name, int& val)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(opt_name); DEB_PARAM() << DEB_VAR1(opt_name);
map<string, int>::iterator pop = EspiaDrvOptMap.find(opt_name); map<string, int>::iterator pop = EspiaDrvOptMap.find(opt_name);
if (pop == EspiaDrvOptMap.end()) { if (pop == EspiaDrvOptMap.end()) {
...@@ -171,14 +171,14 @@ void Dev::getDrvOption(const string& opt_name, int& val) ...@@ -171,14 +171,14 @@ void Dev::getDrvOption(const string& opt_name, int& val)
DEB_TRACE() << "Reading driver option #" << pop->second; DEB_TRACE() << "Reading driver option #" << pop->second;
CHECK_CALL(espia_option(m_dev, pop->second, action, &val)); CHECK_CALL(espia_option(m_dev, pop->second, action, &val));
DEB_RETURN_VAR1(val); DEB_RETURN() << DEB_VAR1(val);
} }
void Dev::setDrvOption(const string& opt_name, int val) void Dev::setDrvOption(const string& opt_name, int val)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(opt_name, val); DEB_PARAM() << DEB_VAR2(opt_name, val);
map<string, int>::iterator pop = EspiaDrvOptMap.find(opt_name); map<string, int>::iterator pop = EspiaDrvOptMap.find(opt_name);
if (pop == EspiaDrvOptMap.end()) { if (pop == EspiaDrvOptMap.end()) {
......
...@@ -22,7 +22,7 @@ SerialLine::SerialLine(Dev& edev, const string& line_term, ...@@ -22,7 +22,7 @@ SerialLine::SerialLine(Dev& edev, const string& line_term,
m_dev(edev) m_dev(edev)
{ {
DEB_CONSTRUCTOR(); DEB_CONSTRUCTOR();
DEB_PARAM_VAR1(edev.getDevNb()); DEB_PARAM() << DEB_VAR1(edev.getDevNb());
if (edev.isMeta()) { if (edev.isMeta()) {
DEB_ERROR() << "Specified Dev is a meta-device"; DEB_ERROR() << "Specified Dev is a meta-device";
...@@ -51,7 +51,7 @@ Dev& SerialLine::getDev() ...@@ -51,7 +51,7 @@ Dev& SerialLine::getDev()
void SerialLine::write(const string& buffer, bool no_wait) void SerialLine::write(const string& buffer, bool no_wait)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(buffer, no_wait); DEB_PARAM() << DEB_VAR2(buffer, no_wait);
unsigned long len = buffer.size(); unsigned long len = buffer.size();
char *ptr = len ? (char *) buffer.data() : NULL; char *ptr = len ? (char *) buffer.data() : NULL;
...@@ -67,7 +67,7 @@ void SerialLine::write(const string& buffer, bool no_wait) ...@@ -67,7 +67,7 @@ void SerialLine::write(const string& buffer, bool no_wait)
void SerialLine::read(string& buffer, int max_len, double timeout) void SerialLine::read(string& buffer, int max_len, double timeout)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(max_len, timeout); DEB_PARAM() << DEB_VAR2(max_len, timeout);
buffer.resize(max_len); buffer.resize(max_len);
char *ptr = max_len ? (char *) buffer.data() : NULL; char *ptr = max_len ? (char *) buffer.data() : NULL;
...@@ -78,7 +78,7 @@ void SerialLine::read(string& buffer, int max_len, double timeout) ...@@ -78,7 +78,7 @@ void SerialLine::read(string& buffer, int max_len, double timeout)
CHECK_CALL(espia_ser_read(m_dev, ptr, &ret_len, tmout)); CHECK_CALL(espia_ser_read(m_dev, ptr, &ret_len, tmout));
buffer.resize(ret_len); buffer.resize(ret_len);
DEB_RETURN_VAR1(buffer); DEB_RETURN() << DEB_VAR1(buffer);
} }
...@@ -86,7 +86,7 @@ void SerialLine::readStr(string& buffer, int max_len, ...@@ -86,7 +86,7 @@ void SerialLine::readStr(string& buffer, int max_len,
const string& term, double timeout) const string& term, double timeout)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM_VAR3(max_len, term, timeout); DEB_PARAM() << DEB_VAR3(max_len, term, timeout);
buffer.resize(max_len); buffer.resize(max_len);
char *ptr = max_len ? (char *) buffer.data() : NULL; char *ptr = max_len ? (char *) buffer.data() : NULL;
...@@ -99,7 +99,7 @@ void SerialLine::readStr(string& buffer, int max_len, ...@@ -99,7 +99,7 @@ void SerialLine::readStr(string& buffer, int max_len,
term.size(), tmout)); term.size(), tmout));
buffer.resize(ret_len); buffer.resize(ret_len);
DEB_RETURN_VAR1(buffer); DEB_RETURN() << DEB_VAR1(buffer);
} }
...@@ -118,5 +118,5 @@ void SerialLine::getNbAvailBytes(int& avail_bytes) ...@@ -118,5 +118,5 @@ void SerialLine::getNbAvailBytes(int& avail_bytes)
unsigned long ret_bytes = 0; unsigned long ret_bytes = 0;
CHECK_CALL(espia_ser_read(m_dev, NULL, &ret_bytes, 0)); CHECK_CALL(espia_ser_read(m_dev, NULL, &ret_bytes, 0));
avail_bytes = ret_bytes; avail_bytes = ret_bytes;
DEB_RETURN_VAR1(avail_bytes);