IGSTK
Main Page
Namespaces
Classes
Files
File List
File Members
Source
igstkSerialCommunicationForWindows.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Image Guided Surgery Software Toolkit
4
Module: $RCSfile: igstkSerialCommunicationForWindows.h,v $
5
Language: C++
6
Date: $Date: 2008-02-11 01:41:51 $
7
Version: $Revision: 1.12 $
8
9
Copyright (c) ISC Insight Software Consortium. All rights reserved.
10
See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
18
#ifndef __igstkSerialCommunicationForWindows_h
19
#define __igstkSerialCommunicationForWindows_h
20
21
#include <windows.h>
22
23
#include "
igstkSerialCommunication.h
"
24
25
namespace
igstk
26
{
27
44
class
SerialCommunicationForWindows
:
public
SerialCommunication
45
{
46
public
:
47
49
igstkStandardClassTraitsMacro
(
SerialCommunicationForWindows
,
50
SerialCommunication
)
51
52
public:
53
55
typedef
SerialCommunication
::
ResultType
ResultType
;
56
57
protected:
58
60
typedef HANDLE
HandleType
;
61
63
SerialCommunicationForWindows
();
64
66
~
SerialCommunicationForWindows
();
67
69
virtual ResultType
InternalOpenPort
(
void
);
70
73
virtual ResultType
InternalUpdateParameters
(
void
);
74
76
virtual ResultType
InternalClosePort
(
void
);
77
79
virtual ResultType
InternalSendBreak
(
void
);
80
82
virtual
void
InternalSleep
(
int
milliseconds );
83
85
virtual ResultType
InternalPurgeBuffers
(
void
);
86
88
virtual ResultType
InternalWrite
( const
char
*message,
89
unsigned
int
numberOfBytes );
90
92
virtual ResultType
InternalRead
(
char
*data,
unsigned
int
numberOfBytes,
93
unsigned
int
&bytesRead );
94
98
virtual ResultType
InternalSetRTS
(
unsigned
int
signal);
99
101
virtual ResultType
InternalSetTimeout
(
unsigned
int
timeoutPeriod );
102
104
virtual
void
PrintSelf
( std::ostream& os, itk::Indent indent ) const;
105
106
private:
107
108
unsigned
int
m_OldTimeoutPeriod;
109
110
HandleType m_PortHandle;
// com port handle
111
};
112
113
}
// end namespace igstk
114
115
#endif // __igstkSerialCommunicationForWindows_h
Generated on Thu Mar 20 2014 13:04:04 for IGSTK by
1.8.1.2