10 typedef void (*NotifyErrorCallback)(bool);
90 PortFailedToClose = 3,
92 CommunicationError = 5,
93 UnrecognizedCommand = 6,
94 InvalidCommandValues = 7,
95 MissingCommandParameter = 8,
107 CommandProcessed = 2,
192 virtual void GetScanArea (
int* xStart,
int* xStop,
int* yStart,
int* yStop)
const = 0;
197 virtual void GetMirror (
int* major,
int* minor)
const = 0;
302 virtual bool SetScanArea (
int xStart,
int xStop,
int yStart,
int yStop) = 0;
311 virtual bool SetScanArea (
int xStart,
int xStop,
int yStart,
int yStop,
int numPasses) = 0;
369 virtual bool OpenPort (
const char* portName,
int baudRate,
int numStopBits,
370 int timeout,
bool monitorConnection) = 0;
381 virtual bool OpenPort (
int baudRate,
int numStopBits,
int timeout,
bool monitorConnection) = 0;
405 virtual bool SendCommand (
const char* command,
char* response,
int maxResponseSize) = 0;
483 virtual bool IsShutterOpen (
int ID,
bool* open) = 0;
484 virtual bool OpenShutter (
int ID) = 0;
485 virtual bool CloseShutter (
int ID) = 0;
527 static bool DestroyOCTController();
543 __declspec(dllexport)
bool DestroyOCTController();
void(* SendNoParams)(void *)
Typedefs for callbacks.
Definition: IWPOCTController.h:9
__declspec(dllexport) IWPOCTController *GetOCTController()
Gets the instance of the controller object.
Definition: IWPOCTController.cpp:13
The WPOCT Controller is packaged as a toolkit and provides a set of application programming interface...
Definition: IWPOCTController.h:75
virtual bool SetActiveOpticalPort(int port)=0
Sets the optical switch to the specified port.
virtual bool SetAScans(int value)=0
Sets the number of A-scans sent out in a frame (B-scan).
virtual bool ToggleOpticalSwitch()=0
Toggles the optical switch from one position to the other.
virtual bool GetSwapXY() const =0
Gets the value of the SwapXY flag.
virtual const char * GetVersion() const =0
Get the firmware version of the controller.
virtual bool SetSwapXY(bool value)=0
Sets the SwapXY flag.
virtual int GetAScans() const =0
Gets the number of A-scans per B-scan output by the controller.
virtual bool ParkArm()=0
Park the reference arm.
virtual bool OpenPort(const char *portName, int baudRate, int numStopBits, int timeout, bool monitorConnection)=0
Open the specified port with the parameters supplied.
virtual int GetPulse() const =0
Gets the size of the timing pulse in milliseconds that is used to trigger an A-scan.
virtual IWPOCTController::ErrorCode GetLastError() const =0
Gets the result of the most current operation.
virtual bool StartScan()=0
Start the scan using the parameters previously specified.
virtual bool SetPulse(int value)=0
Sets the pulse duration value in quarter milliseconds.
virtual const char * GetLastResponse() const =0
Get the last response from the serial port.
virtual int GetNumStopBits() const =0
Gets the number of stop bits used to communicate with the controller.
virtual bool SetYRampMaxPos(int value)=0
Set the max y ramp value.
virtual int GetDelay() const =0
Gets the delay in milliseconds between the end of one pulse and the start of another.
virtual bool SetReadResponse(bool value)=0
Sets the flag that determines if the response from the serial port is read after a command is issued.
virtual int GetXRampStopPos() const =0
Get the x ramp stop position.
virtual bool TurnLightOn(int num)=0
Turns the specified light on.
virtual bool SetScanArea(int xStart, int xStop, int yStart, int yStop)=0
Set the limits of the scanning area (each value is between 1500 and 52000).
virtual bool IsLightOn(int index)=0
Returns whether the given light is on or off.
virtual int GetYRampStopPos() const =0
Get the y ramp stop position.
virtual int GetPhase() const =0
Get the phase delay.
virtual bool TurnLightsOff()=0
Turns all lights off.
virtual int GetXRampMaxPos() const =0
Get the x ramp max position.
virtual bool SetScanArea(int xStart, int xStop, int yStart, int yStop, int numPasses)=0
Set the limits of the scanning area (each value is between 1500 and 52000).
virtual bool SetArmPosition(int position)=0
Sets the reference arm position.
virtual bool SendMotorsHome()=0
Send all motors to their home position (position 0).
virtual void GetMirror(int *major, int *minor) const =0
Get the major and minor mirror values.
virtual bool SetMirror(int major, int minor)=0
Set the major and minor mirror values.
virtual int GetYRampMinPos() const =0
Get the y ramp min position.
virtual bool SendCommand(const char *command, char *response, int maxResponseSize)=0
Send a command to the serial port and receive its response back if GetReadResponse() is true.
virtual bool SetXRampMaxPos(int value)=0
Sets the maximum scan position in the x direction.
virtual void SetSerialPortLostCallback(NotifyErrorCallback notifyError)=0
Sets the callback to run if the serial port connection is lost.
virtual bool ClosePort()=0
Close the serial port.
virtual int GetYRampStartPos() const =0
Get the y ramp start position.
virtual bool OpenPort()=0
Open the port using the default or previous parameters.
virtual bool SendCommand(const char *command)=0
Send a command to the serial port.
virtual int GetXRampMinPos() const =0
Get the x ramp min position.
virtual bool GetReadResponse() const =0
Gets the flag that determines if the response is read from the serial port after each command is sent...
virtual int GetPortTimeout() const =0
Gets the timeout period of the serial port in milliseconds.
virtual bool TurnLightOff(int num)=0
Turns the specified light off.
virtual bool IsScanning() const =0
Returns the scanning state.
virtual bool SetPhase(int value)=0
Sets the phase delay value in milliseconds.
virtual int GetBScans() const =0
Gets the number of B-scans output by the controller.
virtual bool SetXRampMinPos(int value)=0
Sets the minimum scan position in the x direction.
virtual bool StopScan()=0
Stop the scan.
ErrorCode
The following are error codes that are used within the controller.
Definition: IWPOCTController.h:86
virtual void SetSerialPortLostCallback2(SendNoParams serialPortLost, void *context)=0
Sets the callback to run if the serial port connection is lost.
virtual int GetYRampMaxPos() const =0
Get the y ramp max position.
virtual int GetArmPosition() const =0
Get the reference arm position.
virtual int GetXRampStartPos() const =0
Get the x ramp start position.
virtual bool SetFoci(int value)=0
Sets the foci value.
virtual int GetQuarterHalfWavePosMax() const =0
Gets the max possible value of the quarter and half wave motors’ position.
virtual int GetActiveOpticalPort()=0
Gets the active optical port.
virtual int GetFoci() const =0
Get the foci value.
CurrentStates
The following are status codes that are used within the controller.
Definition: IWPOCTController.h:104
virtual void GetScanArea(int *xStart, int *xStop, int *yStart, int *yStop) const =0
Get the limits of the scanning area (each value is between 1500 and 52000).
virtual bool GetMonitorPort() const =0
Gets the flag that determines if serial port is constantly being monitored for a connection.
virtual ~IWPOCTController()
Destructor
Definition: IWPOCTController.h:117
virtual int GetPathMotorPosMax() const =0
Gets the max possible value of the path motor.
virtual bool IsPortOpen() const =0
Returns whether the port is open or closed.
virtual bool SetDelay(int value)=0
Sets the delay value in quarter milliseconds.
virtual bool SetPathMotorPosMax(int value)=0
Sets the max possible value of the path motor.
virtual bool SetYRampMinPos(int value)=0
Set the min y ramp value.
virtual bool OpenPort(int baudRate, int numStopBits, int timeout, bool monitorConnection)=0
Open the specified port.
virtual const char * GetLastCommandSent() const =0
Get the last command sent.
virtual IWPOCTController::CurrentStates GetCurrentStatus() const =0
Gets the current status of the controller.
virtual bool SetBScans(int value)=0
Sets the number of B-scans sent out.
virtual int GetBaudRate() const =0
Gets the baud rate used to communicate with the controller.
virtual const char * GetPortName()=0
Gets the name of the serial port used by the controller.
virtual bool SetQuarterHalfWavePosMax(int value)=0
Sets the max possible value of the quarter and half wave motor position.