EHS
COM.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
ehs/EHS.h
"
4
5
namespace
ehs
6
{
7
enum class
Parity
:
UInt_8
8
{
9
NONE
,
10
ODD
,
11
EVEN
,
12
MARK
,
13
SPACE
14
};
15
16
enum class
StopBits
:
UInt_8
17
{
18
ONE
,
19
ONE_POINT_FIVE
,
20
TWO
21
};
22
23
class
EHS_LIB_IO
COM
24
{
25
private
:
26
UInt_8
port;
27
UInt_32
baudRate;
28
UInt_8
byteSize;
29
Parity
parity;
30
StopBits
stopBits;
31
void
* hdl;
32
bool
initialized;
33
34
public
:
35
COM
();
36
37
COM
(
const
UInt_8
port,
const
UInt_32
baudRate,
const
UInt_8
byteSize,
const
Parity
parity,
const
StopBits
stopBits);
38
39
COM
(
const
COM
& com) =
default
;
40
41
void
Initialize
();
42
43
void
UnInitialize();
44
45
UInt_32
Wait();
46
47
void
Transmit(
const
Char_8
data);
48
49
UInt_32
Send(
const
Char_8
* data,
const
UInt_32
size);
50
51
UInt_32
Receive(
const
Char_8
* data,
const
UInt_32
size);
52
53
void
Flush();
54
};
55
}
EHS.h
ehs::COM
Definition:
COM.h:24
ehs::COM::COM
COM(const COM &com)=default
ehs
Definition:
Anchor.h:6
ehs::Parity
Parity
Definition:
COM.h:8
ehs::Parity::MARK
@ MARK
ehs::Parity::ODD
@ ODD
ehs::Parity::SPACE
@ SPACE
ehs::Parity::EVEN
@ EVEN
ehs::UInt_32
unsigned int UInt_32
Definition:
Types.h:49
ehs::Dock::NONE
@ NONE
ehs::Char_8
char Char_8
Definition:
Types.h:40
ehs::UInt_8
unsigned char UInt_8
Definition:
Types.h:43
ehs::Initialize
EHS_LIB_IO void Initialize(Str_8 appName, Str_8 appVerId, const Version &appVer)
Definition:
EHS.cpp:34
ehs::StopBits
StopBits
Definition:
COM.h:17
ehs::StopBits::TWO
@ TWO
ehs::StopBits::ONE_POINT_FIVE
@ ONE_POINT_FIVE
ehs::StopBits::ONE
@ ONE
include
ehs
io
COM.h
Generated by
1.9.4