equal
deleted
inserted
replaced
|
1 // vtc_serial.h |
|
2 // |
|
3 // Copyright (c) 2007 - 2010 Accenture. All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Accenture - Initial contribution |
|
11 // |
|
12 |
|
13 #ifndef __VTC_SERIAL_H__ |
|
14 #define __VTC_SERIAL_H__ |
|
15 |
|
16 #include <e32std.h> |
|
17 #include <e32cons.h> |
|
18 #include <c32comm.h> |
|
19 #include <e32math.h> |
|
20 #include <fshell/consoleextensions.h> |
|
21 #include <fshell/vtc_base.h> |
|
22 #include <fshell/vtc_controller.h> |
|
23 |
|
24 class TPortConfig |
|
25 { |
|
26 public: |
|
27 TPortConfig() : iRate(EBpsAutobaud) {} |
|
28 |
|
29 TPtrC iPdd; |
|
30 TPtrC iLdd; |
|
31 TPtrC iCsy; |
|
32 TPtrC iPort; |
|
33 TBps iRate; |
|
34 }; |
|
35 |
|
36 |
|
37 class CVtcSerialConsole : public CVtcConsoleBase |
|
38 { |
|
39 public: |
|
40 IMPORT_C CVtcSerialConsole(); |
|
41 IMPORT_C virtual ~CVtcSerialConsole(); |
|
42 protected: // From CVtcSerialConsole. |
|
43 IMPORT_C virtual void ConstructL(const TDesC& aTitle); |
|
44 private: // From MConsoleOutput. |
|
45 IMPORT_C virtual TInt Output(const TDesC8& aDes); |
|
46 private: // From MConsoleInput. |
|
47 IMPORT_C virtual void Input(TDes8& aDes, TRequestStatus& aStatus); |
|
48 IMPORT_C virtual void CancelInput(TRequestStatus& aStatus); |
|
49 private: |
|
50 TInt ReadConfig(const TDesC& aConfigDes, TPortConfig& aConfig); |
|
51 private: |
|
52 RCommServ iCommServ; |
|
53 RComm iCommPort; |
|
54 }; |
|
55 |
|
56 #endif //__VTC_SERIAL_H__ |