PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions
PlusCmsBrachyStepper Class Reference

#include <src/PlusDataCollection/BrachyTracking/PlusCmsBrachyStepper.h>

Inheritance diagram for PlusCmsBrachyStepper:
Inheritance graph
[legend]
Collaboration diagram for PlusCmsBrachyStepper:
Collaboration graph
[legend]

Public Types

typedef const char * STEPPERCOMMAND
 
typedef const char * STEPPERRESPCODE
 
- Public Types inherited from PlusBrachyStepper
enum  BRACHY_STEPPER_TYPE {
  UNDEFINED_STEPPER, BURDETTE_MEDICAL_SYSTEMS_DIGITAL_STEPPER, BURDETTE_MEDICAL_SYSTEMS_DIGITAL_MOTORIZED_STEPPER, CMS_ACCUSEED_DS300,
  CIVCO_STEPPER
}
 

Public Member Functions

virtual PlusStatus Connect ()
 
virtual PlusStatus Disconnect ()
 
PlusStatus GetCalibrationState (int &PState, int &GState, int &RState)
 
virtual PlusStatus GetDeviceModelInfo (std::string &version, std::string &model, std::string &serial)
 
virtual PlusStatus GetEncoderValues (double &PPosition, double &GPosition, double &RPosition, unsigned long &PositionRequestNumber)
 
PlusStatus GetGridReferenceData (double &count, double &dist, double &scale)
 
PlusStatus GetMotorizationScaleFactor (int &scaleFactor)
 
PlusStatus GetProbeReferenceData (double &count, double &dist, double &scale)
 
PlusStatus GetRotateState (int &State)
 
PlusStatus GetRotationReferenceData (double &count, double &dist, double &scale)
 
PlusStatus GetStatusInfo (unsigned int &Status)
 
virtual PlusStatus InitializeStepper (std::string &CalibMsg)
 
virtual PlusStatus IsStepperAlive ()
 
bool IsStepperCalibrated ()
 
bool IsStepperMotorized ()
 
PlusStatus MoveProbeToPosition (double PositionInMm, int &ReturnCode)
 
 PlusCmsBrachyStepper (unsigned long COMPort=1, unsigned long BaudRate=19200)
 
virtual PlusStatus ResetStepper ()
 
virtual PlusStatus SetBaudRate (unsigned long BaudRate)
 
virtual PlusStatus SetCOMPort (unsigned long COMPort)
 
virtual ~PlusCmsBrachyStepper ()
 
- Public Member Functions inherited from PlusBrachyStepper
BRACHY_STEPPER_TYPE GetBrachyStepperType () const
 
 PlusBrachyStepper ()
 
void SetBrachyStepperType (BRACHY_STEPPER_TYPE type)
 
virtual ~PlusBrachyStepper ()
 

Protected Member Functions

void ClearBuffer ()
 
void CreateAckMessage (BYTE opcode, std::string *sMessage)
 
void DecodeStepperMessage (std::vector< BYTE > StepperMessage, std::vector< BYTE > &DecodedMessage)
 
void GetPositionMessage (std::vector< BYTE > &StepperMessage, std::vector< BYTE > &DecodedMessage)
 
PlusStatus GetReferenceData (STEPPERCOMMAND command, STEPPERRESPCODE respcode, double &count, double &dist, double &scale)
 
void GetStepperMessage (STEPPERCOMMAND command, const char *Response, std::vector< BYTE > &DecodedMessage)
 
PlusStatus GetVersionInfo (int &iVerHi, int &iVerLo, int &iModelNum, int &iSerialNum)
 
bool IsStepperACKRecieved (std::vector< BYTE > &ackMessage, STEPPERCOMMAND command)
 
void ReadStepperAnswer (std::vector< BYTE > &stepperAnswer)
 
void SendAckMessage (std::vector< BYTE > StepperMessage)
 
void SendPositionRequestCommand (STEPPERCOMMAND command, std::vector< BYTE > &vRawMessage)
 
void SendStepperCommand (STEPPERCOMMAND command, STEPPERRESPCODE Response, std::vector< BYTE > &vRawMessage)
 
void SetScalingParameters ()
 
PlusStatus StepperButtonDisable ()
 
