cass port: getDeviceName() added.
This commit is contained in:
@@ -62,7 +62,7 @@ BaseLoop::BaseLoop()
|
||||
m_port->open();
|
||||
|
||||
if (m_port->isOpen() == false)
|
||||
L.log(bus, error, "can't open %s", A.getOptVal<const char*>("device"));
|
||||
L.log(bus, error, "can't open %s", m_port->getDeviceName());
|
||||
|
||||
// create BusHandler
|
||||
m_busHandler = new BusHandler(m_port, m_messages,
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
using namespace std;
|
||||
|
||||
extern Logger& L;
|
||||
extern Appl& A;
|
||||
|
||||
/**
|
||||
* @brief Return the string corresponding to the @a BusState.
|
||||
@@ -219,7 +218,7 @@ void BusHandler::run()
|
||||
result_t result = m_port->open();
|
||||
|
||||
if (result != RESULT_OK)
|
||||
L.log(bus, error, "can't open %s", A.getOptVal<const char*>("device"));
|
||||
L.log(bus, error, "can't open %s", m_port->getDeviceName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -288,6 +288,12 @@ public:
|
||||
*/
|
||||
void setDumpRawMaxSize(const long maxSize) { m_dumpRawMaxSize = maxSize; }
|
||||
|
||||
/**
|
||||
* @brief Return the device name.
|
||||
* @return the device name.
|
||||
*/
|
||||
const char* getDeviceName() { return m_deviceName.c_str(); }
|
||||
|
||||
private:
|
||||
/** the device name */
|
||||
const string m_deviceName;
|
||||
|
||||
Reference in New Issue
Block a user