OpenZWave Library 1.4.0
Loading...
Searching...
No Matches
winRT/SerialControllerImpl.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2//
3// SerialControllerImpl.h
4//
5// WinRT Implementation of the cross-platform serial port
6//
7// Copyright (c) 2015 Microsoft Corporation
8// All rights reserved.
9//
10// SOFTWARE NOTICE AND LICENSE
11//
12// This file is part of OpenZWave.
13//
14// OpenZWave is free software: you can redistribute it and/or modify
15// it under the terms of the GNU Lesser General Public License as published
16// by the Free Software Foundation, either version 3 of the License,
17// or (at your option) any later version.
18//
19// OpenZWave is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22// GNU Lesser General Public License for more details.
23//
24// You should have received a copy of the GNU Lesser General Public License
25// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
26//
27//-----------------------------------------------------------------------------
28
29#ifndef _SerialControllerImpl_H
30#define _SerialControllerImpl_H
31
32#include <Windows.h>
33#include <ppltasks.h>
34
35#include "Defs.h"
37
38namespace OpenZWave
39{
41 {
42 private:
43 friend class SerialController;
44
45 SerialControllerImpl( SerialController* _owner );
46 ~SerialControllerImpl();
47
48 bool Open();
49 void Close();
50
51 uint32 Write( uint8* _buffer, uint32 _length );
52 void StartReadTask();
53
54 Windows::Devices::SerialCommunication::SerialDevice ^ m_serialDevice;
55 Concurrency::cancellation_token_source m_readTaskCancelationTokenSource;
56
57 SerialController* m_owner;
58 };
59
60} // namespace OpenZWave
61
62#endif //_SerialControllerImpl_H
63
unsigned int uint32
Definition Defs.h:80
unsigned char uint8
Definition Defs.h:74
Definition windows/SerialControllerImpl.h:39
friend class SerialController
Definition windows/SerialControllerImpl.h:44
Definition Bitfield.h:35