-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvtcom.cpp
More file actions
109 lines (89 loc) · 1.99 KB
/
vtcom.cpp
File metadata and controls
109 lines (89 loc) · 1.99 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/**
****************************************************************************************
*
* @file vtcom.cpp
*
* @brief com port function
*
* Copyright (C) ViewTool 2018
*
* $Rev: 1.0$
*
* Change History:
* 12/21/18: Initial release, working on capturing BLE data, see captured data in file: 2018.12.21-14.52.34.txt
*
****************************************************************************************
*/
#define VTCOM_API __declspec(dllexport)
#include "vtcom.h"
#ifndef ENABLE_WINDOWS
#include <QDebug>
#endif
extern int com_port_open_success;
vtcom::vtcom()
{
}
vtcom::~vtcom()
{
}
#ifdef ENABLE_WINDOWS
HRESULT vtcom::Open(unsigned int nPort, unsigned int nBandRate, unsigned int nByteSize, unsigned int nParity, unsigned int nStopBit,
unsigned int nReadTimeout, unsigned int nWriteTimeout)
{
return NULL;
}
//timeout
void vtcom::Close()
{
}
HRESULT vtcom::Read(unsigned char *pbyBuffer, unsigned int *nNByte)
{
return NULL;
}
HRESULT vtcom::Write(const unsigned char *pbyBuffer, unsigned int nNByte)
{
return NULL;
}
#endif
#ifdef ENABLE_LINUX
int vtcom::Open(unsigned int nPort, unsigned int nBaudRate, unsigned int nByteSize, unsigned int nParity,
unsigned int nStopBit, unsigned int nTimeout, unsigned int nMin)
{
return NULL;
}
void vtcom::Close()
{
}
void vtcom::SetTrace(bool bTrace)
{
}
int vtcom::Read(unsigned char *pbyBuffer, unsigned int *nNByte)
{
return NULL;
}
int vtcom::Write(unsigned char *pbyBuffer, unsigned int nNByte)
{
return NULL;
}
#endif
#ifdef ENABLE_MAC
int vtcom::Open(QString nPort, unsigned int nBaudRate, unsigned int nByteSize, unsigned int nParity,
unsigned int nStopBit, unsigned int nTimeout, unsigned int nMin)
{
return NULL;
}
void vtcom::Close()
{
}
void vtcom::SetTrace(bool bTrace)
{
}
int vtcom::Read(unsigned char *pbyBuffer, unsigned int * nNByte)
{
return NULL;
}
int vtcom::Write(unsigned char *pbyBuffer, unsigned int nNByte)
{
return NULL;
}
#endif