Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkQuantelLaser.h>
Public Types | |
enum | LaserState { UNCONNECTED, STATE0, STATE1, STATE2, STATE3, STATE4, STATE5, STATE6, STATE7 } |
typedef mitk::SerialCommunication::PortNumber | PortNumber |
Port number of the serial connection. More... | |
typedef mitk::SerialCommunication::BaudRate | BaudRate |
Baud rate of the serial connection. More... | |
typedef mitk::SerialCommunication::DataBits | DataBits |
Number of data bits used in the serial connection. More... | |
typedef mitk::SerialCommunication::Parity | Parity |
Parity mode used in the serial connection. More... | |
typedef mitk::SerialCommunication::StopBits | StopBits |
Number of stop bits used in the serial connection. More... | |
typedef mitk::SerialCommunication::HardwareHandshake | HardwareHandshake |
Hardware handshake mode of the serial connection. More... | |
Public Member Functions | |
mitkClassMacroItkParent (QuantelLaser, itk::LightObject) | |
virtual bool | OpenConnection (std::string configurationFile) |
Opens a connection to the device. More... | |
virtual bool | CloseConnection () |
Closes the connection to the device. More... | |
virtual std::string | SendAndReceiveLine (const std::string *input, std::string *answer) |
virtual void | StayAlive () |
virtual bool | StartFlashing () |
virtual bool | StopFlashing () |
virtual bool | StartQswitching () |
virtual bool | StopQswitching () |
virtual bool | IsEmitting () |
virtual bool | IsFlashing () |
virtual LaserState | GetState () |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
QuantelLaser () | |
virtual | ~QuantelLaser () |
void | LoadResorceFile (std::string filename, std::string *lines) |
Protected Attributes | |
bool | m_KeepAlive |
bool | m_FlashlampRunning |
bool | m_ShutterOpen |
bool | m_LaserEmission |
std::string | m_DeviceName |
Device Name. More... | |
PortNumber | m_PortNumber |
COM Port Number. More... | |
BaudRate | m_BaudRate |
COM Port Baud Rate. More... | |
DataBits | m_DataBits |
Number of Data Bits per token. More... | |
Parity | m_Parity |
Parity mode for communication. More... | |
StopBits | m_StopBits |
number of stop bits per token More... | |
HardwareHandshake | m_HardwareHandshake |
use hardware handshake for serial port connection More... | |
std::string | m_XmlPumpLaserConfiguration |
mitk::SerialCommunication::Pointer | m_SerialCommunication |
serial communication interface More... | |
std::thread | m_StayAliveMessageThread |
std::mutex | m_SerialCommunicationMutex |
mutex for coordinated access of serial communication interface More... | |
Definition at line 35 of file mitkQuantelLaser.h.
Baud rate of the serial connection.
Definition at line 71 of file mitkQuantelLaser.h.
Number of data bits used in the serial connection.
Definition at line 72 of file mitkQuantelLaser.h.
Hardware handshake mode of the serial connection.
Definition at line 75 of file mitkQuantelLaser.h.
Parity mode used in the serial connection.
Definition at line 73 of file mitkQuantelLaser.h.
Port number of the serial connection.
Definition at line 70 of file mitkQuantelLaser.h.
Number of stop bits used in the serial connection.
Definition at line 74 of file mitkQuantelLaser.h.
Enumerator | |
---|---|
UNCONNECTED | |
STATE0 | |
STATE1 | |
STATE2 | |
STATE3 | |
STATE4 | |
STATE5 | |
STATE6 | |
STATE7 |
Definition at line 41 of file mitkQuantelLaser.h.
|
protected |
Definition at line 27 of file mitkQuantelLaser.cpp.
References mitk::None.
|
protectedvirtual |
Definition at line 45 of file mitkQuantelLaser.cpp.
References CloseConnection(), GetState(), m_SerialCommunication, m_StayAliveMessageThread, STATE2, STATE3, STATE4, STATE5, STATE6, StopFlashing(), and StopQswitching().
|
virtual |
Closes the connection to the device.
This may only be called if there is currently a connection to the device. (e.g. object is in a STATE state)Closes the connection with the device
Definition at line 176 of file mitkQuantelLaser.cpp.
References GetState(), m_SerialCommunication, StopFlashing(), StopQswitching(), and UNCONNECTED.
Referenced by ~QuantelLaser().
|
virtual |
Definition at line 191 of file mitkQuantelLaser.cpp.
References m_FlashlampRunning, m_LaserEmission, m_SerialCommunication, m_ShutterOpen, MITK_INFO, SendAndReceiveLine(), STATE0, STATE1, STATE2, STATE3, STATE4, STATE5, STATE6, STATE7, and UNCONNECTED.
Referenced by CloseConnection(), OpenConnection(), StartFlashing(), StartQswitching(), StopFlashing(), StopQswitching(), and ~QuantelLaser().
|
virtual |
Definition at line 398 of file mitkQuantelLaser.cpp.
References m_LaserEmission.
|
virtual |
Definition at line 402 of file mitkQuantelLaser.cpp.
References m_FlashlampRunning.
|
protected |
Definition at line 100 of file mitkQuantelLaser.cpp.
References ModuleContext::GetModule(), us::GetModuleContext(), us::ModuleResource::IsFile(), us::ModuleResource::IsValid(), line, and MITK_ERROR.
Referenced by OpenConnection().
mitk::QuantelLaser::mitkClassMacroItkParent | ( | QuantelLaser | , |
itk::LightObject | |||
) |
|
static |
|
virtual |
Opens a connection to the device.
This may only be called if there is currently no connection to the device. If OpenConnection() is successful, the object will change from UNCONNECTED state to a STATE state
Definition at line 118 of file mitkQuantelLaser.cpp.
References GetState(), LoadResorceFile(), m_BaudRate, m_DataBits, m_DeviceName, m_Parity, m_PortNumber, m_SerialCommunication, m_StopBits, m_XmlPumpLaserConfiguration, MITK_ERROR, MITK_INFO, mitk::SerialCommunication::New(), SendAndReceiveLine(), and UNCONNECTED.
|
virtual |
Definition at line 71 of file mitkQuantelLaser.cpp.
References LF, m_SerialCommunication, and MITK_INFO.
Referenced by GetState(), OpenConnection(), StartFlashing(), StartQswitching(), StayAlive(), StopFlashing(), and StopQswitching().
|
virtual |
Definition at line 284 of file mitkQuantelLaser.cpp.
References GetState(), m_FlashlampRunning, m_KeepAlive, m_LaserEmission, m_ShutterOpen, MITK_ERROR, MITK_INFO, SendAndReceiveLine(), and StopQswitching().
|
virtual |
Definition at line 348 of file mitkQuantelLaser.cpp.
References GetState(), m_FlashlampRunning, m_LaserEmission, m_ShutterOpen, MITK_ERROR, MITK_INFO, and SendAndReceiveLine().
|
virtual |
Definition at line 273 of file mitkQuantelLaser.cpp.
References m_KeepAlive, and SendAndReceiveLine().
|
virtual |
Definition at line 316 of file mitkQuantelLaser.cpp.
References GetState(), m_FlashlampRunning, m_KeepAlive, m_LaserEmission, m_ShutterOpen, MITK_ERROR, MITK_INFO, SendAndReceiveLine(), and StopQswitching().
Referenced by CloseConnection(), and ~QuantelLaser().
|
virtual |
Definition at line 377 of file mitkQuantelLaser.cpp.
References GetState(), m_FlashlampRunning, m_LaserEmission, MITK_ERROR, MITK_INFO, and SendAndReceiveLine().
Referenced by CloseConnection(), StartFlashing(), StopFlashing(), and ~QuantelLaser().
|
protected |
COM Port Baud Rate.
Definition at line 92 of file mitkQuantelLaser.h.
Referenced by OpenConnection().
|
protected |
Number of Data Bits per token.
Definition at line 93 of file mitkQuantelLaser.h.
Referenced by OpenConnection().
|
protected |
|
protected |
Definition at line 85 of file mitkQuantelLaser.h.
Referenced by GetState(), IsFlashing(), StartFlashing(), StartQswitching(), StopFlashing(), and StopQswitching().
|
protected |
use hardware handshake for serial port connection
Definition at line 96 of file mitkQuantelLaser.h.
|
protected |
Definition at line 84 of file mitkQuantelLaser.h.
Referenced by StartFlashing(), StayAlive(), and StopFlashing().
|
protected |
Definition at line 87 of file mitkQuantelLaser.h.
Referenced by GetState(), IsEmitting(), StartFlashing(), StartQswitching(), StopFlashing(), and StopQswitching().
|
protected |
Parity mode for communication.
Definition at line 94 of file mitkQuantelLaser.h.
Referenced by OpenConnection().
|
protected |
|
protected |
serial communication interface
Definition at line 99 of file mitkQuantelLaser.h.
Referenced by CloseConnection(), GetState(), OpenConnection(), SendAndReceiveLine(), and ~QuantelLaser().
|
protected |
mutex for coordinated access of serial communication interface
Definition at line 101 of file mitkQuantelLaser.h.
|
protected |
Definition at line 86 of file mitkQuantelLaser.h.
Referenced by GetState(), StartFlashing(), StartQswitching(), and StopFlashing().
|
protected |
Definition at line 100 of file mitkQuantelLaser.h.
Referenced by ~QuantelLaser().
|
protected |
number of stop bits per token
Definition at line 95 of file mitkQuantelLaser.h.
Referenced by OpenConnection().
|
protected |
Definition at line 98 of file mitkQuantelLaser.h.
Referenced by OpenConnection().