|
|
|
|
|
|
|
|
if(m_Port.is_open()) |
|
|
if(m_Port.is_open()) |
|
|
{ |
|
|
{ |
|
|
this->getLogManager() << LogLevel_Info << "Connected to Serial Port: " << m_PortName << "\n"; |
|
|
this->getLogManager() << LogLevel_Info << "Connected to Serial Port: " << m_PortName << "\n"; |
|
|
|
|
|
m_Port.write_some(boost::asio::buffer("0")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CBoxAlgorithmTactiloController::uninitialize() |
|
|
bool CBoxAlgorithmTactiloController::uninitialize() |
|
|
{ |
|
|
{ |
|
|
|
|
|
this->getLogManager() << LogLevel_Info << "Close Serial Port: " << m_PortName << "\n"; |
|
|
|
|
|
m_Port.write_some(boost::asio::buffer("0")); |
|
|
|
|
|
m_Port.close(); |
|
|
|
|
|
|
|
|
m_StimDecoder.uninitialize(); |
|
|
m_StimDecoder.uninitialize(); |
|
|
m_StimEncoder.uninitialize(); |
|
|
m_StimEncoder.uninitialize(); |
|
|
|
|
|
|
|
|
m_Port.close(); |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|