Medical Imaging Interaction Toolkit  2018.4.99-bd7b41ba
Medical Imaging Interaction Toolkit
mitk::QuantelLaser Class Reference

#include <mitkQuantelLaser.h>

Inheritance diagram for mitk::QuantelLaser:
Collaboration diagram for mitk::QuantelLaser:

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...
 

Detailed Description

Definition at line 35 of file mitkQuantelLaser.h.

Member Typedef Documentation

◆ BaudRate

Baud rate of the serial connection.

Definition at line 71 of file mitkQuantelLaser.h.

◆ DataBits

Number of data bits used in the serial connection.

Definition at line 72 of file mitkQuantelLaser.h.

◆ HardwareHandshake

Hardware handshake mode of the serial connection.

Definition at line 75 of file mitkQuantelLaser.h.

◆ Parity

Parity mode used in the serial connection.

Definition at line 73 of file mitkQuantelLaser.h.

◆ PortNumber

Port number of the serial connection.

Definition at line 70 of file mitkQuantelLaser.h.

◆ StopBits

Number of stop bits used in the serial connection.

Definition at line 74 of file mitkQuantelLaser.h.

Member Enumeration Documentation

◆ LaserState

Enumerator
UNCONNECTED 
STATE0 
STATE1 
STATE2 
STATE3 
STATE4 
STATE5 
STATE6 
STATE7 

Definition at line 41 of file mitkQuantelLaser.h.

Constructor & Destructor Documentation

◆ QuantelLaser()

mitk::QuantelLaser::QuantelLaser ( )
protected

Definition at line 27 of file mitkQuantelLaser.cpp.

References mitk::None.

◆ ~QuantelLaser()

mitk::QuantelLaser::~QuantelLaser ( )
protectedvirtual

Member Function Documentation

◆ CloseConnection()

bool mitk::QuantelLaser::CloseConnection ( )
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().

◆ GetState()

◆ IsEmitting()

bool mitk::QuantelLaser::IsEmitting ( )
virtual

Definition at line 398 of file mitkQuantelLaser.cpp.

References m_LaserEmission.

◆ IsFlashing()

bool mitk::QuantelLaser::IsFlashing ( )
virtual

Definition at line 402 of file mitkQuantelLaser.cpp.

References m_FlashlampRunning.

◆ LoadResorceFile()

void mitk::QuantelLaser::LoadResorceFile ( std::string  filename,
std::string *  lines 
)
protected

◆ mitkClassMacroItkParent()

mitk::QuantelLaser::mitkClassMacroItkParent ( QuantelLaser  ,
itk::LightObject   
)

◆ New()

static Pointer mitk::QuantelLaser::New ( )
static

◆ OpenConnection()

bool mitk::QuantelLaser::OpenConnection ( std::string  configurationFile)
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.

◆ SendAndReceiveLine()

std::string mitk::QuantelLaser::SendAndReceiveLine ( const std::string *  input,
std::string *  answer 
)
virtual

◆ StartFlashing()

bool mitk::QuantelLaser::StartFlashing ( )
virtual

◆ StartQswitching()

bool mitk::QuantelLaser::StartQswitching ( )
virtual

◆ StayAlive()

void mitk::QuantelLaser::StayAlive ( )
virtual

Definition at line 273 of file mitkQuantelLaser.cpp.

References m_KeepAlive, and SendAndReceiveLine().

◆ StopFlashing()

bool mitk::QuantelLaser::StopFlashing ( )
virtual

◆ StopQswitching()

bool mitk::QuantelLaser::StopQswitching ( )
virtual

Member Data Documentation

◆ m_BaudRate

BaudRate mitk::QuantelLaser::m_BaudRate
protected

COM Port Baud Rate.

Definition at line 92 of file mitkQuantelLaser.h.

Referenced by OpenConnection().

◆ m_DataBits

DataBits mitk::QuantelLaser::m_DataBits
protected

Number of Data Bits per token.

Definition at line 93 of file mitkQuantelLaser.h.

Referenced by OpenConnection().

◆ m_DeviceName

std::string mitk::QuantelLaser::m_DeviceName
protected

Device Name.

Definition at line 90 of file mitkQuantelLaser.h.

Referenced by OpenConnection().

◆ m_FlashlampRunning

bool mitk::QuantelLaser::m_FlashlampRunning
protected

◆ m_HardwareHandshake

HardwareHandshake mitk::QuantelLaser::m_HardwareHandshake
protected

use hardware handshake for serial port connection

Definition at line 96 of file mitkQuantelLaser.h.

◆ m_KeepAlive

bool mitk::QuantelLaser::m_KeepAlive
protected

Definition at line 84 of file mitkQuantelLaser.h.

Referenced by StartFlashing(), StayAlive(), and StopFlashing().

◆ m_LaserEmission

bool mitk::QuantelLaser::m_LaserEmission
protected

◆ m_Parity

Parity mitk::QuantelLaser::m_Parity
protected

Parity mode for communication.

Definition at line 94 of file mitkQuantelLaser.h.

Referenced by OpenConnection().

◆ m_PortNumber

PortNumber mitk::QuantelLaser::m_PortNumber
protected

COM Port Number.

Definition at line 91 of file mitkQuantelLaser.h.

Referenced by OpenConnection().

◆ m_SerialCommunication

mitk::SerialCommunication::Pointer mitk::QuantelLaser::m_SerialCommunication
protected

serial communication interface

Definition at line 99 of file mitkQuantelLaser.h.

Referenced by CloseConnection(), GetState(), OpenConnection(), SendAndReceiveLine(), and ~QuantelLaser().

◆ m_SerialCommunicationMutex

std::mutex mitk::QuantelLaser::m_SerialCommunicationMutex
protected

mutex for coordinated access of serial communication interface

Definition at line 101 of file mitkQuantelLaser.h.

◆ m_ShutterOpen

bool mitk::QuantelLaser::m_ShutterOpen
protected

Definition at line 86 of file mitkQuantelLaser.h.

Referenced by GetState(), StartFlashing(), StartQswitching(), and StopFlashing().

◆ m_StayAliveMessageThread

std::thread mitk::QuantelLaser::m_StayAliveMessageThread
protected

Definition at line 100 of file mitkQuantelLaser.h.

Referenced by ~QuantelLaser().

◆ m_StopBits

StopBits mitk::QuantelLaser::m_StopBits
protected

number of stop bits per token

Definition at line 95 of file mitkQuantelLaser.h.

Referenced by OpenConnection().

◆ m_XmlPumpLaserConfiguration

std::string mitk::QuantelLaser::m_XmlPumpLaserConfiguration
protected

Definition at line 98 of file mitkQuantelLaser.h.

Referenced by OpenConnection().


The documentation for this class was generated from the following files: