Changeset 4 for Dev/LoggingTool


Ignore:
Timestamp:
02/15/11 10:51:30 (14 years ago)
Author:
jkraaijeveld
Message:

Preliminary work in a general logging tool

Location:
Dev/LoggingTool
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Dev/LoggingTool/LoggingTool.csproj

    r3 r4  
    5454  </ItemGroup>
    5555  <ItemGroup>
    56     <Compile Include="LoggingTool.cs" />
    5756    <Compile Include="interfaces\TeamUpLogic.cs" />
    5857    <Compile Include="interfaces\ILoggerLogic.cs" />
    5958    <Compile Include="interfaces\TeamUpSpreadsheetOutput.cs" />
    6059    <Compile Include="interfaces\ILoggerOutput.cs" />
    61     <Compile Include="models\SVData.cs" />
    6260    <Compile Include="models\TeamUpEvent.cs" />
    6361    <Compile Include="models\TeamUpQuestionnaire.cs" />
    6462    <Compile Include="models\LoggerMessage.cs" />
    6563    <Compile Include="models\TeamUpSpreadsheetMessage.cs" />
    66     <Compile Include="network\SVProtocolClientData.cs" />
    67     <Compile Include="network\SVProtocol.cs" />
    6864    <Compile Include="TestSpreadsheetOutput.cs" />
    6965    <Compile Include="Properties\AssemblyInfo.cs" />
    7066  </ItemGroup>
    71   <ItemGroup>
    72     <ProjectReference Include="..\..\..\UDKTCPLink\UDKTCPLink\UDKTCPLink.csproj">
    73       <Project>{5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}</Project>
    74       <Name>UDKTCPLink</Name>
    75     </ProjectReference>
    76   </ItemGroup>
     67  <ItemGroup />
    7768  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    7869  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • Dev/LoggingTool/LoggingTool.sln

    r3 r4  
    44Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingTool", "LoggingTool.csproj", "{B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}"
    55EndProject
    6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UDKTCPLink", "..\..\..\UDKTCPLink\UDKTCPLink\UDKTCPLink.csproj", "{5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}"
    7 EndProject
    86Global
    97        GlobalSection(SolutionConfigurationPlatforms) = preSolution
    10                 Debug|Any CPU = Debug|Any CPU
    11                 Debug|Mixed Platforms = Debug|Mixed Platforms
    128                Debug|x86 = Debug|x86
    13                 Release|Any CPU = Release|Any CPU
    14                 Release|Mixed Platforms = Release|Mixed Platforms
    159                Release|x86 = Release|x86
    1610        EndGlobalSection
    1711        GlobalSection(ProjectConfigurationPlatforms) = postSolution
    18                 {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Debug|Any CPU.ActiveCfg = Debug|x86
    19                 {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
    20                 {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Debug|Mixed Platforms.Build.0 = Debug|x86
    2112                {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Debug|x86.ActiveCfg = Debug|x86
    2213                {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Debug|x86.Build.0 = Debug|x86
    23                 {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Release|Any CPU.ActiveCfg = Release|x86
    24                 {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Release|Mixed Platforms.ActiveCfg = Release|x86
    25                 {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Release|Mixed Platforms.Build.0 = Release|x86
    2614                {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Release|x86.ActiveCfg = Release|x86
    2715                {B5F52C17-DB39-47A9-8A4A-31FB4DE899EA}.Release|x86.Build.0 = Release|x86
    28                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    29                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
    30                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
    31                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    32                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Debug|x86.ActiveCfg = Debug|Any CPU
    33                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
    34                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Release|Any CPU.Build.0 = Release|Any CPU
    35                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
    36                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    37                 {5FB0E6BA-4999-494D-B6A4-7E884E6B4B6F}.Release|x86.ActiveCfg = Release|Any CPU
    3816        EndGlobalSection
    3917        GlobalSection(SolutionProperties) = preSolution
  • Dev/LoggingTool/TestSpreadsheetOutput.cs

    r3 r4  
    99using LoggingTool.models;
    1010using System.IO;
    11 using UDKTCPLink;
    12 using LoggingTool.network;
    13 using System.Threading;
    1411
    1512namespace LoggingTool
     
    1815    {
    1916
    20         /*static void Main(string[] args)
     17        static void Main(string[] args)
    2118        {
    22             //new SpreadsheetLogicTest();
     19            new SpreadsheetLogicTest();
    2320            Console.ReadKey();
    24         }*/
     21        }
    2522    }
    2623    class SpreadsheetOutputTest
     
    3027        public SpreadsheetOutputTest()
    3128        {
    32             output = new TeamUpSpeadsheetOutput("cpsgamingstreet@gmail.com", "wachtwoord2009", "GDataTest");
     29            output = new TeamUpSpeadsheetOutput("kaidencez@gmail.com", "verboden", "GDataTest");
    3330            LoggerMessage questionnaireMessage = new TeamUpSpreadsheetMessage(TeamUpSpreadsheetMessage.QUESTIONNAIRE, new List<String>() {"1", "11.8940", "1", "20", "0", "1", "2", "3", "4", "5", "6", "7", "8"});
    3431            LoggerMessage eventMessage = new TeamUpSpreadsheetMessage(TeamUpSpreadsheetMessage.EVENT, new List<String>() {"1", "11.8940", "1337"});
     
    3835    }
    3936
    40     /* class SpreadsheetLogicTest
    41      {
    42          private ILoggerLogic logic;
    43          private ILoggerOutput output;
    44          private ILoggerInput input;
     37    class SpreadsheetLogicTest
     38    {
     39        private ILoggerLogic logic;
     40        private ILoggerOutput output;
    4541
    46          public SpreadsheetLogicTest()
    47          {
     42        public SpreadsheetLogicTest()
     43        {
     44            logic = new TeamUpLogic();
     45            output = new TeamUpSpeadsheetOutput("kaidencez@gmail.com", "verboden", "GDataTest");
     46            //Create some filestreams for testing purposes
     47            FileStream fQ = new FileStream("D:\\jkraaijeveld\\Desktop\\questionnaires.log", FileMode.Open);
     48            FileStream fE = new FileStream("D:\\jkraaijeveld\\Desktop\\events.log", FileMode.Open);
     49            StreamReader sQ = new StreamReader(fQ);
     50            StreamReader sE = new StreamReader(fE);
    4851
    49              Console.WriteLine("Setting up Logic");
    50              logic = new TeamUpLogic();
    51              Console.WriteLine("Setting up Output");
    52              output = new TeamUpSpeadsheetOutput("cpsgamingstreet@gmail.com", "wachtwoord2009", "GDataTest");
    53              Console.WriteLine("Setting up Input");
    54              input = new TeamUpInput(logic);
     52            //Read everything in both of the files
     53            while (!sQ.EndOfStream)
     54            {
     55                logic.addInput(sQ.ReadLine());
     56            }
     57            while (!sE.EndOfStream)
     58            {
     59                logic.addInput(sE.ReadLine());
     60            }
    5561
    56              Console.WriteLine("Setting up Server");
    57              TeamUpServer server = new TeamUpServer();
    58              Console.WriteLine("Setting Protocol");
    59              server.Protocol = new TeamUpProtocol(server);
    60              Console.WriteLine("Activating Server");
    61              server.Activate(input);
    62              while (true)
    63                  Thread.Sleep(1000);
    64            
    65            
    66             /*
    67              //Create some filestreams for testing purposes
    68              FileStream fQ = new FileStream("D:\\jkraaijeveld\\Desktop\\questionnaires.log", FileMode.Open);
    69              FileStream fE = new FileStream("D:\\jkraaijeveld\\Desktop\\events.log", FileMode.Open);
    70              StreamReader sQ = new StreamReader(fQ);
    71              StreamReader sE = new StreamReader(fE);
    72 
    73              //Read everything in both of the files
    74              while (!sQ.EndOfStream)
    75              {
    76                  logic.addInput(sQ.ReadLine());
    77              }
    78              while (!sE.EndOfStream)
    79              {
    80                  logic.addInput(sE.ReadLine());
    81              }
    82 
    83              //Create all the models
    84              logic.createModels();
    85              //Write them
    86              List<LoggerMessage> messages = logic.formatModels();
    87              foreach (LoggerMessage message in messages)
    88              {
    89                  output.send(message);
    90              }
    91          }
    92      }*/
    93 
    94 
    95 
    96 
    97 
    98 
    99 
    100 
    101 
     62            //Create all the models
     63            logic.createModels();
     64            //Write them
     65            List<LoggerMessage> messages = logic.formatModels();
     66            foreach (LoggerMessage message in messages)
     67            {
     68                output.send(message);
     69            }
     70        }
     71    }
     72       
     73   
     74   
     75   
     76   
     77   
     78   
     79   
     80   
    10281    /*static void Main(string[] args)
    10382        {
Note: See TracChangeset for help on using the changeset viewer.