-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewportController.h
57 lines (43 loc) · 1.32 KB
/
NewportController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef NEWPORTCONTROLLER_H
#define NEWPORTCONTROLLER_H
#include "globals.h"
#include <QString>
#include <vcclr.h>
class StageControlZ;
class NewportController
{
public:
NewportController();
NewportController(StageControlZ* pTSM);
~NewportController();
bool connectToPort(QString qsPort);
void disconnect();
void moveAbsolute(double z, bool async = false);
void moveRelative(double z, bool async = false);
void getPosition(double& z);
void reportPosition(QString functionCall);
void stopMotion();
bool checkIfMoving(bool& bError);
QString getErrorState(QString errCode);
void setKeypad(bool on);
NEWPORT_STATUS::status GetStatusFromString(System::String^ status);
QString GetStatusString(System::String^ status);
bool checkStatusEqual(NEWPORT_STATUS::status status);
void sendCommand(QString command);
bool changeState(NEWPORT_STATUS::status status);
void SendSomeCommands();
QString GetStatusString(QString status);
void getStatus();
void reportResult(int result, QString s, System::String^ err);
static std::wstring MarshalString(System::String^ s);
static System::String^ q2ss(const QString &qstring);
static QString ss2q(System::String^ str);
void getInfo();
private:
QString m_COMPortZ;
StageControlZ* m_pTSM;
gcroot<CommandInterfaceSMC100::SMC100^> m_pSMC;
// port identifier
int m_portZ;
};
#endif