OpenZWave Library  1.4.3493
windows/SerialControllerImpl.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // SerialControllerImpl.h
4 //
5 // Windows Implementation of the cross-platform serial port
6 //
7 // Copyright (c) 2010 Jason Frazier <frazierjason@gmail.com>
8 //
9 // SOFTWARE NOTICE AND LICENSE
10 //
11 // This file is part of OpenZWave.
12 //
13 // OpenZWave is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU Lesser General Public License as published
15 // by the Free Software Foundation, either version 3 of the License,
16 // or (at your option) any later version.
17 //
18 // OpenZWave is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // You should have received a copy of the GNU Lesser General Public License
24 // along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25 //
26 //-----------------------------------------------------------------------------
27 
28 #ifndef _SerialControllerImpl_H
29 #define _SerialControllerImpl_H
30 
31 #include <windows.h>
32 
33 #include "Defs.h"
35 
36 namespace OpenZWave
37 {
39  {
40  public:
41  void ReadThreadProc();
42 
43  private:
44  friend class SerialController;
45 
48 
49  bool Open();
50  void Close();
51 
52  uint32 Write( uint8* _buffer, uint32 _length );
53 
54  bool Init( uint32 const _attempts );
55  void Read();
56 
57  SerialController* m_owner;
58  HANDLE m_hThread;
59  HANDLE m_hExit;
60  HANDLE m_hSerialController;
61  };
62 
63 } // namespace OpenZWave
64 
65 #endif //_SerialControllerImpl_H
66 
Definition: Bitfield.h:34
void ReadThreadProc()
Definition: windows/SerialControllerImpl.cpp:130
Definition: windows/SerialControllerImpl.h:38
Definition: SerialController.h:41
unsigned int uint32
Definition: Defs.h:80
unsigned char uint8
Definition: Defs.h:74