PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
Macros | Variables
PlusCmsBrachyStepper.cxx File Reference
#include "PlusConfigure.h"
#include "PlusCmsBrachyStepper.h"
#include "vtkIGSIOAccurateTimer.h"
#include "PlusSerialLine.h"
#include <assert.h>
#include <iostream>
#include <math.h>
#include <sstream>
Include dependency graph for PlusCmsBrachyStepper.cxx:

Go to the source code of this file.

Macros

#define ETX   3
 
#define MAXTRIES   5
 
#define STEPPERDEBUGMSG   0
 
#define STX   2
 

Variables

static const char * CALIB_MSG_COMPLETED = "Calibration completed!"
 
static const char * CALIB_MSG_GRID_TO_BASE = "Step the template grid to home position. A green light should appear."
 
static const char * CALIB_MSG_GRID_TO_HOME = "Step the template grid to the home position. The light should revert to green and flashes twice."
 
static const char * CALIB_MSG_GRID_TO_REF = "Step the template grid to the reference position (12.5 mm). An amber light should replace the green light."
 
static const char * CALIB_MSG_PROBE_TO_BASE = "Step the probe to home position. A green light should appear."
 
static const char * CALIB_MSG_PROBE_TO_HOME = "Step the probe to the home position. The light should revert to green and flashes twice."
 
static const char * CALIB_MSG_PROBE_TO_REF = "Step the probe to the reference position (12.5 mm). An amber light should replace the green light."
 
static const char * CALIB_MSG_ROTATION_TO_BASE = "Rotate the probe to zero degree. A green light should appear."
 
static const char * CALIB_MSG_ROTATION_TO_HOME = "Rotate the probe to zero degree. The light should revert to green and flashes twice."
 
static const char * CALIB_MSG_ROTATION_TO_REF = "Rotate the probe to the reference position (10.5 deg or more). An amber light should replace the green light."
 
static const int MAX_REPEATED_POSITION_ERROR_COUNT = 15
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_BUTTON_DISABLE = "3131"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_BUTTON_ENABLE = "2929"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_CALIBRATION_STATES = "7171"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_DISABLE_ROTATE_CALIBRATION = "920092"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_ENABLE_ROTATE_CALIBRATION = "920193"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_GRID_REFERENCE_DATA = "4141"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_IS_MOTORIZED = "8181"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_MOTOR_OFF = "8A008A"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_MOTOR_ON = "8A018B"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_POSITION_DATA_1 = "1919"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_POSITION_DATA_2 = "9999"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_PROBE_REFERENCE_DATA = "3939"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_RESET_SYSTEM = "0101"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_ROTATE_STATE = "5959"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_ROTATION_REFERENCE_DATA = "4949"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_STATUS_INFO = "2121"
 
static PlusCmsBrachyStepper::STEPPERCOMMAND SC_VERSION_INFO = "5151"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_CALIBRATION_STATES = "74"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_COUNTERS_INVALID = "29"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_GRID_REFERENCE_DATA = "55"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_MOTORIZATION_CODE = "82"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_MOVE_COMPLETE = "7A"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_POSITION_DATA_BUTTON_LATCH = "67"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_POSITION_DATA_BUTTON_OFF = "07"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_POSITION_DATA_BUTTON_ON = "47"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_PROBE_REFERENCE_DATA = "4D"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_ROTATE_STATE = "8A"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_ROTATION_REFERENCE_DATA = "5D"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_STATUS_INFO = "22"
 
static PlusCmsBrachyStepper::STEPPERRESPCODE SRC_VERSION_INFO = "37"
 

Macro Definition Documentation

◆ ETX

#define ETX   3

Definition at line 26 of file PlusCmsBrachyStepper.cxx.

◆ MAXTRIES

#define MAXTRIES   5

Definition at line 27 of file PlusCmsBrachyStepper.cxx.

◆ STEPPERDEBUGMSG

#define STEPPERDEBUGMSG   0

Definition at line 19 of file PlusCmsBrachyStepper.cxx.

◆ STX

#define STX   2

Definition at line 25 of file PlusCmsBrachyStepper.cxx.

Variable Documentation

◆ CALIB_MSG_COMPLETED

const char* CALIB_MSG_COMPLETED = "Calibration completed!"
static

Definition at line 44 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_GRID_TO_BASE

