Skip to content

Commit

Permalink
Add class for a packet reader monitor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinematics committed Dec 24, 2012
1 parent 66e730c commit 8c40467
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions ParserCore/Monitors/PacketReader/PacketReader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WaywardGamers.KParser.Monitoring
{
public class PacketReader : AbstractReader
{
#region Singleton Constructor
// Make the class a singleton
private static readonly PacketReader instance = new PacketReader();

/// <summary>
/// Gets the singleton instance of the LogParser class.
/// This is the only internal way to access the singleton.
/// </summary>
internal static PacketReader Instance { get { return instance; } }

/// <summary>
/// Private constructor ensures singleton purity.
/// </summary>
private PacketReader()
{
// Layout of total structure:
// 50 offsets to new log records (short): 100 bytes
// 50 offsets to old log offsets (short): 100 bytes
// ChatLogInfoStruct block
//sizeOfChatLogInfoStruct = (uint)(Marshal.SizeOf(typeof(ChatLogInfoStruct)));

//sizeOfChatLogControlStruct = (uint)(Marshal.SizeOf(typeof(ChatLogControlStruct)));
}
#endregion

public override void Stop()
{
throw new NotImplementedException();
}

public override DataSource ParseModeType
{
get { throw new NotImplementedException(); }
}
}
}
1 change: 1 addition & 0 deletions ParserCore/ParserCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
<Compile Include="Monad\BaseMonadClasses.cs" />
<Compile Include="Monad\Lexer.cs" />
<Compile Include="Monad\Scanner.cs" />
<Compile Include="Monitors\PacketReader\PacketReader.cs" />
<Compile Include="Parsing\InternalTesting.cs" />
<Compile Include="Monad\MonadParser.cs" />
<Compile Include="Monad\Parser.cs" />
Expand Down

0 comments on commit 8c40467

Please sign in to comment.