PlusStatus StepperButtonEnable ()
 
void StepperInstruction (STEPPERCOMMAND command)
 
PlusStatus StepperRotateCalibrationDisable ()
 
PlusStatus StepperRotateCalibrationEnable ()
 
PlusStatus TurnMotorOff ()
 
PlusStatus TurnMotorOn ()
 

Static Protected Member Functions

static unsigned int AsciiToBin (unsigned int i, unsigned int j)
 
static void BinToAscii (unsigned int n, unsigned char *c1, unsigned char *c2)
 

Additional Inherited Members

- Static Public Member Functions inherited from PlusBrachyStepper
static std::string GetBrachyStepperTypeInString (BRACHY_STEPPER_TYPE stepperType)
 
- Protected Attributes inherited from PlusBrachyStepper
BRACHY_STEPPER_TYPE m_BrachyStepperType
 
unsigned long m_PositionRequestNumber
 

Detailed Description

Definition at line 32 of file PlusCmsBrachyStepper.h.

Member Typedef Documentation

◆ STEPPERCOMMAND

Definition at line 35 of file PlusCmsBrachyStepper.h.

◆ STEPPERRESPCODE

Definition at line 36 of file PlusCmsBrachyStepper.h.

Constructor & Destructor Documentation

◆ PlusCmsBrachyStepper()

PlusCmsBrachyStepper::PlusCmsBrachyStepper ( unsigned long  COMPort = 1,
unsigned long  BaudRate = 19200 
)

Constructor

Definition at line 96 of file PlusCmsBrachyStepper.cxx.

◆ ~PlusCmsBrachyStepper()

PlusCmsBrachyStepper::~PlusCmsBrachyStepper ( )
virtual

Destructor

Definition at line 116 of file PlusCmsBrachyStepper.cxx.

Member Function Documentation

◆ AsciiToBin()

unsigned int PlusCmsBrachyStepper::AsciiToBin ( unsigned int  i,
unsigned int  j 
)
staticprotected

Convert from ASCII to binary

Definition at line 1083 of file PlusCmsBrachyStepper.cxx.

◆ BinToAscii()

void PlusCmsBrachyStepper::BinToAscii ( unsigned int  n,
unsigned char *  c1,
unsigned char *  c2 
)
staticprotected

Convert from binary to ASCII

Definition at line 1101 of file PlusCmsBrachyStepper.cxx.

◆ ClearBuffer()

void PlusCmsBrachyStepper::ClearBuffer ( )
protected

Clear buffer

Definition at line 1054 of file PlusCmsBrachyStepper.cxx.

◆ Connect()

PlusStatus PlusCmsBrachyStepper::Connect ( )
virtual

Connect to CMS stepper

Implements PlusBrachyStepper.

Definition at line 160 of file PlusCmsBrachyStepper.cxx.

◆ CreateAckMessage()

void PlusCmsBrachyStepper::CreateAckMessage ( BYTE  opcode,
std::string *  sMessage 
)
protected

Create ACK message

Definition at line 1061 of file PlusCmsBrachyStepper.cxx.

◆ DecodeStepperMessage()

void PlusCmsBrachyStepper::DecodeStepperMessage ( std::vector< BYTE StepperMessage,
std::vector< BYTE > &  DecodedMessage 
)
protected

Decode stepper message

Definition at line 1017 of file PlusCmsBrachyStepper.cxx.

◆ Disconnect()

PlusStatus PlusCmsBrachyStepper::Disconnect ( )
virtual

Disconnect from CMS stepper

Implements PlusBrachyStepper.

Definition at line 188 of file PlusCmsBrachyStepper.cxx.

◆ GetCalibrationState()

PlusStatus PlusCmsBrachyStepper::GetCalibrationState ( int PState,
int GState,
int RState 
)

Get calibration state

Definition at line 376 of file PlusCmsBrachyStepper.cxx.

◆ GetDeviceModelInfo()

PlusStatus PlusCmsBrachyStepper::GetDeviceModelInfo ( std::string &  version,
std::string &  model,
std::string &  serial 
)
virtual

Get device mode information

Implements PlusBrachyStepper.

Definition at line 196 of file PlusCmsBrachyStepper.cxx.

◆ GetEncoderValues()