const char* CALIB_MSG_GRID_TO_BASE = "Step the template grid to home position. A green light should appear."
static

Definition at line 36 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_GRID_TO_HOME

const char* CALIB_MSG_GRID_TO_HOME = "Step the template grid to the home position. The light should revert to green and flashes twice."
static

Definition at line 38 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_GRID_TO_REF

const char* CALIB_MSG_GRID_TO_REF = "Step the template grid to the reference position (12.5 mm). An amber light should replace the green light."
static

Definition at line 37 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_PROBE_TO_BASE

const char* CALIB_MSG_PROBE_TO_BASE = "Step the probe to home position. A green light should appear."
static

Definition at line 32 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_PROBE_TO_HOME

const char* CALIB_MSG_PROBE_TO_HOME = "Step the probe to the home position. The light should revert to green and flashes twice."
static

Definition at line 34 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_PROBE_TO_REF

const char* CALIB_MSG_PROBE_TO_REF = "Step the probe to the reference position (12.5 mm). An amber light should replace the green light."
static

Definition at line 33 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_ROTATION_TO_BASE

const char* CALIB_MSG_ROTATION_TO_BASE = "Rotate the probe to zero degree. A green light should appear."
static

Definition at line 40 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_ROTATION_TO_HOME

const char* CALIB_MSG_ROTATION_TO_HOME = "Rotate the probe to zero degree. The light should revert to green and flashes twice."
static

Definition at line 42 of file PlusCmsBrachyStepper.cxx.

◆ CALIB_MSG_ROTATION_TO_REF

const char* CALIB_MSG_ROTATION_TO_REF = "Rotate the probe to the reference position (10.5 deg or more). An amber light should replace the green light."
static

Definition at line 41 of file PlusCmsBrachyStepper.cxx.

◆ MAX_REPEATED_POSITION_ERROR_COUNT

const int MAX_REPEATED_POSITION_ERROR_COUNT = 15
static

Definition at line 29 of file PlusCmsBrachyStepper.cxx.

◆ SC_BUTTON_DISABLE

PlusCmsBrachyStepper::STEPPERCOMMAND SC_BUTTON_DISABLE = "3131"
static

Definition at line 84 of file PlusCmsBrachyStepper.cxx.

◆ SC_BUTTON_ENABLE

PlusCmsBrachyStepper::STEPPERCOMMAND SC_BUTTON_ENABLE = "2929"
static

Definition at line 82 of file PlusCmsBrachyStepper.cxx.

◆ SC_CALIBRATION_STATES

PlusCmsBrachyStepper::STEPPERCOMMAND SC_CALIBRATION_STATES = "7171"
static

Definition at line 61 of file PlusCmsBrachyStepper.cxx.

◆ SC_DISABLE_ROTATE_CALIBRATION

PlusCmsBrachyStepper::STEPPERCOMMAND SC_DISABLE_ROTATE_CALIBRATION = "920092"
static

Definition at line 88 of file PlusCmsBrachyStepper.cxx.

◆ SC_ENABLE_ROTATE_CALIBRATION

PlusCmsBrachyStepper::STEPPERCOMMAND SC_ENABLE_ROTATE_CALIBRATION = "920193"
static

Definition at line 86 of file PlusCmsBrachyStepper.cxx.

◆ SC_GRID_REFERENCE_DATA

PlusCmsBrachyStepper::STEPPERCOMMAND SC_GRID_REFERENCE_DATA = "4141"
static

Definition at line 55 of file PlusCmsBrachyStepper.cxx.

◆ SC_IS_MOTORIZED

PlusCmsBrachyStepper::STEPPERCOMMAND SC_IS_MOTORIZED = "8181"
static

Definition at line 76 of file PlusCmsBrachyStepper.cxx.

◆ SC_MOTOR_OFF

PlusCmsBrachyStepper::STEPPERCOMMAND SC_MOTOR_OFF = "8A008A"
static

Definition at line 75 of file PlusCmsBrachyStepper.cxx.

◆ SC_MOTOR_ON

PlusCmsBrachyStepper::STEPPERCOMMAND SC_MOTOR_ON = "8A018B"
static

Definition at line 74 of file PlusCmsBrachyStepper.cxx.

◆ SC_POSITION_DATA_1

