IGSTK
Main Page
Namespaces
Classes
Files
File List
File Members
Source
igstkSerialCommunicationForPosix.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Image Guided Surgery Software Toolkit
4
Module: $RCSfile: igstkSerialCommunicationForPosix.h,v $
5
Language: C++
6
Date: $Date: 2008-02-11 01:41:51 $
7
Version: $Revision: 1.14 $
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 __igstkSerialCommunicationForPosix_h
19
#define __igstkSerialCommunicationForPosix_h
20
21
#include "
igstkSerialCommunication.h
"
22
23
namespace
igstk
24
{
25
41
class
SerialCommunicationForPosix
:
public
SerialCommunication
42
{
43
public
:
44
46
igstkStandardClassTraitsMacro
(
SerialCommunicationForPosix
, \
47
SerialCommunication
)
48
49
public
:
50
52
typedef
SerialCommunication::ResultType
ResultType
;
53
54
protected
:
55
57
SerialCommunicationForPosix
();
58
60
~SerialCommunicationForPosix
();
61
63
virtual
ResultType
InternalOpenPort
(
void
);
64
67
virtual
ResultType
InternalUpdateParameters
(
void
);
68
70
virtual
ResultType
InternalClosePort
(
void
);
71
73
virtual
ResultType
InternalSendBreak
(
void
);
74
76
virtual
void
InternalSleep
(
unsigned
int
milliseconds );
77
79
virtual
ResultType
InternalPurgeBuffers
(
void
);
80
82
virtual
ResultType
InternalWrite
(
const
char
*message,
83
unsigned
int
numberOfBytes );
84
86
virtual
ResultType
InternalRead
(
char
*data,
unsigned
int
numberOfBytes,
87
unsigned
int
&bytesRead );
88
92
virtual
ResultType
InternalSetRTS
(
unsigned
int
signal );
93
95
virtual
void
PrintSelf
( std::ostream& os, itk::Indent indent )
const
;
96
97
private
:
98
100
itkStaticConstMacro( INVALID_HANDLE ,
int
, -1 );
101
103
int
m_PortHandle;
104
106
unsigned
int
m_OldTimeoutPeriod;
107
};
108
109
}
// end namespace igstk
110
111
#endif // __igstkSerialCommunicationForPosix_h
Generated on Thu Mar 20 2014 13:04:04 for IGSTK by
1.8.1.2