PlusStatus PlusCmsBrachyStepper::GetEncoderValues ( double &  PPosition,
double &  GPosition,
double &  RPosition,
unsigned long &  PositionRequestNumber 
)
virtual

Get raw encoder values from stepper

Implements PlusBrachyStepper.

Definition at line 328 of file PlusCmsBrachyStepper.cxx.

◆ GetGridReferenceData()

PlusStatus PlusCmsBrachyStepper::GetGridReferenceData ( double &  count,
double &  dist,
double &  scale 
)

Get grid reference data

Definition at line 302 of file PlusCmsBrachyStepper.cxx.

◆ GetMotorizationScaleFactor()

PlusStatus PlusCmsBrachyStepper::GetMotorizationScaleFactor ( int scaleFactor)

Return motorization scale factor

Definition at line 586 of file PlusCmsBrachyStepper.cxx.

◆ GetPositionMessage()

void PlusCmsBrachyStepper::GetPositionMessage ( std::vector< BYTE > &  StepperMessage,
std::vector< BYTE > &  DecodedMessage 
)
protected

Get position message from stepper

Definition at line 980 of file PlusCmsBrachyStepper.cxx.

◆ GetProbeReferenceData()

PlusStatus PlusCmsBrachyStepper::GetProbeReferenceData ( double &  count,
double &  dist,
double &  scale 
)

Get probe reference data

Definition at line 289 of file PlusCmsBrachyStepper.cxx.

◆ GetReferenceData()

PlusStatus PlusCmsBrachyStepper::GetReferenceData ( STEPPERCOMMAND  command,
STEPPERRESPCODE  respcode,
double &  count,
double &  dist,
double &  scale 
)
protected

Get reference data

Definition at line 266 of file PlusCmsBrachyStepper.cxx.

◆ GetRotateState()

PlusStatus PlusCmsBrachyStepper::GetRotateState ( int State)

Get rotation state

Definition at line 399 of file PlusCmsBrachyStepper.cxx.

◆ GetRotationReferenceData()

PlusStatus PlusCmsBrachyStepper::GetRotationReferenceData ( double &  count,
double &  dist,
double &  scale 
)

Get rotation reference data

Definition at line 315 of file PlusCmsBrachyStepper.cxx.

◆ GetStatusInfo()

PlusStatus PlusCmsBrachyStepper::GetStatusInfo ( unsigned int Status)

Get status information

Definition at line 221 of file PlusCmsBrachyStepper.cxx.

◆ GetStepperMessage()

void PlusCmsBrachyStepper::GetStepperMessage ( STEPPERCOMMAND  command,
const char *  Response,
std::vector< BYTE > &  DecodedMessage 
)
protected

Get message from stepper

Definition at line 923 of file PlusCmsBrachyStepper.cxx.

◆ GetVersionInfo()

PlusStatus PlusCmsBrachyStepper::GetVersionInfo ( int iVerHi,
int iVerLo,
int iModelNum,
int iSerialNum 
)
protected

Get version information

Definition at line 242 of file PlusCmsBrachyStepper.cxx.

◆ InitializeStepper()

PlusStatus PlusCmsBrachyStepper::InitializeStepper ( std::string &  CalibMsg)
virtual

Initialize stepper

Implements PlusBrachyStepper.

Definition at line 463 of file PlusCmsBrachyStepper.cxx.

◆ IsStepperACKRecieved()

bool PlusCmsBrachyStepper::IsStepperACKRecieved ( std::vector< BYTE > &  ackMessage,
STEPPERCOMMAND  command 
)
protected

Returns whether ACK received from stepper

Definition at line 895 of file PlusCmsBrachyStepper.cxx.

◆ IsStepperAlive()

PlusStatus PlusCmsBrachyStepper::IsStepperAlive ( )
virtual

Return whether stepper is alive

Implements PlusBrachyStepper.

Definition at line 452 of file PlusCmsBrachyStepper.cxx.

◆ IsStepperCalibrated()

bool PlusCmsBrachyStepper::IsStepperCalibrated ( )

Return whether stepper is calibrated

Definition at line 421 of file PlusCmsBrachyStepper.cxx.

◆ IsStepperMotorized()

