PlusLib
2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
|
#include <src/PlusDataCollection/BrachyTracking/PlusCmsBrachyStepper.h>
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 |
Definition at line 32 of file PlusCmsBrachyStepper.h.
typedef const char* PlusCmsBrachyStepper::STEPPERCOMMAND |
Definition at line 35 of file PlusCmsBrachyStepper.h.
typedef const char* PlusCmsBrachyStepper::STEPPERRESPCODE |
Definition at line 36 of file PlusCmsBrachyStepper.h.
PlusCmsBrachyStepper::PlusCmsBrachyStepper | ( | unsigned long | COMPort = 1 , |
unsigned long | BaudRate = 19200 |
||
) |
Constructor
Definition at line 96 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Destructor
Definition at line 116 of file PlusCmsBrachyStepper.cxx.
Convert from ASCII to binary
Definition at line 1083 of file PlusCmsBrachyStepper.cxx.
|
staticprotected |
Convert from binary to ASCII
Definition at line 1101 of file PlusCmsBrachyStepper.cxx.
|
protected |
Clear buffer
Definition at line 1054 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Connect to CMS stepper
Implements PlusBrachyStepper.
Definition at line 160 of file PlusCmsBrachyStepper.cxx.
|
protected |
Create ACK message
Definition at line 1061 of file PlusCmsBrachyStepper.cxx.
|
protected |
Decode stepper message
Definition at line 1017 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Disconnect from CMS stepper
Implements PlusBrachyStepper.
Definition at line 188 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetCalibrationState | ( | int & | PState, |
int & | GState, | ||
int & | RState | ||
) |
Get calibration state
Definition at line 376 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Get device mode information
Implements PlusBrachyStepper.
Definition at line 196 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Get raw encoder values from stepper
Implements PlusBrachyStepper.
Definition at line 328 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetGridReferenceData | ( | double & | count, |
double & | dist, | ||
double & | scale | ||
) |
Get grid reference data
Definition at line 302 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetMotorizationScaleFactor | ( | int & | scaleFactor | ) |
Return motorization scale factor
Definition at line 586 of file PlusCmsBrachyStepper.cxx.
|
protected |
Get position message from stepper
Definition at line 980 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetProbeReferenceData | ( | double & | count, |
double & | dist, | ||
double & | scale | ||
) |
Get probe reference data
Definition at line 289 of file PlusCmsBrachyStepper.cxx.
|
protected |
Get reference data
Definition at line 266 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetRotateState | ( | int & | State | ) |
Get rotation state
Definition at line 399 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetRotationReferenceData | ( | double & | count, |
double & | dist, | ||
double & | scale | ||
) |
Get rotation reference data
Definition at line 315 of file PlusCmsBrachyStepper.cxx.
PlusStatus PlusCmsBrachyStepper::GetStatusInfo | ( | unsigned int & | Status | ) |
Get status information
Definition at line 221 of file PlusCmsBrachyStepper.cxx.
|
protected |
Get message from stepper
Definition at line 923 of file PlusCmsBrachyStepper.cxx.
|
protected |
Get version information
Definition at line 242 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Initialize stepper
Implements PlusBrachyStepper.
Definition at line 463 of file PlusCmsBrachyStepper.cxx.
|
protected |
Returns whether ACK received from stepper
Definition at line 895 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Return whether stepper is alive
Implements PlusBrachyStepper.
Definition at line 452 of file PlusCmsBrachyStepper.cxx.
bool PlusCmsBrachyStepper::IsStepperCalibrated | ( | ) |
Return whether stepper is calibrated
Definition at line 421 of file PlusCmsBrachyStepper.cxx.
bool PlusCmsBrachyStepper::IsStepperMotorized | ( | ) |
Return whether stepper is motorized
Definition at line 610 of file PlusCmsBrachyStepper.cxx.
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.
|
protected |
Read stepper answer
Definition at line 862 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Reset stepper
Implements PlusBrachyStepper.
Definition at line 526 of file PlusCmsBrachyStepper.cxx.
|
protected |
Send ACK message
Definition at line 962 of file PlusCmsBrachyStepper.cxx.
|
protected |
Send a position request command to the stepper
Definition at line 801 of file PlusCmsBrachyStepper.cxx.
|
protected |
Send a command to the stepper
Definition at line 791 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Set baud rate of communication
Implements PlusBrachyStepper.
Definition at line 146 of file PlusCmsBrachyStepper.cxx.
|
virtual |
Set used COM port for communication
Implements PlusBrachyStepper.
Definition at line 129 of file PlusCmsBrachyStepper.cxx.
|
protected |
Set scaling parameters
Definition at line 1043 of file PlusCmsBrachyStepper.cxx.
|
protected |
Disable stepper button
Definition at line 731 of file PlusCmsBrachyStepper.cxx.
|
protected |
Enable stepper button
Definition at line 711 of file PlusCmsBrachyStepper.cxx.
|
protected |
Send instruction to the stepper
Definition at line 832 of file PlusCmsBrachyStepper.cxx.
|
protected |
Disable stepper rotation calibration
Definition at line 771 of file PlusCmsBrachyStepper.cxx.
|
protected |
Enable stepper rotation calibration
Definition at line 751 of file PlusCmsBrachyStepper.cxx.
|
protected |
Turn motor off
Definition at line 566 of file PlusCmsBrachyStepper.cxx.
|
protected |
Turn motor on
Definition at line 546 of file PlusCmsBrachyStepper.cxx.