00001 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 00002 // All rights reserved. 00003 // This component and the accompanying materials are made available 00004 // under the terms of "Eclipse Public License v1.0" 00005 // which accompanies this distribution, and is available 00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". 00007 // 00008 // Initial Contributors: 00009 // Nokia Corporation - initial contribution. 00010 // 00011 // Contributors: 00012 // 00013 // Description: 00014 // 00015 00016 #ifndef CCOLLECTOR_H_ 00017 #define CCOLLECTOR_H_ 00018 00019 00020 #include <e32base.h> 00021 #include <e32cons.h> 00022 #include "e32std.h" 00023 #include "e32msgqueue.h" 00024 #include "CMsgQActive.h" 00025 /*This Class is used to get user input from the console and display the final output 00026 * to the user. 00027 */ 00028 class CCollector : public CActive 00029 { 00030 public: 00031 enum TRequestType {ECount, EStop} ; 00032 00033 public: 00034 static CCollector* NewL(TInt aPriority = EPriorityStandard); 00035 CCollector(TInt aPriority = EPriorityStandard ); 00036 virtual void DoCancel(); 00037 virtual void RunL(); 00038 void RequestFunction(); 00039 void Stop(); 00040 CCollector(); 00041 virtual ~CCollector(); 00042 void ConstructL(); 00043 void ProcessKeyPress(TChar aChar); 00044 void StartRecieving(); 00045 void SendMsgInQ(TBuf<100>); 00046 private: 00047 TBuf<100> iBuf; //buffer to store words. 00048 CMsgQActive* iRcvInverterInQ; 00049 00050 RMsgQueue<TBuf<100> > iInverterInQ; //message queues to be created and used to send data to inverter. 00051 RMsgQueue<TBuf<100> > iInverterOutQ; //message queues to be created and used to recieve data from inverter. 00052 RProcess process; //Inverter process. 00053 CConsoleBase* iConsole; 00054 }; 00055 00056 GLDEF_C TInt E32Main(); 00057 00058 #endif /*CCollector_H_*/
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.