PlusCmsBrachyStepper::STEPPERCOMMAND SC_POSITION_DATA_1 = "1919"
static

Definition at line 67 of file PlusCmsBrachyStepper.cxx.

◆ SC_POSITION_DATA_2

PlusCmsBrachyStepper::STEPPERCOMMAND SC_POSITION_DATA_2 = "9999"
static

Definition at line 68 of file PlusCmsBrachyStepper.cxx.

◆ SC_PROBE_REFERENCE_DATA

PlusCmsBrachyStepper::STEPPERCOMMAND SC_PROBE_REFERENCE_DATA = "3939"
static

Definition at line 52 of file PlusCmsBrachyStepper.cxx.

◆ SC_RESET_SYSTEM

PlusCmsBrachyStepper::STEPPERCOMMAND SC_RESET_SYSTEM = "0101"
static

Definition at line 80 of file PlusCmsBrachyStepper.cxx.

◆ SC_ROTATE_STATE

PlusCmsBrachyStepper::STEPPERCOMMAND SC_ROTATE_STATE = "5959"
static

Definition at line 64 of file PlusCmsBrachyStepper.cxx.

◆ SC_ROTATION_REFERENCE_DATA

PlusCmsBrachyStepper::STEPPERCOMMAND SC_ROTATION_REFERENCE_DATA = "4949"
static

Definition at line 58 of file PlusCmsBrachyStepper.cxx.

◆ SC_STATUS_INFO

PlusCmsBrachyStepper::STEPPERCOMMAND SC_STATUS_INFO = "2121"
static

Definition at line 49 of file PlusCmsBrachyStepper.cxx.

◆ SC_VERSION_INFO

PlusCmsBrachyStepper::STEPPERCOMMAND SC_VERSION_INFO = "5151"
static

Definition at line 46 of file PlusCmsBrachyStepper.cxx.

◆ SRC_CALIBRATION_STATES

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_CALIBRATION_STATES = "74"
static

Definition at line 62 of file PlusCmsBrachyStepper.cxx.

◆ SRC_COUNTERS_INVALID

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_COUNTERS_INVALID = "29"
static

Definition at line 90 of file PlusCmsBrachyStepper.cxx.

◆ SRC_GRID_REFERENCE_DATA

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_GRID_REFERENCE_DATA = "55"
static

Definition at line 56 of file PlusCmsBrachyStepper.cxx.

◆ SRC_MOTORIZATION_CODE

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_MOTORIZATION_CODE = "82"
static

Definition at line 77 of file PlusCmsBrachyStepper.cxx.

◆ SRC_MOVE_COMPLETE

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_MOVE_COMPLETE = "7A"
static

Definition at line 78 of file PlusCmsBrachyStepper.cxx.

◆ SRC_POSITION_DATA_BUTTON_LATCH

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_POSITION_DATA_BUTTON_LATCH = "67"
static

Definition at line 71 of file PlusCmsBrachyStepper.cxx.

◆ SRC_POSITION_DATA_BUTTON_OFF

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_POSITION_DATA_BUTTON_OFF = "07"
static

Definition at line 69 of file PlusCmsBrachyStepper.cxx.

◆ SRC_POSITION_DATA_BUTTON_ON

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_POSITION_DATA_BUTTON_ON = "47"
static

Definition at line 70 of file PlusCmsBrachyStepper.cxx.

◆ SRC_PROBE_REFERENCE_DATA

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_PROBE_REFERENCE_DATA = "4D"
static

Definition at line 53 of file PlusCmsBrachyStepper.cxx.

◆ SRC_ROTATE_STATE

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_ROTATE_STATE = "8A"
static

Definition at line 65 of file PlusCmsBrachyStepper.cxx.

◆ SRC_ROTATION_REFERENCE_DATA

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_ROTATION_REFERENCE_DATA = "5D"
static

Definition at line 59 of file PlusCmsBrachyStepper.cxx.

◆ SRC_STATUS_INFO

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_STATUS_INFO = "22"
static

Definition at line 50 of file PlusCmsBrachyStepper.cxx.

◆ SRC_VERSION_INFO

PlusCmsBrachyStepper::STEPPERRESPCODE SRC_VERSION_INFO = "37"
static

Definition at line 47 of file PlusCmsBrachyStepper.cxx.