From 8064051f2f64e9a9a23d9164a4fcaec9e0413b94 Mon Sep 17 00:00:00 2001 From: benbierens Date: Thu, 25 Jul 2024 10:30:20 +0200 Subject: [PATCH] Setting up basic idea of overwatch transcript --- Tools/OverwatchTranscript/Model.cs | 76 +++++++++++++++++++ .../OverwatchTranscript.csproj | 9 +++ cs-codex-dist-testing.sln | 7 ++ 3 files changed, 92 insertions(+) create mode 100644 Tools/OverwatchTranscript/Model.cs create mode 100644 Tools/OverwatchTranscript/OverwatchTranscript.csproj diff --git a/Tools/OverwatchTranscript/Model.cs b/Tools/OverwatchTranscript/Model.cs new file mode 100644 index 0000000..0069c4b --- /dev/null +++ b/Tools/OverwatchTranscript/Model.cs @@ -0,0 +1,76 @@ +namespace OverwatchTranscript +{ + [Serializable] + public class Transcript + { + public Header Header { get; set; } = new(); + public Event[] Events { get; set; } = Array.Empty(); + } + + [Serializable] + public class Header + { + public int TotalNumberOfNodes { get; set; } + } + + [Serializable] + public class Event + { + public DateTime Utc { get; set; } + public ScenarioFinishedEvent? ScenarioFinished { get; set; } + public NodeStartedEvent? NodeStarted { get; set; } + public NodeStoppedEvent? NodeStopped { get; set; } + public FileUploadedEvent? FileUploaded { get; set; } + public FileDownloadedEvent? FileDownloaded { get; set; } + public BlockReceivedEvent? BlockReceived { get; set; } + } + + #region Scenario Generated Events + + [Serializable] + public class ScenarioFinishedEvent + { + public bool Success { get; set; } + public string Result { get; set; } = string.Empty; + } + + [Serializable] + public class NodeStartedEvent + { + public string Name { get; set; } = string.Empty; + public string Image { get; set; } = string.Empty; + public string Args { get; set; } = string.Empty; + } + + [Serializable] + public class NodeStoppedEvent + { + public string Name { get; set; } = string.Empty; + } + + [Serializable] + public class FileUploadedEvent + { + public ulong ByteSize { get; set; } + public string Cid { get; set; } = string.Empty; + } + + [Serializable] + public class FileDownloadedEvent + { + public string Cid { get; set; } = string.Empty; + } + + #endregion + + #region Codex Generated Events + + [Serializable] + public class BlockReceivedEvent + { + public string BlockAddress { get; set; } = string.Empty; + public string PeerId { get; set; } = string.Empty; + } + + #endregion +} \ No newline at end of file diff --git a/Tools/OverwatchTranscript/OverwatchTranscript.csproj b/Tools/OverwatchTranscript/OverwatchTranscript.csproj new file mode 100644 index 0000000..cfadb03 --- /dev/null +++ b/Tools/OverwatchTranscript/OverwatchTranscript.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + enable + enable + + + diff --git a/cs-codex-dist-testing.sln b/cs-codex-dist-testing.sln index 8c95ef0..8333ce7 100644 --- a/cs-codex-dist-testing.sln +++ b/cs-codex-dist-testing.sln @@ -70,6 +70,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoClient", "Tools\AutoCli EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KeyMaker", "Tools\KeyMaker\KeyMaker.csproj", "{B57A4789-D8EF-42E0-8D20-581C4057FFD3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OverwatchTranscript", "Tools\OverwatchTranscript\OverwatchTranscript.csproj", "{3A6CD81E-3134-4F4C-8846-1DFA6AF7774C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -184,6 +186,10 @@ Global {B57A4789-D8EF-42E0-8D20-581C4057FFD3}.Debug|Any CPU.Build.0 = Debug|Any CPU {B57A4789-D8EF-42E0-8D20-581C4057FFD3}.Release|Any CPU.ActiveCfg = Release|Any CPU {B57A4789-D8EF-42E0-8D20-581C4057FFD3}.Release|Any CPU.Build.0 = Release|Any CPU + {3A6CD81E-3134-4F4C-8846-1DFA6AF7774C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A6CD81E-3134-4F4C-8846-1DFA6AF7774C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A6CD81E-3134-4F4C-8846-1DFA6AF7774C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A6CD81E-3134-4F4C-8846-1DFA6AF7774C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -216,6 +222,7 @@ Global {88C212E9-308A-46A4-BAAD-468E8EBD8EDF} = {8F1F1C2A-E313-4E0C-BE40-58FB0BA91124} {73599F9C-98BB-4C6A-9D7D-7C50FBF2993B} = {7591C5B3-D86E-4AE4-8ED2-B272D17FE7E3} {B57A4789-D8EF-42E0-8D20-581C4057FFD3} = {7591C5B3-D86E-4AE4-8ED2-B272D17FE7E3} + {3A6CD81E-3134-4F4C-8846-1DFA6AF7774C} = {7591C5B3-D86E-4AE4-8ED2-B272D17FE7E3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {237BF0AA-9EC4-4659-AD9A-65DEB974250C}