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
void AcqEndCallback::setAcq(Acq *acq)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(acq);
DEB_PARAM() << DEB_VAR1(acq);
if (acq && m_acq) {
DEB_ERROR() << "Acquisition already set";
......@@ -53,7 +53,7 @@ Acq::Acq(Dev& dev)
: m_dev(dev)
{
DEB_CONSTRUCTOR();
DEB_PARAM_VAR1(dev.getDevNb());
DEB_PARAM() << DEB_VAR1(dev.getDevNb());
ostringstream os;
if (dev.isMeta())
......@@ -96,10 +96,10 @@ Dev& Acq::getDev()
int Acq::dispatchFrameCallback(struct espia_cb_data *cb_data)
{
DEB_STATIC_FUNCT();
DEB_PARAM_VAR1(cb_data->cb_nr);
DEB_PARAM() << DEB_VAR1(cb_data->cb_nr);
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;
......@@ -165,7 +165,7 @@ void Acq::disableFrameCallback()
void Acq::setFrameCallbackActive(bool cb_active)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_active);
DEB_PARAM() << DEB_VAR1(cb_active);
m_user_frame_cb_act = cb_active;
}
......@@ -185,7 +185,7 @@ void Acq::processFrameCallback(struct espia_cb_data *cb_data)
finished = (!endless && (cb_finfo.acq_frame_nr == last_frame));
}
DEB_TRACE_VAR2(aborted, finished);
DEB_TRACE() << DEB_VAR2(aborted, finished);
if (finished)
m_started = false;
......@@ -196,7 +196,7 @@ void Acq::processFrameCallback(struct espia_cb_data *cb_data)
if (!aborted)
real2virtFrameInfo(cb_finfo, hw_finfo);
DEB_TRACE_VAR1(hw_finfo);
DEB_TRACE() << DEB_VAR1(hw_finfo);
if (m_user_frame_cb_act) {
DEB_TRACE() << "Calling user FrameCallback";
......@@ -213,7 +213,7 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames,
const FrameDim& frame_dim)
{
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) ||
(nb_buffer_frames <= 0)) {
......@@ -252,11 +252,12 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames,
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_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,
real_frame_size));
......@@ -266,7 +267,7 @@ void Acq::bufferAlloc(int& nb_buffers, int nb_buffer_frames,
m_real_frame_factor = frame_factor;
m_real_frame_size = real_frame_size;
DEB_RETURN_VAR1(nb_buffers);
DEB_RETURN() << DEB_VAR1(nb_buffers);
}
void Acq::bufferFree()
......@@ -291,55 +292,55 @@ void Acq::bufferFree()
const FrameDim& Acq::getFrameDim()
{
DEB_MEMBER_FUNCT();
DEB_RETURN_VAR1(m_frame_dim);
DEB_RETURN() << DEB_VAR1(m_frame_dim);
return m_frame_dim;
}
void Acq::getNbBuffers(int& nb_buffers)
{
DEB_MEMBER_FUNCT();
DEB_RETURN_VAR1(nb_buffers);
DEB_RETURN() << DEB_VAR1(nb_buffers);
nb_buffers = m_nb_buffers;
}
void Acq::getNbBufferFrames(int& nb_buffer_frames)
{
DEB_MEMBER_FUNCT();
DEB_RETURN_VAR1(nb_buffer_frames);
DEB_RETURN() << DEB_VAR1(nb_buffer_frames);
nb_buffer_frames = m_nb_buffer_frames;
}
void *Acq::getBufferFramePtr(int buffer_nb, int frame_nb)
{
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_frame = realFrameNb(buffer_nb, frame_nb);
void *ptr;
DEB_TRACE() << "Calling espia_frame_address";
CHECK_CALL(espia_frame_address(m_dev, real_buffer, real_frame, &ptr));
DEB_RETURN_VAR1(ptr);
DEB_RETURN() << DEB_VAR1(ptr);
return ptr;
}
void *Acq::getAcqFramePtr(int acq_frame_nb)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(acq_frame_nb);
DEB_PARAM() << DEB_VAR1(acq_frame_nb);
unsigned long buffer_nb = ESPIA_ACQ_ANY;
void *ptr;
DEB_TRACE() << "Calling espia_frame_address";
CHECK_CALL(espia_frame_address(m_dev, buffer_nb, acq_frame_nb, &ptr));
DEB_RETURN_VAR1(ptr);
DEB_RETURN() << DEB_VAR1(ptr);
return ptr;
}
void Acq::getFrameInfo(int acq_frame_nb, HwFrameInfoType& info)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(acq_frame_nb);
DEB_PARAM() << DEB_VAR1(acq_frame_nb);
struct img_frame_info finfo;
finfo.buffer_nr = ESPIA_ACQ_ANY;
......@@ -357,7 +358,7 @@ void Acq::getFrameInfo(int acq_frame_nb, HwFrameInfoType& info)
CHECK_CALL(ret);
real2virtFrameInfo(finfo, info);
DEB_RETURN_VAR1(info);
DEB_RETURN() << DEB_VAR1(info);
}
void Acq::real2virtFrameInfo(const struct img_frame_info& real_info,
......@@ -391,10 +392,10 @@ void Acq::resetFrameInfo(struct img_frame_info& frame_info)
void Acq::setNbFrames(int nb_frames)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(nb_frames);
DEB_PARAM() << DEB_VAR1(nb_frames);
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");
}
......@@ -405,7 +406,7 @@ void Acq::getNbFrames(int& nb_frames)
{
DEB_MEMBER_FUNCT();
nb_frames = m_nb_frames;
DEB_RETURN_VAR1(nb_frames);
DEB_RETURN() << DEB_VAR1(nb_frames);
}
void Acq::start()
......@@ -459,13 +460,13 @@ void Acq::getStatus(StatusType& status)
status.run_nb = acq_run_nb;
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)
{
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) {
DEB_ERROR() << "AcqEndCallback already registered";
......@@ -480,7 +481,7 @@ void Acq::registerAcqEndCallback(AcqEndCallback& acq_end_cb)
void Acq::unregisterAcqEndCallback(AcqEndCallback& acq_end_cb)
{
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) {
DEB_ERROR() << "Specified AcqEndCallback not registered";
......
......@@ -13,7 +13,7 @@ BufferMgr::BufferMgr(Acq& acq)
DEB_CONSTRUCTOR();
Dev& dev = acq.getDev();
DEB_PARAM_VAR1(dev.getDevNb());
DEB_PARAM() << DEB_VAR1(dev.getDevNb());
ostringstream os;
if (dev.isMeta())
......@@ -37,14 +37,14 @@ int BufferMgr::getMaxNbBuffers(const FrameDim& frame_dim,
int nb_concat_frames)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(frame_dim, nb_concat_frames);
DEB_PARAM() << DEB_VAR2(frame_dim, nb_concat_frames);
FrameDim 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);
DEB_RETURN_VAR1(max_nb_buffers);
DEB_RETURN() << DEB_VAR1(max_nb_buffers);
return max_nb_buffers;
}
......@@ -105,7 +105,7 @@ void BufferMgr::getStartTimestamp(Timestamp& start_ts)
void BufferMgr::setFrameCallbackActive(bool cb_active)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_active);
DEB_PARAM() << DEB_VAR1(cb_active);
if (cb_active)
m_acq.registerFrameCallback(m_frame_cb);
......
......@@ -17,7 +17,7 @@ map<string, int> lima::Espia::EspiaDrvOptMap;
Dev::Dev(int dev_nb)
{
DEB_CONSTRUCTOR();
DEB_PARAM_VAR1(dev_nb);
DEB_PARAM() << DEB_VAR1(dev_nb);
ostringstream os;
if (dev_nb == MetaDev)
......@@ -43,7 +43,7 @@ Dev::~Dev()
void Dev::open(int dev_nb)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(dev_nb);
DEB_PARAM() << DEB_VAR1(dev_nb);
if (dev_nb == m_dev_nb) {
DEB_TRACE() << "Device already opened";
......@@ -74,11 +74,11 @@ void Dev::close()
void Dev::registerCallback(struct espia_cb_data& cb_data, int& cb_nr)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_data.type);
DEB_PARAM() << DEB_VAR1(cb_data.type);
DEB_TRACE() << "Calling espia_register_callback";
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 {
DEB_TRACE() << "Calling espia_callback_active";
......@@ -88,13 +88,13 @@ void Dev::registerCallback(struct espia_cb_data& cb_data, int& cb_nr)
throw;
}
DEB_RETURN_VAR1(cb_nr);
DEB_RETURN() << DEB_VAR1(cb_nr);
}
void Dev::unregisterCallback(int& cb_nr)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(cb_nr);
DEB_PARAM() << DEB_VAR1(cb_nr);
DEB_TRACE() << "Calling espia_unregister_callback";
CHECK_CALL(espia_unregister_callback(m_dev, cb_nr));
......@@ -122,7 +122,7 @@ void Dev::getCcdStatus(int& ccd_status)
DEB_TRACE() << "Calling espia_ccd_status";
CHECK_CALL(espia_ccd_status(m_dev, &status, SCDXIPCI_NO_BLOCK));
ccd_status = status;
DEB_RETURN_VAR1(ccd_status);
DEB_RETURN() << DEB_VAR1(DEB_HEX(ccd_status));
}
......@@ -140,7 +140,7 @@ void Dev::initEspiaDrvOptMap()
int nr_option = -1;
DEB_TRACE() << "Getting number of options";
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++) {
struct espia_option *eoption;
......@@ -148,7 +148,7 @@ void Dev::initEspiaDrvOptMap()
CHECK_CALL(espia_get_option_data(m_dev, &i, &eoption));
string option_name = eoption->name;
DEB_TRACE_VAR1(option_name);
DEB_TRACE() << DEB_VAR1(option_name);
EspiaDrvOptMap[option_name] = eoption->option;
}
......@@ -159,7 +159,7 @@ void Dev::initEspiaDrvOptMap()
void Dev::getDrvOption(const string& opt_name, int& val)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR1(opt_name);
DEB_PARAM() << DEB_VAR1(opt_name);
map<string, int>::iterator pop = EspiaDrvOptMap.find(opt_name);
if (pop == EspiaDrvOptMap.end()) {
......@@ -171,14 +171,14 @@ void Dev::getDrvOption(const string& opt_name, int& val)
DEB_TRACE() << "Reading driver option #" << pop->second;
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)
{
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);
if (pop == EspiaDrvOptMap.end()) {
......
......@@ -22,7 +22,7 @@ SerialLine::SerialLine(Dev& edev, const string& line_term,
m_dev(edev)
{
DEB_CONSTRUCTOR();
DEB_PARAM_VAR1(edev.getDevNb());
DEB_PARAM() << DEB_VAR1(edev.getDevNb());
if (edev.isMeta()) {
DEB_ERROR() << "Specified Dev is a meta-device";
......@@ -51,7 +51,7 @@ Dev& SerialLine::getDev()
void SerialLine::write(const string& buffer, bool no_wait)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(buffer, no_wait);
DEB_PARAM() << DEB_VAR2(buffer, no_wait);
unsigned long len = buffer.size();
char *ptr = len ? (char *) buffer.data() : NULL;
......@@ -67,7 +67,7 @@ void SerialLine::write(const string& buffer, bool no_wait)
void SerialLine::read(string& buffer, int max_len, double timeout)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR2(max_len, timeout);
DEB_PARAM() << DEB_VAR2(max_len, timeout);
buffer.resize(max_len);
char *ptr = max_len ? (char *) buffer.data() : NULL;
......@@ -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));
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,
const string& term, double timeout)
{
DEB_MEMBER_FUNCT();
DEB_PARAM_VAR3(max_len, term, timeout);
DEB_PARAM() << DEB_VAR3(max_len, term, timeout);
buffer.resize(max_len);
char *ptr = max_len ? (char *) buffer.data() : NULL;
......@@ -99,7 +99,7 @@ void SerialLine::readStr(string& buffer, int max_len,
term.size(), tmout));
buffer.resize(ret_len);
DEB_RETURN_VAR1(buffer);
DEB_RETURN() << DEB_VAR1(buffer);
}
......@@ -118,5 +118,5 @@ void SerialLine::getNbAvailBytes(int& avail_bytes)
unsigned long ret_bytes = 0;
CHECK_CALL(espia_ser_read(m_dev, NULL, &ret_bytes, 0));
avail_bytes = ret_bytes;
DEB_RETURN_VAR1(avail_bytes);
DEB_RETURN() << DEB_VAR1(avail_bytes);
}
......@@ -11,7 +11,7 @@ namespace Frelon
class Camera
{
DEB_CLASS_NAMESPC(DebModFrelon, "Camera", "Frelon");
DEB_CLASS_NAMESPC(DebModCamera, "Camera", "Frelon");
public:
Camera(Espia::SerialLine& espia_ser_line);
......
......@@ -12,7 +12,7 @@ namespace Frelon
class SerialLine : public HwSerialLine
{
DEB_CLASS_NAMESPC(DebModFrelonSerial, "SerialLine", "Frelon");
DEB_CLASS_NAMESPC(DebModCameraCom, "SerialLine", "Frelon");
public:
enum MsgPart {
......
......@@ -17,7 +17,11 @@ Camera::Camera(Espia::SerialLine& espia_ser_line)
DEB_CONSTRUCTOR();
m_trig_mode = IntTrig;
readRegister(NbFrames, m_nb_frames);
string ver;
getVersion(ver);
int ser_nb;
getSerialNb(ser_nb);
}
Camera::~Camera()
......@@ -42,7 +46,7 @@ void Camera::sendCmd(Cmd cmd)
{
DEB_MEMBER_FUNCT();
const string& cmd_str = CmdStrMap[cmd];
DEB_PARAM_VAR2(int(cmd), cmd_str);
DEB_PARAM() << DEB_VAR2(cmd, cmd_str);
if (cmd_str.empty()) {
DEB_ERROR() << "Invalid command cmd=" << cmd;
throw LIMA_HW_EXC(InvalidValue, "Invalid command");
......@@ -56,7 +60,7 @@ void Camera::writeRegister(Reg reg, int val)
{
DEB_MEMBER_FUNCT();
const string& reg_str = RegStrMap[reg];
DEB_PARAM_VAR3(int(reg), reg_str, val);
DEB_PARAM() << DEB_VAR3(reg, reg_str, val);
if (reg_str.empty()) {
DEB_ERROR() << "Invalid register reg=" << reg;
throw LIMA_HW_EXC(InvalidValue, "Invalid register");
......@@ -71,8 +75,9 @@ void Camera::writeRegister(Reg reg, int val)
void Camera::readRegister(Reg reg, int& val)
{
DEB_MEMBER_FUNCT();
const string& reg_str = RegStrMap[reg];
DEB_PARAM_VAR2(int(reg), reg_str);
DEB_PARAM() << DEB_VAR2(reg, reg_str);
if (reg_str.empty()) {
DEB_ERROR() << "Invalid register reg=" << reg;
throw LIMA_HW_EXC(InvalidValue, "Invalid register");
......@@ -82,6 +87,8 @@ void Camera::readRegister(Reg reg, int& val)
m_ser_line.sendFmtCmd(reg_str + "?", resp);
istringstream is(resp);
is >> val;
DEB_RETURN() << DEB_VAR1(val);
}
void Camera::hardReset()
......@@ -96,17 +103,23 @@ void Camera::hardReset()
void Camera::getVersion(string& ver)
{
DEB_MEMBER_FUNCT();
string cmd = RegStrMap[Version] + "?";
m_ser_line.sendFmtCmd(cmd, ver);
DEB_RETURN() << DEB_VAR1(ver);
}
void Camera::getComplexSerialNb(int& complex_ser_nb)
{
DEB_MEMBER_FUNCT();
readRegister(CompSerNb, complex_ser_nb);
DEB_RETURN() << DEB_VAR1(DEB_HEX(complex_ser_nb));
}
void Camera::getSerialNbParam(SerNbParam param, int& val)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(DEB_HEX(param));
int complex_ser_nb;
getComplexSerialNb(complex_ser_nb);
val = complex_ser_nb & int(param);
......@@ -114,48 +127,65 @@ void Camera::getSerialNbParam(SerNbParam param, int& val)
void Camera::getSerialNb(int& ser_nb)
{
DEB_MEMBER_FUNCT();
getSerialNbParam(SerNb, ser_nb);
DEB_RETURN() << DEB_VAR1(ser_nb);
}
void Camera::isFrelon2k16(bool& is_frelon_2k16)
{
DEB_MEMBER_FUNCT();
int frelon_2k16;
getSerialNbParam(F2k16, frelon_2k16);
is_frelon_2k16 = bool(frelon_2k16);
DEB_RETURN() << DEB_VAR1(is_frelon_2k16);
}
void Camera::isFrelon4M(bool& is_frelon_4m)
{
DEB_MEMBER_FUNCT();
int f4m;
getSerialNbParam(F4M, f4m);
is_frelon_4m = bool(f4m);
DEB_RETURN() << DEB_VAR1(is_frelon_4m);
}
void Camera::hasTaper(bool& has_taper)
{
DEB_MEMBER_FUNCT();
int taper;
getSerialNbParam(Taper, taper);
has_taper = bool(taper);
DEB_RETURN() << DEB_VAR1(has_taper);
}
void Camera::setChanMode(int chan_mode)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(chan_mode);
writeRegister(ChanMode, chan_mode);
}
void Camera::getChanMode(int& chan_mode)
{
DEB_MEMBER_FUNCT();
readRegister(ChanMode, chan_mode);
DEB_RETURN() << DEB_VAR1(chan_mode);
}
void Camera::getBaseChanMode(FrameTransferMode ftm, int& base_chan_mode)
{
DEB_MEMBER_FUNCT();
base_chan_mode = FTMChanRangeMap[ftm].first;
DEB_RETURN() << DEB_VAR1(base_chan_mode);
}
void Camera::getInputChanMode(FrameTransferMode ftm, InputChan input_chan,
int& chan_mode)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR2(ftm, DEB_HEX(input_chan));
getBaseChanMode(ftm, chan_mode);
const InputChanList& chan_list = FTMInputChanListMap[ftm];
InputChanList::const_iterator it;
......@@ -163,10 +193,15 @@ void Camera::getInputChanMode(FrameTransferMode ftm, InputChan input_chan,
if (it == chan_list.end())
throw LIMA_HW_EXC(InvalidValue, "Invalid input channel");
chan_mode += it - chan_list.begin();
DEB_RETURN() << DEB_VAR1(chan_mode);
}
void Camera::setInputChan(InputChan input_chan)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(DEB_HEX(input_chan));
FrameTransferMode ftm;
getFrameTransferMode(ftm);
int chan_mode;
......@@ -176,16 +211,23 @@ void Camera::setInputChan(InputChan input_chan)
void Camera::getInputChan(InputChan& input_chan)
{
DEB_MEMBER_FUNCT();
FrameTransferMode ftm;
getFrameTransferMode(ftm);
int chan_mode, base_chan_mode;
getChanMode(chan_mode);
getBaseChanMode(ftm, base_chan_mode);
input_chan = FTMInputChanListMap[ftm][chan_mode - base_chan_mode];
DEB_RETURN() << DEB_VAR1(DEB_HEX(input_chan));
}
void Camera::setFrameTransferMode(FrameTransferMode ftm)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(ftm);
InputChan input_chan;
getInputChan(input_chan);
int chan_mode;
......@@ -195,6 +237,8 @@ void Camera::setFrameTransferMode(FrameTransferMode ftm)
void Camera::getFrameTransferMode(FrameTransferMode& ftm)
{
DEB_MEMBER_FUNCT();
int chan_mode;
getChanMode(chan_mode);
......@@ -202,8 +246,10 @@ void Camera::getFrameTransferMode(FrameTransferMode& ftm)
for (it = FTMChanRangeMap.begin(); it != end; ++it) {
ftm = it->first;
const ChanRange& range = it->second;
if ((chan_mode >= range.first) && (chan_mode < range.second))
if ((chan_mode >= range.first) && (chan_mode < range.second)) {