7 #ifndef _CMSBRACHYSTEPPER_H_ 8 #define _CMSBRACHYSTEPPER_H_ 10 #include "PlusConfigure.h" 11 #include "vtkPlusDataCollectionExport.h" 51 double &GPosition,
double &RPosition,
unsigned long &PositionRequestNumber);
74 PlusStatus GetStatusInfo(
unsigned int &Status);
77 PlusStatus GetProbeReferenceData(
double &
count,
double &dist,
double &scale);
80 PlusStatus GetGridReferenceData(
double &
count,
double &dist,
double &scale);
83 PlusStatus GetRotationReferenceData(
double &
count,
double &dist,
double &scale);
86 PlusStatus GetCalibrationState(
int &PState,
int &GState,
int &RState);
92 bool IsStepperCalibrated();
95 PlusStatus GetMotorizationScaleFactor(
int &scaleFactor);
98 bool IsStepperMotorized();
101 PlusStatus MoveProbeToPosition(
double PositionInMm,
int &ReturnCode);
105 PlusStatus GetVersionInfo(
int &iVerHi,
int &iVerLo,
int &iModelNum,
int &iSerialNum);
126 void SetScalingParameters();
133 static unsigned int AsciiToBin(
unsigned int i,
unsigned int j);
136 static void BinToAscii(
unsigned int n,
unsigned char *c1,
unsigned char *c2);
142 void SendPositionRequestCommand(
STEPPERCOMMAND command, std::vector<BYTE> &vRawMessage);
148 void ReadStepperAnswer(std::vector<BYTE> &stepperAnswer);
151 bool IsStepperACKRecieved(std::vector<BYTE> &ackMessage,
STEPPERCOMMAND command);
154 void GetStepperMessage(
STEPPERCOMMAND command,
const char* Response, std::vector<BYTE> &DecodedMessage);
157 void GetPositionMessage(std::vector<BYTE> &StepperMessage, std::vector<BYTE> &DecodedMessage);
160 void CreateAckMessage(
BYTE opcode, std::string *sMessage);
163 void SendAckMessage(std::vector<BYTE> StepperMessage);
166 void DecodeStepperMessage(std::vector<BYTE> StepperMessage, std::vector<BYTE> &DecodedMessage);
183 double m_RotationScale;
191 int m_RepeatedPositionErrorCount;
194 CRITICAL_SECTION m_CriticalSection;
virtual PlusStatus SetBaudRate(unsigned long BaudRate)=0
Class for reading and writing data through the serial (RS-232) port.
const char * STEPPERRESPCODE
virtual PlusStatus IsStepperAlive()=0
virtual PlusStatus SetCOMPort(unsigned long COMPort)=0
virtual PlusStatus ResetStepper()=0
const char * STEPPERCOMMAND
Phidget_ChannelClass uint32_t * count
virtual PlusStatus Disconnect()=0
virtual PlusStatus GetDeviceModelInfo(std::string &version, std::string &model, std::string &serial)=0
virtual PlusStatus InitializeStepper(std::string &CalibMsg)=0
virtual PlusStatus Connect()=0
virtual PlusStatus GetEncoderValues(double &PPosition, double &GPosition, double &RPosition, unsigned long &PositionRequestNumber)=0