bool PlusCmsBrachyStepper::IsStepperMotorized ( )

Return whether stepper is motorized

Definition at line 610 of file PlusCmsBrachyStepper.cxx.

◆ MoveProbeToPosition()

PlusStatus PlusCmsBrachyStepper::MoveProbeToPosition ( double  PositionInMm,
int ReturnCode 
)

Commands the stepper to move the probe to a certain position

Definition at line 621 of file PlusCmsBrachyStepper.cxx.

◆ ReadStepperAnswer()

void PlusCmsBrachyStepper::ReadStepperAnswer ( std::vector< BYTE > &  stepperAnswer)
protected

Read stepper answer

Definition at line 862 of file PlusCmsBrachyStepper.cxx.

◆ ResetStepper()

PlusStatus PlusCmsBrachyStepper::ResetStepper ( )
virtual

Reset stepper

Implements PlusBrachyStepper.

Definition at line 526 of file PlusCmsBrachyStepper.cxx.

◆ SendAckMessage()

void PlusCmsBrachyStepper::SendAckMessage ( std::vector< BYTE StepperMessage)
protected

Send ACK message

Definition at line 962 of file PlusCmsBrachyStepper.cxx.

◆ SendPositionRequestCommand()

void PlusCmsBrachyStepper::SendPositionRequestCommand ( STEPPERCOMMAND  command,
std::vector< BYTE > &  vRawMessage 
)
protected

Send a position request command to the stepper

Definition at line 801 of file PlusCmsBrachyStepper.cxx.

◆ SendStepperCommand()

void PlusCmsBrachyStepper::SendStepperCommand ( STEPPERCOMMAND  command,
STEPPERRESPCODE  Response,
std::vector< BYTE > &  vRawMessage 
)
protected

Send a command to the stepper

Definition at line 791 of file PlusCmsBrachyStepper.cxx.

◆ SetBaudRate()

PlusStatus PlusCmsBrachyStepper::SetBaudRate ( unsigned long  BaudRate)
virtual

Set baud rate of communication

Implements PlusBrachyStepper.

Definition at line 146 of file PlusCmsBrachyStepper.cxx.

◆ SetCOMPort()

PlusStatus PlusCmsBrachyStepper::SetCOMPort ( unsigned long  COMPort)
virtual

Set used COM port for communication

Implements PlusBrachyStepper.

Definition at line 129 of file PlusCmsBrachyStepper.cxx.

◆ SetScalingParameters()

void PlusCmsBrachyStepper::SetScalingParameters ( )
protected

Set scaling parameters

Definition at line 1043 of file PlusCmsBrachyStepper.cxx.

◆ StepperButtonDisable()

PlusStatus PlusCmsBrachyStepper::StepperButtonDisable ( )
protected

Disable stepper button

Definition at line 731 of file PlusCmsBrachyStepper.cxx.

◆ StepperButtonEnable()

PlusStatus PlusCmsBrachyStepper::StepperButtonEnable ( )
protected

Enable stepper button

Definition at line 711 of file PlusCmsBrachyStepper.cxx.

◆ StepperInstruction()

void PlusCmsBrachyStepper::StepperInstruction ( STEPPERCOMMAND  command)
protected

Send instruction to the stepper

Definition at line 832 of file PlusCmsBrachyStepper.cxx.

◆ StepperRotateCalibrationDisable()

PlusStatus PlusCmsBrachyStepper::StepperRotateCalibrationDisable ( )
protected

Disable stepper rotation calibration

Definition at line 771 of file PlusCmsBrachyStepper.cxx.

◆ StepperRotateCalibrationEnable()

PlusStatus PlusCmsBrachyStepper::StepperRotateCalibrationEnable ( )
protected

Enable stepper rotation calibration

Definition at line 751 of file PlusCmsBrachyStepper.cxx.

◆ TurnMotorOff()

PlusStatus PlusCmsBrachyStepper::TurnMotorOff ( )
protected

Turn motor off

Definition at line 566 of file PlusCmsBrachyStepper.cxx.

◆ TurnMotorOn()

PlusStatus PlusCmsBrachyStepper::TurnMotorOn ( )
protected

Turn motor on

Definition at line 546 of file PlusCmsBrachyStepper.cxx.


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