diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
new file mode 100644
index 0000000..70ef4a4
--- /dev/null
+++ b/.github/workflows/dotnet.yml
@@ -0,0 +1,31 @@
+name: .NET
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+env:
+ MY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 5.0.x
+ - name: Restore dependencies
+ shell: bash
+ run: ./build.sh --target Restore --verbosity verbose
+ - name: Build with Nuke
+ shell: bash
+ run: ./build.sh --target Compile --configuration release --verbosity verbose
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1a44dac
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+obj/
+bin/
+x86/
+v16/
+Release/
+*.cache
+*.i.cs
+.vs/
+
+.nuke/temp/build-attempt.log
diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
new file mode 100644
index 0000000..38767b2
--- /dev/null
+++ b/.nuke/build.schema.json
@@ -0,0 +1,111 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Build Schema",
+ "$ref": "#/definitions/build",
+ "definitions": {
+ "build": {
+ "type": "object",
+ "properties": {
+ "Configuration": {
+ "type": "string",
+ "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
+ "enum": [
+ "Debug",
+ "Release"
+ ]
+ },
+ "Continue": {
+ "type": "boolean",
+ "description": "Indicates to continue a previously failed build attempt"
+ },
+ "Help": {
+ "type": "boolean",
+ "description": "Shows the help text for this build assembly"
+ },
+ "Host": {
+ "type": "string",
+ "description": "Host for execution. Default is 'automatic'",
+ "enum": [
+ "AppVeyor",
+ "AzurePipelines",
+ "Bamboo",
+ "Bitrise",
+ "GitHubActions",
+ "GitLab",
+ "Jenkins",
+ "Rider",
+ "SpaceAutomation",
+ "TeamCity",
+ "Terminal",
+ "TravisCI",
+ "VisualStudio",
+ "VSCode"
+ ]
+ },
+ "NoLogo": {
+ "type": "boolean",
+ "description": "Disables displaying the NUKE logo"
+ },
+ "Partition": {
+ "type": "string",
+ "description": "Partition to use on CI"
+ },
+ "Plan": {
+ "type": "boolean",
+ "description": "Shows the execution plan (HTML)"
+ },
+ "Profile": {
+ "type": "array",
+ "description": "Defines the profiles to load",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Root": {
+ "type": "string",
+ "description": "Root directory during build execution"
+ },
+ "Skip": {
+ "type": "array",
+ "description": "List of targets to be skipped. Empty list skips all dependencies",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Clean",
+ "Compile",
+ "Pack",
+ "Restore"
+ ]
+ }
+ },
+ "Solution": {
+ "type": "string",
+ "description": "Path to a solution file that is automatically loaded"
+ },
+ "Target": {
+ "type": "array",
+ "description": "List of targets to be invoked. Default is '{default_target}'",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Clean",
+ "Compile",
+ "Pack",
+ "Restore"
+ ]
+ }
+ },
+ "Verbosity": {
+ "type": "string",
+ "description": "Logging verbosity during build execution. Default is 'Normal'",
+ "enum": [
+ "Minimal",
+ "Normal",
+ "Quiet",
+ "Verbose"
+ ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/.nuke/parameters.json b/.nuke/parameters.json
new file mode 100644
index 0000000..add4f5a
--- /dev/null
+++ b/.nuke/parameters.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "./build.schema.json",
+ "Solution": "OpenDis.sln"
+}
\ No newline at end of file
diff --git a/CsharpDis6/EspduReceiver/OpenDis.EspduReceiver.csproj b/CsharpDis6/EspduReceiver/OpenDis.EspduReceiver.csproj
deleted file mode 100644
index 359f94d..0000000
--- a/CsharpDis6/EspduReceiver/OpenDis.EspduReceiver.csproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {70F94942-1466-4E6C-A2A3-89DB19C20159}
- Exe
- Properties
- EspduReceiver
- EspduReceiver
- v4.0
- Client
- 512
-
-
- x86
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}
- OpenDis
-
-
-
-
-
\ No newline at end of file
diff --git a/CsharpDis6/EspduReceiver/Properties/AssemblyInfo.cs b/CsharpDis6/EspduReceiver/Properties/AssemblyInfo.cs
deleted file mode 100644
index aebf68e..0000000
--- a/CsharpDis6/EspduReceiver/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("EspduReceiver")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("EspduReceiver")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b895fb76-1cfa-4ca3-a2ca-6eb63c18250f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/CsharpDis6/EspduSender/OpenDis.EspduSender.csproj b/CsharpDis6/EspduSender/OpenDis.EspduSender.csproj
deleted file mode 100644
index e002aea..0000000
--- a/CsharpDis6/EspduSender/OpenDis.EspduSender.csproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}
- Exe
- Properties
- EspduSender
- EspduSender
- v4.0
- Client
- 512
-
-
- x86
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}
- OpenDis
-
-
-
-
-
\ No newline at end of file
diff --git a/CsharpDis6/EspduSender/Properties/AssemblyInfo.cs b/CsharpDis6/EspduSender/Properties/AssemblyInfo.cs
deleted file mode 100644
index 36bafe1..0000000
--- a/CsharpDis6/EspduSender/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("EspduSender")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("EspduSender")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("fa71ba03-ced4-4464-bcd3-b05ddf61f29f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/CsharpDis6/OpenDis.Demo/OpenDis.Demo.csproj b/CsharpDis6/OpenDis.Demo/OpenDis.Demo.csproj
deleted file mode 100644
index 25352fc..0000000
--- a/CsharpDis6/OpenDis.Demo/OpenDis.Demo.csproj
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}
- WinExe
- Properties
- OpenDis.Demo
- OpenDis.Demo
- v4.0
- Client
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- x86
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}
- OpenDis
-
-
-
-
-
\ No newline at end of file
diff --git a/CsharpDis6/OpenDis.Demo/Properties/AssemblyInfo.cs b/CsharpDis6/OpenDis.Demo/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2ccdf9f..0000000
--- a/CsharpDis6/OpenDis.Demo/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OpenDis.Demo")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("OpenDis.Demo")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/CsharpDis6/OpenDis.Demo/bin/Debug/OpenDis.Demo.vshost.exe b/CsharpDis6/OpenDis.Demo/bin/Debug/OpenDis.Demo.vshost.exe
deleted file mode 100644
index bb84a51..0000000
Binary files a/CsharpDis6/OpenDis.Demo/bin/Debug/OpenDis.Demo.vshost.exe and /dev/null differ
diff --git a/CsharpDis6/OpenDis.Demo/bin/Debug/OpenDis.Demo.vshost.exe.manifest b/CsharpDis6/OpenDis.Demo/bin/Debug/OpenDis.Demo.vshost.exe.manifest
deleted file mode 100644
index f96b1d6..0000000
--- a/CsharpDis6/OpenDis.Demo/bin/Debug/OpenDis.Demo.vshost.exe.manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/App.g.i.cs b/CsharpDis6/OpenDis.Demo/obj/x86/Debug/App.g.i.cs
deleted file mode 100644
index fe82268..0000000
--- a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/App.g.i.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-#pragma checksum "..\..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AD751E87B884BF2956E97D7D533B3ABE"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-
-
-namespace OpenDis.Demo {
-
-
- ///
- /// App
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public partial class App : System.Windows.Application {
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public void InitializeComponent() {
-
- #line 4 "..\..\..\App.xaml"
- this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
-
- #line default
- #line hidden
- }
-
- ///
- /// Application Entry Point.
- ///
- [System.STAThreadAttribute()]
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static void Main() {
- OpenDis.Demo.App app = new OpenDis.Demo.App();
- app.InitializeComponent();
- app.Run();
- }
- }
-}
-
diff --git a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CsharpDis6/OpenDis.Demo/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 42afc61..0000000
Binary files a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/MainWindow.g.i.cs b/CsharpDis6/OpenDis.Demo/obj/x86/Debug/MainWindow.g.i.cs
deleted file mode 100644
index e51d433..0000000
--- a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/MainWindow.g.i.cs
+++ /dev/null
@@ -1,234 +0,0 @@
-#pragma checksum "..\..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "82DFBDDFBC29EF428350DE84095F598B"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using OpenDis.Demo;
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-
-
-namespace OpenDis.Demo {
-
-
- ///
- /// MainWindow
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
-
-
- #line 4 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal OpenDis.Demo.MainWindow mainWindow;
-
- #line default
- #line hidden
-
-
- #line 54 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Primitives.ToggleButton toggleEntityTree;
-
- #line default
- #line hidden
-
-
- #line 55 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Primitives.ToggleButton toggleEntityGrid;
-
- #line default
- #line hidden
-
-
- #line 58 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Primitives.ToggleButton toggleCet2006;
-
- #line default
- #line hidden
-
-
- #line 59 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Primitives.ToggleButton toggleCet2010;
-
- #line default
- #line hidden
-
-
- #line 62 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TreeView treeViewEntityTypes;
-
- #line default
- #line hidden
-
-
- #line 63 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.DataGrid dataGridEntityTypes;
-
- #line default
- #line hidden
-
-
- #line 114 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Primitives.ToggleButton toggleAggregate2006;
-
- #line default
- #line hidden
-
-
- #line 115 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Primitives.ToggleButton toggleAggregate2010;
-
- #line default
- #line hidden
-
-
- #line 118 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TreeView treeViewAggregateTypes;
-
- #line default
- #line hidden
-
-
- #line 126 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TreeView treeViewEnumerations;
-
- #line default
- #line hidden
-
- private bool _contentLoaded;
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public void InitializeComponent() {
- if (_contentLoaded) {
- return;
- }
- _contentLoaded = true;
- System.Uri resourceLocater = new System.Uri("/OpenDis.Demo;component/mainwindow.xaml", System.UriKind.Relative);
-
- #line 1 "..\..\..\MainWindow.xaml"
- System.Windows.Application.LoadComponent(this, resourceLocater);
-
- #line default
- #line hidden
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
- switch (connectionId)
- {
- case 1:
- this.mainWindow = ((OpenDis.Demo.MainWindow)(target));
- return;
- case 2:
- this.toggleEntityTree = ((System.Windows.Controls.Primitives.ToggleButton)(target));
-
- #line 54 "..\..\..\MainWindow.xaml"
- this.toggleEntityTree.Click += new System.Windows.RoutedEventHandler(this.toggleEntityTree_Click);
-
- #line default
- #line hidden
- return;
- case 3:
- this.toggleEntityGrid = ((System.Windows.Controls.Primitives.ToggleButton)(target));
-
- #line 55 "..\..\..\MainWindow.xaml"
- this.toggleEntityGrid.Click += new System.Windows.RoutedEventHandler(this.toggleEntityGrid_Click);
-
- #line default
- #line hidden
- return;
- case 4:
- this.toggleCet2006 = ((System.Windows.Controls.Primitives.ToggleButton)(target));
-
- #line 58 "..\..\..\MainWindow.xaml"
- this.toggleCet2006.Click += new System.Windows.RoutedEventHandler(this.toggleCet2006_Click);
-
- #line default
- #line hidden
- return;
- case 5:
- this.toggleCet2010 = ((System.Windows.Controls.Primitives.ToggleButton)(target));
-
- #line 59 "..\..\..\MainWindow.xaml"
- this.toggleCet2010.Click += new System.Windows.RoutedEventHandler(this.toggleCet2010_Click);
-
- #line default
- #line hidden
- return;
- case 6:
- this.treeViewEntityTypes = ((System.Windows.Controls.TreeView)(target));
- return;
- case 7:
- this.dataGridEntityTypes = ((System.Windows.Controls.DataGrid)(target));
- return;
- case 8:
- this.toggleAggregate2006 = ((System.Windows.Controls.Primitives.ToggleButton)(target));
-
- #line 114 "..\..\..\MainWindow.xaml"
- this.toggleAggregate2006.Click += new System.Windows.RoutedEventHandler(this.toggleAggregate2006_Click);
-
- #line default
- #line hidden
- return;
- case 9:
- this.toggleAggregate2010 = ((System.Windows.Controls.Primitives.ToggleButton)(target));
-
- #line 115 "..\..\..\MainWindow.xaml"
- this.toggleAggregate2010.Click += new System.Windows.RoutedEventHandler(this.toggleAggregate2010_Click);
-
- #line default
- #line hidden
- return;
- case 10:
- this.treeViewAggregateTypes = ((System.Windows.Controls.TreeView)(target));
- return;
- case 11:
- this.treeViewEnumerations = ((System.Windows.Controls.TreeView)(target));
- return;
- }
- this._contentLoaded = true;
- }
- }
-}
-
diff --git a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/OpenDis.Demo_MarkupCompile.i.cache b/CsharpDis6/OpenDis.Demo/obj/x86/Debug/OpenDis.Demo_MarkupCompile.i.cache
deleted file mode 100644
index 5aea8fe..0000000
--- a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/OpenDis.Demo_MarkupCompile.i.cache
+++ /dev/null
@@ -1,20 +0,0 @@
-OpenDis.Demo
-
-
-winexe
-C#
-.cs
-G:\Temp\OpenDis_v4\OpenDis.Demo\obj\x86\Debug\
-OpenDis.Demo
-none
-false
-DEBUG;TRACE
-G:\Temp\OpenDis_v4\OpenDis.Demo\App.xaml
-11151548125
-
-61412217032
-13151655058
-MainWindow.xaml;
-
-True
-
diff --git a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/OpenDis.Demo_MarkupCompile.i.lref b/CsharpDis6/OpenDis.Demo/obj/x86/Debug/OpenDis.Demo_MarkupCompile.i.lref
deleted file mode 100644
index d143884..0000000
--- a/CsharpDis6/OpenDis.Demo/obj/x86/Debug/OpenDis.Demo_MarkupCompile.i.lref
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-FG:\Temp\OpenDis_v4\OpenDis.Demo\MainWindow.xaml
-
diff --git a/CsharpDis6/OpenDis.sln b/CsharpDis6/OpenDis.sln
deleted file mode 100644
index 38e9cbf..0000000
--- a/CsharpDis6/OpenDis.sln
+++ /dev/null
@@ -1,47 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenDis", "OpenDis\OpenDis.csproj", "{628EE35F-450A-49B2-BA46-04FABB66D0BF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenDis.Demo", "OpenDis.Demo\OpenDis.Demo.csproj", "{0FC1409E-A9F2-4409-85A3-D989A36C3CB8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenDis.EspduReceiver", "EspduReceiver\OpenDis.EspduReceiver.csproj", "{70F94942-1466-4E6C-A2A3-89DB19C20159}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenDis.EspduSender", "EspduSender\OpenDis.EspduSender.csproj", "{AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Analysis|x86 = Analysis|x86
- Debug|x86 = Debug|x86
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}.Analysis|x86.ActiveCfg = Analysis|x86
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}.Analysis|x86.Build.0 = Analysis|x86
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}.Debug|x86.ActiveCfg = Debug|x86
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}.Debug|x86.Build.0 = Debug|x86
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}.Release|x86.ActiveCfg = Release|x86
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}.Release|x86.Build.0 = Release|x86
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}.Analysis|x86.ActiveCfg = Release|x86
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}.Analysis|x86.Build.0 = Release|x86
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}.Debug|x86.ActiveCfg = Debug|x86
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}.Debug|x86.Build.0 = Debug|x86
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}.Release|x86.ActiveCfg = Release|x86
- {0FC1409E-A9F2-4409-85A3-D989A36C3CB8}.Release|x86.Build.0 = Release|x86
- {70F94942-1466-4E6C-A2A3-89DB19C20159}.Analysis|x86.ActiveCfg = Release|x86
- {70F94942-1466-4E6C-A2A3-89DB19C20159}.Analysis|x86.Build.0 = Release|x86
- {70F94942-1466-4E6C-A2A3-89DB19C20159}.Debug|x86.ActiveCfg = Debug|x86
- {70F94942-1466-4E6C-A2A3-89DB19C20159}.Debug|x86.Build.0 = Debug|x86
- {70F94942-1466-4E6C-A2A3-89DB19C20159}.Release|x86.ActiveCfg = Release|x86
- {70F94942-1466-4E6C-A2A3-89DB19C20159}.Release|x86.Build.0 = Release|x86
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}.Analysis|x86.ActiveCfg = Release|x86
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}.Analysis|x86.Build.0 = Release|x86
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}.Debug|x86.ActiveCfg = Debug|x86
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}.Debug|x86.Build.0 = Debug|x86
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}.Release|x86.ActiveCfg = Release|x86
- {AEF2FB06-9CCF-491A-9727-FE6E4C4CF664}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/CsharpDis6/OpenDis.suo b/CsharpDis6/OpenDis.suo
deleted file mode 100644
index c5d5284..0000000
Binary files a/CsharpDis6/OpenDis.suo and /dev/null differ
diff --git a/CsharpDis6/OpenDis/OpenDis.build.bat b/CsharpDis6/OpenDis/OpenDis.build.bat
deleted file mode 100644
index 9858854..0000000
--- a/CsharpDis6/OpenDis/OpenDis.build.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-msbuild /p:Platform="x86" /p:Configuration="Debug" OpenDis.build.csproj
-msbuild /p:Platform="x86" /p:Configuration="Release" OpenDis.build.csproj
\ No newline at end of file
diff --git a/CsharpDis6/OpenDis/OpenDis.build.csproj b/CsharpDis6/OpenDis/OpenDis.build.csproj
deleted file mode 100644
index a60fe07..0000000
--- a/CsharpDis6/OpenDis/OpenDis.build.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- copy "$(ProjectDir)Properties\Version.cs" "$(ProjectDir)Properties\Version.cs_temp" /y
-cd "$(ProjectDir)"
-"C:\Program Files\TortoiseSVN\bin\SubWCRev.exe" . "Properties\Version2.cs" "Properties\Version.cs"
-
-
- copy "$(ProjectDir)Properties\Version.cs_temp" "$(ProjectDir)Properties\Version.cs" /y
-
-
\ No newline at end of file
diff --git a/CsharpDis6/OpenDis/OpenDis.csproj b/CsharpDis6/OpenDis/OpenDis.csproj
deleted file mode 100644
index ae7b6bf..0000000
--- a/CsharpDis6/OpenDis/OpenDis.csproj
+++ /dev/null
@@ -1,826 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {628EE35F-450A-49B2-BA46-04FABB66D0BF}
- Library
- Properties
- OpenDis
- OpenDis
- v4.0
- 512
- 3.5
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
-
- true
- bin\x86\Debug\
- TRACE;DEBUG
- full
- x86
- true
- GlobalSuppressions.cs
- prompt
- AllRules.ruleset
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- true
- GlobalSuppressions.cs
- prompt
- AllRules.ruleset
- bin\x86\Release\OpenDis.XML
-
-
- true
-
-
- key.snk
-
-
- false
-
-
- Always
-
-
- true
- bin\x86\Analyze\
- TRACE;DEBUG;CODE_ANALYSIS
- full
- x86
- bin\x86\Debug\OpenDis.dll.CodeAnalysisLog.xml
- true
- GlobalSuppressions.cs
- prompt
- AllRules.ruleset
- ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
- true
- ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
- true
- false
- true
- false
-
-
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code
-
-
- Code
-
-
-
- Code
-
-
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
- Code
-
-
-
-
-
- Code
-
-
-
-
-
- Code
-
-
- Code
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
- Code
-
-
-
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
- Code
-
-
-
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
- Designer
-
-
-
-
-
-
-
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- true
-
-
- False
- Windows Installer 3.1
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CsharpDis6/OpenDis/OpenDis.csproj.user b/CsharpDis6/OpenDis/OpenDis.csproj.user
deleted file mode 100644
index 566c009..0000000
--- a/CsharpDis6/OpenDis/OpenDis.csproj.user
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- ShowAllFiles
-
-
\ No newline at end of file
diff --git a/CsharpDis6/OpenDis/Properties/AssemblyInfo.cs b/CsharpDis6/OpenDis/Properties/AssemblyInfo.cs
deleted file mode 100644
index e82a9c0..0000000
--- a/CsharpDis6/OpenDis/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Open DIS Library")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Blubit d.o.o.")]
-[assembly: AssemblyProduct("Open DIS, http://open-dis.sourceforge.org")]
-[assembly: AssemblyCopyright("Copyright © Blubit d.o.o. 2010")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-[assembly: CLSCompliant(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("719719e6-e1a9-4428-aa7a-e8d2defd1b75")]
diff --git a/CsharpDis6/OpenDis/Properties/Version.cs b/CsharpDis6/OpenDis/Properties/Version.cs
deleted file mode 100644
index 87478fc..0000000
--- a/CsharpDis6/OpenDis/Properties/Version.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-using System.Reflection;
-
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
diff --git a/CsharpDis6/OpenDis/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CsharpDis6/OpenDis/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 52acc8e..0000000
Binary files a/CsharpDis6/OpenDis/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/CSharpDis7/AcknowledgePdu.cs b/Libs/CSharpDis7/AcknowledgePdu.cs
similarity index 100%
rename from CSharpDis7/AcknowledgePdu.cs
rename to Libs/CSharpDis7/AcknowledgePdu.cs
diff --git a/CSharpDis7/AcknowledgeReliablePdu.cs b/Libs/CSharpDis7/AcknowledgeReliablePdu.cs
similarity index 100%
rename from CSharpDis7/AcknowledgeReliablePdu.cs
rename to Libs/CSharpDis7/AcknowledgeReliablePdu.cs
diff --git a/CSharpDis7/AcousticEmitter.cs b/Libs/CSharpDis7/AcousticEmitter.cs
similarity index 100%
rename from CSharpDis7/AcousticEmitter.cs
rename to Libs/CSharpDis7/AcousticEmitter.cs
diff --git a/CSharpDis7/ActionRequestPdu.cs b/Libs/CSharpDis7/ActionRequestPdu.cs
similarity index 100%
rename from CSharpDis7/ActionRequestPdu.cs
rename to Libs/CSharpDis7/ActionRequestPdu.cs
diff --git a/CSharpDis7/ActionRequestReliablePdu.cs b/Libs/CSharpDis7/ActionRequestReliablePdu.cs
similarity index 100%
rename from CSharpDis7/ActionRequestReliablePdu.cs
rename to Libs/CSharpDis7/ActionRequestReliablePdu.cs
diff --git a/CSharpDis7/ActionResponsePdu.cs b/Libs/CSharpDis7/ActionResponsePdu.cs
similarity index 100%
rename from CSharpDis7/ActionResponsePdu.cs
rename to Libs/CSharpDis7/ActionResponsePdu.cs
diff --git a/CSharpDis7/ActionResponseReliablePdu.cs b/Libs/CSharpDis7/ActionResponseReliablePdu.cs
similarity index 100%
rename from CSharpDis7/ActionResponseReliablePdu.cs
rename to Libs/CSharpDis7/ActionResponseReliablePdu.cs
diff --git a/CSharpDis7/AggregateIdentifier.cs b/Libs/CSharpDis7/AggregateIdentifier.cs
similarity index 100%
rename from CSharpDis7/AggregateIdentifier.cs
rename to Libs/CSharpDis7/AggregateIdentifier.cs
diff --git a/CSharpDis7/AggregateMarking.cs b/Libs/CSharpDis7/AggregateMarking.cs
similarity index 100%
rename from CSharpDis7/AggregateMarking.cs
rename to Libs/CSharpDis7/AggregateMarking.cs
diff --git a/CSharpDis7/AggregateType.cs b/Libs/CSharpDis7/AggregateType.cs
similarity index 100%
rename from CSharpDis7/AggregateType.cs
rename to Libs/CSharpDis7/AggregateType.cs
diff --git a/CSharpDis7/AngleDeception.cs b/Libs/CSharpDis7/AngleDeception.cs
similarity index 100%
rename from CSharpDis7/AngleDeception.cs
rename to Libs/CSharpDis7/AngleDeception.cs
diff --git a/CSharpDis7/AngularVelocityVector.cs b/Libs/CSharpDis7/AngularVelocityVector.cs
similarity index 100%
rename from CSharpDis7/AngularVelocityVector.cs
rename to Libs/CSharpDis7/AngularVelocityVector.cs
diff --git a/CSharpDis7/AntennaLocation.cs b/Libs/CSharpDis7/AntennaLocation.cs
similarity index 100%
rename from CSharpDis7/AntennaLocation.cs
rename to Libs/CSharpDis7/AntennaLocation.cs
diff --git a/CSharpDis7/ArealObjectStatePdu.cs b/Libs/CSharpDis7/ArealObjectStatePdu.cs
similarity index 100%
rename from CSharpDis7/ArealObjectStatePdu.cs
rename to Libs/CSharpDis7/ArealObjectStatePdu.cs
diff --git a/CSharpDis7/ArticulatedParts.cs b/Libs/CSharpDis7/ArticulatedParts.cs
similarity index 100%
rename from CSharpDis7/ArticulatedParts.cs
rename to Libs/CSharpDis7/ArticulatedParts.cs
diff --git a/CSharpDis7/Association.cs b/Libs/CSharpDis7/Association.cs
similarity index 100%
rename from CSharpDis7/Association.cs
rename to Libs/CSharpDis7/Association.cs
diff --git a/CSharpDis7/AttachedParts.cs b/Libs/CSharpDis7/AttachedParts.cs
similarity index 100%
rename from CSharpDis7/AttachedParts.cs
rename to Libs/CSharpDis7/AttachedParts.cs
diff --git a/CSharpDis7/Attribute.cs b/Libs/CSharpDis7/Attribute.cs
similarity index 100%
rename from CSharpDis7/Attribute.cs
rename to Libs/CSharpDis7/Attribute.cs
diff --git a/CSharpDis7/AttributePdu.cs b/Libs/CSharpDis7/AttributePdu.cs
similarity index 100%
rename from CSharpDis7/AttributePdu.cs
rename to Libs/CSharpDis7/AttributePdu.cs
diff --git a/CSharpDis7/BeamAntennaPattern.cs b/Libs/CSharpDis7/BeamAntennaPattern.cs
similarity index 100%
rename from CSharpDis7/BeamAntennaPattern.cs
rename to Libs/CSharpDis7/BeamAntennaPattern.cs
diff --git a/CSharpDis7/BeamData.cs b/Libs/CSharpDis7/BeamData.cs
similarity index 100%
rename from CSharpDis7/BeamData.cs
rename to Libs/CSharpDis7/BeamData.cs
diff --git a/CSharpDis7/BeamStatus.cs b/Libs/CSharpDis7/BeamStatus.cs
similarity index 100%
rename from CSharpDis7/BeamStatus.cs
rename to Libs/CSharpDis7/BeamStatus.cs
diff --git a/CSharpDis7/BlankingSector.cs b/Libs/CSharpDis7/BlankingSector.cs
similarity index 100%
rename from CSharpDis7/BlankingSector.cs
rename to Libs/CSharpDis7/BlankingSector.cs
diff --git a/CSharpDis7/ChangeOptions.cs b/Libs/CSharpDis7/ChangeOptions.cs
similarity index 100%
rename from CSharpDis7/ChangeOptions.cs
rename to Libs/CSharpDis7/ChangeOptions.cs
diff --git a/CSharpDis7/ClockTime.cs b/Libs/CSharpDis7/ClockTime.cs
similarity index 100%
rename from CSharpDis7/ClockTime.cs
rename to Libs/CSharpDis7/ClockTime.cs
diff --git a/CSharpDis7/CollisionElasticPdu.cs b/Libs/CSharpDis7/CollisionElasticPdu.cs
similarity index 100%
rename from CSharpDis7/CollisionElasticPdu.cs
rename to Libs/CSharpDis7/CollisionElasticPdu.cs
diff --git a/CSharpDis7/CollisionPdu.cs b/Libs/CSharpDis7/CollisionPdu.cs
similarity index 100%
rename from CSharpDis7/CollisionPdu.cs
rename to Libs/CSharpDis7/CollisionPdu.cs
diff --git a/CSharpDis7/CommentPdu.cs b/Libs/CSharpDis7/CommentPdu.cs
similarity index 100%
rename from CSharpDis7/CommentPdu.cs
rename to Libs/CSharpDis7/CommentPdu.cs
diff --git a/CSharpDis7/CommentReliablePdu.cs b/Libs/CSharpDis7/CommentReliablePdu.cs
similarity index 100%
rename from CSharpDis7/CommentReliablePdu.cs
rename to Libs/CSharpDis7/CommentReliablePdu.cs
diff --git a/CSharpDis7/CommunicationsNodeID.cs b/Libs/CSharpDis7/CommunicationsNodeID.cs
similarity index 100%
rename from CSharpDis7/CommunicationsNodeID.cs
rename to Libs/CSharpDis7/CommunicationsNodeID.cs
diff --git a/CSharpDis7/CreateEntityPdu.cs b/Libs/CSharpDis7/CreateEntityPdu.cs
similarity index 100%
rename from CSharpDis7/CreateEntityPdu.cs
rename to Libs/CSharpDis7/CreateEntityPdu.cs
diff --git a/CSharpDis7/CreateEntityReliablePdu.cs b/Libs/CSharpDis7/CreateEntityReliablePdu.cs
similarity index 100%
rename from CSharpDis7/CreateEntityReliablePdu.cs
rename to Libs/CSharpDis7/CreateEntityReliablePdu.cs
diff --git a/CSharpDis7/DataPdu.cs b/Libs/CSharpDis7/DataPdu.cs
similarity index 100%
rename from CSharpDis7/DataPdu.cs
rename to Libs/CSharpDis7/DataPdu.cs
diff --git a/CSharpDis7/DataQueryDatumSpecification.cs b/Libs/CSharpDis7/DataQueryDatumSpecification.cs
similarity index 100%
rename from CSharpDis7/DataQueryDatumSpecification.cs
rename to Libs/CSharpDis7/DataQueryDatumSpecification.cs
diff --git a/CSharpDis7/DataQueryPdu.cs b/Libs/CSharpDis7/DataQueryPdu.cs
similarity index 100%
rename from CSharpDis7/DataQueryPdu.cs
rename to Libs/CSharpDis7/DataQueryPdu.cs
diff --git a/CSharpDis7/DataQueryReliablePdu.cs b/Libs/CSharpDis7/DataQueryReliablePdu.cs
similarity index 100%
rename from CSharpDis7/DataQueryReliablePdu.cs
rename to Libs/CSharpDis7/DataQueryReliablePdu.cs
diff --git a/CSharpDis7/DataReliablePdu.cs b/Libs/CSharpDis7/DataReliablePdu.cs
similarity index 100%
rename from CSharpDis7/DataReliablePdu.cs
rename to Libs/CSharpDis7/DataReliablePdu.cs
diff --git a/CSharpDis7/DatumSpecification.cs b/Libs/CSharpDis7/DatumSpecification.cs
similarity index 100%
rename from CSharpDis7/DatumSpecification.cs
rename to Libs/CSharpDis7/DatumSpecification.cs
diff --git a/CSharpDis7/DeadReckoningParameters.cs b/Libs/CSharpDis7/DeadReckoningParameters.cs
similarity index 100%
rename from CSharpDis7/DeadReckoningParameters.cs
rename to Libs/CSharpDis7/DeadReckoningParameters.cs
diff --git a/CSharpDis7/DesignatorPdu.cs b/Libs/CSharpDis7/DesignatorPdu.cs
similarity index 100%
rename from CSharpDis7/DesignatorPdu.cs
rename to Libs/CSharpDis7/DesignatorPdu.cs
diff --git a/CSharpDis7/DetonationPdu.cs b/Libs/CSharpDis7/DetonationPdu.cs
similarity index 100%
rename from CSharpDis7/DetonationPdu.cs
rename to Libs/CSharpDis7/DetonationPdu.cs
diff --git a/CSharpDis7/DirectedEnergyAreaAimpoint.cs b/Libs/CSharpDis7/DirectedEnergyAreaAimpoint.cs
similarity index 100%
rename from CSharpDis7/DirectedEnergyAreaAimpoint.cs
rename to Libs/CSharpDis7/DirectedEnergyAreaAimpoint.cs
diff --git a/CSharpDis7/DirectedEnergyDamage.cs b/Libs/CSharpDis7/DirectedEnergyDamage.cs
similarity index 100%
rename from CSharpDis7/DirectedEnergyDamage.cs
rename to Libs/CSharpDis7/DirectedEnergyDamage.cs
diff --git a/CSharpDis7/DirectedEnergyFirePdu.cs b/Libs/CSharpDis7/DirectedEnergyFirePdu.cs
similarity index 100%
rename from CSharpDis7/DirectedEnergyFirePdu.cs
rename to Libs/CSharpDis7/DirectedEnergyFirePdu.cs
diff --git a/CSharpDis7/DirectedEnergyPrecisionAimpoint.cs b/Libs/CSharpDis7/DirectedEnergyPrecisionAimpoint.cs
similarity index 100%
rename from CSharpDis7/DirectedEnergyPrecisionAimpoint.cs
rename to Libs/CSharpDis7/DirectedEnergyPrecisionAimpoint.cs
diff --git a/CSharpDis7/DirectedEnergyTargetEnergyDeposition.cs b/Libs/CSharpDis7/DirectedEnergyTargetEnergyDeposition.cs
similarity index 100%
rename from CSharpDis7/DirectedEnergyTargetEnergyDeposition.cs
rename to Libs/CSharpDis7/DirectedEnergyTargetEnergyDeposition.cs
diff --git a/CSharpDis7/DistributedEmissionsFamilyPdu.cs b/Libs/CSharpDis7/DistributedEmissionsFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/DistributedEmissionsFamilyPdu.cs
rename to Libs/CSharpDis7/DistributedEmissionsFamilyPdu.cs
diff --git a/CSharpDis7/EEFundamentalParameterData.cs b/Libs/CSharpDis7/EEFundamentalParameterData.cs
similarity index 100%
rename from CSharpDis7/EEFundamentalParameterData.cs
rename to Libs/CSharpDis7/EEFundamentalParameterData.cs
diff --git a/CSharpDis7/EightByteChunk.cs b/Libs/CSharpDis7/EightByteChunk.cs
similarity index 100%
rename from CSharpDis7/EightByteChunk.cs
rename to Libs/CSharpDis7/EightByteChunk.cs
diff --git a/CSharpDis7/ElectronicEmissionsPdu.cs b/Libs/CSharpDis7/ElectronicEmissionsPdu.cs
similarity index 100%
rename from CSharpDis7/ElectronicEmissionsPdu.cs
rename to Libs/CSharpDis7/ElectronicEmissionsPdu.cs
diff --git a/CSharpDis7/EmitterSystem.cs b/Libs/CSharpDis7/EmitterSystem.cs
similarity index 100%
rename from CSharpDis7/EmitterSystem.cs
rename to Libs/CSharpDis7/EmitterSystem.cs
diff --git a/CSharpDis7/EngineFuel.cs b/Libs/CSharpDis7/EngineFuel.cs
similarity index 100%
rename from CSharpDis7/EngineFuel.cs
rename to Libs/CSharpDis7/EngineFuel.cs
diff --git a/CSharpDis7/EngineFuelReload.cs b/Libs/CSharpDis7/EngineFuelReload.cs
similarity index 100%
rename from CSharpDis7/EngineFuelReload.cs
rename to Libs/CSharpDis7/EngineFuelReload.cs
diff --git a/CSharpDis7/EntityAssociation.cs b/Libs/CSharpDis7/EntityAssociation.cs
similarity index 100%
rename from CSharpDis7/EntityAssociation.cs
rename to Libs/CSharpDis7/EntityAssociation.cs
diff --git a/CSharpDis7/EntityDamageStatusPdu.cs b/Libs/CSharpDis7/EntityDamageStatusPdu.cs
similarity index 100%
rename from CSharpDis7/EntityDamageStatusPdu.cs
rename to Libs/CSharpDis7/EntityDamageStatusPdu.cs
diff --git a/CSharpDis7/EntityID.cs b/Libs/CSharpDis7/EntityID.cs
similarity index 100%
rename from CSharpDis7/EntityID.cs
rename to Libs/CSharpDis7/EntityID.cs
diff --git a/CSharpDis7/EntityInformationFamilyPdu.cs b/Libs/CSharpDis7/EntityInformationFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/EntityInformationFamilyPdu.cs
rename to Libs/CSharpDis7/EntityInformationFamilyPdu.cs
diff --git a/CSharpDis7/EntityManagementFamilyPdu.cs b/Libs/CSharpDis7/EntityManagementFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/EntityManagementFamilyPdu.cs
rename to Libs/CSharpDis7/EntityManagementFamilyPdu.cs
diff --git a/CSharpDis7/EntityMarking.cs b/Libs/CSharpDis7/EntityMarking.cs
similarity index 100%
rename from CSharpDis7/EntityMarking.cs
rename to Libs/CSharpDis7/EntityMarking.cs
diff --git a/CSharpDis7/EntityStatePdu.cs b/Libs/CSharpDis7/EntityStatePdu.cs
similarity index 100%
rename from CSharpDis7/EntityStatePdu.cs
rename to Libs/CSharpDis7/EntityStatePdu.cs
diff --git a/CSharpDis7/EntityStateUpdatePdu.cs b/Libs/CSharpDis7/EntityStateUpdatePdu.cs
similarity index 100%
rename from CSharpDis7/EntityStateUpdatePdu.cs
rename to Libs/CSharpDis7/EntityStateUpdatePdu.cs
diff --git a/CSharpDis7/EntityType.cs b/Libs/CSharpDis7/EntityType.cs
similarity index 100%
rename from CSharpDis7/EntityType.cs
rename to Libs/CSharpDis7/EntityType.cs
diff --git a/CSharpDis7/EntityTypeVP.cs b/Libs/CSharpDis7/EntityTypeVP.cs
similarity index 100%
rename from CSharpDis7/EntityTypeVP.cs
rename to Libs/CSharpDis7/EntityTypeVP.cs
diff --git a/CSharpDis7/Environment.cs b/Libs/CSharpDis7/Environment.cs
similarity index 100%
rename from CSharpDis7/Environment.cs
rename to Libs/CSharpDis7/Environment.cs
diff --git a/CSharpDis7/EnvironmentGeneral.cs b/Libs/CSharpDis7/EnvironmentGeneral.cs
similarity index 100%
rename from CSharpDis7/EnvironmentGeneral.cs
rename to Libs/CSharpDis7/EnvironmentGeneral.cs
diff --git a/CSharpDis7/EnvironmentType.cs b/Libs/CSharpDis7/EnvironmentType.cs
similarity index 100%
rename from CSharpDis7/EnvironmentType.cs
rename to Libs/CSharpDis7/EnvironmentType.cs
diff --git a/CSharpDis7/EulerAngles.cs b/Libs/CSharpDis7/EulerAngles.cs
similarity index 100%
rename from CSharpDis7/EulerAngles.cs
rename to Libs/CSharpDis7/EulerAngles.cs
diff --git a/CSharpDis7/EventIdentifier.cs b/Libs/CSharpDis7/EventIdentifier.cs
similarity index 100%
rename from CSharpDis7/EventIdentifier.cs
rename to Libs/CSharpDis7/EventIdentifier.cs
diff --git a/CSharpDis7/EventIdentifierLiveEntity.cs b/Libs/CSharpDis7/EventIdentifierLiveEntity.cs
similarity index 100%
rename from CSharpDis7/EventIdentifierLiveEntity.cs
rename to Libs/CSharpDis7/EventIdentifierLiveEntity.cs
diff --git a/CSharpDis7/EventReportPdu.cs b/Libs/CSharpDis7/EventReportPdu.cs
similarity index 100%
rename from CSharpDis7/EventReportPdu.cs
rename to Libs/CSharpDis7/EventReportPdu.cs
diff --git a/CSharpDis7/EventReportReliablePdu.cs b/Libs/CSharpDis7/EventReportReliablePdu.cs
similarity index 100%
rename from CSharpDis7/EventReportReliablePdu.cs
rename to Libs/CSharpDis7/EventReportReliablePdu.cs
diff --git a/CSharpDis7/Expendable.cs b/Libs/CSharpDis7/Expendable.cs
similarity index 100%
rename from CSharpDis7/Expendable.cs
rename to Libs/CSharpDis7/Expendable.cs
diff --git a/CSharpDis7/ExpendableDescriptor.cs b/Libs/CSharpDis7/ExpendableDescriptor.cs
similarity index 100%
rename from CSharpDis7/ExpendableDescriptor.cs
rename to Libs/CSharpDis7/ExpendableDescriptor.cs
diff --git a/CSharpDis7/ExpendableReload.cs b/Libs/CSharpDis7/ExpendableReload.cs
similarity index 100%
rename from CSharpDis7/ExpendableReload.cs
rename to Libs/CSharpDis7/ExpendableReload.cs
diff --git a/CSharpDis7/ExplosionDescriptor.cs b/Libs/CSharpDis7/ExplosionDescriptor.cs
similarity index 100%
rename from CSharpDis7/ExplosionDescriptor.cs
rename to Libs/CSharpDis7/ExplosionDescriptor.cs
diff --git a/CSharpDis7/FalseTargetsAttribute.cs b/Libs/CSharpDis7/FalseTargetsAttribute.cs
similarity index 100%
rename from CSharpDis7/FalseTargetsAttribute.cs
rename to Libs/CSharpDis7/FalseTargetsAttribute.cs
diff --git a/CSharpDis7/FastEntityStatePdu.cs b/Libs/CSharpDis7/FastEntityStatePdu.cs
similarity index 100%
rename from CSharpDis7/FastEntityStatePdu.cs
rename to Libs/CSharpDis7/FastEntityStatePdu.cs
diff --git a/CSharpDis7/FirePdu.cs b/Libs/CSharpDis7/FirePdu.cs
similarity index 100%
rename from CSharpDis7/FirePdu.cs
rename to Libs/CSharpDis7/FirePdu.cs
diff --git a/CSharpDis7/FixedDatum.cs b/Libs/CSharpDis7/FixedDatum.cs
similarity index 100%
rename from CSharpDis7/FixedDatum.cs
rename to Libs/CSharpDis7/FixedDatum.cs
diff --git a/CSharpDis7/FourByteChunk.cs b/Libs/CSharpDis7/FourByteChunk.cs
similarity index 100%
rename from CSharpDis7/FourByteChunk.cs
rename to Libs/CSharpDis7/FourByteChunk.cs
diff --git a/CSharpDis7/FundamentalOperationalData.cs b/Libs/CSharpDis7/FundamentalOperationalData.cs
similarity index 100%
rename from CSharpDis7/FundamentalOperationalData.cs
rename to Libs/CSharpDis7/FundamentalOperationalData.cs
diff --git a/CSharpDis7/GridAxis.cs b/Libs/CSharpDis7/GridAxis.cs
similarity index 100%
rename from CSharpDis7/GridAxis.cs
rename to Libs/CSharpDis7/GridAxis.cs
diff --git a/CSharpDis7/GroupIdentifier.cs b/Libs/CSharpDis7/GroupIdentifier.cs
similarity index 100%
rename from CSharpDis7/GroupIdentifier.cs
rename to Libs/CSharpDis7/GroupIdentifier.cs
diff --git a/CSharpDis7/IFFFundamentalParameterData.cs b/Libs/CSharpDis7/IFFFundamentalParameterData.cs
similarity index 100%
rename from CSharpDis7/IFFFundamentalParameterData.cs
rename to Libs/CSharpDis7/IFFFundamentalParameterData.cs
diff --git a/CSharpDis7/IOCommunicationsNode.cs b/Libs/CSharpDis7/IOCommunicationsNode.cs
similarity index 100%
rename from CSharpDis7/IOCommunicationsNode.cs
rename to Libs/CSharpDis7/IOCommunicationsNode.cs
diff --git a/CSharpDis7/IOEffect.cs b/Libs/CSharpDis7/IOEffect.cs
similarity index 100%
rename from CSharpDis7/IOEffect.cs
rename to Libs/CSharpDis7/IOEffect.cs
diff --git a/CSharpDis7/IffDataSpecification.cs b/Libs/CSharpDis7/IffDataSpecification.cs
similarity index 100%
rename from CSharpDis7/IffDataSpecification.cs
rename to Libs/CSharpDis7/IffDataSpecification.cs
diff --git a/CSharpDis7/IntercomCommunicationsParameters.cs b/Libs/CSharpDis7/IntercomCommunicationsParameters.cs
similarity index 100%
rename from CSharpDis7/IntercomCommunicationsParameters.cs
rename to Libs/CSharpDis7/IntercomCommunicationsParameters.cs
diff --git a/CSharpDis7/IntercomIdentifier.cs b/Libs/CSharpDis7/IntercomIdentifier.cs
similarity index 100%
rename from CSharpDis7/IntercomIdentifier.cs
rename to Libs/CSharpDis7/IntercomIdentifier.cs
diff --git a/CSharpDis7/IntercomSignalPdu.cs b/Libs/CSharpDis7/IntercomSignalPdu.cs
similarity index 100%
rename from CSharpDis7/IntercomSignalPdu.cs
rename to Libs/CSharpDis7/IntercomSignalPdu.cs
diff --git a/CSharpDis7/IsPartOfPdu.cs b/Libs/CSharpDis7/IsPartOfPdu.cs
similarity index 100%
rename from CSharpDis7/IsPartOfPdu.cs
rename to Libs/CSharpDis7/IsPartOfPdu.cs
diff --git a/CSharpDis7/JammingTechnique.cs b/Libs/CSharpDis7/JammingTechnique.cs
similarity index 100%
rename from CSharpDis7/JammingTechnique.cs
rename to Libs/CSharpDis7/JammingTechnique.cs
diff --git a/CSharpDis7/LaunchedMunitionRecord.cs b/Libs/CSharpDis7/LaunchedMunitionRecord.cs
similarity index 100%
rename from CSharpDis7/LaunchedMunitionRecord.cs
rename to Libs/CSharpDis7/LaunchedMunitionRecord.cs
diff --git a/CSharpDis7/LayerHeader.cs b/Libs/CSharpDis7/LayerHeader.cs
similarity index 100%
rename from CSharpDis7/LayerHeader.cs
rename to Libs/CSharpDis7/LayerHeader.cs
diff --git a/CSharpDis7/LinearObjectStatePdu.cs b/Libs/CSharpDis7/LinearObjectStatePdu.cs
similarity index 100%
rename from CSharpDis7/LinearObjectStatePdu.cs
rename to Libs/CSharpDis7/LinearObjectStatePdu.cs
diff --git a/CSharpDis7/LinearSegmentParameter.cs b/Libs/CSharpDis7/LinearSegmentParameter.cs
similarity index 100%
rename from CSharpDis7/LinearSegmentParameter.cs
rename to Libs/CSharpDis7/LinearSegmentParameter.cs
diff --git a/CSharpDis7/LiveEntityIdentifier.cs b/Libs/CSharpDis7/LiveEntityIdentifier.cs
similarity index 100%
rename from CSharpDis7/LiveEntityIdentifier.cs
rename to Libs/CSharpDis7/LiveEntityIdentifier.cs
diff --git a/CSharpDis7/LiveEntityPdu.cs b/Libs/CSharpDis7/LiveEntityPdu.cs
similarity index 100%
rename from CSharpDis7/LiveEntityPdu.cs
rename to Libs/CSharpDis7/LiveEntityPdu.cs
diff --git a/CSharpDis7/LiveSimulationAddress.cs b/Libs/CSharpDis7/LiveSimulationAddress.cs
similarity index 100%
rename from CSharpDis7/LiveSimulationAddress.cs
rename to Libs/CSharpDis7/LiveSimulationAddress.cs
diff --git a/CSharpDis7/LogisticsFamilyPdu.cs b/Libs/CSharpDis7/LogisticsFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/LogisticsFamilyPdu.cs
rename to Libs/CSharpDis7/LogisticsFamilyPdu.cs
diff --git a/CSharpDis7/MineEntityIdentifier.cs b/Libs/CSharpDis7/MineEntityIdentifier.cs
similarity index 100%
rename from CSharpDis7/MineEntityIdentifier.cs
rename to Libs/CSharpDis7/MineEntityIdentifier.cs
diff --git a/CSharpDis7/MinefieldFamilyPdu.cs b/Libs/CSharpDis7/MinefieldFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/MinefieldFamilyPdu.cs
rename to Libs/CSharpDis7/MinefieldFamilyPdu.cs
diff --git a/CSharpDis7/MinefieldIdentifier.cs b/Libs/CSharpDis7/MinefieldIdentifier.cs
similarity index 100%
rename from CSharpDis7/MinefieldIdentifier.cs
rename to Libs/CSharpDis7/MinefieldIdentifier.cs
diff --git a/CSharpDis7/MinefieldResponseNackPdu.cs b/Libs/CSharpDis7/MinefieldResponseNackPdu.cs
similarity index 100%
rename from CSharpDis7/MinefieldResponseNackPdu.cs
rename to Libs/CSharpDis7/MinefieldResponseNackPdu.cs
diff --git a/CSharpDis7/MinefieldStatePdu.cs b/Libs/CSharpDis7/MinefieldStatePdu.cs
similarity index 100%
rename from CSharpDis7/MinefieldStatePdu.cs
rename to Libs/CSharpDis7/MinefieldStatePdu.cs
diff --git a/CSharpDis7/ModulationParameters.cs b/Libs/CSharpDis7/ModulationParameters.cs
similarity index 100%
rename from CSharpDis7/ModulationParameters.cs
rename to Libs/CSharpDis7/ModulationParameters.cs
diff --git a/CSharpDis7/ModulationType.cs b/Libs/CSharpDis7/ModulationType.cs
similarity index 100%
rename from CSharpDis7/ModulationType.cs
rename to Libs/CSharpDis7/ModulationType.cs
diff --git a/CSharpDis7/Munition.cs b/Libs/CSharpDis7/Munition.cs
similarity index 100%
rename from CSharpDis7/Munition.cs
rename to Libs/CSharpDis7/Munition.cs
diff --git a/CSharpDis7/MunitionDescriptor.cs b/Libs/CSharpDis7/MunitionDescriptor.cs
similarity index 100%
rename from CSharpDis7/MunitionDescriptor.cs
rename to Libs/CSharpDis7/MunitionDescriptor.cs
diff --git a/CSharpDis7/MunitionReload.cs b/Libs/CSharpDis7/MunitionReload.cs
similarity index 100%
rename from CSharpDis7/MunitionReload.cs
rename to Libs/CSharpDis7/MunitionReload.cs
diff --git a/CSharpDis7/NamedLocationIdentification.cs b/Libs/CSharpDis7/NamedLocationIdentification.cs
similarity index 100%
rename from CSharpDis7/NamedLocationIdentification.cs
rename to Libs/CSharpDis7/NamedLocationIdentification.cs
diff --git a/CSharpDis7/ObjectIdentifier.cs b/Libs/CSharpDis7/ObjectIdentifier.cs
similarity index 100%
rename from CSharpDis7/ObjectIdentifier.cs
rename to Libs/CSharpDis7/ObjectIdentifier.cs
diff --git a/CSharpDis7/ObjectType.cs b/Libs/CSharpDis7/ObjectType.cs
similarity index 100%
rename from CSharpDis7/ObjectType.cs
rename to Libs/CSharpDis7/ObjectType.cs
diff --git a/CSharpDis7/OneByteChunk.cs b/Libs/CSharpDis7/OneByteChunk.cs
similarity index 100%
rename from CSharpDis7/OneByteChunk.cs
rename to Libs/CSharpDis7/OneByteChunk.cs
diff --git a/CSharpDis7/OwnershipStatus.cs b/Libs/CSharpDis7/OwnershipStatus.cs
similarity index 100%
rename from CSharpDis7/OwnershipStatus.cs
rename to Libs/CSharpDis7/OwnershipStatus.cs
diff --git a/CSharpDis7/Pdu.cs b/Libs/CSharpDis7/Pdu.cs
similarity index 100%
rename from CSharpDis7/Pdu.cs
rename to Libs/CSharpDis7/Pdu.cs
diff --git a/CSharpDis7/PduContainer.cs b/Libs/CSharpDis7/PduContainer.cs
similarity index 100%
rename from CSharpDis7/PduContainer.cs
rename to Libs/CSharpDis7/PduContainer.cs
diff --git a/CSharpDis7/PduHeader.cs b/Libs/CSharpDis7/PduHeader.cs
similarity index 100%
rename from CSharpDis7/PduHeader.cs
rename to Libs/CSharpDis7/PduHeader.cs
diff --git a/CSharpDis7/PduStatus.cs b/Libs/CSharpDis7/PduStatus.cs
similarity index 100%
rename from CSharpDis7/PduStatus.cs
rename to Libs/CSharpDis7/PduStatus.cs
diff --git a/CSharpDis7/PduSuperclass.cs b/Libs/CSharpDis7/PduSuperclass.cs
similarity index 100%
rename from CSharpDis7/PduSuperclass.cs
rename to Libs/CSharpDis7/PduSuperclass.cs
diff --git a/CSharpDis7/PointObjectStatePdu.cs b/Libs/CSharpDis7/PointObjectStatePdu.cs
similarity index 100%
rename from CSharpDis7/PointObjectStatePdu.cs
rename to Libs/CSharpDis7/PointObjectStatePdu.cs
diff --git a/CSharpDis7/PropulsionSystemData.cs b/Libs/CSharpDis7/PropulsionSystemData.cs
similarity index 100%
rename from CSharpDis7/PropulsionSystemData.cs
rename to Libs/CSharpDis7/PropulsionSystemData.cs
diff --git a/CSharpDis7/RadioCommunicationsFamilyPdu.cs b/Libs/CSharpDis7/RadioCommunicationsFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/RadioCommunicationsFamilyPdu.cs
rename to Libs/CSharpDis7/RadioCommunicationsFamilyPdu.cs
diff --git a/CSharpDis7/RadioIdentifier.cs b/Libs/CSharpDis7/RadioIdentifier.cs
similarity index 100%
rename from CSharpDis7/RadioIdentifier.cs
rename to Libs/CSharpDis7/RadioIdentifier.cs
diff --git a/CSharpDis7/RadioType.cs b/Libs/CSharpDis7/RadioType.cs
similarity index 100%
rename from CSharpDis7/RadioType.cs
rename to Libs/CSharpDis7/RadioType.cs
diff --git a/CSharpDis7/ReceiverPdu.cs b/Libs/CSharpDis7/ReceiverPdu.cs
similarity index 100%
rename from CSharpDis7/ReceiverPdu.cs
rename to Libs/CSharpDis7/ReceiverPdu.cs
diff --git a/CSharpDis7/RecordQueryReliablePdu.cs b/Libs/CSharpDis7/RecordQueryReliablePdu.cs
similarity index 100%
rename from CSharpDis7/RecordQueryReliablePdu.cs
rename to Libs/CSharpDis7/RecordQueryReliablePdu.cs
diff --git a/CSharpDis7/RecordQuerySpecification.cs b/Libs/CSharpDis7/RecordQuerySpecification.cs
similarity index 100%
rename from CSharpDis7/RecordQuerySpecification.cs
rename to Libs/CSharpDis7/RecordQuerySpecification.cs
diff --git a/CSharpDis7/RecordSpecification.cs b/Libs/CSharpDis7/RecordSpecification.cs
similarity index 100%
rename from CSharpDis7/RecordSpecification.cs
rename to Libs/CSharpDis7/RecordSpecification.cs
diff --git a/CSharpDis7/RecordSpecificationElement.cs b/Libs/CSharpDis7/RecordSpecificationElement.cs
similarity index 100%
rename from CSharpDis7/RecordSpecificationElement.cs
rename to Libs/CSharpDis7/RecordSpecificationElement.cs
diff --git a/CSharpDis7/Relationship.cs b/Libs/CSharpDis7/Relationship.cs
similarity index 100%
rename from CSharpDis7/Relationship.cs
rename to Libs/CSharpDis7/Relationship.cs
diff --git a/CSharpDis7/RemoveEntityPdu.cs b/Libs/CSharpDis7/RemoveEntityPdu.cs
similarity index 100%
rename from CSharpDis7/RemoveEntityPdu.cs
rename to Libs/CSharpDis7/RemoveEntityPdu.cs
diff --git a/CSharpDis7/RemoveEntityReliablePdu.cs b/Libs/CSharpDis7/RemoveEntityReliablePdu.cs
similarity index 100%
rename from CSharpDis7/RemoveEntityReliablePdu.cs
rename to Libs/CSharpDis7/RemoveEntityReliablePdu.cs
diff --git a/CSharpDis7/RepairCompletePdu.cs b/Libs/CSharpDis7/RepairCompletePdu.cs
similarity index 100%
rename from CSharpDis7/RepairCompletePdu.cs
rename to Libs/CSharpDis7/RepairCompletePdu.cs
diff --git a/CSharpDis7/RepairResponsePdu.cs b/Libs/CSharpDis7/RepairResponsePdu.cs
similarity index 100%
rename from CSharpDis7/RepairResponsePdu.cs
rename to Libs/CSharpDis7/RepairResponsePdu.cs
diff --git a/CSharpDis7/ResupplyOfferPdu.cs b/Libs/CSharpDis7/ResupplyOfferPdu.cs
similarity index 100%
rename from CSharpDis7/ResupplyOfferPdu.cs
rename to Libs/CSharpDis7/ResupplyOfferPdu.cs
diff --git a/CSharpDis7/ResupplyReceivedPdu.cs b/Libs/CSharpDis7/ResupplyReceivedPdu.cs
similarity index 100%
rename from CSharpDis7/ResupplyReceivedPdu.cs
rename to Libs/CSharpDis7/ResupplyReceivedPdu.cs
diff --git a/CSharpDis7/SecondaryOperationalData.cs b/Libs/CSharpDis7/SecondaryOperationalData.cs
similarity index 100%
rename from CSharpDis7/SecondaryOperationalData.cs
rename to Libs/CSharpDis7/SecondaryOperationalData.cs
diff --git a/CSharpDis7/SeesPdu.cs b/Libs/CSharpDis7/SeesPdu.cs
similarity index 100%
rename from CSharpDis7/SeesPdu.cs
rename to Libs/CSharpDis7/SeesPdu.cs
diff --git a/CSharpDis7/Sensor.cs b/Libs/CSharpDis7/Sensor.cs
similarity index 100%
rename from CSharpDis7/Sensor.cs
rename to Libs/CSharpDis7/Sensor.cs
diff --git a/CSharpDis7/SeparationVP.cs b/Libs/CSharpDis7/SeparationVP.cs
similarity index 100%
rename from CSharpDis7/SeparationVP.cs
rename to Libs/CSharpDis7/SeparationVP.cs
diff --git a/CSharpDis7/ServiceRequestPdu.cs b/Libs/CSharpDis7/ServiceRequestPdu.cs
similarity index 100%
rename from CSharpDis7/ServiceRequestPdu.cs
rename to Libs/CSharpDis7/ServiceRequestPdu.cs
diff --git a/CSharpDis7/SetDataPdu.cs b/Libs/CSharpDis7/SetDataPdu.cs
similarity index 100%
rename from CSharpDis7/SetDataPdu.cs
rename to Libs/CSharpDis7/SetDataPdu.cs
diff --git a/CSharpDis7/SetDataReliablePdu.cs b/Libs/CSharpDis7/SetDataReliablePdu.cs
similarity index 100%
rename from CSharpDis7/SetDataReliablePdu.cs
rename to Libs/CSharpDis7/SetDataReliablePdu.cs
diff --git a/CSharpDis7/SimulationAddress.cs b/Libs/CSharpDis7/SimulationAddress.cs
similarity index 100%
rename from CSharpDis7/SimulationAddress.cs
rename to Libs/CSharpDis7/SimulationAddress.cs
diff --git a/CSharpDis7/SimulationIdentifier.cs b/Libs/CSharpDis7/SimulationIdentifier.cs
similarity index 100%
rename from CSharpDis7/SimulationIdentifier.cs
rename to Libs/CSharpDis7/SimulationIdentifier.cs
diff --git a/CSharpDis7/SimulationManagementFamilyPdu.cs b/Libs/CSharpDis7/SimulationManagementFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/SimulationManagementFamilyPdu.cs
rename to Libs/CSharpDis7/SimulationManagementFamilyPdu.cs
diff --git a/CSharpDis7/SimulationManagementPduHeader.cs b/Libs/CSharpDis7/SimulationManagementPduHeader.cs
similarity index 100%
rename from CSharpDis7/SimulationManagementPduHeader.cs
rename to Libs/CSharpDis7/SimulationManagementPduHeader.cs
diff --git a/CSharpDis7/SimulationManagementWithReliabilityFamilyPdu.cs b/Libs/CSharpDis7/SimulationManagementWithReliabilityFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/SimulationManagementWithReliabilityFamilyPdu.cs
rename to Libs/CSharpDis7/SimulationManagementWithReliabilityFamilyPdu.cs
diff --git a/CSharpDis7/StandardVariableSpecification.cs b/Libs/CSharpDis7/StandardVariableSpecification.cs
similarity index 100%
rename from CSharpDis7/StandardVariableSpecification.cs
rename to Libs/CSharpDis7/StandardVariableSpecification.cs
diff --git a/CSharpDis7/StartResumePdu.cs b/Libs/CSharpDis7/StartResumePdu.cs
similarity index 100%
rename from CSharpDis7/StartResumePdu.cs
rename to Libs/CSharpDis7/StartResumePdu.cs
diff --git a/CSharpDis7/StartResumeReliablePdu.cs b/Libs/CSharpDis7/StartResumeReliablePdu.cs
similarity index 100%
rename from CSharpDis7/StartResumeReliablePdu.cs
rename to Libs/CSharpDis7/StartResumeReliablePdu.cs
diff --git a/CSharpDis7/StopFreezePdu.cs b/Libs/CSharpDis7/StopFreezePdu.cs
similarity index 100%
rename from CSharpDis7/StopFreezePdu.cs
rename to Libs/CSharpDis7/StopFreezePdu.cs
diff --git a/CSharpDis7/StopFreezeReliablePdu.cs b/Libs/CSharpDis7/StopFreezeReliablePdu.cs
similarity index 100%
rename from CSharpDis7/StopFreezeReliablePdu.cs
rename to Libs/CSharpDis7/StopFreezeReliablePdu.cs
diff --git a/CSharpDis7/StorageFuel.cs b/Libs/CSharpDis7/StorageFuel.cs
similarity index 100%
rename from CSharpDis7/StorageFuel.cs
rename to Libs/CSharpDis7/StorageFuel.cs
diff --git a/CSharpDis7/StorageFuelReload.cs b/Libs/CSharpDis7/StorageFuelReload.cs
similarity index 100%
rename from CSharpDis7/StorageFuelReload.cs
rename to Libs/CSharpDis7/StorageFuelReload.cs
diff --git a/CSharpDis7/SupplyQuantity.cs b/Libs/CSharpDis7/SupplyQuantity.cs
similarity index 100%
rename from CSharpDis7/SupplyQuantity.cs
rename to Libs/CSharpDis7/SupplyQuantity.cs
diff --git a/CSharpDis7/SyntheticEnvironmentFamilyPdu.cs b/Libs/CSharpDis7/SyntheticEnvironmentFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/SyntheticEnvironmentFamilyPdu.cs
rename to Libs/CSharpDis7/SyntheticEnvironmentFamilyPdu.cs
diff --git a/CSharpDis7/SystemIdentifier.cs b/Libs/CSharpDis7/SystemIdentifier.cs
similarity index 100%
rename from CSharpDis7/SystemIdentifier.cs
rename to Libs/CSharpDis7/SystemIdentifier.cs
diff --git a/CSharpDis7/TotalRecordSets.cs b/Libs/CSharpDis7/TotalRecordSets.cs
similarity index 100%
rename from CSharpDis7/TotalRecordSets.cs
rename to Libs/CSharpDis7/TotalRecordSets.cs
diff --git a/CSharpDis7/TrackJamData.cs b/Libs/CSharpDis7/TrackJamData.cs
similarity index 100%
rename from CSharpDis7/TrackJamData.cs
rename to Libs/CSharpDis7/TrackJamData.cs
diff --git a/CSharpDis7/TwoByteChunk.cs b/Libs/CSharpDis7/TwoByteChunk.cs
similarity index 100%
rename from CSharpDis7/TwoByteChunk.cs
rename to Libs/CSharpDis7/TwoByteChunk.cs
diff --git a/CSharpDis7/UAFundamentalParameter.cs b/Libs/CSharpDis7/UAFundamentalParameter.cs
similarity index 100%
rename from CSharpDis7/UAFundamentalParameter.cs
rename to Libs/CSharpDis7/UAFundamentalParameter.cs
diff --git a/CSharpDis7/UaPdu.cs b/Libs/CSharpDis7/UaPdu.cs
similarity index 100%
rename from CSharpDis7/UaPdu.cs
rename to Libs/CSharpDis7/UaPdu.cs
diff --git a/CSharpDis7/UnattachedIdentifier.cs b/Libs/CSharpDis7/UnattachedIdentifier.cs
similarity index 100%
rename from CSharpDis7/UnattachedIdentifier.cs
rename to Libs/CSharpDis7/UnattachedIdentifier.cs
diff --git a/CSharpDis7/UnsignedDISInteger.cs b/Libs/CSharpDis7/UnsignedDISInteger.cs
similarity index 100%
rename from CSharpDis7/UnsignedDISInteger.cs
rename to Libs/CSharpDis7/UnsignedDISInteger.cs
diff --git a/CSharpDis7/VariableDatum.cs b/Libs/CSharpDis7/VariableDatum.cs
similarity index 100%
rename from CSharpDis7/VariableDatum.cs
rename to Libs/CSharpDis7/VariableDatum.cs
diff --git a/CSharpDis7/VariableParameter.cs b/Libs/CSharpDis7/VariableParameter.cs
similarity index 100%
rename from CSharpDis7/VariableParameter.cs
rename to Libs/CSharpDis7/VariableParameter.cs
diff --git a/CSharpDis7/VariableTransmitterParameters.cs b/Libs/CSharpDis7/VariableTransmitterParameters.cs
similarity index 100%
rename from CSharpDis7/VariableTransmitterParameters.cs
rename to Libs/CSharpDis7/VariableTransmitterParameters.cs
diff --git a/CSharpDis7/Vector2Float.cs b/Libs/CSharpDis7/Vector2Float.cs
similarity index 100%
rename from CSharpDis7/Vector2Float.cs
rename to Libs/CSharpDis7/Vector2Float.cs
diff --git a/CSharpDis7/Vector3Double.cs b/Libs/CSharpDis7/Vector3Double.cs
similarity index 100%
rename from CSharpDis7/Vector3Double.cs
rename to Libs/CSharpDis7/Vector3Double.cs
diff --git a/CSharpDis7/Vector3Float.cs b/Libs/CSharpDis7/Vector3Float.cs
similarity index 100%
rename from CSharpDis7/Vector3Float.cs
rename to Libs/CSharpDis7/Vector3Float.cs
diff --git a/CSharpDis7/VectoringNozzleSystem.cs b/Libs/CSharpDis7/VectoringNozzleSystem.cs
similarity index 100%
rename from CSharpDis7/VectoringNozzleSystem.cs
rename to Libs/CSharpDis7/VectoringNozzleSystem.cs
diff --git a/CSharpDis7/WarfareFamilyPdu.cs b/Libs/CSharpDis7/WarfareFamilyPdu.cs
similarity index 100%
rename from CSharpDis7/WarfareFamilyPdu.cs
rename to Libs/CSharpDis7/WarfareFamilyPdu.cs
diff --git a/CsharpDis6/OpenDis/Core/CetBase.cs b/Libs/CsharpDis6/Core/CetBase.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/CetBase.cs
rename to Libs/CsharpDis6/Core/CetBase.cs
index 703f80b..edae72c 100644
--- a/CsharpDis6/OpenDis/Core/CetBase.cs
+++ b/Libs/CsharpDis6/Core/CetBase.cs
@@ -1,37 +1,37 @@
-using System;
-
-namespace OpenDis.Core
-{
- public class CetBase
- {
- ///
- /// Verifies the string if it contains only numerical characters (0-9).
- ///
- /// The value to be verified.
- /// if set to true allow null or empty value does not result
- /// in an exception.
- /// When the allowNullOrEmpty is false and value is
- /// null or empty.
- /// When the value is not null or empty and contains
- /// non-numerical character.
- protected void VerifyNumericString(string value, bool allowNullOrEmpty)
- {
- if (!allowNullOrEmpty &&
- string.IsNullOrEmpty(value))
- {
- throw new ArgumentNullException("Value must be greater or equal to 0.");
- }
-
- if (value != null)
- {
- for (int i = 0; i < value.Length; i++)
- {
- if (value[i] < '0' || value[i] > '9')
- {
- throw new ArgumentOutOfRangeException("Value must be greater or equal to 0.");
- }
- }
- }
- }
- }
+using System;
+
+namespace OpenDis.Core
+{
+ public class CetBase
+ {
+ ///
+ /// Verifies the string if it contains only numerical characters (0-9).
+ ///
+ /// The value to be verified.
+ /// if set to true allow null or empty value does not result
+ /// in an exception.
+ /// When the allowNullOrEmpty is false and value is
+ /// null or empty.
+ /// When the value is not null or empty and contains
+ /// non-numerical character.
+ protected void VerifyNumericString(string value, bool allowNullOrEmpty)
+ {
+ if (!allowNullOrEmpty &&
+ string.IsNullOrEmpty(value))
+ {
+ throw new ArgumentNullException("Value must be greater or equal to 0.");
+ }
+
+ if (value != null)
+ {
+ for (int i = 0; i < value.Length; i++)
+ {
+ if (value[i] < '0' || value[i] > '9')
+ {
+ throw new ArgumentOutOfRangeException("Value must be greater or equal to 0.");
+ }
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/CsharpDis6/OpenDis/Core/DisTime.cs b/Libs/CsharpDis6/Core/DisTime.cs
similarity index 100%
rename from CsharpDis6/OpenDis/Core/DisTime.cs
rename to Libs/CsharpDis6/Core/DisTime.cs
diff --git a/CsharpDis6/OpenDis/Core/EndianTypes.cs b/Libs/CsharpDis6/Core/EndianTypes.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/EndianTypes.cs
rename to Libs/CsharpDis6/Core/EndianTypes.cs
index 3ed4160..86e011c 100644
--- a/CsharpDis6/OpenDis/Core/EndianTypes.cs
+++ b/Libs/CsharpDis6/Core/EndianTypes.cs
@@ -1,58 +1,58 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
-// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace OpenDis.Core
-{
- ///
- /// Known endian types
- ///
- public enum Endian
- {
- ///
- /// Little endian
- ///
- Little = 1,
-
- ///
- /// Big endian
- ///
- Big = 0,
- }
-}
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
+// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace OpenDis.Core
+{
+ ///
+ /// Known endian types
+ ///
+ public enum Endian
+ {
+ ///
+ /// Little endian
+ ///
+ Little = 1,
+
+ ///
+ /// Big endian
+ ///
+ Big = 0,
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/EnumHelper.cs b/Libs/CsharpDis6/Core/EnumHelper.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/EnumHelper.cs
rename to Libs/CsharpDis6/Core/EnumHelper.cs
index eabb5dd..2cfc332 100644
--- a/CsharpDis6/OpenDis/Core/EnumHelper.cs
+++ b/Libs/CsharpDis6/Core/EnumHelper.cs
@@ -1,217 +1,217 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
-// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Reflection;
-using OpenDis.Core;
-using System.Collections.Generic;
-
-namespace OpenDis.Core
-{
- public static class EnumHelper
- {
- #region Static methods (7)Â
-
- public static bool EnumerationForValueExists(int number)
- {
- return Enum.IsDefined(typeof(T), number);
- }
-
- ///
- /// Gets the description.
- ///
- /// The value.
- /// the description
- /// if the type parameter is not enum.
- public static string GetDescription(T value)
- {
- string retVal = string.Empty;
-
- DescriptionAttribute attr = GetEnumValueAttribute(value);
-
- if (attr != null)
- {
- retVal = attr.Description;
- }
-
- return retVal;
- }
-
- ///
- /// Returns an Enumeration Type from a number passed in
- ///
- /// Enumeration Type
- /// Enumeration value
- /// Enumeration of that value
- /// if the nuber (parameter)
- /// value is not found in the enum definition
- public static T GetEnumerationForValue(int number)
- {
- if (Enum.IsDefined(typeof(T), number) == true)
- {
- return (T)Enum.ToObject(typeof(T), number);
- }
- else
- {
- throw new EnumNotFoundException(string.Format("No enumeration found for value {0} of enumeration {1}", number, typeof(T).Name), typeof(T));
- }
- }
-
- ///
- /// Gets the attribute of the enumeration value.
- ///
- /// Attribute type.
- /// Enumeration type
- /// The value.
- /// The instance of the attribute or null if the attribute is not found
- public static T GetEnumValueAttribute(U value)
- {
- Type t = typeof(U);
-
- if (t.IsEnum)
- {
- if (value != null)
- {
- FieldInfo fieldInfo = typeof(U).GetField(Enum.GetName(typeof(U), value));
-
- if (fieldInfo != null)
- {
- object[] attributes = fieldInfo.GetCustomAttributes(typeof(T), false);
-
- if (attributes != null &&
- attributes.Length > 0)
- {
- return (T)attributes[0];
- }
- }
- }
- }
- else
- {
- throw new ArgumentException("Type must be an enum.");
- }
-
- return default(T);
- }
-
- ///
- /// Gets the attribute of the enumeration value.
- ///
- /// Attribute type.
- /// Enumeration type
- /// The value.
- /// The instance of the attribute or null if the attribute is not found
- public static IEnumerable GetEnumValueAttributes(U value)
- {
- Type t = typeof(U);
-
- if (t.IsEnum)
- {
- if (value != null)
- {
- FieldInfo fieldInfo = typeof(U).GetField(Enum.GetName(typeof(U), value));
-
- if (fieldInfo != null)
- {
- object[] attributes = fieldInfo.GetCustomAttributes(typeof(T), false);
-
- if (attributes != null &&
- attributes.Length > 0)
- {
- return attributes.Cast(); ;
- }
- }
- }
- }
- else
- {
- throw new ArgumentException("Type must be an enum.");
- }
-
- return new T[0];
- }
-
- ///
- /// Returns the Description associated with the enumeration
- ///
- /// The enum type
- /// The enumeration object which has the attribute.
- ///
- /// The description string of the attribute or string.empty
- ///
- public static string GetInternetDomainCode(T value)
- {
- string retVal = string.Empty;
-
- InternetDomainCodeAttribute attr = GetEnumValueAttribute(value);
-
- if (attr != null)
- {
- retVal = attr.InternetDomainCode;
- }
-
- return retVal;
- }
-
- ///
- /// Parses the specified name.
- ///
- /// The enum type
- /// The string value.
- /// Enum value.
- public static T Parse(string value)
- {
- return (T)Enum.Parse(typeof(T), value);
- }
-
- ///
- /// Parses the specified value.
- ///
- /// The enum type
- /// The value.
- /// if set to true [ignore case].
- /// Enum value.
- public static T Parse(string value, bool ignoreCase)
- {
- return (T)Enum.Parse(typeof(T), value, ignoreCase);
- }
-
- #endregion Static methodsÂ
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
+// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Reflection;
+using OpenDis.Core;
+using System.Collections.Generic;
+
+namespace OpenDis.Core
+{
+ public static class EnumHelper
+ {
+ #region Static methods (7)Â
+
+ public static bool EnumerationForValueExists(int number)
+ {
+ return Enum.IsDefined(typeof(T), number);
+ }
+
+ ///
+ /// Gets the description.
+ ///
+ /// The value.
+ /// the description
+ /// if the type parameter is not enum.
+ public static string GetDescription(T value)
+ {
+ string retVal = string.Empty;
+
+ DescriptionAttribute attr = GetEnumValueAttribute(value);
+
+ if (attr != null)
+ {
+ retVal = attr.Description;
+ }
+
+ return retVal;
+ }
+
+ ///
+ /// Returns an Enumeration Type from a number passed in
+ ///
+ /// Enumeration Type
+ /// Enumeration value
+ /// Enumeration of that value
+ /// if the nuber (parameter)
+ /// value is not found in the enum definition
+ public static T GetEnumerationForValue(int number)
+ {
+ if (Enum.IsDefined(typeof(T), number) == true)
+ {
+ return (T)Enum.ToObject(typeof(T), number);
+ }
+ else
+ {
+ throw new EnumNotFoundException(string.Format("No enumeration found for value {0} of enumeration {1}", number, typeof(T).Name), typeof(T));
+ }
+ }
+
+ ///
+ /// Gets the attribute of the enumeration value.
+ ///
+ /// Attribute type.
+ /// Enumeration type
+ /// The value.
+ /// The instance of the attribute or null if the attribute is not found
+ public static T GetEnumValueAttribute(U value)
+ {
+ Type t = typeof(U);
+
+ if (t.IsEnum)
+ {
+ if (value != null)
+ {
+ FieldInfo fieldInfo = typeof(U).GetField(Enum.GetName(typeof(U), value));
+
+ if (fieldInfo != null)
+ {
+ object[] attributes = fieldInfo.GetCustomAttributes(typeof(T), false);
+
+ if (attributes != null &&
+ attributes.Length > 0)
+ {
+ return (T)attributes[0];
+ }
+ }
+ }
+ }
+ else
+ {
+ throw new ArgumentException("Type must be an enum.");
+ }
+
+ return default(T);
+ }
+
+ ///
+ /// Gets the attribute of the enumeration value.
+ ///
+ /// Attribute type.
+ /// Enumeration type
+ /// The value.
+ /// The instance of the attribute or null if the attribute is not found
+ public static IEnumerable GetEnumValueAttributes(U value)
+ {
+ Type t = typeof(U);
+
+ if (t.IsEnum)
+ {
+ if (value != null)
+ {
+ FieldInfo fieldInfo = typeof(U).GetField(Enum.GetName(typeof(U), value));
+
+ if (fieldInfo != null)
+ {
+ object[] attributes = fieldInfo.GetCustomAttributes(typeof(T), false);
+
+ if (attributes != null &&
+ attributes.Length > 0)
+ {
+ return attributes.Cast(); ;
+ }
+ }
+ }
+ }
+ else
+ {
+ throw new ArgumentException("Type must be an enum.");
+ }
+
+ return new T[0];
+ }
+
+ ///
+ /// Returns the Description associated with the enumeration
+ ///
+ /// The enum type
+ /// The enumeration object which has the attribute.
+ ///
+ /// The description string of the attribute or string.empty
+ ///
+ public static string GetInternetDomainCode(T value)
+ {
+ string retVal = string.Empty;
+
+ InternetDomainCodeAttribute attr = GetEnumValueAttribute(value);
+
+ if (attr != null)
+ {
+ retVal = attr.InternetDomainCode;
+ }
+
+ return retVal;
+ }
+
+ ///
+ /// Parses the specified name.
+ ///
+ /// The enum type
+ /// The string value.
+ /// Enum value.
+ public static T Parse(string value)
+ {
+ return (T)Enum.Parse(typeof(T), value);
+ }
+
+ ///
+ /// Parses the specified value.
+ ///
+ /// The enum type
+ /// The value.
+ /// if set to true [ignore case].
+ /// Enum value.
+ public static T Parse(string value, bool ignoreCase)
+ {
+ return (T)Enum.Parse(typeof(T), value, ignoreCase);
+ }
+
+ #endregion Static methodsÂ
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/EnumNotFoundException.cs b/Libs/CsharpDis6/Core/EnumNotFoundException.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/EnumNotFoundException.cs
rename to Libs/CsharpDis6/Core/EnumNotFoundException.cs
index c55472a..472e6be 100644
--- a/CsharpDis6/OpenDis/Core/EnumNotFoundException.cs
+++ b/Libs/CsharpDis6/Core/EnumNotFoundException.cs
@@ -1,82 +1,82 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
-// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-using System.Text;
-
-namespace OpenDis.Core
-{
- public class EnumNotFoundException : Exception
- {
- #region Constructors (5)Â
-
- public EnumNotFoundException(string message, Exception exception)
- : base(message, exception)
- {
- }
-
- private EnumNotFoundException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
-
- public EnumNotFoundException(string message, Type enumType)
- : base(message)
- {
- this.EnumType = enumType;
- }
-
- public EnumNotFoundException(string message)
- : base(message)
- {
- }
-
- public EnumNotFoundException()
- {
- }
-
- #endregion ConstructorsÂ
-
- #region Properties (1)Â
-
- public Type EnumType { get; private set; }
-
- #endregion PropertiesÂ
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
+// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using System.Text;
+
+namespace OpenDis.Core
+{
+ public class EnumNotFoundException : Exception
+ {
+ #region Constructors (5)Â
+
+ public EnumNotFoundException(string message, Exception exception)
+ : base(message, exception)
+ {
+ }
+
+ private EnumNotFoundException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+
+ public EnumNotFoundException(string message, Type enumType)
+ : base(message)
+ {
+ this.EnumType = enumType;
+ }
+
+ public EnumNotFoundException(string message)
+ : base(message)
+ {
+ }
+
+ public EnumNotFoundException()
+ {
+ }
+
+ #endregion ConstructorsÂ
+
+ #region Properties (1)Â
+
+ public Type EnumType { get; private set; }
+
+ #endregion PropertiesÂ
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/ICetItem.cs b/Libs/CsharpDis6/Core/ICetItem.cs
similarity index 96%
rename from CsharpDis6/OpenDis/Core/ICetItem.cs
rename to Libs/CsharpDis6/Core/ICetItem.cs
index 0f2bab6..9886e8e 100644
--- a/CsharpDis6/OpenDis/Core/ICetItem.cs
+++ b/Libs/CsharpDis6/Core/ICetItem.cs
@@ -1,65 +1,65 @@
-using System;
-using OpenDis.Enumerations;
-using OpenDis.Enumerations.EntityState.Type;
-namespace OpenDis.Core
-{
- ///
- /// Interface for tabelaric representation of comprehensive entity-type tables
- ///
- public interface ICetItem : IComparable, IComparable
- {
- ///
- /// Gets or sets the category.
- ///
- /// The category.
- byte Category { get; set; }
-
- ///
- /// Gets or sets the country.
- ///
- /// The country.
- Country Country { get; set; }
-
- ///
- /// Gets or sets the description.
- ///
- /// The description.
- string Description { get; set; }
-
- ///
- /// Gets or sets the domain.
- ///
- /// The domain.
- byte Domain { get; set; }
-
- ///
- /// Gets or sets the extra.
- ///
- /// The extra.
- byte? Extra { get; set; }
-
- ///
- /// Gets or sets the maximum value of the range.
- ///
- /// The maximum value of the range.
- uint? Maximum { get; set; }
-
- ///
- /// Gets or sets the kind.
- ///
- /// The kind.
- EntityKind Kind { get; set; }
-
- ///
- /// Gets or sets the specific.
- ///
- /// The specific.
- byte? Specific { get; set; }
-
- ///
- /// Gets or sets the subcategory.
- ///
- /// The subcategory.
- byte? Subcategory { get; set; }
- }
-}
+using System;
+using OpenDis.Enumerations;
+using OpenDis.Enumerations.EntityState.Type;
+namespace OpenDis.Core
+{
+ ///
+ /// Interface for tabelaric representation of comprehensive entity-type tables
+ ///
+ public interface ICetItem : IComparable, IComparable
+ {
+ ///
+ /// Gets or sets the category.
+ ///
+ /// The category.
+ byte Category { get; set; }
+
+ ///
+ /// Gets or sets the country.
+ ///
+ /// The country.
+ Country Country { get; set; }
+
+ ///
+ /// Gets or sets the description.
+ ///
+ /// The description.
+ string Description { get; set; }
+
+ ///
+ /// Gets or sets the domain.
+ ///
+ /// The domain.
+ byte Domain { get; set; }
+
+ ///
+ /// Gets or sets the extra.
+ ///
+ /// The extra.
+ byte? Extra { get; set; }
+
+ ///
+ /// Gets or sets the maximum value of the range.
+ ///
+ /// The maximum value of the range.
+ uint? Maximum { get; set; }
+
+ ///
+ /// Gets or sets the kind.
+ ///
+ /// The kind.
+ EntityKind Kind { get; set; }
+
+ ///
+ /// Gets or sets the specific.
+ ///
+ /// The specific.
+ byte? Specific { get; set; }
+
+ ///
+ /// Gets or sets the subcategory.
+ ///
+ /// The subcategory.
+ byte? Subcategory { get; set; }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/IPdu.cs b/Libs/CsharpDis6/Core/IPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/IPdu.cs
rename to Libs/CsharpDis6/Core/IPdu.cs
index aaef12b..44da9f4 100644
--- a/CsharpDis6/OpenDis/Core/IPdu.cs
+++ b/Libs/CsharpDis6/Core/IPdu.cs
@@ -1,34 +1,34 @@
-using System;
-
-namespace OpenDis.Core
-{
- public interface IPdu
- {
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- void Marshal(OpenDis.Core.DataOutputStream dos);
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- void Reflection(System.Text.StringBuilder sb);
-
- ///
- /// Unmarshal the data from the DataInputStream.
- ///
- /// The dis input stream.
- void Unmarshal(OpenDis.Core.DataInputStream dis);
-
- ///
- /// Raised when exception occurs while processing PDU.
- ///
- event EventHandler ExceptionOccured;
- }
-}
+using System;
+
+namespace OpenDis.Core
+{
+ public interface IPdu
+ {
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ void Marshal(OpenDis.Core.DataOutputStream dos);
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ void Reflection(System.Text.StringBuilder sb);
+
+ ///
+ /// Unmarshal the data from the DataInputStream.
+ ///
+ /// The dis input stream.
+ void Unmarshal(OpenDis.Core.DataInputStream dis);
+
+ ///
+ /// Raised when exception occurs while processing PDU.
+ ///
+ event EventHandler ExceptionOccured;
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/InternetDomainCodeAttribute.cs b/Libs/CsharpDis6/Core/InternetDomainCodeAttribute.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/InternetDomainCodeAttribute.cs
rename to Libs/CsharpDis6/Core/InternetDomainCodeAttribute.cs
index 7370146..fdbac5f 100644
--- a/CsharpDis6/OpenDis/Core/InternetDomainCodeAttribute.cs
+++ b/Libs/CsharpDis6/Core/InternetDomainCodeAttribute.cs
@@ -1,75 +1,75 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
-// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-
-namespace OpenDis.Core
-{
- [AttributeUsage(AttributeTargets.Field, Inherited = true)]
- public sealed class InternetDomainCodeAttribute : Attribute
- {
- #region Fields (1)Â
-
- private string internetDomainCode;
-
- #endregion FieldsÂ
-
- #region Constructors (1)Â
-
- public InternetDomainCodeAttribute(string internetDomainCode)
- {
- this.internetDomainCode = internetDomainCode;
- }
-
- #endregion ConstructorsÂ
-
- #region Properties (1)Â
-
- public string InternetDomainCode
- {
- get
- {
- return this.internetDomainCode;
- }
- }
-
- #endregion PropertiesÂ
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author Peter Smith (Naval Air Warfare Center - Training Systems Division) 01/23/2009
+// Modified by Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+
+namespace OpenDis.Core
+{
+ [AttributeUsage(AttributeTargets.Field, Inherited = true)]
+ public sealed class InternetDomainCodeAttribute : Attribute
+ {
+ #region Fields (1)Â
+
+ private string internetDomainCode;
+
+ #endregion FieldsÂ
+
+ #region Constructors (1)Â
+
+ public InternetDomainCodeAttribute(string internetDomainCode)
+ {
+ this.internetDomainCode = internetDomainCode;
+ }
+
+ #endregion ConstructorsÂ
+
+ #region Properties (1)Â
+
+ public string InternetDomainCode
+ {
+ get
+ {
+ return this.internetDomainCode;
+ }
+ }
+
+ #endregion PropertiesÂ
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/PduBase.cs b/Libs/CsharpDis6/Core/PduBase.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Core/PduBase.cs
rename to Libs/CsharpDis6/Core/PduBase.cs
index d38422d..4fabbe9 100644
--- a/CsharpDis6/OpenDis/Core/PduBase.cs
+++ b/Libs/CsharpDis6/Core/PduBase.cs
@@ -1,25 +1,25 @@
-using System;
-
-namespace OpenDis.Core
-{
- public abstract class PduBase
- {
- ///
- /// Gets or sets a value indicating whether exceptions caught in PDU classes are written via instrumetnation infrastructure.
- ///
- /// true if caught exceptions are traced; otherwise, false.
- public static bool TraceExceptions { get; set; }
-
- ///
- /// Gets or sets a value indicating whether exceptions caught in PDU classes are rethrown.
- ///
- /// true if caught exceptions are rethrown; otherwise, false.
- public static bool ThrowExceptions { get; set; }
-
- ///
- /// Gets or sets a value indicating whether exceptions caught in PDU classes fire event.
- ///
- /// true if events are fired when exception is caught; otherwise, false.
- public static bool FireExceptionEvents { get; set; }
- }
-}
+using System;
+
+namespace OpenDis.Core
+{
+ public abstract class PduBase
+ {
+ ///
+ /// Gets or sets a value indicating whether exceptions caught in PDU classes are written via instrumetnation infrastructure.
+ ///
+ /// true if caught exceptions are traced; otherwise, false.
+ public static bool TraceExceptions { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether exceptions caught in PDU classes are rethrown.
+ ///
+ /// true if caught exceptions are rethrown; otherwise, false.
+ public static bool ThrowExceptions { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether exceptions caught in PDU classes fire event.
+ ///
+ /// true if events are fired when exception is caught; otherwise, false.
+ public static bool FireExceptionEvents { get; set; }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/PduExceptionEventArgs.cs b/Libs/CsharpDis6/Core/PduExceptionEventArgs.cs
similarity index 96%
rename from CsharpDis6/OpenDis/Core/PduExceptionEventArgs.cs
rename to Libs/CsharpDis6/Core/PduExceptionEventArgs.cs
index 5a81bcc..73b7ad4 100644
--- a/CsharpDis6/OpenDis/Core/PduExceptionEventArgs.cs
+++ b/Libs/CsharpDis6/Core/PduExceptionEventArgs.cs
@@ -1,22 +1,22 @@
-using System;
-
-namespace OpenDis.Core
-{
- public class PduExceptionEventArgs : EventArgs
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// The exception.
- public PduExceptionEventArgs(Exception e)
- {
- this.Exception = e;
- }
-
- ///
- /// Gets or sets the exception.
- ///
- /// The exception.
- public Exception Exception { get; set; }
- }
-}
+using System;
+
+namespace OpenDis.Core
+{
+ public class PduExceptionEventArgs : EventArgs
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The exception.
+ public PduExceptionEventArgs(Exception e)
+ {
+ this.Exception = e;
+ }
+
+ ///
+ /// Gets or sets the exception.
+ ///
+ /// The exception.
+ public Exception Exception { get; set; }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Core/PduFactory.cs b/Libs/CsharpDis6/Core/PduFactory.cs
similarity index 92%
rename from CsharpDis6/OpenDis/Core/PduFactory.cs
rename to Libs/CsharpDis6/Core/PduFactory.cs
index e90c8b5..9f096b0 100644
--- a/CsharpDis6/OpenDis/Core/PduFactory.cs
+++ b/Libs/CsharpDis6/Core/PduFactory.cs
@@ -1,48 +1,52 @@
-using System;
-using OpenDis.Enumerations;
-using Dis1995 = OpenDis.Dis1995;
-using Dis1998 = OpenDis.Dis1998;
-
-namespace OpenDis.Core
-{
- public static class PduFactory
- {
- ///
- /// Creates the PDU. Supported protocol versions are IEEE 1278.1-1995 and IEEE 1278.1A-1998.
- ///
- /// The type of PDU to be created.
- /// The protocol version.
- ///
- /// Returns the corresponding PDU instance or null if type equals 0.
- ///
- /// if the PDU type specified in parameter is not supported.
- /// if the protocol version is not supported
- public static IPdu CreatePdu(byte type, ProtocolVersion version)
- {
- return CreatePdu((PduType)type, version);
- }
-
- ///
- /// Creates the PDU. Supported protocol versions are IEEE 1278.1-1995 and IEEE 1278.1A-1998.
- ///
- /// The type of PDU to be created.
- ///
- /// Returns the corresponding PDU instance or null if PduType.Other is specified.
- ///
- /// if the PDU type specified in parameter is not supported.
- /// if the protocol version is not supported
- public static IPdu CreatePdu(PduType type, ProtocolVersion version)
- {
- if (version == ProtocolVersion.Ieee1278_1_1995)
- {
- return Dis1995.PduFactory.CreatePdu(type);
- }
- else if (version == ProtocolVersion.Ieee1278_1A_1998)
- {
- return Dis1998.PduFactory.CreatePdu(type);
- }
-
- throw new ArgumentException("Unsupported protocol version.");
- }
- }
-}
+using System;
+using OpenDis.Enumerations;
+using Dis1995 = OpenDis.Dis1995;
+using Dis1998 = OpenDis.Dis1998;
+
+namespace OpenDis.Core
+{
+ public static class PduFactory
+ {
+ ///
+ /// Creates the PDU. Supported protocol versions are IEEE 1278.1-1995 and IEEE 1278.1A-1998.
+ ///
+ /// The type of PDU to be created.
+ /// The protocol version.
+ ///
+ /// Returns the corresponding PDU instance or null if type equals 0.
+ ///
+ /// if the PDU type specified in parameter is not supported.
+ /// if the protocol version is not supported
+ public static IPdu CreatePdu(byte type, ProtocolVersion version)
+ {
+ return CreatePdu((PduType)type, version);
+ }
+
+ ///
+ /// Creates the PDU. Supported protocol versions are IEEE 1278.1-1995 and IEEE 1278.1A-1998.
+ ///
+ /// The type of PDU to be created.
+ ///
+ /// Returns the corresponding PDU instance or null if PduType.Other is specified.
+ ///
+ /// if the PDU type specified in parameter is not supported.
+ /// if the protocol version is not supported
+ public static IPdu CreatePdu(PduType type, ProtocolVersion version)
+ {
+ if (version == ProtocolVersion.Ieee1278_1_1995)
+ {
+ return Dis1995.PduFactory.CreatePdu(type);
+ }
+ else if (version == ProtocolVersion.Ieee1278_1A_1998)
+ {
+ return Dis1998.PduFactory.CreatePdu(type);
+ }
+ else if (version == ProtocolVersion.Ieee1278_1_2012)
+ {
+ return Dis1998.PduFactory.CreatePdu(type);
+ }
+
+ throw new ArgumentException("Unsupported protocol version.");
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/EntityID.cs b/Libs/CsharpDis6/Dis1995/EntityID.cs
similarity index 98%
rename from CsharpDis6/OpenDis/Dis1995/EntityID.cs
rename to Libs/CsharpDis6/Dis1995/EntityID.cs
index 5ae486a..cc74fd3 100644
--- a/CsharpDis6/OpenDis/Dis1995/EntityID.cs
+++ b/Libs/CsharpDis6/Dis1995/EntityID.cs
@@ -1,15 +1,15 @@
-using System;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Each entity in a given DIS simulation application shall be given an entity identifier number unique to all other entities in that application. This identifier number is valid for the duration of the exercise; however, entity identifier numbers may be reused when all possible numbers have been exhausted. No entity shall have an entity identifier number of NO_ENTITY, ALL_ENTITIES, or RQST_ASSIGN_ID. The entity iden- tifier number need not be registered or retained for future exercises. The entity identifier number shall be specified by a 16-bit unsigned integer. An entity identifier number equal to zero with valid site and application identification shall address a simulation application. An entity identifier number equal to ALL_ENTITIES shall mean all entities within the specified site and application. An entity identifier number equal to RQST_ASSIGN_ID allows the receiver of the create entity to define the entity identifier number of the new entity.
- ///
- public partial class EntityID
- {
- public override string ToString()
- {
- return string.Format("{0:00}{1:00}{2:00}", this.Site, this.Application, this.Entity);
- }
- }
-}
+using System;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Each entity in a given DIS simulation application shall be given an entity identifier number unique to all other entities in that application. This identifier number is valid for the duration of the exercise; however, entity identifier numbers may be reused when all possible numbers have been exhausted. No entity shall have an entity identifier number of NO_ENTITY, ALL_ENTITIES, or RQST_ASSIGN_ID. The entity iden- tifier number need not be registered or retained for future exercises. The entity identifier number shall be specified by a 16-bit unsigned integer. An entity identifier number equal to zero with valid site and application identification shall address a simulation application. An entity identifier number equal to ALL_ENTITIES shall mean all entities within the specified site and application. An entity identifier number equal to RQST_ASSIGN_ID allows the receiver of the create entity to define the entity identifier number of the new entity.
+ ///
+ public partial class EntityID
+ {
+ public override string ToString()
+ {
+ return string.Format("{0:00}{1:00}{2:00}", this.Site, this.Application, this.Entity);
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/AcknowledgePdu.cs b/Libs/CsharpDis6/Dis1995/Generated/AcknowledgePdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/AcknowledgePdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/AcknowledgePdu.cs
index 9717f55..dbd3124 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/AcknowledgePdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/AcknowledgePdu.cs
@@ -1,368 +1,368 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.5. Acknowledge the receiptof a start/resume, stop/freeze, or RemoveEntityPDU
- ///
- [Serializable]
- [XmlRoot]
- public partial class AcknowledgePdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// type of message being acknowledged
- ///
- private ushort _acknowledgeFlag;
-
- ///
- /// Whether or not the receiving entity was able to comply with the request
- ///
- private ushort _responseFlag;
-
- ///
- /// Request ID that is unique
- ///
- private uint _requestID;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AcknowledgePdu()
- {
- PduType = (byte)15;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(AcknowledgePdu left, AcknowledgePdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(AcknowledgePdu left, AcknowledgePdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 2; // this._acknowledgeFlag
- marshalSize += 2; // this._responseFlag
- marshalSize += 4; // this._requestID
- return marshalSize;
- }
-
- ///
- /// Gets or sets the type of message being acknowledged
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "acknowledgeFlag")]
- public ushort AcknowledgeFlag
- {
- get
- {
- return this._acknowledgeFlag;
- }
-
- set
- {
- this._acknowledgeFlag = value;
- }
- }
-
- ///
- /// Gets or sets the Whether or not the receiving entity was able to comply with the request
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "responseFlag")]
- public ushort ResponseFlag
- {
- get
- {
- return this._responseFlag;
- }
-
- set
- {
- this._responseFlag = value;
- }
- }
-
- ///
- /// Gets or sets the Request ID that is unique
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedShort((ushort)this._acknowledgeFlag);
- dos.WriteUnsignedShort((ushort)this._responseFlag);
- dos.WriteUnsignedInt((uint)this._requestID);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._acknowledgeFlag = dis.ReadUnsignedShort();
- this._responseFlag = dis.ReadUnsignedShort();
- this._requestID = dis.ReadUnsignedInt();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._acknowledgeFlag.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._responseFlag.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as AcknowledgePdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(AcknowledgePdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._acknowledgeFlag != obj._acknowledgeFlag)
- {
- ivarsEqual = false;
- }
-
- if (this._responseFlag != obj._responseFlag)
- {
- ivarsEqual = false;
- }
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._acknowledgeFlag.GetHashCode();
- result = GenerateHash(result) ^ this._responseFlag.GetHashCode();
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.5. Acknowledge the receiptof a start/resume, stop/freeze, or RemoveEntityPDU
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class AcknowledgePdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// type of message being acknowledged
+ ///
+ private ushort _acknowledgeFlag;
+
+ ///
+ /// Whether or not the receiving entity was able to comply with the request
+ ///
+ private ushort _responseFlag;
+
+ ///
+ /// Request ID that is unique
+ ///
+ private uint _requestID;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AcknowledgePdu()
+ {
+ PduType = (byte)15;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(AcknowledgePdu left, AcknowledgePdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(AcknowledgePdu left, AcknowledgePdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 2; // this._acknowledgeFlag
+ marshalSize += 2; // this._responseFlag
+ marshalSize += 4; // this._requestID
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the type of message being acknowledged
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "acknowledgeFlag")]
+ public ushort AcknowledgeFlag
+ {
+ get
+ {
+ return this._acknowledgeFlag;
+ }
+
+ set
+ {
+ this._acknowledgeFlag = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Whether or not the receiving entity was able to comply with the request
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "responseFlag")]
+ public ushort ResponseFlag
+ {
+ get
+ {
+ return this._responseFlag;
+ }
+
+ set
+ {
+ this._responseFlag = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Request ID that is unique
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedShort((ushort)this._acknowledgeFlag);
+ dos.WriteUnsignedShort((ushort)this._responseFlag);
+ dos.WriteUnsignedInt((uint)this._requestID);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._acknowledgeFlag = dis.ReadUnsignedShort();
+ this._responseFlag = dis.ReadUnsignedShort();
+ this._requestID = dis.ReadUnsignedInt();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._acknowledgeFlag.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._responseFlag.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as AcknowledgePdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(AcknowledgePdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._acknowledgeFlag != obj._acknowledgeFlag)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._responseFlag != obj._responseFlag)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._acknowledgeFlag.GetHashCode();
+ result = GenerateHash(result) ^ this._responseFlag.GetHashCode();
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ActionRequestPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ActionRequestPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ActionRequestPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ActionRequestPdu.cs
index c1931a0..ce24460 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ActionRequestPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ActionRequestPdu.cs
@@ -1,548 +1,548 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.6. Request from simulation manager to an entity
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(FixedDatum))]
- [XmlInclude(typeof(VariableDatum))]
- public partial class ActionRequestPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// Request ID that is unique
- ///
- private uint _requestID;
-
- ///
- /// identifies the action being requested
- ///
- private uint _actionID;
-
- ///
- /// Number of fixed datum records
- ///
- private uint _fixedDatumRecordCount;
-
- ///
- /// Number of variable datum records
- ///
- private uint _variableDatumRecordCount;
-
- ///
- /// variable length list of fixed datums
- ///
- private List _fixedDatums = new List();
-
- ///
- /// variable length list of variable length datums
- ///
- private List _variableDatums = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ActionRequestPdu()
- {
- PduType = (byte)16;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ActionRequestPdu left, ActionRequestPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ActionRequestPdu left, ActionRequestPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._requestID
- marshalSize += 4; // this._actionID
- marshalSize += 4; // this._fixedDatumRecordCount
- marshalSize += 4; // this._variableDatumRecordCount
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Request ID that is unique
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Gets or sets the identifies the action being requested
- ///
- [XmlElement(Type = typeof(uint), ElementName = "actionID")]
- public uint ActionID
- {
- get
- {
- return this._actionID;
- }
-
- set
- {
- this._actionID = value;
- }
- }
-
- ///
- /// Gets or sets the Number of fixed datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
- public uint FixedDatumRecordCount
- {
- get
- {
- return this._fixedDatumRecordCount;
- }
-
- set
- {
- this._fixedDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets or sets the Number of variable datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
- public uint VariableDatumRecordCount
- {
- get
- {
- return this._variableDatumRecordCount;
- }
-
- set
- {
- this._variableDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets the variable length list of fixed datums
- ///
- [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
- public List FixedDatums
- {
- get
- {
- return this._fixedDatums;
- }
- }
-
- ///
- /// Gets the variable length list of variable length datums
- ///
- [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
- public List VariableDatums
- {
- get
- {
- return this._variableDatums;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._requestID);
- dos.WriteUnsignedInt((uint)this._actionID);
- dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
- dos.WriteUnsignedInt((uint)this._variableDatums.Count);
-
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Marshal(dos);
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestID = dis.ReadUnsignedInt();
- this._actionID = dis.ReadUnsignedInt();
- this._fixedDatumRecordCount = dis.ReadUnsignedInt();
- this._variableDatumRecordCount = dis.ReadUnsignedInt();
-
- for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
- {
- FixedDatum anX = new FixedDatum();
- anX.Unmarshal(dis);
- this._fixedDatums.Add(anX);
- }
-
- for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
- {
- VariableDatum anX = new VariableDatum();
- anX.Unmarshal(dis);
- this._variableDatums.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._actionID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- sb.AppendLine("");
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- sb.AppendLine("");
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ActionRequestPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ActionRequestPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- if (this._actionID != obj._actionID)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatums.Count != obj._fixedDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._variableDatums.Count != obj._variableDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
- result = GenerateHash(result) ^ this._actionID.GetHashCode();
- result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
- result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
-
- if (this._fixedDatums.Count > 0)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
- }
- }
-
- if (this._variableDatums.Count > 0)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.6. Request from simulation manager to an entity
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(FixedDatum))]
+ [XmlInclude(typeof(VariableDatum))]
+ public partial class ActionRequestPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// Request ID that is unique
+ ///
+ private uint _requestID;
+
+ ///
+ /// identifies the action being requested
+ ///
+ private uint _actionID;
+
+ ///
+ /// Number of fixed datum records
+ ///
+ private uint _fixedDatumRecordCount;
+
+ ///
+ /// Number of variable datum records
+ ///
+ private uint _variableDatumRecordCount;
+
+ ///
+ /// variable length list of fixed datums
+ ///
+ private List _fixedDatums = new List();
+
+ ///
+ /// variable length list of variable length datums
+ ///
+ private List _variableDatums = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ActionRequestPdu()
+ {
+ PduType = (byte)16;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ActionRequestPdu left, ActionRequestPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ActionRequestPdu left, ActionRequestPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._requestID
+ marshalSize += 4; // this._actionID
+ marshalSize += 4; // this._fixedDatumRecordCount
+ marshalSize += 4; // this._variableDatumRecordCount
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Request ID that is unique
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the identifies the action being requested
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "actionID")]
+ public uint ActionID
+ {
+ get
+ {
+ return this._actionID;
+ }
+
+ set
+ {
+ this._actionID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of fixed datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
+ public uint FixedDatumRecordCount
+ {
+ get
+ {
+ return this._fixedDatumRecordCount;
+ }
+
+ set
+ {
+ this._fixedDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of variable datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
+ public uint VariableDatumRecordCount
+ {
+ get
+ {
+ return this._variableDatumRecordCount;
+ }
+
+ set
+ {
+ this._variableDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of fixed datums
+ ///
+ [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
+ public List FixedDatums
+ {
+ get
+ {
+ return this._fixedDatums;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of variable length datums
+ ///
+ [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
+ public List VariableDatums
+ {
+ get
+ {
+ return this._variableDatums;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._requestID);
+ dos.WriteUnsignedInt((uint)this._actionID);
+ dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
+ dos.WriteUnsignedInt((uint)this._variableDatums.Count);
+
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Marshal(dos);
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._requestID = dis.ReadUnsignedInt();
+ this._actionID = dis.ReadUnsignedInt();
+ this._fixedDatumRecordCount = dis.ReadUnsignedInt();
+ this._variableDatumRecordCount = dis.ReadUnsignedInt();
+
+ for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
+ {
+ FixedDatum anX = new FixedDatum();
+ anX.Unmarshal(dis);
+ this._fixedDatums.Add(anX);
+ }
+
+ for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
+ {
+ VariableDatum anX = new VariableDatum();
+ anX.Unmarshal(dis);
+ this._variableDatums.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._actionID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ActionRequestPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ActionRequestPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._actionID != obj._actionID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatums.Count != obj._fixedDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._variableDatums.Count != obj._variableDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+ result = GenerateHash(result) ^ this._actionID.GetHashCode();
+ result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
+ result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
+
+ if (this._fixedDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
+ }
+ }
+
+ if (this._variableDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ActionResponsePdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ActionResponsePdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ActionResponsePdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ActionResponsePdu.cs
index 9e51049..6d24a53 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ActionResponsePdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ActionResponsePdu.cs
@@ -1,548 +1,548 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.7. response to an action request PDU
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(FixedDatum))]
- [XmlInclude(typeof(VariableDatum))]
- public partial class ActionResponsePdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// Request ID that is unique
- ///
- private uint _requestID;
-
- ///
- /// Status of response
- ///
- private uint _requestStatus;
-
- ///
- /// Number of fixed datum records
- ///
- private uint _fixedDatumRecordCount;
-
- ///
- /// Number of variable datum records
- ///
- private uint _variableDatumRecordCount;
-
- ///
- /// variable length list of fixed datums
- ///
- private List _fixedDatums = new List();
-
- ///
- /// variable length list of variable length datums
- ///
- private List _variableDatums = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ActionResponsePdu()
- {
- PduType = (byte)17;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ActionResponsePdu left, ActionResponsePdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ActionResponsePdu left, ActionResponsePdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._requestID
- marshalSize += 4; // this._requestStatus
- marshalSize += 4; // this._fixedDatumRecordCount
- marshalSize += 4; // this._variableDatumRecordCount
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Request ID that is unique
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Gets or sets the Status of response
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestStatus")]
- public uint RequestStatus
- {
- get
- {
- return this._requestStatus;
- }
-
- set
- {
- this._requestStatus = value;
- }
- }
-
- ///
- /// Gets or sets the Number of fixed datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
- public uint FixedDatumRecordCount
- {
- get
- {
- return this._fixedDatumRecordCount;
- }
-
- set
- {
- this._fixedDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets or sets the Number of variable datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
- public uint VariableDatumRecordCount
- {
- get
- {
- return this._variableDatumRecordCount;
- }
-
- set
- {
- this._variableDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets the variable length list of fixed datums
- ///
- [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
- public List FixedDatums
- {
- get
- {
- return this._fixedDatums;
- }
- }
-
- ///
- /// Gets the variable length list of variable length datums
- ///
- [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
- public List VariableDatums
- {
- get
- {
- return this._variableDatums;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._requestID);
- dos.WriteUnsignedInt((uint)this._requestStatus);
- dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
- dos.WriteUnsignedInt((uint)this._variableDatums.Count);
-
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Marshal(dos);
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestID = dis.ReadUnsignedInt();
- this._requestStatus = dis.ReadUnsignedInt();
- this._fixedDatumRecordCount = dis.ReadUnsignedInt();
- this._variableDatumRecordCount = dis.ReadUnsignedInt();
-
- for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
- {
- FixedDatum anX = new FixedDatum();
- anX.Unmarshal(dis);
- this._fixedDatums.Add(anX);
- }
-
- for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
- {
- VariableDatum anX = new VariableDatum();
- anX.Unmarshal(dis);
- this._variableDatums.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._requestStatus.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- sb.AppendLine("");
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- sb.AppendLine("");
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ActionResponsePdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ActionResponsePdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- if (this._requestStatus != obj._requestStatus)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatums.Count != obj._fixedDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._variableDatums.Count != obj._variableDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
- result = GenerateHash(result) ^ this._requestStatus.GetHashCode();
- result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
- result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
-
- if (this._fixedDatums.Count > 0)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
- }
- }
-
- if (this._variableDatums.Count > 0)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.7. response to an action request PDU
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(FixedDatum))]
+ [XmlInclude(typeof(VariableDatum))]
+ public partial class ActionResponsePdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// Request ID that is unique
+ ///
+ private uint _requestID;
+
+ ///
+ /// Status of response
+ ///
+ private uint _requestStatus;
+
+ ///
+ /// Number of fixed datum records
+ ///
+ private uint _fixedDatumRecordCount;
+
+ ///
+ /// Number of variable datum records
+ ///
+ private uint _variableDatumRecordCount;
+
+ ///
+ /// variable length list of fixed datums
+ ///
+ private List _fixedDatums = new List();
+
+ ///
+ /// variable length list of variable length datums
+ ///
+ private List _variableDatums = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ActionResponsePdu()
+ {
+ PduType = (byte)17;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ActionResponsePdu left, ActionResponsePdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ActionResponsePdu left, ActionResponsePdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._requestID
+ marshalSize += 4; // this._requestStatus
+ marshalSize += 4; // this._fixedDatumRecordCount
+ marshalSize += 4; // this._variableDatumRecordCount
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Request ID that is unique
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Status of response
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestStatus")]
+ public uint RequestStatus
+ {
+ get
+ {
+ return this._requestStatus;
+ }
+
+ set
+ {
+ this._requestStatus = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of fixed datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
+ public uint FixedDatumRecordCount
+ {
+ get
+ {
+ return this._fixedDatumRecordCount;
+ }
+
+ set
+ {
+ this._fixedDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of variable datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
+ public uint VariableDatumRecordCount
+ {
+ get
+ {
+ return this._variableDatumRecordCount;
+ }
+
+ set
+ {
+ this._variableDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of fixed datums
+ ///
+ [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
+ public List FixedDatums
+ {
+ get
+ {
+ return this._fixedDatums;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of variable length datums
+ ///
+ [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
+ public List VariableDatums
+ {
+ get
+ {
+ return this._variableDatums;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._requestID);
+ dos.WriteUnsignedInt((uint)this._requestStatus);
+ dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
+ dos.WriteUnsignedInt((uint)this._variableDatums.Count);
+
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Marshal(dos);
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._requestID = dis.ReadUnsignedInt();
+ this._requestStatus = dis.ReadUnsignedInt();
+ this._fixedDatumRecordCount = dis.ReadUnsignedInt();
+ this._variableDatumRecordCount = dis.ReadUnsignedInt();
+
+ for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
+ {
+ FixedDatum anX = new FixedDatum();
+ anX.Unmarshal(dis);
+ this._fixedDatums.Add(anX);
+ }
+
+ for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
+ {
+ VariableDatum anX = new VariableDatum();
+ anX.Unmarshal(dis);
+ this._variableDatums.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._requestStatus.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ActionResponsePdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ActionResponsePdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._requestStatus != obj._requestStatus)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatums.Count != obj._fixedDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._variableDatums.Count != obj._variableDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+ result = GenerateHash(result) ^ this._requestStatus.GetHashCode();
+ result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
+ result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
+
+ if (this._fixedDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
+ }
+ }
+
+ if (this._variableDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/AngularVelocityVector.cs b/Libs/CsharpDis6/Dis1995/Generated/AngularVelocityVector.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/AngularVelocityVector.cs
rename to Libs/CsharpDis6/Dis1995/Generated/AngularVelocityVector.cs
index c7e305e..c108d40 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/AngularVelocityVector.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/AngularVelocityVector.cs
@@ -1,364 +1,364 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// 5.2.2: angular velocity measured in radians per second out each of the entity's own coordinate axes.
- ///
- [Serializable]
- [XmlRoot]
- public partial class AngularVelocityVector
- {
- ///
- /// velocity about the x axis
- ///
- private float _x;
-
- ///
- /// velocity about the y axis
- ///
- private float _y;
-
- ///
- /// velocity about the zaxis
- ///
- private float _z;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AngularVelocityVector()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(AngularVelocityVector left, AngularVelocityVector right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(AngularVelocityVector left, AngularVelocityVector right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 4; // this._x
- marshalSize += 4; // this._y
- marshalSize += 4; // this._z
- return marshalSize;
- }
-
- ///
- /// Gets or sets the velocity about the x axis
- ///
- [XmlElement(Type = typeof(float), ElementName = "x")]
- public float X
- {
- get
- {
- return this._x;
- }
-
- set
- {
- this._x = value;
- }
- }
-
- ///
- /// Gets or sets the velocity about the y axis
- ///
- [XmlElement(Type = typeof(float), ElementName = "y")]
- public float Y
- {
- get
- {
- return this._y;
- }
-
- set
- {
- this._y = value;
- }
- }
-
- ///
- /// Gets or sets the velocity about the zaxis
- ///
- [XmlElement(Type = typeof(float), ElementName = "z")]
- public float Z
- {
- get
- {
- return this._z;
- }
-
- set
- {
- this._z = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteFloat((float)this._x);
- dos.WriteFloat((float)this._y);
- dos.WriteFloat((float)this._z);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._x = dis.ReadFloat();
- this._y = dis.ReadFloat();
- this._z = dis.ReadFloat();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._x.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._y.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._z.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as AngularVelocityVector;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(AngularVelocityVector obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._x != obj._x)
- {
- ivarsEqual = false;
- }
-
- if (this._y != obj._y)
- {
- ivarsEqual = false;
- }
-
- if (this._z != obj._z)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._x.GetHashCode();
- result = GenerateHash(result) ^ this._y.GetHashCode();
- result = GenerateHash(result) ^ this._z.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// 5.2.2: angular velocity measured in radians per second out each of the entity's own coordinate axes.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class AngularVelocityVector
+ {
+ ///
+ /// velocity about the x axis
+ ///
+ private float _x;
+
+ ///
+ /// velocity about the y axis
+ ///
+ private float _y;
+
+ ///
+ /// velocity about the zaxis
+ ///
+ private float _z;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AngularVelocityVector()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(AngularVelocityVector left, AngularVelocityVector right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(AngularVelocityVector left, AngularVelocityVector right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 4; // this._x
+ marshalSize += 4; // this._y
+ marshalSize += 4; // this._z
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the velocity about the x axis
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "x")]
+ public float X
+ {
+ get
+ {
+ return this._x;
+ }
+
+ set
+ {
+ this._x = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the velocity about the y axis
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "y")]
+ public float Y
+ {
+ get
+ {
+ return this._y;
+ }
+
+ set
+ {
+ this._y = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the velocity about the zaxis
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "z")]
+ public float Z
+ {
+ get
+ {
+ return this._z;
+ }
+
+ set
+ {
+ this._z = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteFloat((float)this._x);
+ dos.WriteFloat((float)this._y);
+ dos.WriteFloat((float)this._z);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._x = dis.ReadFloat();
+ this._y = dis.ReadFloat();
+ this._z = dis.ReadFloat();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._x.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._y.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._z.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as AngularVelocityVector;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(AngularVelocityVector obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._x != obj._x)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._y != obj._y)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._z != obj._z)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._x.GetHashCode();
+ result = GenerateHash(result) ^ this._y.GetHashCode();
+ result = GenerateHash(result) ^ this._z.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/AntennaLocation.cs b/Libs/CsharpDis6/Dis1995/Generated/AntennaLocation.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/AntennaLocation.cs
rename to Libs/CsharpDis6/Dis1995/Generated/AntennaLocation.cs
index d7a06bb..4551387 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/AntennaLocation.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/AntennaLocation.cs
@@ -1,338 +1,338 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// 5.2.3: location of the radiating portion of the antenna, specified in world coordinates and entity coordinates.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(Vector3Double))]
- [XmlInclude(typeof(Vector3Float))]
- public partial class AntennaLocation
- {
- ///
- /// Location of the radiating portion of the antenna in world coordinates
- ///
- private Vector3Double _antennaLocation = new Vector3Double();
-
- ///
- /// Location of the radiating portion of the antenna in entity coordinates
- ///
- private Vector3Float _relativeAntennaLocation = new Vector3Float();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AntennaLocation()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(AntennaLocation left, AntennaLocation right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(AntennaLocation left, AntennaLocation right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += this._antennaLocation.GetMarshalledSize(); // this._antennaLocation
- marshalSize += this._relativeAntennaLocation.GetMarshalledSize(); // this._relativeAntennaLocation
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Location of the radiating portion of the antenna in world coordinates
- ///
- [XmlElement(Type = typeof(Vector3Double), ElementName = "antennaLocation")]
- public Vector3Double AntennaLocation_
- {
- get
- {
- return this._antennaLocation;
- }
-
- set
- {
- this._antennaLocation = value;
- }
- }
-
- ///
- /// Gets or sets the Location of the radiating portion of the antenna in entity coordinates
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "relativeAntennaLocation")]
- public Vector3Float RelativeAntennaLocation
- {
- get
- {
- return this._relativeAntennaLocation;
- }
-
- set
- {
- this._relativeAntennaLocation = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- this._antennaLocation.Marshal(dos);
- this._relativeAntennaLocation.Marshal(dos);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._antennaLocation.Unmarshal(dis);
- this._relativeAntennaLocation.Unmarshal(dis);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("");
- this._antennaLocation.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._relativeAntennaLocation.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as AntennaLocation;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(AntennaLocation obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (!this._antennaLocation.Equals(obj._antennaLocation))
- {
- ivarsEqual = false;
- }
-
- if (!this._relativeAntennaLocation.Equals(obj._relativeAntennaLocation))
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._antennaLocation.GetHashCode();
- result = GenerateHash(result) ^ this._relativeAntennaLocation.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// 5.2.3: location of the radiating portion of the antenna, specified in world coordinates and entity coordinates.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(Vector3Double))]
+ [XmlInclude(typeof(Vector3Float))]
+ public partial class AntennaLocation
+ {
+ ///
+ /// Location of the radiating portion of the antenna in world coordinates
+ ///
+ private Vector3Double _antennaLocation = new Vector3Double();
+
+ ///
+ /// Location of the radiating portion of the antenna in entity coordinates
+ ///
+ private Vector3Float _relativeAntennaLocation = new Vector3Float();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AntennaLocation()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(AntennaLocation left, AntennaLocation right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(AntennaLocation left, AntennaLocation right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += this._antennaLocation.GetMarshalledSize(); // this._antennaLocation
+ marshalSize += this._relativeAntennaLocation.GetMarshalledSize(); // this._relativeAntennaLocation
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Location of the radiating portion of the antenna in world coordinates
+ ///
+ [XmlElement(Type = typeof(Vector3Double), ElementName = "antennaLocation")]
+ public Vector3Double AntennaLocation_
+ {
+ get
+ {
+ return this._antennaLocation;
+ }
+
+ set
+ {
+ this._antennaLocation = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Location of the radiating portion of the antenna in entity coordinates
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "relativeAntennaLocation")]
+ public Vector3Float RelativeAntennaLocation
+ {
+ get
+ {
+ return this._relativeAntennaLocation;
+ }
+
+ set
+ {
+ this._relativeAntennaLocation = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ this._antennaLocation.Marshal(dos);
+ this._relativeAntennaLocation.Marshal(dos);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._antennaLocation.Unmarshal(dis);
+ this._relativeAntennaLocation.Unmarshal(dis);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("");
+ this._antennaLocation.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._relativeAntennaLocation.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as AntennaLocation;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(AntennaLocation obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (!this._antennaLocation.Equals(obj._antennaLocation))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._relativeAntennaLocation.Equals(obj._relativeAntennaLocation))
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._antennaLocation.GetHashCode();
+ result = GenerateHash(result) ^ this._relativeAntennaLocation.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ArticulationParameter.cs b/Libs/CsharpDis6/Dis1995/Generated/ArticulationParameter.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ArticulationParameter.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ArticulationParameter.cs
index d53533f..c259f9e 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ArticulationParameter.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ArticulationParameter.cs
@@ -1,413 +1,413 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.5. Articulation parameters for movable parts and attached parts of an entity. Specifes wether or not a change has occured, the part identifcation of the articulated part to which it is attached, and the type and value of each parameter.
- ///
- [Serializable]
- [XmlRoot]
- public partial class ArticulationParameter
- {
- private byte _parameterTypeDesignator;
-
- private byte _changeIndicator;
-
- private ushort _partAttachedTo;
-
- private int _parameterType;
-
- private double _parameterValue;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ArticulationParameter()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ArticulationParameter left, ArticulationParameter right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ArticulationParameter left, ArticulationParameter right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 1; // this._parameterTypeDesignator
- marshalSize += 1; // this._changeIndicator
- marshalSize += 2; // this._partAttachedTo
- marshalSize += 4; // this._parameterType
- marshalSize += 8; // this._parameterValue
- return marshalSize;
- }
-
- ///
- /// Gets or sets the parameterTypeDesignator
- ///
- [XmlElement(Type = typeof(byte), ElementName = "parameterTypeDesignator")]
- public byte ParameterTypeDesignator
- {
- get
- {
- return this._parameterTypeDesignator;
- }
-
- set
- {
- this._parameterTypeDesignator = value;
- }
- }
-
- ///
- /// Gets or sets the changeIndicator
- ///
- [XmlElement(Type = typeof(byte), ElementName = "changeIndicator")]
- public byte ChangeIndicator
- {
- get
- {
- return this._changeIndicator;
- }
-
- set
- {
- this._changeIndicator = value;
- }
- }
-
- ///
- /// Gets or sets the partAttachedTo
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "partAttachedTo")]
- public ushort PartAttachedTo
- {
- get
- {
- return this._partAttachedTo;
- }
-
- set
- {
- this._partAttachedTo = value;
- }
- }
-
- ///
- /// Gets or sets the parameterType
- ///
- [XmlElement(Type = typeof(int), ElementName = "parameterType")]
- public int ParameterType
- {
- get
- {
- return this._parameterType;
- }
-
- set
- {
- this._parameterType = value;
- }
- }
-
- ///
- /// Gets or sets the parameterValue
- ///
- [XmlElement(Type = typeof(double), ElementName = "parameterValue")]
- public double ParameterValue
- {
- get
- {
- return this._parameterValue;
- }
-
- set
- {
- this._parameterValue = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedByte((byte)this._parameterTypeDesignator);
- dos.WriteUnsignedByte((byte)this._changeIndicator);
- dos.WriteUnsignedShort((ushort)this._partAttachedTo);
- dos.WriteInt((int)this._parameterType);
- dos.WriteDouble((double)this._parameterValue);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._parameterTypeDesignator = dis.ReadUnsignedByte();
- this._changeIndicator = dis.ReadUnsignedByte();
- this._partAttachedTo = dis.ReadUnsignedShort();
- this._parameterType = dis.ReadInt();
- this._parameterValue = dis.ReadDouble();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._parameterTypeDesignator.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._changeIndicator.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._partAttachedTo.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._parameterType.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._parameterValue.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ArticulationParameter;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ArticulationParameter obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._parameterTypeDesignator != obj._parameterTypeDesignator)
- {
- ivarsEqual = false;
- }
-
- if (this._changeIndicator != obj._changeIndicator)
- {
- ivarsEqual = false;
- }
-
- if (this._partAttachedTo != obj._partAttachedTo)
- {
- ivarsEqual = false;
- }
-
- if (this._parameterType != obj._parameterType)
- {
- ivarsEqual = false;
- }
-
- if (this._parameterValue != obj._parameterValue)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._parameterTypeDesignator.GetHashCode();
- result = GenerateHash(result) ^ this._changeIndicator.GetHashCode();
- result = GenerateHash(result) ^ this._partAttachedTo.GetHashCode();
- result = GenerateHash(result) ^ this._parameterType.GetHashCode();
- result = GenerateHash(result) ^ this._parameterValue.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.5. Articulation parameters for movable parts and attached parts of an entity. Specifes wether or not a change has occured, the part identifcation of the articulated part to which it is attached, and the type and value of each parameter.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class ArticulationParameter
+ {
+ private byte _parameterTypeDesignator;
+
+ private byte _changeIndicator;
+
+ private ushort _partAttachedTo;
+
+ private int _parameterType;
+
+ private double _parameterValue;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ArticulationParameter()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ArticulationParameter left, ArticulationParameter right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ArticulationParameter left, ArticulationParameter right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 1; // this._parameterTypeDesignator
+ marshalSize += 1; // this._changeIndicator
+ marshalSize += 2; // this._partAttachedTo
+ marshalSize += 4; // this._parameterType
+ marshalSize += 8; // this._parameterValue
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the parameterTypeDesignator
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "parameterTypeDesignator")]
+ public byte ParameterTypeDesignator
+ {
+ get
+ {
+ return this._parameterTypeDesignator;
+ }
+
+ set
+ {
+ this._parameterTypeDesignator = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the changeIndicator
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "changeIndicator")]
+ public byte ChangeIndicator
+ {
+ get
+ {
+ return this._changeIndicator;
+ }
+
+ set
+ {
+ this._changeIndicator = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the partAttachedTo
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "partAttachedTo")]
+ public ushort PartAttachedTo
+ {
+ get
+ {
+ return this._partAttachedTo;
+ }
+
+ set
+ {
+ this._partAttachedTo = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the parameterType
+ ///
+ [XmlElement(Type = typeof(int), ElementName = "parameterType")]
+ public int ParameterType
+ {
+ get
+ {
+ return this._parameterType;
+ }
+
+ set
+ {
+ this._parameterType = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the parameterValue
+ ///
+ [XmlElement(Type = typeof(double), ElementName = "parameterValue")]
+ public double ParameterValue
+ {
+ get
+ {
+ return this._parameterValue;
+ }
+
+ set
+ {
+ this._parameterValue = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedByte((byte)this._parameterTypeDesignator);
+ dos.WriteUnsignedByte((byte)this._changeIndicator);
+ dos.WriteUnsignedShort((ushort)this._partAttachedTo);
+ dos.WriteInt((int)this._parameterType);
+ dos.WriteDouble((double)this._parameterValue);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._parameterTypeDesignator = dis.ReadUnsignedByte();
+ this._changeIndicator = dis.ReadUnsignedByte();
+ this._partAttachedTo = dis.ReadUnsignedShort();
+ this._parameterType = dis.ReadInt();
+ this._parameterValue = dis.ReadDouble();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._parameterTypeDesignator.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._changeIndicator.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._partAttachedTo.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._parameterType.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._parameterValue.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ArticulationParameter;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ArticulationParameter obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._parameterTypeDesignator != obj._parameterTypeDesignator)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._changeIndicator != obj._changeIndicator)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._partAttachedTo != obj._partAttachedTo)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._parameterType != obj._parameterType)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._parameterValue != obj._parameterValue)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._parameterTypeDesignator.GetHashCode();
+ result = GenerateHash(result) ^ this._changeIndicator.GetHashCode();
+ result = GenerateHash(result) ^ this._partAttachedTo.GetHashCode();
+ result = GenerateHash(result) ^ this._parameterType.GetHashCode();
+ result = GenerateHash(result) ^ this._parameterValue.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/BeamAntennaPattern.cs b/Libs/CsharpDis6/Dis1995/Generated/BeamAntennaPattern.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/BeamAntennaPattern.cs
rename to Libs/CsharpDis6/Dis1995/Generated/BeamAntennaPattern.cs
index 2b36f6e..617b0c9 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/BeamAntennaPattern.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/BeamAntennaPattern.cs
@@ -1,515 +1,515 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.4.2. Used when the antenna pattern type field has a value of 1. Specifies the direction, patter, and polarization of radiation from an antenna.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(Orientation))]
- public partial class BeamAntennaPattern
- {
- ///
- /// The rotation that transformst he reference coordinate sytem into the beam coordinate system. Either world coordinates or entity coordinates may be used as the reference coordinate system, as specified by teh reference system field of the antenna pattern record.
- ///
- private Orientation _beamDirection = new Orientation();
-
- private float _azimuthBeamwidth;
-
- private float _referenceSystem;
-
- private short _padding1;
-
- private byte _padding2;
-
- ///
- /// Magnigute of the z-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
- ///
- private float _ez;
-
- ///
- /// Magnigute of the x-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
- ///
- private float _ex;
-
- ///
- /// THe phase angle between Ez and Ex in radians.
- ///
- private float _phase;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BeamAntennaPattern()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(BeamAntennaPattern left, BeamAntennaPattern right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(BeamAntennaPattern left, BeamAntennaPattern right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += this._beamDirection.GetMarshalledSize(); // this._beamDirection
- marshalSize += 4; // this._azimuthBeamwidth
- marshalSize += 4; // this._referenceSystem
- marshalSize += 2; // this._padding1
- marshalSize += 1; // this._padding2
- marshalSize += 4; // this._ez
- marshalSize += 4; // this._ex
- marshalSize += 4; // this._phase
- return marshalSize;
- }
-
- ///
- /// Gets or sets the The rotation that transformst he reference coordinate sytem into the beam coordinate system. Either world coordinates or entity coordinates may be used as the reference coordinate system, as specified by teh reference system field of the antenna pattern record.
- ///
- [XmlElement(Type = typeof(Orientation), ElementName = "beamDirection")]
- public Orientation BeamDirection
- {
- get
- {
- return this._beamDirection;
- }
-
- set
- {
- this._beamDirection = value;
- }
- }
-
- ///
- /// Gets or sets the azimuthBeamwidth
- ///
- [XmlElement(Type = typeof(float), ElementName = "azimuthBeamwidth")]
- public float AzimuthBeamwidth
- {
- get
- {
- return this._azimuthBeamwidth;
- }
-
- set
- {
- this._azimuthBeamwidth = value;
- }
- }
-
- ///
- /// Gets or sets the referenceSystem
- ///
- [XmlElement(Type = typeof(float), ElementName = "referenceSystem")]
- public float ReferenceSystem
- {
- get
- {
- return this._referenceSystem;
- }
-
- set
- {
- this._referenceSystem = value;
- }
- }
-
- ///
- /// Gets or sets the padding1
- ///
- [XmlElement(Type = typeof(short), ElementName = "padding1")]
- public short Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the padding2
- ///
- [XmlElement(Type = typeof(byte), ElementName = "padding2")]
- public byte Padding2
- {
- get
- {
- return this._padding2;
- }
-
- set
- {
- this._padding2 = value;
- }
- }
-
- ///
- /// Gets or sets the Magnigute of the z-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
- ///
- [XmlElement(Type = typeof(float), ElementName = "ez")]
- public float Ez
- {
- get
- {
- return this._ez;
- }
-
- set
- {
- this._ez = value;
- }
- }
-
- ///
- /// Gets or sets the Magnigute of the x-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
- ///
- [XmlElement(Type = typeof(float), ElementName = "ex")]
- public float Ex
- {
- get
- {
- return this._ex;
- }
-
- set
- {
- this._ex = value;
- }
- }
-
- ///
- /// Gets or sets the THe phase angle between Ez and Ex in radians.
- ///
- [XmlElement(Type = typeof(float), ElementName = "phase")]
- public float Phase
- {
- get
- {
- return this._phase;
- }
-
- set
- {
- this._phase = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- this._beamDirection.Marshal(dos);
- dos.WriteFloat((float)this._azimuthBeamwidth);
- dos.WriteFloat((float)this._referenceSystem);
- dos.WriteShort((short)this._padding1);
- dos.WriteByte((byte)this._padding2);
- dos.WriteFloat((float)this._ez);
- dos.WriteFloat((float)this._ex);
- dos.WriteFloat((float)this._phase);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._beamDirection.Unmarshal(dis);
- this._azimuthBeamwidth = dis.ReadFloat();
- this._referenceSystem = dis.ReadFloat();
- this._padding1 = dis.ReadShort();
- this._padding2 = dis.ReadByte();
- this._ez = dis.ReadFloat();
- this._ex = dis.ReadFloat();
- this._phase = dis.ReadFloat();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("");
- this._beamDirection.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._azimuthBeamwidth.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._referenceSystem.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._ez.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._ex.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._phase.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as BeamAntennaPattern;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(BeamAntennaPattern obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (!this._beamDirection.Equals(obj._beamDirection))
- {
- ivarsEqual = false;
- }
-
- if (this._azimuthBeamwidth != obj._azimuthBeamwidth)
- {
- ivarsEqual = false;
- }
-
- if (this._referenceSystem != obj._referenceSystem)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._padding2 != obj._padding2)
- {
- ivarsEqual = false;
- }
-
- if (this._ez != obj._ez)
- {
- ivarsEqual = false;
- }
-
- if (this._ex != obj._ex)
- {
- ivarsEqual = false;
- }
-
- if (this._phase != obj._phase)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._beamDirection.GetHashCode();
- result = GenerateHash(result) ^ this._azimuthBeamwidth.GetHashCode();
- result = GenerateHash(result) ^ this._referenceSystem.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._padding2.GetHashCode();
- result = GenerateHash(result) ^ this._ez.GetHashCode();
- result = GenerateHash(result) ^ this._ex.GetHashCode();
- result = GenerateHash(result) ^ this._phase.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.4.2. Used when the antenna pattern type field has a value of 1. Specifies the direction, patter, and polarization of radiation from an antenna.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(Orientation))]
+ public partial class BeamAntennaPattern
+ {
+ ///
+ /// The rotation that transformst he reference coordinate sytem into the beam coordinate system. Either world coordinates or entity coordinates may be used as the reference coordinate system, as specified by teh reference system field of the antenna pattern record.
+ ///
+ private Orientation _beamDirection = new Orientation();
+
+ private float _azimuthBeamwidth;
+
+ private float _referenceSystem;
+
+ private short _padding1;
+
+ private byte _padding2;
+
+ ///
+ /// Magnigute of the z-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
+ ///
+ private float _ez;
+
+ ///
+ /// Magnigute of the x-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
+ ///
+ private float _ex;
+
+ ///
+ /// THe phase angle between Ez and Ex in radians.
+ ///
+ private float _phase;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public BeamAntennaPattern()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(BeamAntennaPattern left, BeamAntennaPattern right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(BeamAntennaPattern left, BeamAntennaPattern right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += this._beamDirection.GetMarshalledSize(); // this._beamDirection
+ marshalSize += 4; // this._azimuthBeamwidth
+ marshalSize += 4; // this._referenceSystem
+ marshalSize += 2; // this._padding1
+ marshalSize += 1; // this._padding2
+ marshalSize += 4; // this._ez
+ marshalSize += 4; // this._ex
+ marshalSize += 4; // this._phase
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the The rotation that transformst he reference coordinate sytem into the beam coordinate system. Either world coordinates or entity coordinates may be used as the reference coordinate system, as specified by teh reference system field of the antenna pattern record.
+ ///
+ [XmlElement(Type = typeof(Orientation), ElementName = "beamDirection")]
+ public Orientation BeamDirection
+ {
+ get
+ {
+ return this._beamDirection;
+ }
+
+ set
+ {
+ this._beamDirection = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the azimuthBeamwidth
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "azimuthBeamwidth")]
+ public float AzimuthBeamwidth
+ {
+ get
+ {
+ return this._azimuthBeamwidth;
+ }
+
+ set
+ {
+ this._azimuthBeamwidth = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the referenceSystem
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "referenceSystem")]
+ public float ReferenceSystem
+ {
+ get
+ {
+ return this._referenceSystem;
+ }
+
+ set
+ {
+ this._referenceSystem = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding1
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "padding1")]
+ public short Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding2
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "padding2")]
+ public byte Padding2
+ {
+ get
+ {
+ return this._padding2;
+ }
+
+ set
+ {
+ this._padding2 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Magnigute of the z-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "ez")]
+ public float Ez
+ {
+ get
+ {
+ return this._ez;
+ }
+
+ set
+ {
+ this._ez = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Magnigute of the x-component in beam coordinates at some arbitrary single point in the mainbeam and in the far field of the antenna.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "ex")]
+ public float Ex
+ {
+ get
+ {
+ return this._ex;
+ }
+
+ set
+ {
+ this._ex = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the THe phase angle between Ez and Ex in radians.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "phase")]
+ public float Phase
+ {
+ get
+ {
+ return this._phase;
+ }
+
+ set
+ {
+ this._phase = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ this._beamDirection.Marshal(dos);
+ dos.WriteFloat((float)this._azimuthBeamwidth);
+ dos.WriteFloat((float)this._referenceSystem);
+ dos.WriteShort((short)this._padding1);
+ dos.WriteByte((byte)this._padding2);
+ dos.WriteFloat((float)this._ez);
+ dos.WriteFloat((float)this._ex);
+ dos.WriteFloat((float)this._phase);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._beamDirection.Unmarshal(dis);
+ this._azimuthBeamwidth = dis.ReadFloat();
+ this._referenceSystem = dis.ReadFloat();
+ this._padding1 = dis.ReadShort();
+ this._padding2 = dis.ReadByte();
+ this._ez = dis.ReadFloat();
+ this._ex = dis.ReadFloat();
+ this._phase = dis.ReadFloat();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("");
+ this._beamDirection.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._azimuthBeamwidth.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._referenceSystem.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._ez.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._ex.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._phase.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as BeamAntennaPattern;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(BeamAntennaPattern obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (!this._beamDirection.Equals(obj._beamDirection))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._azimuthBeamwidth != obj._azimuthBeamwidth)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._referenceSystem != obj._referenceSystem)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding2 != obj._padding2)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._ez != obj._ez)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._ex != obj._ex)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._phase != obj._phase)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._beamDirection.GetHashCode();
+ result = GenerateHash(result) ^ this._azimuthBeamwidth.GetHashCode();
+ result = GenerateHash(result) ^ this._referenceSystem.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._padding2.GetHashCode();
+ result = GenerateHash(result) ^ this._ez.GetHashCode();
+ result = GenerateHash(result) ^ this._ex.GetHashCode();
+ result = GenerateHash(result) ^ this._phase.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/BurstDescriptor.cs b/Libs/CsharpDis6/Dis1995/Generated/BurstDescriptor.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/BurstDescriptor.cs
rename to Libs/CsharpDis6/Dis1995/Generated/BurstDescriptor.cs
index 886ac7c..4b6e145 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/BurstDescriptor.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/BurstDescriptor.cs
@@ -1,431 +1,431 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.7. Specifies the type of muntion fired, the type of warhead, the type of fuse, the number of rounds fired, and the rate at which the roudns are fired in rounds per minute.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityType))]
- public partial class BurstDescriptor
- {
- ///
- /// What munition was used in the burst
- ///
- private EntityType _munition = new EntityType();
-
- ///
- /// type of warhead
- ///
- private ushort _warhead;
-
- ///
- /// type of fuse used
- ///
- private ushort _fuse;
-
- ///
- /// how many of the munition were fired
- ///
- private ushort _quantity;
-
- ///
- /// rate at which the munition was fired
- ///
- private ushort _rate;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BurstDescriptor()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(BurstDescriptor left, BurstDescriptor right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(BurstDescriptor left, BurstDescriptor right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += this._munition.GetMarshalledSize(); // this._munition
- marshalSize += 2; // this._warhead
- marshalSize += 2; // this._fuse
- marshalSize += 2; // this._quantity
- marshalSize += 2; // this._rate
- return marshalSize;
- }
-
- ///
- /// Gets or sets the What munition was used in the burst
- ///
- [XmlElement(Type = typeof(EntityType), ElementName = "munition")]
- public EntityType Munition
- {
- get
- {
- return this._munition;
- }
-
- set
- {
- this._munition = value;
- }
- }
-
- ///
- /// Gets or sets the type of warhead
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "warhead")]
- public ushort Warhead
- {
- get
- {
- return this._warhead;
- }
-
- set
- {
- this._warhead = value;
- }
- }
-
- ///
- /// Gets or sets the type of fuse used
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "fuse")]
- public ushort Fuse
- {
- get
- {
- return this._fuse;
- }
-
- set
- {
- this._fuse = value;
- }
- }
-
- ///
- /// Gets or sets the how many of the munition were fired
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "quantity")]
- public ushort Quantity
- {
- get
- {
- return this._quantity;
- }
-
- set
- {
- this._quantity = value;
- }
- }
-
- ///
- /// Gets or sets the rate at which the munition was fired
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "rate")]
- public ushort Rate
- {
- get
- {
- return this._rate;
- }
-
- set
- {
- this._rate = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- this._munition.Marshal(dos);
- dos.WriteUnsignedShort((ushort)this._warhead);
- dos.WriteUnsignedShort((ushort)this._fuse);
- dos.WriteUnsignedShort((ushort)this._quantity);
- dos.WriteUnsignedShort((ushort)this._rate);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._munition.Unmarshal(dis);
- this._warhead = dis.ReadUnsignedShort();
- this._fuse = dis.ReadUnsignedShort();
- this._quantity = dis.ReadUnsignedShort();
- this._rate = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("");
- this._munition.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._warhead.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fuse.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._quantity.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._rate.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as BurstDescriptor;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(BurstDescriptor obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (!this._munition.Equals(obj._munition))
- {
- ivarsEqual = false;
- }
-
- if (this._warhead != obj._warhead)
- {
- ivarsEqual = false;
- }
-
- if (this._fuse != obj._fuse)
- {
- ivarsEqual = false;
- }
-
- if (this._quantity != obj._quantity)
- {
- ivarsEqual = false;
- }
-
- if (this._rate != obj._rate)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._munition.GetHashCode();
- result = GenerateHash(result) ^ this._warhead.GetHashCode();
- result = GenerateHash(result) ^ this._fuse.GetHashCode();
- result = GenerateHash(result) ^ this._quantity.GetHashCode();
- result = GenerateHash(result) ^ this._rate.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.7. Specifies the type of muntion fired, the type of warhead, the type of fuse, the number of rounds fired, and the rate at which the roudns are fired in rounds per minute.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityType))]
+ public partial class BurstDescriptor
+ {
+ ///
+ /// What munition was used in the burst
+ ///
+ private EntityType _munition = new EntityType();
+
+ ///
+ /// type of warhead
+ ///
+ private ushort _warhead;
+
+ ///
+ /// type of fuse used
+ ///
+ private ushort _fuse;
+
+ ///
+ /// how many of the munition were fired
+ ///
+ private ushort _quantity;
+
+ ///
+ /// rate at which the munition was fired
+ ///
+ private ushort _rate;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public BurstDescriptor()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(BurstDescriptor left, BurstDescriptor right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(BurstDescriptor left, BurstDescriptor right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += this._munition.GetMarshalledSize(); // this._munition
+ marshalSize += 2; // this._warhead
+ marshalSize += 2; // this._fuse
+ marshalSize += 2; // this._quantity
+ marshalSize += 2; // this._rate
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the What munition was used in the burst
+ ///
+ [XmlElement(Type = typeof(EntityType), ElementName = "munition")]
+ public EntityType Munition
+ {
+ get
+ {
+ return this._munition;
+ }
+
+ set
+ {
+ this._munition = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the type of warhead
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "warhead")]
+ public ushort Warhead
+ {
+ get
+ {
+ return this._warhead;
+ }
+
+ set
+ {
+ this._warhead = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the type of fuse used
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "fuse")]
+ public ushort Fuse
+ {
+ get
+ {
+ return this._fuse;
+ }
+
+ set
+ {
+ this._fuse = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the how many of the munition were fired
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "quantity")]
+ public ushort Quantity
+ {
+ get
+ {
+ return this._quantity;
+ }
+
+ set
+ {
+ this._quantity = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the rate at which the munition was fired
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "rate")]
+ public ushort Rate
+ {
+ get
+ {
+ return this._rate;
+ }
+
+ set
+ {
+ this._rate = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ this._munition.Marshal(dos);
+ dos.WriteUnsignedShort((ushort)this._warhead);
+ dos.WriteUnsignedShort((ushort)this._fuse);
+ dos.WriteUnsignedShort((ushort)this._quantity);
+ dos.WriteUnsignedShort((ushort)this._rate);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._munition.Unmarshal(dis);
+ this._warhead = dis.ReadUnsignedShort();
+ this._fuse = dis.ReadUnsignedShort();
+ this._quantity = dis.ReadUnsignedShort();
+ this._rate = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("");
+ this._munition.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._warhead.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fuse.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._quantity.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._rate.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as BurstDescriptor;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(BurstDescriptor obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (!this._munition.Equals(obj._munition))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._warhead != obj._warhead)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fuse != obj._fuse)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._quantity != obj._quantity)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._rate != obj._rate)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._munition.GetHashCode();
+ result = GenerateHash(result) ^ this._warhead.GetHashCode();
+ result = GenerateHash(result) ^ this._fuse.GetHashCode();
+ result = GenerateHash(result) ^ this._quantity.GetHashCode();
+ result = GenerateHash(result) ^ this._rate.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ClockTime.cs b/Libs/CsharpDis6/Dis1995/Generated/ClockTime.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ClockTime.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ClockTime.cs
index a4a1806..de25b84 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ClockTime.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ClockTime.cs
@@ -1,332 +1,332 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.8. Time measurements that exceed one hour. Hours is the number of hours since January 1, 1970, UTC
- ///
- [Serializable]
- [XmlRoot]
- public partial class ClockTime
- {
- ///
- /// Hours in UTC
- ///
- private int _hour;
-
- ///
- /// Time past the hour
- ///
- private uint _timePastHour;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ClockTime()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ClockTime left, ClockTime right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ClockTime left, ClockTime right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 4; // this._hour
- marshalSize += 4; // this._timePastHour
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Hours in UTC
- ///
- [XmlElement(Type = typeof(int), ElementName = "hour")]
- public int Hour
- {
- get
- {
- return this._hour;
- }
-
- set
- {
- this._hour = value;
- }
- }
-
- ///
- /// Gets or sets the Time past the hour
- ///
- [XmlElement(Type = typeof(uint), ElementName = "timePastHour")]
- public uint TimePastHour
- {
- get
- {
- return this._timePastHour;
- }
-
- set
- {
- this._timePastHour = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteInt((int)this._hour);
- dos.WriteUnsignedInt((uint)this._timePastHour);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._hour = dis.ReadInt();
- this._timePastHour = dis.ReadUnsignedInt();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._hour.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._timePastHour.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ClockTime;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ClockTime obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._hour != obj._hour)
- {
- ivarsEqual = false;
- }
-
- if (this._timePastHour != obj._timePastHour)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._hour.GetHashCode();
- result = GenerateHash(result) ^ this._timePastHour.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.8. Time measurements that exceed one hour. Hours is the number of hours since January 1, 1970, UTC
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class ClockTime
+ {
+ ///
+ /// Hours in UTC
+ ///
+ private int _hour;
+
+ ///
+ /// Time past the hour
+ ///
+ private uint _timePastHour;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ClockTime()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ClockTime left, ClockTime right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ClockTime left, ClockTime right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 4; // this._hour
+ marshalSize += 4; // this._timePastHour
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Hours in UTC
+ ///
+ [XmlElement(Type = typeof(int), ElementName = "hour")]
+ public int Hour
+ {
+ get
+ {
+ return this._hour;
+ }
+
+ set
+ {
+ this._hour = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Time past the hour
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "timePastHour")]
+ public uint TimePastHour
+ {
+ get
+ {
+ return this._timePastHour;
+ }
+
+ set
+ {
+ this._timePastHour = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteInt((int)this._hour);
+ dos.WriteUnsignedInt((uint)this._timePastHour);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._hour = dis.ReadInt();
+ this._timePastHour = dis.ReadUnsignedInt();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._hour.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._timePastHour.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ClockTime;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ClockTime obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._hour != obj._hour)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._timePastHour != obj._timePastHour)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._hour.GetHashCode();
+ result = GenerateHash(result) ^ this._timePastHour.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/CollisionPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/CollisionPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/CollisionPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/CollisionPdu.cs
index b78fd98..a6db5cd 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/CollisionPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/CollisionPdu.cs
@@ -1,542 +1,542 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.3.2. Information about a collision
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(EventID))]
- [XmlInclude(typeof(Vector3Float))]
- public partial class CollisionPdu : EntityInformationPdu, IEquatable
- {
- ///
- /// ID of the entity that issued the collision PDU
- ///
- private EntityID _issuingEntityID = new EntityID();
-
- ///
- /// ID of entity that has collided with the issuing entity ID
- ///
- private EntityID _collidingEntityID = new EntityID();
-
- ///
- /// ID of event
- ///
- private EventID _eventID = new EventID();
-
- ///
- /// ID of event
- ///
- private byte _collisionType;
-
- ///
- /// some padding
- ///
- private byte _pad;
-
- ///
- /// velocity at collision
- ///
- private Vector3Float _velocity = new Vector3Float();
-
- ///
- /// mass of issuing entity
- ///
- private float _mass;
-
- ///
- /// Location with respect to entity the issuing entity collided with
- ///
- private Vector3Float _location = new Vector3Float();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CollisionPdu()
- {
- PduType = (byte)4;
- ProtocolFamily = (byte)1;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(CollisionPdu left, CollisionPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(CollisionPdu left, CollisionPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._issuingEntityID.GetMarshalledSize(); // this._issuingEntityID
- marshalSize += this._collidingEntityID.GetMarshalledSize(); // this._collidingEntityID
- marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
- marshalSize += 1; // this._collisionType
- marshalSize += 1; // this._pad
- marshalSize += this._velocity.GetMarshalledSize(); // this._velocity
- marshalSize += 4; // this._mass
- marshalSize += this._location.GetMarshalledSize(); // this._location
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of the entity that issued the collision PDU
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "issuingEntityID")]
- public EntityID IssuingEntityID
- {
- get
- {
- return this._issuingEntityID;
- }
-
- set
- {
- this._issuingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the ID of entity that has collided with the issuing entity ID
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "collidingEntityID")]
- public EntityID CollidingEntityID
- {
- get
- {
- return this._collidingEntityID;
- }
-
- set
- {
- this._collidingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the ID of event
- ///
- [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
- public EventID EventID
- {
- get
- {
- return this._eventID;
- }
-
- set
- {
- this._eventID = value;
- }
- }
-
- ///
- /// Gets or sets the ID of event
- ///
- [XmlElement(Type = typeof(byte), ElementName = "collisionType")]
- public byte CollisionType
- {
- get
- {
- return this._collisionType;
- }
-
- set
- {
- this._collisionType = value;
- }
- }
-
- ///
- /// Gets or sets the some padding
- ///
- [XmlElement(Type = typeof(byte), ElementName = "pad")]
- public byte Pad
- {
- get
- {
- return this._pad;
- }
-
- set
- {
- this._pad = value;
- }
- }
-
- ///
- /// Gets or sets the velocity at collision
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "velocity")]
- public Vector3Float Velocity
- {
- get
- {
- return this._velocity;
- }
-
- set
- {
- this._velocity = value;
- }
- }
-
- ///
- /// Gets or sets the mass of issuing entity
- ///
- [XmlElement(Type = typeof(float), ElementName = "mass")]
- public float Mass
- {
- get
- {
- return this._mass;
- }
-
- set
- {
- this._mass = value;
- }
- }
-
- ///
- /// Gets or sets the Location with respect to entity the issuing entity collided with
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "location")]
- public Vector3Float Location
- {
- get
- {
- return this._location;
- }
-
- set
- {
- this._location = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._issuingEntityID.Marshal(dos);
- this._collidingEntityID.Marshal(dos);
- this._eventID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._collisionType);
- dos.WriteByte((byte)this._pad);
- this._velocity.Marshal(dos);
- dos.WriteFloat((float)this._mass);
- this._location.Marshal(dos);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._issuingEntityID.Unmarshal(dis);
- this._collidingEntityID.Unmarshal(dis);
- this._eventID.Unmarshal(dis);
- this._collisionType = dis.ReadUnsignedByte();
- this._pad = dis.ReadByte();
- this._velocity.Unmarshal(dis);
- this._mass = dis.ReadFloat();
- this._location.Unmarshal(dis);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._issuingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._collidingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._eventID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._collisionType.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._pad.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._velocity.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._mass.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._location.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as CollisionPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(CollisionPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._issuingEntityID.Equals(obj._issuingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._collidingEntityID.Equals(obj._collidingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._eventID.Equals(obj._eventID))
- {
- ivarsEqual = false;
- }
-
- if (this._collisionType != obj._collisionType)
- {
- ivarsEqual = false;
- }
-
- if (this._pad != obj._pad)
- {
- ivarsEqual = false;
- }
-
- if (!this._velocity.Equals(obj._velocity))
- {
- ivarsEqual = false;
- }
-
- if (this._mass != obj._mass)
- {
- ivarsEqual = false;
- }
-
- if (!this._location.Equals(obj._location))
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._issuingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._collidingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._eventID.GetHashCode();
- result = GenerateHash(result) ^ this._collisionType.GetHashCode();
- result = GenerateHash(result) ^ this._pad.GetHashCode();
- result = GenerateHash(result) ^ this._velocity.GetHashCode();
- result = GenerateHash(result) ^ this._mass.GetHashCode();
- result = GenerateHash(result) ^ this._location.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.3.2. Information about a collision
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(EventID))]
+ [XmlInclude(typeof(Vector3Float))]
+ public partial class CollisionPdu : EntityInformationPdu, IEquatable
+ {
+ ///
+ /// ID of the entity that issued the collision PDU
+ ///
+ private EntityID _issuingEntityID = new EntityID();
+
+ ///
+ /// ID of entity that has collided with the issuing entity ID
+ ///
+ private EntityID _collidingEntityID = new EntityID();
+
+ ///
+ /// ID of event
+ ///
+ private EventID _eventID = new EventID();
+
+ ///
+ /// ID of event
+ ///
+ private byte _collisionType;
+
+ ///
+ /// some padding
+ ///
+ private byte _pad;
+
+ ///
+ /// velocity at collision
+ ///
+ private Vector3Float _velocity = new Vector3Float();
+
+ ///
+ /// mass of issuing entity
+ ///
+ private float _mass;
+
+ ///
+ /// Location with respect to entity the issuing entity collided with
+ ///
+ private Vector3Float _location = new Vector3Float();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CollisionPdu()
+ {
+ PduType = (byte)4;
+ ProtocolFamily = (byte)1;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(CollisionPdu left, CollisionPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(CollisionPdu left, CollisionPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._issuingEntityID.GetMarshalledSize(); // this._issuingEntityID
+ marshalSize += this._collidingEntityID.GetMarshalledSize(); // this._collidingEntityID
+ marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
+ marshalSize += 1; // this._collisionType
+ marshalSize += 1; // this._pad
+ marshalSize += this._velocity.GetMarshalledSize(); // this._velocity
+ marshalSize += 4; // this._mass
+ marshalSize += this._location.GetMarshalledSize(); // this._location
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of the entity that issued the collision PDU
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "issuingEntityID")]
+ public EntityID IssuingEntityID
+ {
+ get
+ {
+ return this._issuingEntityID;
+ }
+
+ set
+ {
+ this._issuingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of entity that has collided with the issuing entity ID
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "collidingEntityID")]
+ public EntityID CollidingEntityID
+ {
+ get
+ {
+ return this._collidingEntityID;
+ }
+
+ set
+ {
+ this._collidingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of event
+ ///
+ [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
+ public EventID EventID
+ {
+ get
+ {
+ return this._eventID;
+ }
+
+ set
+ {
+ this._eventID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of event
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "collisionType")]
+ public byte CollisionType
+ {
+ get
+ {
+ return this._collisionType;
+ }
+
+ set
+ {
+ this._collisionType = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the some padding
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "pad")]
+ public byte Pad
+ {
+ get
+ {
+ return this._pad;
+ }
+
+ set
+ {
+ this._pad = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the velocity at collision
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "velocity")]
+ public Vector3Float Velocity
+ {
+ get
+ {
+ return this._velocity;
+ }
+
+ set
+ {
+ this._velocity = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the mass of issuing entity
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "mass")]
+ public float Mass
+ {
+ get
+ {
+ return this._mass;
+ }
+
+ set
+ {
+ this._mass = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Location with respect to entity the issuing entity collided with
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "location")]
+ public Vector3Float Location
+ {
+ get
+ {
+ return this._location;
+ }
+
+ set
+ {
+ this._location = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._issuingEntityID.Marshal(dos);
+ this._collidingEntityID.Marshal(dos);
+ this._eventID.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._collisionType);
+ dos.WriteByte((byte)this._pad);
+ this._velocity.Marshal(dos);
+ dos.WriteFloat((float)this._mass);
+ this._location.Marshal(dos);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._issuingEntityID.Unmarshal(dis);
+ this._collidingEntityID.Unmarshal(dis);
+ this._eventID.Unmarshal(dis);
+ this._collisionType = dis.ReadUnsignedByte();
+ this._pad = dis.ReadByte();
+ this._velocity.Unmarshal(dis);
+ this._mass = dis.ReadFloat();
+ this._location.Unmarshal(dis);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._issuingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._collidingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._eventID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._collisionType.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._pad.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._velocity.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._mass.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._location.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as CollisionPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(CollisionPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._issuingEntityID.Equals(obj._issuingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._collidingEntityID.Equals(obj._collidingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._eventID.Equals(obj._eventID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._collisionType != obj._collisionType)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._pad != obj._pad)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._velocity.Equals(obj._velocity))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._mass != obj._mass)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._location.Equals(obj._location))
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._issuingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._collidingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._eventID.GetHashCode();
+ result = GenerateHash(result) ^ this._collisionType.GetHashCode();
+ result = GenerateHash(result) ^ this._pad.GetHashCode();
+ result = GenerateHash(result) ^ this._velocity.GetHashCode();
+ result = GenerateHash(result) ^ this._mass.GetHashCode();
+ result = GenerateHash(result) ^ this._location.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/CommentPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/CommentPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/CommentPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/CommentPdu.cs
index 2529aa1..f4d4f23 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/CommentPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/CommentPdu.cs
@@ -1,484 +1,484 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.12. Arbitrary messages can be entered into the data stream via use of this PDU
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(FixedDatum))]
- [XmlInclude(typeof(VariableDatum))]
- public partial class CommentPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// Number of fixed datum records
- ///
- private uint _fixedDatumRecordCount;
-
- ///
- /// Number of variable datum records
- ///
- private uint _variableDatumRecordCount;
-
- ///
- /// variable length list of fixed datums
- ///
- private List _fixedDatums = new List();
-
- ///
- /// variable length list of variable length datums
- ///
- private List _variableDatums = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CommentPdu()
- {
- PduType = (byte)22;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(CommentPdu left, CommentPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(CommentPdu left, CommentPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._fixedDatumRecordCount
- marshalSize += 4; // this._variableDatumRecordCount
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Number of fixed datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
- public uint FixedDatumRecordCount
- {
- get
- {
- return this._fixedDatumRecordCount;
- }
-
- set
- {
- this._fixedDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets or sets the Number of variable datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
- public uint VariableDatumRecordCount
- {
- get
- {
- return this._variableDatumRecordCount;
- }
-
- set
- {
- this._variableDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets the variable length list of fixed datums
- ///
- [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
- public List FixedDatums
- {
- get
- {
- return this._fixedDatums;
- }
- }
-
- ///
- /// Gets the variable length list of variable length datums
- ///
- [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
- public List VariableDatums
- {
- get
- {
- return this._variableDatums;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
- dos.WriteUnsignedInt((uint)this._variableDatums.Count);
-
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Marshal(dos);
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._fixedDatumRecordCount = dis.ReadUnsignedInt();
- this._variableDatumRecordCount = dis.ReadUnsignedInt();
-
- for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
- {
- FixedDatum anX = new FixedDatum();
- anX.Unmarshal(dis);
- this._fixedDatums.Add(anX);
- }
-
- for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
- {
- VariableDatum anX = new VariableDatum();
- anX.Unmarshal(dis);
- this._variableDatums.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- sb.AppendLine("");
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- sb.AppendLine("");
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as CommentPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(CommentPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatums.Count != obj._fixedDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._variableDatums.Count != obj._variableDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
- result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
-
- if (this._fixedDatums.Count > 0)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
- }
- }
-
- if (this._variableDatums.Count > 0)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.12. Arbitrary messages can be entered into the data stream via use of this PDU
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(FixedDatum))]
+ [XmlInclude(typeof(VariableDatum))]
+ public partial class CommentPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// Number of fixed datum records
+ ///
+ private uint _fixedDatumRecordCount;
+
+ ///
+ /// Number of variable datum records
+ ///
+ private uint _variableDatumRecordCount;
+
+ ///
+ /// variable length list of fixed datums
+ ///
+ private List _fixedDatums = new List();
+
+ ///
+ /// variable length list of variable length datums
+ ///
+ private List _variableDatums = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CommentPdu()
+ {
+ PduType = (byte)22;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(CommentPdu left, CommentPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(CommentPdu left, CommentPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._fixedDatumRecordCount
+ marshalSize += 4; // this._variableDatumRecordCount
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Number of fixed datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
+ public uint FixedDatumRecordCount
+ {
+ get
+ {
+ return this._fixedDatumRecordCount;
+ }
+
+ set
+ {
+ this._fixedDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of variable datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
+ public uint VariableDatumRecordCount
+ {
+ get
+ {
+ return this._variableDatumRecordCount;
+ }
+
+ set
+ {
+ this._variableDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of fixed datums
+ ///
+ [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
+ public List FixedDatums
+ {
+ get
+ {
+ return this._fixedDatums;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of variable length datums
+ ///
+ [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
+ public List VariableDatums
+ {
+ get
+ {
+ return this._variableDatums;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
+ dos.WriteUnsignedInt((uint)this._variableDatums.Count);
+
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Marshal(dos);
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._fixedDatumRecordCount = dis.ReadUnsignedInt();
+ this._variableDatumRecordCount = dis.ReadUnsignedInt();
+
+ for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
+ {
+ FixedDatum anX = new FixedDatum();
+ anX.Unmarshal(dis);
+ this._fixedDatums.Add(anX);
+ }
+
+ for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
+ {
+ VariableDatum anX = new VariableDatum();
+ anX.Unmarshal(dis);
+ this._variableDatums.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as CommentPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(CommentPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatums.Count != obj._fixedDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._variableDatums.Count != obj._variableDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
+ result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
+
+ if (this._fixedDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
+ }
+ }
+
+ if (this._variableDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/CreateEntityPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/CreateEntityPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/CreateEntityPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/CreateEntityPdu.cs
index 6d454da..e19230d 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/CreateEntityPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/CreateEntityPdu.cs
@@ -1,304 +1,304 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.1. Create a new entity
- ///
- [Serializable]
- [XmlRoot]
- public partial class CreateEntityPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// Identifier for the request
- ///
- private uint _requestID;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CreateEntityPdu()
- {
- PduType = (byte)11;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(CreateEntityPdu left, CreateEntityPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(CreateEntityPdu left, CreateEntityPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._requestID
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Identifier for the request
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._requestID);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestID = dis.ReadUnsignedInt();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as CreateEntityPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(CreateEntityPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.1. Create a new entity
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class CreateEntityPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// Identifier for the request
+ ///
+ private uint _requestID;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CreateEntityPdu()
+ {
+ PduType = (byte)11;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(CreateEntityPdu left, CreateEntityPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(CreateEntityPdu left, CreateEntityPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._requestID
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Identifier for the request
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._requestID);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._requestID = dis.ReadUnsignedInt();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as CreateEntityPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(CreateEntityPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/DataPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/DataPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/DataPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/DataPdu.cs
index e9d77d0..044222c 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/DataPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/DataPdu.cs
@@ -1,548 +1,548 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.10. Information issued in response to a data query pdu or a set data pdu is communicated using a data pdu.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(FixedDatum))]
- [XmlInclude(typeof(VariableDatum))]
- public partial class DataPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// ID of request
- ///
- private uint _requestID;
-
- ///
- /// padding
- ///
- private uint _padding1;
-
- ///
- /// Number of fixed datum records
- ///
- private uint _fixedDatumRecordCount;
-
- ///
- /// Number of variable datum records
- ///
- private uint _variableDatumRecordCount;
-
- ///
- /// variable length list of fixed datums
- ///
- private List _fixedDatums = new List();
-
- ///
- /// variable length list of variable length datums
- ///
- private List _variableDatums = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DataPdu()
- {
- PduType = (byte)20;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(DataPdu left, DataPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(DataPdu left, DataPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._requestID
- marshalSize += 4; // this._padding1
- marshalSize += 4; // this._fixedDatumRecordCount
- marshalSize += 4; // this._variableDatumRecordCount
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of request
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(uint), ElementName = "padding1")]
- public uint Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the Number of fixed datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
- public uint FixedDatumRecordCount
- {
- get
- {
- return this._fixedDatumRecordCount;
- }
-
- set
- {
- this._fixedDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets or sets the Number of variable datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
- public uint VariableDatumRecordCount
- {
- get
- {
- return this._variableDatumRecordCount;
- }
-
- set
- {
- this._variableDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets the variable length list of fixed datums
- ///
- [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
- public List FixedDatums
- {
- get
- {
- return this._fixedDatums;
- }
- }
-
- ///
- /// Gets the variable length list of variable length datums
- ///
- [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
- public List VariableDatums
- {
- get
- {
- return this._variableDatums;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._requestID);
- dos.WriteUnsignedInt((uint)this._padding1);
- dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
- dos.WriteUnsignedInt((uint)this._variableDatums.Count);
-
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Marshal(dos);
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestID = dis.ReadUnsignedInt();
- this._padding1 = dis.ReadUnsignedInt();
- this._fixedDatumRecordCount = dis.ReadUnsignedInt();
- this._variableDatumRecordCount = dis.ReadUnsignedInt();
-
- for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
- {
- FixedDatum anX = new FixedDatum();
- anX.Unmarshal(dis);
- this._fixedDatums.Add(anX);
- }
-
- for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
- {
- VariableDatum anX = new VariableDatum();
- anX.Unmarshal(dis);
- this._variableDatums.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- sb.AppendLine("");
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- sb.AppendLine("");
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as DataPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(DataPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatums.Count != obj._fixedDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._variableDatums.Count != obj._variableDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
- result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
-
- if (this._fixedDatums.Count > 0)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
- }
- }
-
- if (this._variableDatums.Count > 0)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.10. Information issued in response to a data query pdu or a set data pdu is communicated using a data pdu.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(FixedDatum))]
+ [XmlInclude(typeof(VariableDatum))]
+ public partial class DataPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// ID of request
+ ///
+ private uint _requestID;
+
+ ///
+ /// padding
+ ///
+ private uint _padding1;
+
+ ///
+ /// Number of fixed datum records
+ ///
+ private uint _fixedDatumRecordCount;
+
+ ///
+ /// Number of variable datum records
+ ///
+ private uint _variableDatumRecordCount;
+
+ ///
+ /// variable length list of fixed datums
+ ///
+ private List _fixedDatums = new List();
+
+ ///
+ /// variable length list of variable length datums
+ ///
+ private List _variableDatums = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DataPdu()
+ {
+ PduType = (byte)20;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(DataPdu left, DataPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(DataPdu left, DataPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._requestID
+ marshalSize += 4; // this._padding1
+ marshalSize += 4; // this._fixedDatumRecordCount
+ marshalSize += 4; // this._variableDatumRecordCount
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of request
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "padding1")]
+ public uint Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of fixed datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
+ public uint FixedDatumRecordCount
+ {
+ get
+ {
+ return this._fixedDatumRecordCount;
+ }
+
+ set
+ {
+ this._fixedDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of variable datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
+ public uint VariableDatumRecordCount
+ {
+ get
+ {
+ return this._variableDatumRecordCount;
+ }
+
+ set
+ {
+ this._variableDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of fixed datums
+ ///
+ [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
+ public List FixedDatums
+ {
+ get
+ {
+ return this._fixedDatums;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of variable length datums
+ ///
+ [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
+ public List VariableDatums
+ {
+ get
+ {
+ return this._variableDatums;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._requestID);
+ dos.WriteUnsignedInt((uint)this._padding1);
+ dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
+ dos.WriteUnsignedInt((uint)this._variableDatums.Count);
+
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Marshal(dos);
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._requestID = dis.ReadUnsignedInt();
+ this._padding1 = dis.ReadUnsignedInt();
+ this._fixedDatumRecordCount = dis.ReadUnsignedInt();
+ this._variableDatumRecordCount = dis.ReadUnsignedInt();
+
+ for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
+ {
+ FixedDatum anX = new FixedDatum();
+ anX.Unmarshal(dis);
+ this._fixedDatums.Add(anX);
+ }
+
+ for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
+ {
+ VariableDatum anX = new VariableDatum();
+ anX.Unmarshal(dis);
+ this._variableDatums.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as DataPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(DataPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatums.Count != obj._fixedDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._variableDatums.Count != obj._variableDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
+ result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
+
+ if (this._fixedDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
+ }
+ }
+
+ if (this._variableDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/DataQueryPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/DataQueryPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/DataQueryPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/DataQueryPdu.cs
index 9539bb1..d8131dd 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/DataQueryPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/DataQueryPdu.cs
@@ -1,548 +1,548 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.8. Request for data from an entity
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(FixedDatum))]
- [XmlInclude(typeof(VariableDatum))]
- public partial class DataQueryPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// ID of request
- ///
- private uint _requestID;
-
- ///
- /// time issues between issues of Data PDUs. Zero means send once only.
- ///
- private uint _timeInterval;
-
- ///
- /// Number of fixed datum records
- ///
- private uint _fixedDatumRecordCount;
-
- ///
- /// Number of variable datum records
- ///
- private uint _variableDatumRecordCount;
-
- ///
- /// variable length list of fixed datums
- ///
- private List _fixedDatums = new List();
-
- ///
- /// variable length list of variable length datums
- ///
- private List _variableDatums = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DataQueryPdu()
- {
- PduType = (byte)18;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(DataQueryPdu left, DataQueryPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(DataQueryPdu left, DataQueryPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._requestID
- marshalSize += 4; // this._timeInterval
- marshalSize += 4; // this._fixedDatumRecordCount
- marshalSize += 4; // this._variableDatumRecordCount
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of request
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Gets or sets the time issues between issues of Data PDUs. Zero means send once only.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "timeInterval")]
- public uint TimeInterval
- {
- get
- {
- return this._timeInterval;
- }
-
- set
- {
- this._timeInterval = value;
- }
- }
-
- ///
- /// Gets or sets the Number of fixed datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
- public uint FixedDatumRecordCount
- {
- get
- {
- return this._fixedDatumRecordCount;
- }
-
- set
- {
- this._fixedDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets or sets the Number of variable datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
- public uint VariableDatumRecordCount
- {
- get
- {
- return this._variableDatumRecordCount;
- }
-
- set
- {
- this._variableDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets the variable length list of fixed datums
- ///
- [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
- public List FixedDatums
- {
- get
- {
- return this._fixedDatums;
- }
- }
-
- ///
- /// Gets the variable length list of variable length datums
- ///
- [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
- public List VariableDatums
- {
- get
- {
- return this._variableDatums;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._requestID);
- dos.WriteUnsignedInt((uint)this._timeInterval);
- dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
- dos.WriteUnsignedInt((uint)this._variableDatums.Count);
-
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Marshal(dos);
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestID = dis.ReadUnsignedInt();
- this._timeInterval = dis.ReadUnsignedInt();
- this._fixedDatumRecordCount = dis.ReadUnsignedInt();
- this._variableDatumRecordCount = dis.ReadUnsignedInt();
-
- for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
- {
- FixedDatum anX = new FixedDatum();
- anX.Unmarshal(dis);
- this._fixedDatums.Add(anX);
- }
-
- for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
- {
- VariableDatum anX = new VariableDatum();
- anX.Unmarshal(dis);
- this._variableDatums.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._timeInterval.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- sb.AppendLine("");
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- sb.AppendLine("");
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as DataQueryPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(DataQueryPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- if (this._timeInterval != obj._timeInterval)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatums.Count != obj._fixedDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._variableDatums.Count != obj._variableDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
- result = GenerateHash(result) ^ this._timeInterval.GetHashCode();
- result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
- result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
-
- if (this._fixedDatums.Count > 0)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
- }
- }
-
- if (this._variableDatums.Count > 0)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.8. Request for data from an entity
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(FixedDatum))]
+ [XmlInclude(typeof(VariableDatum))]
+ public partial class DataQueryPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// ID of request
+ ///
+ private uint _requestID;
+
+ ///
+ /// time issues between issues of Data PDUs. Zero means send once only.
+ ///
+ private uint _timeInterval;
+
+ ///
+ /// Number of fixed datum records
+ ///
+ private uint _fixedDatumRecordCount;
+
+ ///
+ /// Number of variable datum records
+ ///
+ private uint _variableDatumRecordCount;
+
+ ///
+ /// variable length list of fixed datums
+ ///
+ private List _fixedDatums = new List();
+
+ ///
+ /// variable length list of variable length datums
+ ///
+ private List _variableDatums = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DataQueryPdu()
+ {
+ PduType = (byte)18;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(DataQueryPdu left, DataQueryPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(DataQueryPdu left, DataQueryPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._requestID
+ marshalSize += 4; // this._timeInterval
+ marshalSize += 4; // this._fixedDatumRecordCount
+ marshalSize += 4; // this._variableDatumRecordCount
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of request
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the time issues between issues of Data PDUs. Zero means send once only.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "timeInterval")]
+ public uint TimeInterval
+ {
+ get
+ {
+ return this._timeInterval;
+ }
+
+ set
+ {
+ this._timeInterval = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of fixed datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
+ public uint FixedDatumRecordCount
+ {
+ get
+ {
+ return this._fixedDatumRecordCount;
+ }
+
+ set
+ {
+ this._fixedDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of variable datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
+ public uint VariableDatumRecordCount
+ {
+ get
+ {
+ return this._variableDatumRecordCount;
+ }
+
+ set
+ {
+ this._variableDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of fixed datums
+ ///
+ [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
+ public List FixedDatums
+ {
+ get
+ {
+ return this._fixedDatums;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of variable length datums
+ ///
+ [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
+ public List VariableDatums
+ {
+ get
+ {
+ return this._variableDatums;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._requestID);
+ dos.WriteUnsignedInt((uint)this._timeInterval);
+ dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
+ dos.WriteUnsignedInt((uint)this._variableDatums.Count);
+
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Marshal(dos);
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._requestID = dis.ReadUnsignedInt();
+ this._timeInterval = dis.ReadUnsignedInt();
+ this._fixedDatumRecordCount = dis.ReadUnsignedInt();
+ this._variableDatumRecordCount = dis.ReadUnsignedInt();
+
+ for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
+ {
+ FixedDatum anX = new FixedDatum();
+ anX.Unmarshal(dis);
+ this._fixedDatums.Add(anX);
+ }
+
+ for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
+ {
+ VariableDatum anX = new VariableDatum();
+ anX.Unmarshal(dis);
+ this._variableDatums.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._timeInterval.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as DataQueryPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(DataQueryPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._timeInterval != obj._timeInterval)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatums.Count != obj._fixedDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._variableDatums.Count != obj._variableDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+ result = GenerateHash(result) ^ this._timeInterval.GetHashCode();
+ result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
+ result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
+
+ if (this._fixedDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
+ }
+ }
+
+ if (this._variableDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/DeadReckoningParameter.cs b/Libs/CsharpDis6/Dis1995/Generated/DeadReckoningParameter.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/DeadReckoningParameter.cs
rename to Libs/CsharpDis6/Dis1995/Generated/DeadReckoningParameter.cs
index 3eeb7df..e9f3bb3 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/DeadReckoningParameter.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/DeadReckoningParameter.cs
@@ -1,431 +1,431 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// represents values used in dead reckoning algorithms
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(Vector3Float))]
- public partial class DeadReckoningParameter
- {
- ///
- /// enumeration of what dead reckoning algorighm to use
- ///
- private byte _deadReckoningAlgorithm;
-
- ///
- /// other parameters to use in the dead reckoning algorithm
- ///
- private byte[] _otherParameters = new byte[15];
-
- ///
- /// Linear acceleration of the entity
- ///
- private Vector3Float _entityLinearAcceleration = new Vector3Float();
-
- ///
- /// angular velocity of the entity
- ///
- private Vector3Float _entityAngularVelocity = new Vector3Float();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DeadReckoningParameter()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(DeadReckoningParameter left, DeadReckoningParameter right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(DeadReckoningParameter left, DeadReckoningParameter right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 1; // this._deadReckoningAlgorithm
- marshalSize += 15 * 1; // _otherParameters
- marshalSize += this._entityLinearAcceleration.GetMarshalledSize(); // this._entityLinearAcceleration
- marshalSize += this._entityAngularVelocity.GetMarshalledSize(); // this._entityAngularVelocity
- return marshalSize;
- }
-
- ///
- /// Gets or sets the enumeration of what dead reckoning algorighm to use
- ///
- [XmlElement(Type = typeof(byte), ElementName = "deadReckoningAlgorithm")]
- public byte DeadReckoningAlgorithm
- {
- get
- {
- return this._deadReckoningAlgorithm;
- }
-
- set
- {
- this._deadReckoningAlgorithm = value;
- }
- }
-
- ///
- /// Gets or sets the other parameters to use in the dead reckoning algorithm
- ///
- [XmlArray(ElementName = "otherParameters")]
- public byte[] OtherParameters
- {
- get
- {
- return this._otherParameters;
- }
-
- set
- {
- this._otherParameters = value;
- }
-}
-
- ///
- /// Gets or sets the Linear acceleration of the entity
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "entityLinearAcceleration")]
- public Vector3Float EntityLinearAcceleration
- {
- get
- {
- return this._entityLinearAcceleration;
- }
-
- set
- {
- this._entityLinearAcceleration = value;
- }
- }
-
- ///
- /// Gets or sets the angular velocity of the entity
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "entityAngularVelocity")]
- public Vector3Float EntityAngularVelocity
- {
- get
- {
- return this._entityAngularVelocity;
- }
-
- set
- {
- this._entityAngularVelocity = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedByte((byte)this._deadReckoningAlgorithm);
-
- for (int idx = 0; idx < this._otherParameters.Length; idx++)
- {
- dos.WriteByte(this._otherParameters[idx]);
- }
-
- this._entityLinearAcceleration.Marshal(dos);
- this._entityAngularVelocity.Marshal(dos);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._deadReckoningAlgorithm = dis.ReadUnsignedByte();
-
- for (int idx = 0; idx < this._otherParameters.Length; idx++)
- {
- this._otherParameters[idx] = dis.ReadByte();
- }
-
- this._entityLinearAcceleration.Unmarshal(dis);
- this._entityAngularVelocity.Unmarshal(dis);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._deadReckoningAlgorithm.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._otherParameters.Length; idx++)
- {
- sb.AppendLine("" + this._otherParameters[idx] + "");
- }
-
- sb.AppendLine("");
- this._entityLinearAcceleration.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._entityAngularVelocity.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as DeadReckoningParameter;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(DeadReckoningParameter obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm)
- {
- ivarsEqual = false;
- }
-
- if (obj._otherParameters.Length != 15)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < 15; idx++)
- {
- if (this._otherParameters[idx] != obj._otherParameters[idx])
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration))
- {
- ivarsEqual = false;
- }
-
- if (!this._entityAngularVelocity.Equals(obj._entityAngularVelocity))
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._deadReckoningAlgorithm.GetHashCode();
-
- for (int idx = 0; idx < 15; idx++)
- {
- result = GenerateHash(result) ^ this._otherParameters[idx].GetHashCode();
- }
-
- result = GenerateHash(result) ^ this._entityLinearAcceleration.GetHashCode();
- result = GenerateHash(result) ^ this._entityAngularVelocity.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// represents values used in dead reckoning algorithms
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(Vector3Float))]
+ public partial class DeadReckoningParameter
+ {
+ ///
+ /// enumeration of what dead reckoning algorighm to use
+ ///
+ private byte _deadReckoningAlgorithm;
+
+ ///
+ /// other parameters to use in the dead reckoning algorithm
+ ///
+ private byte[] _otherParameters = new byte[15];
+
+ ///
+ /// Linear acceleration of the entity
+ ///
+ private Vector3Float _entityLinearAcceleration = new Vector3Float();
+
+ ///
+ /// angular velocity of the entity
+ ///
+ private Vector3Float _entityAngularVelocity = new Vector3Float();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DeadReckoningParameter()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(DeadReckoningParameter left, DeadReckoningParameter right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(DeadReckoningParameter left, DeadReckoningParameter right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 1; // this._deadReckoningAlgorithm
+ marshalSize += 15 * 1; // _otherParameters
+ marshalSize += this._entityLinearAcceleration.GetMarshalledSize(); // this._entityLinearAcceleration
+ marshalSize += this._entityAngularVelocity.GetMarshalledSize(); // this._entityAngularVelocity
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the enumeration of what dead reckoning algorighm to use
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "deadReckoningAlgorithm")]
+ public byte DeadReckoningAlgorithm
+ {
+ get
+ {
+ return this._deadReckoningAlgorithm;
+ }
+
+ set
+ {
+ this._deadReckoningAlgorithm = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the other parameters to use in the dead reckoning algorithm
+ ///
+ [XmlArray(ElementName = "otherParameters")]
+ public byte[] OtherParameters
+ {
+ get
+ {
+ return this._otherParameters;
+ }
+
+ set
+ {
+ this._otherParameters = value;
+ }
+}
+
+ ///
+ /// Gets or sets the Linear acceleration of the entity
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "entityLinearAcceleration")]
+ public Vector3Float EntityLinearAcceleration
+ {
+ get
+ {
+ return this._entityLinearAcceleration;
+ }
+
+ set
+ {
+ this._entityLinearAcceleration = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the angular velocity of the entity
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "entityAngularVelocity")]
+ public Vector3Float EntityAngularVelocity
+ {
+ get
+ {
+ return this._entityAngularVelocity;
+ }
+
+ set
+ {
+ this._entityAngularVelocity = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedByte((byte)this._deadReckoningAlgorithm);
+
+ for (int idx = 0; idx < this._otherParameters.Length; idx++)
+ {
+ dos.WriteByte(this._otherParameters[idx]);
+ }
+
+ this._entityLinearAcceleration.Marshal(dos);
+ this._entityAngularVelocity.Marshal(dos);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._deadReckoningAlgorithm = dis.ReadUnsignedByte();
+
+ for (int idx = 0; idx < this._otherParameters.Length; idx++)
+ {
+ this._otherParameters[idx] = dis.ReadByte();
+ }
+
+ this._entityLinearAcceleration.Unmarshal(dis);
+ this._entityAngularVelocity.Unmarshal(dis);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._deadReckoningAlgorithm.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._otherParameters.Length; idx++)
+ {
+ sb.AppendLine("" + this._otherParameters[idx] + "");
+ }
+
+ sb.AppendLine("");
+ this._entityLinearAcceleration.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._entityAngularVelocity.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as DeadReckoningParameter;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(DeadReckoningParameter obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm)
+ {
+ ivarsEqual = false;
+ }
+
+ if (obj._otherParameters.Length != 15)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < 15; idx++)
+ {
+ if (this._otherParameters[idx] != obj._otherParameters[idx])
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._entityAngularVelocity.Equals(obj._entityAngularVelocity))
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._deadReckoningAlgorithm.GetHashCode();
+
+ for (int idx = 0; idx < 15; idx++)
+ {
+ result = GenerateHash(result) ^ this._otherParameters[idx].GetHashCode();
+ }
+
+ result = GenerateHash(result) ^ this._entityLinearAcceleration.GetHashCode();
+ result = GenerateHash(result) ^ this._entityAngularVelocity.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/DesignatorPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/DesignatorPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/DesignatorPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/DesignatorPdu.cs
index 2de5816..2421885 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/DesignatorPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/DesignatorPdu.cs
@@ -1,669 +1,669 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.7.2. Handles designating operations
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(Vector3Float))]
- [XmlInclude(typeof(Vector3Double))]
- public partial class DesignatorPdu : DistributedEmissionsPdu, IEquatable
- {
- ///
- /// ID of the entity designating
- ///
- private EntityID _designatingEntityID = new EntityID();
-
- ///
- /// This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
- ///
- private ushort _codeName;
-
- ///
- /// ID of the entity being designated
- ///
- private EntityID _designatedEntityID = new EntityID();
-
- ///
- /// This field shall identify the designator code being used by the designating entity
- ///
- private ushort _designatorCode;
-
- ///
- /// This field shall identify the designator output power in watts
- ///
- private float _designatorPower;
-
- ///
- /// This field shall identify the designator wavelength in units of microns
- ///
- private float _designatorWavelength;
-
- ///
- /// designtor spot wrt the designated entity
- ///
- private Vector3Float _designatorSpotWrtDesignated = new Vector3Float();
-
- ///
- /// designtor spot wrt the designated entity
- ///
- private Vector3Double _designatorSpotLocation = new Vector3Double();
-
- ///
- /// Dead reckoning algorithm
- ///
- private byte _deadReckoningAlgorithm;
-
- ///
- /// padding
- ///
- private ushort _padding1;
-
- ///
- /// padding
- ///
- private byte _padding2;
-
- ///
- /// linear accelleration of entity
- ///
- private Vector3Float _entityLinearAcceleration = new Vector3Float();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DesignatorPdu()
- {
- PduType = (byte)24;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(DesignatorPdu left, DesignatorPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(DesignatorPdu left, DesignatorPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._designatingEntityID.GetMarshalledSize(); // this._designatingEntityID
- marshalSize += 2; // this._codeName
- marshalSize += this._designatedEntityID.GetMarshalledSize(); // this._designatedEntityID
- marshalSize += 2; // this._designatorCode
- marshalSize += 4; // this._designatorPower
- marshalSize += 4; // this._designatorWavelength
- marshalSize += this._designatorSpotWrtDesignated.GetMarshalledSize(); // this._designatorSpotWrtDesignated
- marshalSize += this._designatorSpotLocation.GetMarshalledSize(); // this._designatorSpotLocation
- marshalSize += 1; // this._deadReckoningAlgorithm
- marshalSize += 2; // this._padding1
- marshalSize += 1; // this._padding2
- marshalSize += this._entityLinearAcceleration.GetMarshalledSize(); // this._entityLinearAcceleration
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of the entity designating
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "designatingEntityID")]
- public EntityID DesignatingEntityID
- {
- get
- {
- return this._designatingEntityID;
- }
-
- set
- {
- this._designatingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "codeName")]
- public ushort CodeName
- {
- get
- {
- return this._codeName;
- }
-
- set
- {
- this._codeName = value;
- }
- }
-
- ///
- /// Gets or sets the ID of the entity being designated
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "designatedEntityID")]
- public EntityID DesignatedEntityID
- {
- get
- {
- return this._designatedEntityID;
- }
-
- set
- {
- this._designatedEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall identify the designator code being used by the designating entity
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "designatorCode")]
- public ushort DesignatorCode
- {
- get
- {
- return this._designatorCode;
- }
-
- set
- {
- this._designatorCode = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall identify the designator output power in watts
- ///
- [XmlElement(Type = typeof(float), ElementName = "designatorPower")]
- public float DesignatorPower
- {
- get
- {
- return this._designatorPower;
- }
-
- set
- {
- this._designatorPower = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall identify the designator wavelength in units of microns
- ///
- [XmlElement(Type = typeof(float), ElementName = "designatorWavelength")]
- public float DesignatorWavelength
- {
- get
- {
- return this._designatorWavelength;
- }
-
- set
- {
- this._designatorWavelength = value;
- }
- }
-
- ///
- /// Gets or sets the designtor spot wrt the designated entity
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "designatorSpotWrtDesignated")]
- public Vector3Float DesignatorSpotWrtDesignated
- {
- get
- {
- return this._designatorSpotWrtDesignated;
- }
-
- set
- {
- this._designatorSpotWrtDesignated = value;
- }
- }
-
- ///
- /// Gets or sets the designtor spot wrt the designated entity
- ///
- [XmlElement(Type = typeof(Vector3Double), ElementName = "designatorSpotLocation")]
- public Vector3Double DesignatorSpotLocation
- {
- get
- {
- return this._designatorSpotLocation;
- }
-
- set
- {
- this._designatorSpotLocation = value;
- }
- }
-
- ///
- /// Gets or sets the Dead reckoning algorithm
- ///
- [XmlElement(Type = typeof(byte), ElementName = "deadReckoningAlgorithm")]
- public byte DeadReckoningAlgorithm
- {
- get
- {
- return this._deadReckoningAlgorithm;
- }
-
- set
- {
- this._deadReckoningAlgorithm = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "padding1")]
- public ushort Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(byte), ElementName = "padding2")]
- public byte Padding2
- {
- get
- {
- return this._padding2;
- }
-
- set
- {
- this._padding2 = value;
- }
- }
-
- ///
- /// Gets or sets the linear accelleration of entity
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "entityLinearAcceleration")]
- public Vector3Float EntityLinearAcceleration
- {
- get
- {
- return this._entityLinearAcceleration;
- }
-
- set
- {
- this._entityLinearAcceleration = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._designatingEntityID.Marshal(dos);
- dos.WriteUnsignedShort((ushort)this._codeName);
- this._designatedEntityID.Marshal(dos);
- dos.WriteUnsignedShort((ushort)this._designatorCode);
- dos.WriteFloat((float)this._designatorPower);
- dos.WriteFloat((float)this._designatorWavelength);
- this._designatorSpotWrtDesignated.Marshal(dos);
- this._designatorSpotLocation.Marshal(dos);
- dos.WriteByte((byte)this._deadReckoningAlgorithm);
- dos.WriteUnsignedShort((ushort)this._padding1);
- dos.WriteByte((byte)this._padding2);
- this._entityLinearAcceleration.Marshal(dos);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._designatingEntityID.Unmarshal(dis);
- this._codeName = dis.ReadUnsignedShort();
- this._designatedEntityID.Unmarshal(dis);
- this._designatorCode = dis.ReadUnsignedShort();
- this._designatorPower = dis.ReadFloat();
- this._designatorWavelength = dis.ReadFloat();
- this._designatorSpotWrtDesignated.Unmarshal(dis);
- this._designatorSpotLocation.Unmarshal(dis);
- this._deadReckoningAlgorithm = dis.ReadByte();
- this._padding1 = dis.ReadUnsignedShort();
- this._padding2 = dis.ReadByte();
- this._entityLinearAcceleration.Unmarshal(dis);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._designatingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._codeName.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._designatedEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._designatorCode.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._designatorPower.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._designatorWavelength.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._designatorSpotWrtDesignated.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._designatorSpotLocation.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._deadReckoningAlgorithm.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._entityLinearAcceleration.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as DesignatorPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(DesignatorPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._designatingEntityID.Equals(obj._designatingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._codeName != obj._codeName)
- {
- ivarsEqual = false;
- }
-
- if (!this._designatedEntityID.Equals(obj._designatedEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._designatorCode != obj._designatorCode)
- {
- ivarsEqual = false;
- }
-
- if (this._designatorPower != obj._designatorPower)
- {
- ivarsEqual = false;
- }
-
- if (this._designatorWavelength != obj._designatorWavelength)
- {
- ivarsEqual = false;
- }
-
- if (!this._designatorSpotWrtDesignated.Equals(obj._designatorSpotWrtDesignated))
- {
- ivarsEqual = false;
- }
-
- if (!this._designatorSpotLocation.Equals(obj._designatorSpotLocation))
- {
- ivarsEqual = false;
- }
-
- if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._padding2 != obj._padding2)
- {
- ivarsEqual = false;
- }
-
- if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration))
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._designatingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._codeName.GetHashCode();
- result = GenerateHash(result) ^ this._designatedEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._designatorCode.GetHashCode();
- result = GenerateHash(result) ^ this._designatorPower.GetHashCode();
- result = GenerateHash(result) ^ this._designatorWavelength.GetHashCode();
- result = GenerateHash(result) ^ this._designatorSpotWrtDesignated.GetHashCode();
- result = GenerateHash(result) ^ this._designatorSpotLocation.GetHashCode();
- result = GenerateHash(result) ^ this._deadReckoningAlgorithm.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._padding2.GetHashCode();
- result = GenerateHash(result) ^ this._entityLinearAcceleration.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.7.2. Handles designating operations
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(Vector3Float))]
+ [XmlInclude(typeof(Vector3Double))]
+ public partial class DesignatorPdu : DistributedEmissionsPdu, IEquatable
+ {
+ ///
+ /// ID of the entity designating
+ ///
+ private EntityID _designatingEntityID = new EntityID();
+
+ ///
+ /// This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
+ ///
+ private ushort _codeName;
+
+ ///
+ /// ID of the entity being designated
+ ///
+ private EntityID _designatedEntityID = new EntityID();
+
+ ///
+ /// This field shall identify the designator code being used by the designating entity
+ ///
+ private ushort _designatorCode;
+
+ ///
+ /// This field shall identify the designator output power in watts
+ ///
+ private float _designatorPower;
+
+ ///
+ /// This field shall identify the designator wavelength in units of microns
+ ///
+ private float _designatorWavelength;
+
+ ///
+ /// designtor spot wrt the designated entity
+ ///
+ private Vector3Float _designatorSpotWrtDesignated = new Vector3Float();
+
+ ///
+ /// designtor spot wrt the designated entity
+ ///
+ private Vector3Double _designatorSpotLocation = new Vector3Double();
+
+ ///
+ /// Dead reckoning algorithm
+ ///
+ private byte _deadReckoningAlgorithm;
+
+ ///
+ /// padding
+ ///
+ private ushort _padding1;
+
+ ///
+ /// padding
+ ///
+ private byte _padding2;
+
+ ///
+ /// linear accelleration of entity
+ ///
+ private Vector3Float _entityLinearAcceleration = new Vector3Float();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DesignatorPdu()
+ {
+ PduType = (byte)24;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(DesignatorPdu left, DesignatorPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(DesignatorPdu left, DesignatorPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._designatingEntityID.GetMarshalledSize(); // this._designatingEntityID
+ marshalSize += 2; // this._codeName
+ marshalSize += this._designatedEntityID.GetMarshalledSize(); // this._designatedEntityID
+ marshalSize += 2; // this._designatorCode
+ marshalSize += 4; // this._designatorPower
+ marshalSize += 4; // this._designatorWavelength
+ marshalSize += this._designatorSpotWrtDesignated.GetMarshalledSize(); // this._designatorSpotWrtDesignated
+ marshalSize += this._designatorSpotLocation.GetMarshalledSize(); // this._designatorSpotLocation
+ marshalSize += 1; // this._deadReckoningAlgorithm
+ marshalSize += 2; // this._padding1
+ marshalSize += 1; // this._padding2
+ marshalSize += this._entityLinearAcceleration.GetMarshalledSize(); // this._entityLinearAcceleration
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of the entity designating
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "designatingEntityID")]
+ public EntityID DesignatingEntityID
+ {
+ get
+ {
+ return this._designatingEntityID;
+ }
+
+ set
+ {
+ this._designatingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "codeName")]
+ public ushort CodeName
+ {
+ get
+ {
+ return this._codeName;
+ }
+
+ set
+ {
+ this._codeName = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of the entity being designated
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "designatedEntityID")]
+ public EntityID DesignatedEntityID
+ {
+ get
+ {
+ return this._designatedEntityID;
+ }
+
+ set
+ {
+ this._designatedEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall identify the designator code being used by the designating entity
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "designatorCode")]
+ public ushort DesignatorCode
+ {
+ get
+ {
+ return this._designatorCode;
+ }
+
+ set
+ {
+ this._designatorCode = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall identify the designator output power in watts
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "designatorPower")]
+ public float DesignatorPower
+ {
+ get
+ {
+ return this._designatorPower;
+ }
+
+ set
+ {
+ this._designatorPower = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall identify the designator wavelength in units of microns
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "designatorWavelength")]
+ public float DesignatorWavelength
+ {
+ get
+ {
+ return this._designatorWavelength;
+ }
+
+ set
+ {
+ this._designatorWavelength = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the designtor spot wrt the designated entity
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "designatorSpotWrtDesignated")]
+ public Vector3Float DesignatorSpotWrtDesignated
+ {
+ get
+ {
+ return this._designatorSpotWrtDesignated;
+ }
+
+ set
+ {
+ this._designatorSpotWrtDesignated = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the designtor spot wrt the designated entity
+ ///
+ [XmlElement(Type = typeof(Vector3Double), ElementName = "designatorSpotLocation")]
+ public Vector3Double DesignatorSpotLocation
+ {
+ get
+ {
+ return this._designatorSpotLocation;
+ }
+
+ set
+ {
+ this._designatorSpotLocation = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Dead reckoning algorithm
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "deadReckoningAlgorithm")]
+ public byte DeadReckoningAlgorithm
+ {
+ get
+ {
+ return this._deadReckoningAlgorithm;
+ }
+
+ set
+ {
+ this._deadReckoningAlgorithm = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "padding1")]
+ public ushort Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "padding2")]
+ public byte Padding2
+ {
+ get
+ {
+ return this._padding2;
+ }
+
+ set
+ {
+ this._padding2 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the linear accelleration of entity
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "entityLinearAcceleration")]
+ public Vector3Float EntityLinearAcceleration
+ {
+ get
+ {
+ return this._entityLinearAcceleration;
+ }
+
+ set
+ {
+ this._entityLinearAcceleration = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._designatingEntityID.Marshal(dos);
+ dos.WriteUnsignedShort((ushort)this._codeName);
+ this._designatedEntityID.Marshal(dos);
+ dos.WriteUnsignedShort((ushort)this._designatorCode);
+ dos.WriteFloat((float)this._designatorPower);
+ dos.WriteFloat((float)this._designatorWavelength);
+ this._designatorSpotWrtDesignated.Marshal(dos);
+ this._designatorSpotLocation.Marshal(dos);
+ dos.WriteByte((byte)this._deadReckoningAlgorithm);
+ dos.WriteUnsignedShort((ushort)this._padding1);
+ dos.WriteByte((byte)this._padding2);
+ this._entityLinearAcceleration.Marshal(dos);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._designatingEntityID.Unmarshal(dis);
+ this._codeName = dis.ReadUnsignedShort();
+ this._designatedEntityID.Unmarshal(dis);
+ this._designatorCode = dis.ReadUnsignedShort();
+ this._designatorPower = dis.ReadFloat();
+ this._designatorWavelength = dis.ReadFloat();
+ this._designatorSpotWrtDesignated.Unmarshal(dis);
+ this._designatorSpotLocation.Unmarshal(dis);
+ this._deadReckoningAlgorithm = dis.ReadByte();
+ this._padding1 = dis.ReadUnsignedShort();
+ this._padding2 = dis.ReadByte();
+ this._entityLinearAcceleration.Unmarshal(dis);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._designatingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._codeName.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._designatedEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._designatorCode.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._designatorPower.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._designatorWavelength.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._designatorSpotWrtDesignated.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._designatorSpotLocation.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._deadReckoningAlgorithm.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._entityLinearAcceleration.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as DesignatorPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(DesignatorPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._designatingEntityID.Equals(obj._designatingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._codeName != obj._codeName)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._designatedEntityID.Equals(obj._designatedEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._designatorCode != obj._designatorCode)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._designatorPower != obj._designatorPower)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._designatorWavelength != obj._designatorWavelength)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._designatorSpotWrtDesignated.Equals(obj._designatorSpotWrtDesignated))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._designatorSpotLocation.Equals(obj._designatorSpotLocation))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding2 != obj._padding2)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration))
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._designatingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._codeName.GetHashCode();
+ result = GenerateHash(result) ^ this._designatedEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._designatorCode.GetHashCode();
+ result = GenerateHash(result) ^ this._designatorPower.GetHashCode();
+ result = GenerateHash(result) ^ this._designatorWavelength.GetHashCode();
+ result = GenerateHash(result) ^ this._designatorSpotWrtDesignated.GetHashCode();
+ result = GenerateHash(result) ^ this._designatorSpotLocation.GetHashCode();
+ result = GenerateHash(result) ^ this._deadReckoningAlgorithm.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._padding2.GetHashCode();
+ result = GenerateHash(result) ^ this._entityLinearAcceleration.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/DetonationPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/DetonationPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/DetonationPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/DetonationPdu.cs
index b427d28..6cd5d87 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/DetonationPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/DetonationPdu.cs
@@ -1,614 +1,614 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.4.2. Information about Stuff Exploding
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(EventID))]
- [XmlInclude(typeof(Vector3Float))]
- [XmlInclude(typeof(Vector3Double))]
- [XmlInclude(typeof(BurstDescriptor))]
- [XmlInclude(typeof(ArticulationParameter))]
- public partial class DetonationPdu : Warfare, IEquatable
- {
- ///
- /// ID of muntion that was fired
- ///
- private EntityID _munitionID = new EntityID();
-
- ///
- /// ID firing event
- ///
- private EventID _eventID = new EventID();
-
- ///
- /// ID firing event
- ///
- private Vector3Float _velocity = new Vector3Float();
-
- ///
- /// where the detonation is, in world coordinates
- ///
- private Vector3Double _locationInWorldCoordinates = new Vector3Double();
-
- ///
- /// Describes munition used
- ///
- private BurstDescriptor _burstDescriptor = new BurstDescriptor();
-
- ///
- /// result of the explosion
- ///
- private byte _detonationResult;
-
- ///
- /// How many articulation parameters we have
- ///
- private byte _numberOfArticulationParameters;
-
- ///
- /// padding
- ///
- private short _pad;
-
- private List _articulationParameters = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DetonationPdu()
- {
- PduType = (byte)3;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(DetonationPdu left, DetonationPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(DetonationPdu left, DetonationPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._munitionID.GetMarshalledSize(); // this._munitionID
- marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
- marshalSize += this._velocity.GetMarshalledSize(); // this._velocity
- marshalSize += this._locationInWorldCoordinates.GetMarshalledSize(); // this._locationInWorldCoordinates
- marshalSize += this._burstDescriptor.GetMarshalledSize(); // this._burstDescriptor
- marshalSize += 1; // this._detonationResult
- marshalSize += 1; // this._numberOfArticulationParameters
- marshalSize += 2; // this._pad
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- ArticulationParameter listElement = (ArticulationParameter)this._articulationParameters[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of muntion that was fired
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "munitionID")]
- public EntityID MunitionID
- {
- get
- {
- return this._munitionID;
- }
-
- set
- {
- this._munitionID = value;
- }
- }
-
- ///
- /// Gets or sets the ID firing event
- ///
- [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
- public EventID EventID
- {
- get
- {
- return this._eventID;
- }
-
- set
- {
- this._eventID = value;
- }
- }
-
- ///
- /// Gets or sets the ID firing event
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "velocity")]
- public Vector3Float Velocity
- {
- get
- {
- return this._velocity;
- }
-
- set
- {
- this._velocity = value;
- }
- }
-
- ///
- /// Gets or sets the where the detonation is, in world coordinates
- ///
- [XmlElement(Type = typeof(Vector3Double), ElementName = "locationInWorldCoordinates")]
- public Vector3Double LocationInWorldCoordinates
- {
- get
- {
- return this._locationInWorldCoordinates;
- }
-
- set
- {
- this._locationInWorldCoordinates = value;
- }
- }
-
- ///
- /// Gets or sets the Describes munition used
- ///
- [XmlElement(Type = typeof(BurstDescriptor), ElementName = "burstDescriptor")]
- public BurstDescriptor BurstDescriptor
- {
- get
- {
- return this._burstDescriptor;
- }
-
- set
- {
- this._burstDescriptor = value;
- }
- }
-
- ///
- /// Gets or sets the result of the explosion
- ///
- [XmlElement(Type = typeof(byte), ElementName = "detonationResult")]
- public byte DetonationResult
- {
- get
- {
- return this._detonationResult;
- }
-
- set
- {
- this._detonationResult = value;
- }
- }
-
- ///
- /// Gets or sets the How many articulation parameters we have
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getnumberOfArticulationParameters method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "numberOfArticulationParameters")]
- public byte NumberOfArticulationParameters
- {
- get
- {
- return this._numberOfArticulationParameters;
- }
-
- set
- {
- this._numberOfArticulationParameters = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "pad")]
- public short Pad
- {
- get
- {
- return this._pad;
- }
-
- set
- {
- this._pad = value;
- }
- }
-
- ///
- /// Gets the articulationParameters
- ///
- [XmlElement(ElementName = "articulationParametersList", Type = typeof(List))]
- public List ArticulationParameters
- {
- get
- {
- return this._articulationParameters;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._munitionID.Marshal(dos);
- this._eventID.Marshal(dos);
- this._velocity.Marshal(dos);
- this._locationInWorldCoordinates.Marshal(dos);
- this._burstDescriptor.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._detonationResult);
- dos.WriteUnsignedByte((byte)this._articulationParameters.Count);
- dos.WriteShort((short)this._pad);
-
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
- aArticulationParameter.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._munitionID.Unmarshal(dis);
- this._eventID.Unmarshal(dis);
- this._velocity.Unmarshal(dis);
- this._locationInWorldCoordinates.Unmarshal(dis);
- this._burstDescriptor.Unmarshal(dis);
- this._detonationResult = dis.ReadUnsignedByte();
- this._numberOfArticulationParameters = dis.ReadUnsignedByte();
- this._pad = dis.ReadShort();
-
- for (int idx = 0; idx < this.NumberOfArticulationParameters; idx++)
- {
- ArticulationParameter anX = new ArticulationParameter();
- anX.Unmarshal(dis);
- this._articulationParameters.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._munitionID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._eventID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._velocity.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._locationInWorldCoordinates.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._burstDescriptor.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._detonationResult.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._articulationParameters.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._pad.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- sb.AppendLine("");
- ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
- aArticulationParameter.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as DetonationPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(DetonationPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._munitionID.Equals(obj._munitionID))
- {
- ivarsEqual = false;
- }
-
- if (!this._eventID.Equals(obj._eventID))
- {
- ivarsEqual = false;
- }
-
- if (!this._velocity.Equals(obj._velocity))
- {
- ivarsEqual = false;
- }
-
- if (!this._locationInWorldCoordinates.Equals(obj._locationInWorldCoordinates))
- {
- ivarsEqual = false;
- }
-
- if (!this._burstDescriptor.Equals(obj._burstDescriptor))
- {
- ivarsEqual = false;
- }
-
- if (this._detonationResult != obj._detonationResult)
- {
- ivarsEqual = false;
- }
-
- if (this._numberOfArticulationParameters != obj._numberOfArticulationParameters)
- {
- ivarsEqual = false;
- }
-
- if (this._pad != obj._pad)
- {
- ivarsEqual = false;
- }
-
- if (this._articulationParameters.Count != obj._articulationParameters.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- if (!this._articulationParameters[idx].Equals(obj._articulationParameters[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._munitionID.GetHashCode();
- result = GenerateHash(result) ^ this._eventID.GetHashCode();
- result = GenerateHash(result) ^ this._velocity.GetHashCode();
- result = GenerateHash(result) ^ this._locationInWorldCoordinates.GetHashCode();
- result = GenerateHash(result) ^ this._burstDescriptor.GetHashCode();
- result = GenerateHash(result) ^ this._detonationResult.GetHashCode();
- result = GenerateHash(result) ^ this._numberOfArticulationParameters.GetHashCode();
- result = GenerateHash(result) ^ this._pad.GetHashCode();
-
- if (this._articulationParameters.Count > 0)
- {
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- result = GenerateHash(result) ^ this._articulationParameters[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.4.2. Information about Stuff Exploding
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(EventID))]
+ [XmlInclude(typeof(Vector3Float))]
+ [XmlInclude(typeof(Vector3Double))]
+ [XmlInclude(typeof(BurstDescriptor))]
+ [XmlInclude(typeof(ArticulationParameter))]
+ public partial class DetonationPdu : Warfare, IEquatable
+ {
+ ///
+ /// ID of muntion that was fired
+ ///
+ private EntityID _munitionID = new EntityID();
+
+ ///
+ /// ID firing event
+ ///
+ private EventID _eventID = new EventID();
+
+ ///
+ /// ID firing event
+ ///
+ private Vector3Float _velocity = new Vector3Float();
+
+ ///
+ /// where the detonation is, in world coordinates
+ ///
+ private Vector3Double _locationInWorldCoordinates = new Vector3Double();
+
+ ///
+ /// Describes munition used
+ ///
+ private BurstDescriptor _burstDescriptor = new BurstDescriptor();
+
+ ///
+ /// result of the explosion
+ ///
+ private byte _detonationResult;
+
+ ///
+ /// How many articulation parameters we have
+ ///
+ private byte _numberOfArticulationParameters;
+
+ ///
+ /// padding
+ ///
+ private short _pad;
+
+ private List _articulationParameters = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DetonationPdu()
+ {
+ PduType = (byte)3;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(DetonationPdu left, DetonationPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(DetonationPdu left, DetonationPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._munitionID.GetMarshalledSize(); // this._munitionID
+ marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
+ marshalSize += this._velocity.GetMarshalledSize(); // this._velocity
+ marshalSize += this._locationInWorldCoordinates.GetMarshalledSize(); // this._locationInWorldCoordinates
+ marshalSize += this._burstDescriptor.GetMarshalledSize(); // this._burstDescriptor
+ marshalSize += 1; // this._detonationResult
+ marshalSize += 1; // this._numberOfArticulationParameters
+ marshalSize += 2; // this._pad
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ ArticulationParameter listElement = (ArticulationParameter)this._articulationParameters[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of muntion that was fired
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "munitionID")]
+ public EntityID MunitionID
+ {
+ get
+ {
+ return this._munitionID;
+ }
+
+ set
+ {
+ this._munitionID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID firing event
+ ///
+ [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
+ public EventID EventID
+ {
+ get
+ {
+ return this._eventID;
+ }
+
+ set
+ {
+ this._eventID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID firing event
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "velocity")]
+ public Vector3Float Velocity
+ {
+ get
+ {
+ return this._velocity;
+ }
+
+ set
+ {
+ this._velocity = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the where the detonation is, in world coordinates
+ ///
+ [XmlElement(Type = typeof(Vector3Double), ElementName = "locationInWorldCoordinates")]
+ public Vector3Double LocationInWorldCoordinates
+ {
+ get
+ {
+ return this._locationInWorldCoordinates;
+ }
+
+ set
+ {
+ this._locationInWorldCoordinates = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Describes munition used
+ ///
+ [XmlElement(Type = typeof(BurstDescriptor), ElementName = "burstDescriptor")]
+ public BurstDescriptor BurstDescriptor
+ {
+ get
+ {
+ return this._burstDescriptor;
+ }
+
+ set
+ {
+ this._burstDescriptor = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the result of the explosion
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "detonationResult")]
+ public byte DetonationResult
+ {
+ get
+ {
+ return this._detonationResult;
+ }
+
+ set
+ {
+ this._detonationResult = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the How many articulation parameters we have
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getnumberOfArticulationParameters method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "numberOfArticulationParameters")]
+ public byte NumberOfArticulationParameters
+ {
+ get
+ {
+ return this._numberOfArticulationParameters;
+ }
+
+ set
+ {
+ this._numberOfArticulationParameters = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "pad")]
+ public short Pad
+ {
+ get
+ {
+ return this._pad;
+ }
+
+ set
+ {
+ this._pad = value;
+ }
+ }
+
+ ///
+ /// Gets the articulationParameters
+ ///
+ [XmlElement(ElementName = "articulationParametersList", Type = typeof(List))]
+ public List ArticulationParameters
+ {
+ get
+ {
+ return this._articulationParameters;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._munitionID.Marshal(dos);
+ this._eventID.Marshal(dos);
+ this._velocity.Marshal(dos);
+ this._locationInWorldCoordinates.Marshal(dos);
+ this._burstDescriptor.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._detonationResult);
+ dos.WriteUnsignedByte((byte)this._articulationParameters.Count);
+ dos.WriteShort((short)this._pad);
+
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
+ aArticulationParameter.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._munitionID.Unmarshal(dis);
+ this._eventID.Unmarshal(dis);
+ this._velocity.Unmarshal(dis);
+ this._locationInWorldCoordinates.Unmarshal(dis);
+ this._burstDescriptor.Unmarshal(dis);
+ this._detonationResult = dis.ReadUnsignedByte();
+ this._numberOfArticulationParameters = dis.ReadUnsignedByte();
+ this._pad = dis.ReadShort();
+
+ for (int idx = 0; idx < this.NumberOfArticulationParameters; idx++)
+ {
+ ArticulationParameter anX = new ArticulationParameter();
+ anX.Unmarshal(dis);
+ this._articulationParameters.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._munitionID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._eventID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._velocity.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._locationInWorldCoordinates.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._burstDescriptor.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._detonationResult.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._articulationParameters.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._pad.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ sb.AppendLine("");
+ ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
+ aArticulationParameter.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as DetonationPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(DetonationPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._munitionID.Equals(obj._munitionID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._eventID.Equals(obj._eventID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._velocity.Equals(obj._velocity))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._locationInWorldCoordinates.Equals(obj._locationInWorldCoordinates))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._burstDescriptor.Equals(obj._burstDescriptor))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._detonationResult != obj._detonationResult)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._numberOfArticulationParameters != obj._numberOfArticulationParameters)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._pad != obj._pad)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._articulationParameters.Count != obj._articulationParameters.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ if (!this._articulationParameters[idx].Equals(obj._articulationParameters[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._munitionID.GetHashCode();
+ result = GenerateHash(result) ^ this._eventID.GetHashCode();
+ result = GenerateHash(result) ^ this._velocity.GetHashCode();
+ result = GenerateHash(result) ^ this._locationInWorldCoordinates.GetHashCode();
+ result = GenerateHash(result) ^ this._burstDescriptor.GetHashCode();
+ result = GenerateHash(result) ^ this._detonationResult.GetHashCode();
+ result = GenerateHash(result) ^ this._numberOfArticulationParameters.GetHashCode();
+ result = GenerateHash(result) ^ this._pad.GetHashCode();
+
+ if (this._articulationParameters.Count > 0)
+ {
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._articulationParameters[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/DistributedEmissionsPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/DistributedEmissionsPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/DistributedEmissionsPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/DistributedEmissionsPdu.cs
index 6e20847..6bf9644 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/DistributedEmissionsPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/DistributedEmissionsPdu.cs
@@ -1,271 +1,271 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.7. Electronic Emmisions
- ///
- [Serializable]
- [XmlRoot]
- public partial class DistributedEmissionsPdu : Pdu, IEquatable
- {
- ///
- /// Initializes a new instance of the class.
- ///
- public DistributedEmissionsPdu()
- {
- ProtocolFamily = (byte)6;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(DistributedEmissionsPdu left, DistributedEmissionsPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(DistributedEmissionsPdu left, DistributedEmissionsPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- return marshalSize;
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public virtual void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as DistributedEmissionsPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(DistributedEmissionsPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.7. Electronic Emmisions
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class DistributedEmissionsPdu : Pdu, IEquatable
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DistributedEmissionsPdu()
+ {
+ ProtocolFamily = (byte)6;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(DistributedEmissionsPdu left, DistributedEmissionsPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(DistributedEmissionsPdu left, DistributedEmissionsPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ return marshalSize;
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public virtual void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as DistributedEmissionsPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(DistributedEmissionsPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EightByteChunk.cs b/Libs/CsharpDis6/Dis1995/Generated/EightByteChunk.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EightByteChunk.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EightByteChunk.cs
index 73f015d..74b03bc 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EightByteChunk.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EightByteChunk.cs
@@ -1,324 +1,324 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// 64 bit piece of data
- ///
- [Serializable]
- [XmlRoot]
- public partial class EightByteChunk
- {
- ///
- /// Eight bytes of arbitrary data
- ///
- private byte[] _otherParameters = new byte[8];
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EightByteChunk()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EightByteChunk left, EightByteChunk right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EightByteChunk left, EightByteChunk right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 8 * 1; // _otherParameters
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Eight bytes of arbitrary data
- ///
- [XmlArray(ElementName = "otherParameters")]
- public byte[] OtherParameters
- {
- get
- {
- return this._otherParameters;
- }
-
- set
- {
- this._otherParameters = value;
- }
-}
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- for (int idx = 0; idx < this._otherParameters.Length; idx++)
- {
- dos.WriteByte(this._otherParameters[idx]);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- for (int idx = 0; idx < this._otherParameters.Length; idx++)
- {
- this._otherParameters[idx] = dis.ReadByte();
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- for (int idx = 0; idx < this._otherParameters.Length; idx++)
- {
- sb.AppendLine("" + this._otherParameters[idx] + "");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EightByteChunk;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EightByteChunk obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (obj._otherParameters.Length != 8)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < 8; idx++)
- {
- if (this._otherParameters[idx] != obj._otherParameters[idx])
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- for (int idx = 0; idx < 8; idx++)
- {
- result = GenerateHash(result) ^ this._otherParameters[idx].GetHashCode();
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// 64 bit piece of data
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class EightByteChunk
+ {
+ ///
+ /// Eight bytes of arbitrary data
+ ///
+ private byte[] _otherParameters = new byte[8];
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EightByteChunk()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EightByteChunk left, EightByteChunk right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EightByteChunk left, EightByteChunk right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 8 * 1; // _otherParameters
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Eight bytes of arbitrary data
+ ///
+ [XmlArray(ElementName = "otherParameters")]
+ public byte[] OtherParameters
+ {
+ get
+ {
+ return this._otherParameters;
+ }
+
+ set
+ {
+ this._otherParameters = value;
+ }
+}
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ for (int idx = 0; idx < this._otherParameters.Length; idx++)
+ {
+ dos.WriteByte(this._otherParameters[idx]);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ for (int idx = 0; idx < this._otherParameters.Length; idx++)
+ {
+ this._otherParameters[idx] = dis.ReadByte();
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ for (int idx = 0; idx < this._otherParameters.Length; idx++)
+ {
+ sb.AppendLine("" + this._otherParameters[idx] + "");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EightByteChunk;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EightByteChunk obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (obj._otherParameters.Length != 8)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < 8; idx++)
+ {
+ if (this._otherParameters[idx] != obj._otherParameters[idx])
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ for (int idx = 0; idx < 8; idx++)
+ {
+ result = GenerateHash(result) ^ this._otherParameters[idx].GetHashCode();
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ElectronicEmmisionsPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ElectronicEmmisionsPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ElectronicEmmisionsPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ElectronicEmmisionsPdu.cs
index f9fdf10..8a9b2a6 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ElectronicEmmisionsPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ElectronicEmmisionsPdu.cs
@@ -1,735 +1,735 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.7.1. Information about active electronic warfare (EW) emissions and active EW countermeasures shall be com- municated using an Electromagnetic Emission PDU.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(EventID))]
- [XmlInclude(typeof(EmitterSystem))]
- [XmlInclude(typeof(Vector3Float))]
- [XmlInclude(typeof(FundamentalParameterData))]
- public partial class ElectronicEmmisionsPdu : DistributedEmissionsPdu, IEquatable
- {
- ///
- /// ID of the entity emitting
- ///
- private EntityID _emittingEntityID = new EntityID();
-
- ///
- /// ID of event
- ///
- private EventID _eventID = new EventID();
-
- ///
- /// This field shall be used to indicate if the data in the PDU represents a state update or just data that has changed since issuance of the last Electromagnetic Emission PDU [rela- tive to the identified entity and emission system(s)].
- ///
- private byte _stateUpdateIndicator;
-
- ///
- /// This field shall specify the number of emission systems being described in the current PDU.
- ///
- private byte _numberOfSystems;
-
- ///
- /// padding.
- ///
- private ushort _emissionsPadding;
-
- ///
- /// This field shall specify the length of this emitter system’s data (including beam data and its track/jam information) in 32-bit words. The length shall include the System Data Length field.
- ///
- private byte _systemDataLength;
-
- ///
- /// This field shall specify the number of beams being described in the current PDU for the system being described.
- ///
- private byte _numberOfBeams;
-
- ///
- /// padding.
- ///
- private ushort _emissionsPadding2;
-
- ///
- /// This field shall specify information about a particular emitter system
- ///
- private EmitterSystem _emitterSystem = new EmitterSystem();
-
- ///
- /// Location with respect to the entity
- ///
- private Vector3Float _location = new Vector3Float();
-
- ///
- /// This field shall specify the length of this beam’s data (including track/ jam information) in 32-bit words. The length shall include the Beam Data Length field
- ///
- private byte _beamDataLength;
-
- ///
- /// This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
- ///
- private byte _beamIdNumber;
-
- ///
- /// This field shall specify a Beam Parameter Index number that shall be used by receiving entities in conjunction with the Emitter Name field to provide a pointer to the stored database parameters required to regenerate the beam.
- ///
- private ushort _beamParameterIndex;
-
- ///
- /// Fundamental parameter data such as frequency range, beam sweep, etc.
- ///
- private FundamentalParameterData _fundamentalParameterData = new FundamentalParameterData();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ElectronicEmmisionsPdu()
- {
- PduType = (byte)23;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ElectronicEmmisionsPdu left, ElectronicEmmisionsPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ElectronicEmmisionsPdu left, ElectronicEmmisionsPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._emittingEntityID.GetMarshalledSize(); // this._emittingEntityID
- marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
- marshalSize += 1; // this._stateUpdateIndicator
- marshalSize += 1; // this._numberOfSystems
- marshalSize += 2; // this._emissionsPadding
- marshalSize += 1; // this._systemDataLength
- marshalSize += 1; // this._numberOfBeams
- marshalSize += 2; // this._emissionsPadding2
- marshalSize += this._emitterSystem.GetMarshalledSize(); // this._emitterSystem
- marshalSize += this._location.GetMarshalledSize(); // this._location
- marshalSize += 1; // this._beamDataLength
- marshalSize += 1; // this._beamIdNumber
- marshalSize += 2; // this._beamParameterIndex
- marshalSize += this._fundamentalParameterData.GetMarshalledSize(); // this._fundamentalParameterData
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of the entity emitting
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "emittingEntityID")]
- public EntityID EmittingEntityID
- {
- get
- {
- return this._emittingEntityID;
- }
-
- set
- {
- this._emittingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the ID of event
- ///
- [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
- public EventID EventID
- {
- get
- {
- return this._eventID;
- }
-
- set
- {
- this._eventID = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall be used to indicate if the data in the PDU represents a state update or just data that has changed since issuance of the last Electromagnetic Emission PDU [rela- tive to the identified entity and emission system(s)].
- ///
- [XmlElement(Type = typeof(byte), ElementName = "stateUpdateIndicator")]
- public byte StateUpdateIndicator
- {
- get
- {
- return this._stateUpdateIndicator;
- }
-
- set
- {
- this._stateUpdateIndicator = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify the number of emission systems being described in the current PDU.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "numberOfSystems")]
- public byte NumberOfSystems
- {
- get
- {
- return this._numberOfSystems;
- }
-
- set
- {
- this._numberOfSystems = value;
- }
- }
-
- ///
- /// Gets or sets the padding.
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "emissionsPadding")]
- public ushort EmissionsPadding
- {
- get
- {
- return this._emissionsPadding;
- }
-
- set
- {
- this._emissionsPadding = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify the length of this emitter system’s data (including beam data and its track/jam information) in 32-bit words. The length shall include the System Data Length field.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "systemDataLength")]
- public byte SystemDataLength
- {
- get
- {
- return this._systemDataLength;
- }
-
- set
- {
- this._systemDataLength = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify the number of beams being described in the current PDU for the system being described.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "numberOfBeams")]
- public byte NumberOfBeams
- {
- get
- {
- return this._numberOfBeams;
- }
-
- set
- {
- this._numberOfBeams = value;
- }
- }
-
- ///
- /// Gets or sets the padding.
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "emissionsPadding2")]
- public ushort EmissionsPadding2
- {
- get
- {
- return this._emissionsPadding2;
- }
-
- set
- {
- this._emissionsPadding2 = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify information about a particular emitter system
- ///
- [XmlElement(Type = typeof(EmitterSystem), ElementName = "emitterSystem")]
- public EmitterSystem EmitterSystem
- {
- get
- {
- return this._emitterSystem;
- }
-
- set
- {
- this._emitterSystem = value;
- }
- }
-
- ///
- /// Gets or sets the Location with respect to the entity
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "location")]
- public Vector3Float Location
- {
- get
- {
- return this._location;
- }
-
- set
- {
- this._location = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify the length of this beam’s data (including track/ jam information) in 32-bit words. The length shall include the Beam Data Length field
- ///
- [XmlElement(Type = typeof(byte), ElementName = "beamDataLength")]
- public byte BeamDataLength
- {
- get
- {
- return this._beamDataLength;
- }
-
- set
- {
- this._beamDataLength = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "beamIdNumber")]
- public byte BeamIdNumber
- {
- get
- {
- return this._beamIdNumber;
- }
-
- set
- {
- this._beamIdNumber = value;
- }
- }
-
- ///
- /// Gets or sets the This field shall specify a Beam Parameter Index number that shall be used by receiving entities in conjunction with the Emitter Name field to provide a pointer to the stored database parameters required to regenerate the beam.
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "beamParameterIndex")]
- public ushort BeamParameterIndex
- {
- get
- {
- return this._beamParameterIndex;
- }
-
- set
- {
- this._beamParameterIndex = value;
- }
- }
-
- ///
- /// Gets or sets the Fundamental parameter data such as frequency range, beam sweep, etc.
- ///
- [XmlElement(Type = typeof(FundamentalParameterData), ElementName = "fundamentalParameterData")]
- public FundamentalParameterData FundamentalParameterData
- {
- get
- {
- return this._fundamentalParameterData;
- }
-
- set
- {
- this._fundamentalParameterData = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._emittingEntityID.Marshal(dos);
- this._eventID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._stateUpdateIndicator);
- dos.WriteUnsignedByte((byte)this._numberOfSystems);
- dos.WriteUnsignedShort((ushort)this._emissionsPadding);
- dos.WriteUnsignedByte((byte)this._systemDataLength);
- dos.WriteUnsignedByte((byte)this._numberOfBeams);
- dos.WriteUnsignedShort((ushort)this._emissionsPadding2);
- this._emitterSystem.Marshal(dos);
- this._location.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._beamDataLength);
- dos.WriteUnsignedByte((byte)this._beamIdNumber);
- dos.WriteUnsignedShort((ushort)this._beamParameterIndex);
- this._fundamentalParameterData.Marshal(dos);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._emittingEntityID.Unmarshal(dis);
- this._eventID.Unmarshal(dis);
- this._stateUpdateIndicator = dis.ReadUnsignedByte();
- this._numberOfSystems = dis.ReadUnsignedByte();
- this._emissionsPadding = dis.ReadUnsignedShort();
- this._systemDataLength = dis.ReadUnsignedByte();
- this._numberOfBeams = dis.ReadUnsignedByte();
- this._emissionsPadding2 = dis.ReadUnsignedShort();
- this._emitterSystem.Unmarshal(dis);
- this._location.Unmarshal(dis);
- this._beamDataLength = dis.ReadUnsignedByte();
- this._beamIdNumber = dis.ReadUnsignedByte();
- this._beamParameterIndex = dis.ReadUnsignedShort();
- this._fundamentalParameterData.Unmarshal(dis);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._emittingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._eventID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._stateUpdateIndicator.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._numberOfSystems.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._emissionsPadding.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._systemDataLength.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._numberOfBeams.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._emissionsPadding2.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._emitterSystem.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._location.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._beamDataLength.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamIdNumber.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamParameterIndex.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._fundamentalParameterData.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ElectronicEmmisionsPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ElectronicEmmisionsPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._emittingEntityID.Equals(obj._emittingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._eventID.Equals(obj._eventID))
- {
- ivarsEqual = false;
- }
-
- if (this._stateUpdateIndicator != obj._stateUpdateIndicator)
- {
- ivarsEqual = false;
- }
-
- if (this._numberOfSystems != obj._numberOfSystems)
- {
- ivarsEqual = false;
- }
-
- if (this._emissionsPadding != obj._emissionsPadding)
- {
- ivarsEqual = false;
- }
-
- if (this._systemDataLength != obj._systemDataLength)
- {
- ivarsEqual = false;
- }
-
- if (this._numberOfBeams != obj._numberOfBeams)
- {
- ivarsEqual = false;
- }
-
- if (this._emissionsPadding2 != obj._emissionsPadding2)
- {
- ivarsEqual = false;
- }
-
- if (!this._emitterSystem.Equals(obj._emitterSystem))
- {
- ivarsEqual = false;
- }
-
- if (!this._location.Equals(obj._location))
- {
- ivarsEqual = false;
- }
-
- if (this._beamDataLength != obj._beamDataLength)
- {
- ivarsEqual = false;
- }
-
- if (this._beamIdNumber != obj._beamIdNumber)
- {
- ivarsEqual = false;
- }
-
- if (this._beamParameterIndex != obj._beamParameterIndex)
- {
- ivarsEqual = false;
- }
-
- if (!this._fundamentalParameterData.Equals(obj._fundamentalParameterData))
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._emittingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._eventID.GetHashCode();
- result = GenerateHash(result) ^ this._stateUpdateIndicator.GetHashCode();
- result = GenerateHash(result) ^ this._numberOfSystems.GetHashCode();
- result = GenerateHash(result) ^ this._emissionsPadding.GetHashCode();
- result = GenerateHash(result) ^ this._systemDataLength.GetHashCode();
- result = GenerateHash(result) ^ this._numberOfBeams.GetHashCode();
- result = GenerateHash(result) ^ this._emissionsPadding2.GetHashCode();
- result = GenerateHash(result) ^ this._emitterSystem.GetHashCode();
- result = GenerateHash(result) ^ this._location.GetHashCode();
- result = GenerateHash(result) ^ this._beamDataLength.GetHashCode();
- result = GenerateHash(result) ^ this._beamIdNumber.GetHashCode();
- result = GenerateHash(result) ^ this._beamParameterIndex.GetHashCode();
- result = GenerateHash(result) ^ this._fundamentalParameterData.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.7.1. Information about active electronic warfare (EW) emissions and active EW countermeasures shall be com- municated using an Electromagnetic Emission PDU.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(EventID))]
+ [XmlInclude(typeof(EmitterSystem))]
+ [XmlInclude(typeof(Vector3Float))]
+ [XmlInclude(typeof(FundamentalParameterData))]
+ public partial class ElectronicEmmisionsPdu : DistributedEmissionsPdu, IEquatable
+ {
+ ///
+ /// ID of the entity emitting
+ ///
+ private EntityID _emittingEntityID = new EntityID();
+
+ ///
+ /// ID of event
+ ///
+ private EventID _eventID = new EventID();
+
+ ///
+ /// This field shall be used to indicate if the data in the PDU represents a state update or just data that has changed since issuance of the last Electromagnetic Emission PDU [rela- tive to the identified entity and emission system(s)].
+ ///
+ private byte _stateUpdateIndicator;
+
+ ///
+ /// This field shall specify the number of emission systems being described in the current PDU.
+ ///
+ private byte _numberOfSystems;
+
+ ///
+ /// padding.
+ ///
+ private ushort _emissionsPadding;
+
+ ///
+ /// This field shall specify the length of this emitter system’s data (including beam data and its track/jam information) in 32-bit words. The length shall include the System Data Length field.
+ ///
+ private byte _systemDataLength;
+
+ ///
+ /// This field shall specify the number of beams being described in the current PDU for the system being described.
+ ///
+ private byte _numberOfBeams;
+
+ ///
+ /// padding.
+ ///
+ private ushort _emissionsPadding2;
+
+ ///
+ /// This field shall specify information about a particular emitter system
+ ///
+ private EmitterSystem _emitterSystem = new EmitterSystem();
+
+ ///
+ /// Location with respect to the entity
+ ///
+ private Vector3Float _location = new Vector3Float();
+
+ ///
+ /// This field shall specify the length of this beam’s data (including track/ jam information) in 32-bit words. The length shall include the Beam Data Length field
+ ///
+ private byte _beamDataLength;
+
+ ///
+ /// This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
+ ///
+ private byte _beamIdNumber;
+
+ ///
+ /// This field shall specify a Beam Parameter Index number that shall be used by receiving entities in conjunction with the Emitter Name field to provide a pointer to the stored database parameters required to regenerate the beam.
+ ///
+ private ushort _beamParameterIndex;
+
+ ///
+ /// Fundamental parameter data such as frequency range, beam sweep, etc.
+ ///
+ private FundamentalParameterData _fundamentalParameterData = new FundamentalParameterData();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ElectronicEmmisionsPdu()
+ {
+ PduType = (byte)23;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ElectronicEmmisionsPdu left, ElectronicEmmisionsPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ElectronicEmmisionsPdu left, ElectronicEmmisionsPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._emittingEntityID.GetMarshalledSize(); // this._emittingEntityID
+ marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
+ marshalSize += 1; // this._stateUpdateIndicator
+ marshalSize += 1; // this._numberOfSystems
+ marshalSize += 2; // this._emissionsPadding
+ marshalSize += 1; // this._systemDataLength
+ marshalSize += 1; // this._numberOfBeams
+ marshalSize += 2; // this._emissionsPadding2
+ marshalSize += this._emitterSystem.GetMarshalledSize(); // this._emitterSystem
+ marshalSize += this._location.GetMarshalledSize(); // this._location
+ marshalSize += 1; // this._beamDataLength
+ marshalSize += 1; // this._beamIdNumber
+ marshalSize += 2; // this._beamParameterIndex
+ marshalSize += this._fundamentalParameterData.GetMarshalledSize(); // this._fundamentalParameterData
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of the entity emitting
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "emittingEntityID")]
+ public EntityID EmittingEntityID
+ {
+ get
+ {
+ return this._emittingEntityID;
+ }
+
+ set
+ {
+ this._emittingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of event
+ ///
+ [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
+ public EventID EventID
+ {
+ get
+ {
+ return this._eventID;
+ }
+
+ set
+ {
+ this._eventID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall be used to indicate if the data in the PDU represents a state update or just data that has changed since issuance of the last Electromagnetic Emission PDU [rela- tive to the identified entity and emission system(s)].
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "stateUpdateIndicator")]
+ public byte StateUpdateIndicator
+ {
+ get
+ {
+ return this._stateUpdateIndicator;
+ }
+
+ set
+ {
+ this._stateUpdateIndicator = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify the number of emission systems being described in the current PDU.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "numberOfSystems")]
+ public byte NumberOfSystems
+ {
+ get
+ {
+ return this._numberOfSystems;
+ }
+
+ set
+ {
+ this._numberOfSystems = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding.
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "emissionsPadding")]
+ public ushort EmissionsPadding
+ {
+ get
+ {
+ return this._emissionsPadding;
+ }
+
+ set
+ {
+ this._emissionsPadding = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify the length of this emitter system’s data (including beam data and its track/jam information) in 32-bit words. The length shall include the System Data Length field.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "systemDataLength")]
+ public byte SystemDataLength
+ {
+ get
+ {
+ return this._systemDataLength;
+ }
+
+ set
+ {
+ this._systemDataLength = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify the number of beams being described in the current PDU for the system being described.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "numberOfBeams")]
+ public byte NumberOfBeams
+ {
+ get
+ {
+ return this._numberOfBeams;
+ }
+
+ set
+ {
+ this._numberOfBeams = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding.
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "emissionsPadding2")]
+ public ushort EmissionsPadding2
+ {
+ get
+ {
+ return this._emissionsPadding2;
+ }
+
+ set
+ {
+ this._emissionsPadding2 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify information about a particular emitter system
+ ///
+ [XmlElement(Type = typeof(EmitterSystem), ElementName = "emitterSystem")]
+ public EmitterSystem EmitterSystem
+ {
+ get
+ {
+ return this._emitterSystem;
+ }
+
+ set
+ {
+ this._emitterSystem = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Location with respect to the entity
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "location")]
+ public Vector3Float Location
+ {
+ get
+ {
+ return this._location;
+ }
+
+ set
+ {
+ this._location = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify the length of this beam’s data (including track/ jam information) in 32-bit words. The length shall include the Beam Data Length field
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "beamDataLength")]
+ public byte BeamDataLength
+ {
+ get
+ {
+ return this._beamDataLength;
+ }
+
+ set
+ {
+ this._beamDataLength = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "beamIdNumber")]
+ public byte BeamIdNumber
+ {
+ get
+ {
+ return this._beamIdNumber;
+ }
+
+ set
+ {
+ this._beamIdNumber = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the This field shall specify a Beam Parameter Index number that shall be used by receiving entities in conjunction with the Emitter Name field to provide a pointer to the stored database parameters required to regenerate the beam.
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "beamParameterIndex")]
+ public ushort BeamParameterIndex
+ {
+ get
+ {
+ return this._beamParameterIndex;
+ }
+
+ set
+ {
+ this._beamParameterIndex = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Fundamental parameter data such as frequency range, beam sweep, etc.
+ ///
+ [XmlElement(Type = typeof(FundamentalParameterData), ElementName = "fundamentalParameterData")]
+ public FundamentalParameterData FundamentalParameterData
+ {
+ get
+ {
+ return this._fundamentalParameterData;
+ }
+
+ set
+ {
+ this._fundamentalParameterData = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._emittingEntityID.Marshal(dos);
+ this._eventID.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._stateUpdateIndicator);
+ dos.WriteUnsignedByte((byte)this._numberOfSystems);
+ dos.WriteUnsignedShort((ushort)this._emissionsPadding);
+ dos.WriteUnsignedByte((byte)this._systemDataLength);
+ dos.WriteUnsignedByte((byte)this._numberOfBeams);
+ dos.WriteUnsignedShort((ushort)this._emissionsPadding2);
+ this._emitterSystem.Marshal(dos);
+ this._location.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._beamDataLength);
+ dos.WriteUnsignedByte((byte)this._beamIdNumber);
+ dos.WriteUnsignedShort((ushort)this._beamParameterIndex);
+ this._fundamentalParameterData.Marshal(dos);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._emittingEntityID.Unmarshal(dis);
+ this._eventID.Unmarshal(dis);
+ this._stateUpdateIndicator = dis.ReadUnsignedByte();
+ this._numberOfSystems = dis.ReadUnsignedByte();
+ this._emissionsPadding = dis.ReadUnsignedShort();
+ this._systemDataLength = dis.ReadUnsignedByte();
+ this._numberOfBeams = dis.ReadUnsignedByte();
+ this._emissionsPadding2 = dis.ReadUnsignedShort();
+ this._emitterSystem.Unmarshal(dis);
+ this._location.Unmarshal(dis);
+ this._beamDataLength = dis.ReadUnsignedByte();
+ this._beamIdNumber = dis.ReadUnsignedByte();
+ this._beamParameterIndex = dis.ReadUnsignedShort();
+ this._fundamentalParameterData.Unmarshal(dis);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._emittingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._eventID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._stateUpdateIndicator.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._numberOfSystems.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._emissionsPadding.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._systemDataLength.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._numberOfBeams.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._emissionsPadding2.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._emitterSystem.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._location.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._beamDataLength.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamIdNumber.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamParameterIndex.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._fundamentalParameterData.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ElectronicEmmisionsPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ElectronicEmmisionsPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._emittingEntityID.Equals(obj._emittingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._eventID.Equals(obj._eventID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._stateUpdateIndicator != obj._stateUpdateIndicator)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._numberOfSystems != obj._numberOfSystems)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._emissionsPadding != obj._emissionsPadding)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._systemDataLength != obj._systemDataLength)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._numberOfBeams != obj._numberOfBeams)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._emissionsPadding2 != obj._emissionsPadding2)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._emitterSystem.Equals(obj._emitterSystem))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._location.Equals(obj._location))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamDataLength != obj._beamDataLength)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamIdNumber != obj._beamIdNumber)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamParameterIndex != obj._beamParameterIndex)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._fundamentalParameterData.Equals(obj._fundamentalParameterData))
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._emittingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._eventID.GetHashCode();
+ result = GenerateHash(result) ^ this._stateUpdateIndicator.GetHashCode();
+ result = GenerateHash(result) ^ this._numberOfSystems.GetHashCode();
+ result = GenerateHash(result) ^ this._emissionsPadding.GetHashCode();
+ result = GenerateHash(result) ^ this._systemDataLength.GetHashCode();
+ result = GenerateHash(result) ^ this._numberOfBeams.GetHashCode();
+ result = GenerateHash(result) ^ this._emissionsPadding2.GetHashCode();
+ result = GenerateHash(result) ^ this._emitterSystem.GetHashCode();
+ result = GenerateHash(result) ^ this._location.GetHashCode();
+ result = GenerateHash(result) ^ this._beamDataLength.GetHashCode();
+ result = GenerateHash(result) ^ this._beamIdNumber.GetHashCode();
+ result = GenerateHash(result) ^ this._beamParameterIndex.GetHashCode();
+ result = GenerateHash(result) ^ this._fundamentalParameterData.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EmitterSystem.cs b/Libs/CsharpDis6/Dis1995/Generated/EmitterSystem.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EmitterSystem.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EmitterSystem.cs
index 10a96e4..8daf5f9 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EmitterSystem.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EmitterSystem.cs
@@ -1,364 +1,364 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.11. This field shall specify information about a particular emitter system
- ///
- [Serializable]
- [XmlRoot]
- public partial class EmitterSystem
- {
- ///
- /// Name of the emitter, 16 bit enumeration
- ///
- private ushort _emitterName;
-
- ///
- /// function of the emitter, 8 bit enumeration
- ///
- private byte _function;
-
- ///
- /// emitter ID, 8 bit enumeration
- ///
- private byte _emitterIdNumber;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EmitterSystem()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EmitterSystem left, EmitterSystem right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EmitterSystem left, EmitterSystem right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 2; // this._emitterName
- marshalSize += 1; // this._function
- marshalSize += 1; // this._emitterIdNumber
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Name of the emitter, 16 bit enumeration
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "emitterName")]
- public ushort EmitterName
- {
- get
- {
- return this._emitterName;
- }
-
- set
- {
- this._emitterName = value;
- }
- }
-
- ///
- /// Gets or sets the function of the emitter, 8 bit enumeration
- ///
- [XmlElement(Type = typeof(byte), ElementName = "function")]
- public byte Function
- {
- get
- {
- return this._function;
- }
-
- set
- {
- this._function = value;
- }
- }
-
- ///
- /// Gets or sets the emitter ID, 8 bit enumeration
- ///
- [XmlElement(Type = typeof(byte), ElementName = "emitterIdNumber")]
- public byte EmitterIdNumber
- {
- get
- {
- return this._emitterIdNumber;
- }
-
- set
- {
- this._emitterIdNumber = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedShort((ushort)this._emitterName);
- dos.WriteUnsignedByte((byte)this._function);
- dos.WriteUnsignedByte((byte)this._emitterIdNumber);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._emitterName = dis.ReadUnsignedShort();
- this._function = dis.ReadUnsignedByte();
- this._emitterIdNumber = dis.ReadUnsignedByte();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._emitterName.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._function.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._emitterIdNumber.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EmitterSystem;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EmitterSystem obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._emitterName != obj._emitterName)
- {
- ivarsEqual = false;
- }
-
- if (this._function != obj._function)
- {
- ivarsEqual = false;
- }
-
- if (this._emitterIdNumber != obj._emitterIdNumber)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._emitterName.GetHashCode();
- result = GenerateHash(result) ^ this._function.GetHashCode();
- result = GenerateHash(result) ^ this._emitterIdNumber.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.11. This field shall specify information about a particular emitter system
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class EmitterSystem
+ {
+ ///
+ /// Name of the emitter, 16 bit enumeration
+ ///
+ private ushort _emitterName;
+
+ ///
+ /// function of the emitter, 8 bit enumeration
+ ///
+ private byte _function;
+
+ ///
+ /// emitter ID, 8 bit enumeration
+ ///
+ private byte _emitterIdNumber;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EmitterSystem()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EmitterSystem left, EmitterSystem right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EmitterSystem left, EmitterSystem right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 2; // this._emitterName
+ marshalSize += 1; // this._function
+ marshalSize += 1; // this._emitterIdNumber
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Name of the emitter, 16 bit enumeration
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "emitterName")]
+ public ushort EmitterName
+ {
+ get
+ {
+ return this._emitterName;
+ }
+
+ set
+ {
+ this._emitterName = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the function of the emitter, 8 bit enumeration
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "function")]
+ public byte Function
+ {
+ get
+ {
+ return this._function;
+ }
+
+ set
+ {
+ this._function = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the emitter ID, 8 bit enumeration
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "emitterIdNumber")]
+ public byte EmitterIdNumber
+ {
+ get
+ {
+ return this._emitterIdNumber;
+ }
+
+ set
+ {
+ this._emitterIdNumber = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedShort((ushort)this._emitterName);
+ dos.WriteUnsignedByte((byte)this._function);
+ dos.WriteUnsignedByte((byte)this._emitterIdNumber);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._emitterName = dis.ReadUnsignedShort();
+ this._function = dis.ReadUnsignedByte();
+ this._emitterIdNumber = dis.ReadUnsignedByte();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._emitterName.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._function.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._emitterIdNumber.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EmitterSystem;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EmitterSystem obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._emitterName != obj._emitterName)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._function != obj._function)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._emitterIdNumber != obj._emitterIdNumber)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._emitterName.GetHashCode();
+ result = GenerateHash(result) ^ this._function.GetHashCode();
+ result = GenerateHash(result) ^ this._emitterIdNumber.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EntityID.cs b/Libs/CsharpDis6/Dis1995/Generated/EntityID.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EntityID.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EntityID.cs
index 695f5ac..4d1a0af 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EntityID.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EntityID.cs
@@ -1,364 +1,364 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Each entity in a given DIS simulation application shall be given an entity identifier number unique to all other entities in that application. This identifier number is valid for the duration of the exercise; however, entity identifier numbers may be reused when all possible numbers have been exhausted. No entity shall have an entity identifier number of NO_ENTITY, ALL_ENTITIES, or RQST_ASSIGN_ID. The entity iden- tifier number need not be registered or retained for future exercises. The entity identifier number shall be specified by a 16-bit unsigned integer. An entity identifier number equal to zero with valid site and application identification shall address a simulation application. An entity identifier number equal to ALL_ENTITIES shall mean all entities within the specified site and application. An entity identifier number equal to RQST_ASSIGN_ID allows the receiver of the create entity to define the entity identifier number of the new entity.
- ///
- [Serializable]
- [XmlRoot]
- public partial class EntityID
- {
- ///
- /// The site ID
- ///
- private ushort _site;
-
- ///
- /// The application ID
- ///
- private ushort _application;
-
- ///
- /// the entity ID
- ///
- private ushort _entity;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EntityID()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EntityID left, EntityID right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EntityID left, EntityID right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 2; // this._site
- marshalSize += 2; // this._application
- marshalSize += 2; // this._entity
- return marshalSize;
- }
-
- ///
- /// Gets or sets the The site ID
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "site")]
- public ushort Site
- {
- get
- {
- return this._site;
- }
-
- set
- {
- this._site = value;
- }
- }
-
- ///
- /// Gets or sets the The application ID
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "application")]
- public ushort Application
- {
- get
- {
- return this._application;
- }
-
- set
- {
- this._application = value;
- }
- }
-
- ///
- /// Gets or sets the the entity ID
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "entity")]
- public ushort Entity
- {
- get
- {
- return this._entity;
- }
-
- set
- {
- this._entity = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedShort((ushort)this._site);
- dos.WriteUnsignedShort((ushort)this._application);
- dos.WriteUnsignedShort((ushort)this._entity);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._site = dis.ReadUnsignedShort();
- this._application = dis.ReadUnsignedShort();
- this._entity = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._site.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._application.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._entity.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EntityID;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EntityID obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._site != obj._site)
- {
- ivarsEqual = false;
- }
-
- if (this._application != obj._application)
- {
- ivarsEqual = false;
- }
-
- if (this._entity != obj._entity)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._site.GetHashCode();
- result = GenerateHash(result) ^ this._application.GetHashCode();
- result = GenerateHash(result) ^ this._entity.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Each entity in a given DIS simulation application shall be given an entity identifier number unique to all other entities in that application. This identifier number is valid for the duration of the exercise; however, entity identifier numbers may be reused when all possible numbers have been exhausted. No entity shall have an entity identifier number of NO_ENTITY, ALL_ENTITIES, or RQST_ASSIGN_ID. The entity iden- tifier number need not be registered or retained for future exercises. The entity identifier number shall be specified by a 16-bit unsigned integer. An entity identifier number equal to zero with valid site and application identification shall address a simulation application. An entity identifier number equal to ALL_ENTITIES shall mean all entities within the specified site and application. An entity identifier number equal to RQST_ASSIGN_ID allows the receiver of the create entity to define the entity identifier number of the new entity.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class EntityID
+ {
+ ///
+ /// The site ID
+ ///
+ private ushort _site;
+
+ ///
+ /// The application ID
+ ///
+ private ushort _application;
+
+ ///
+ /// the entity ID
+ ///
+ private ushort _entity;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EntityID()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EntityID left, EntityID right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EntityID left, EntityID right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 2; // this._site
+ marshalSize += 2; // this._application
+ marshalSize += 2; // this._entity
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the The site ID
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "site")]
+ public ushort Site
+ {
+ get
+ {
+ return this._site;
+ }
+
+ set
+ {
+ this._site = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the The application ID
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "application")]
+ public ushort Application
+ {
+ get
+ {
+ return this._application;
+ }
+
+ set
+ {
+ this._application = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the the entity ID
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "entity")]
+ public ushort Entity
+ {
+ get
+ {
+ return this._entity;
+ }
+
+ set
+ {
+ this._entity = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedShort((ushort)this._site);
+ dos.WriteUnsignedShort((ushort)this._application);
+ dos.WriteUnsignedShort((ushort)this._entity);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._site = dis.ReadUnsignedShort();
+ this._application = dis.ReadUnsignedShort();
+ this._entity = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._site.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._application.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._entity.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EntityID;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EntityID obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._site != obj._site)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._application != obj._application)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._entity != obj._entity)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._site.GetHashCode();
+ result = GenerateHash(result) ^ this._application.GetHashCode();
+ result = GenerateHash(result) ^ this._entity.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EntityInformationPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/EntityInformationPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EntityInformationPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EntityInformationPdu.cs
index 45da503..49461c4 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EntityInformationPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EntityInformationPdu.cs
@@ -1,271 +1,271 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.3. Common superclass for EntityState and Collision PDUs. This should be abstract.
- ///
- [Serializable]
- [XmlRoot]
- public partial class EntityInformationPdu : Pdu, IEquatable
- {
- ///
- /// Initializes a new instance of the class.
- ///
- public EntityInformationPdu()
- {
- ProtocolFamily = (byte)1;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EntityInformationPdu left, EntityInformationPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EntityInformationPdu left, EntityInformationPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- return marshalSize;
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public virtual void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EntityInformationPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EntityInformationPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.3. Common superclass for EntityState and Collision PDUs. This should be abstract.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class EntityInformationPdu : Pdu, IEquatable
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EntityInformationPdu()
+ {
+ ProtocolFamily = (byte)1;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EntityInformationPdu left, EntityInformationPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EntityInformationPdu left, EntityInformationPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ return marshalSize;
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public virtual void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EntityInformationPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EntityInformationPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EntityStatePdu.cs b/Libs/CsharpDis6/Dis1995/Generated/EntityStatePdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EntityStatePdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EntityStatePdu.cs
index 19340ef..6efe3e8 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EntityStatePdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EntityStatePdu.cs
@@ -1,774 +1,774 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.3.1. Represents the postion and state of one entity in the world
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(EntityType))]
- [XmlInclude(typeof(Vector3Float))]
- [XmlInclude(typeof(Vector3Double))]
- [XmlInclude(typeof(Orientation))]
- [XmlInclude(typeof(DeadReckoningParameter))]
- [XmlInclude(typeof(ArticulationParameter))]
- public partial class EntityStatePdu : EntityInformationPdu, IEquatable
- {
- ///
- /// Unique ID for an entity that is tied to this state information
- ///
- private EntityID _entityID = new EntityID();
-
- private byte _forceId;
-
- ///
- /// How many articulation parameters are in the variable length list
- ///
- private byte _articulationParameterCount;
-
- ///
- /// Describes the type of entity in the world
- ///
- private EntityType _entityType = new EntityType();
-
- private EntityType _alternativeEntityType = new EntityType();
-
- ///
- /// Describes the speed of the entity in the world
- ///
- private Vector3Float _entityLinearVelocity = new Vector3Float();
-
- ///
- /// describes the location of the entity in the world
- ///
- private Vector3Double _entityLocation = new Vector3Double();
-
- ///
- /// describes the orientation of the entity, in euler angles
- ///
- private Orientation _entityOrientation = new Orientation();
-
- ///
- /// a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.
- ///
- private int _entityAppearance;
-
- ///
- /// parameters used for dead reckoning
- ///
- private DeadReckoningParameter _deadReckoningParameters = new DeadReckoningParameter();
-
- ///
- /// characters that can be used for debugging, or to draw unique strings on the side of entities in the world
- ///
- private byte[] _marking = new byte[12];
-
- ///
- /// a series of bit flags
- ///
- private int _capabilities;
-
- ///
- /// variable length list of articulation parameters
- ///
- private List _articulationParameters = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EntityStatePdu()
- {
- PduType = (byte)1;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EntityStatePdu left, EntityStatePdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EntityStatePdu left, EntityStatePdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._entityID.GetMarshalledSize(); // this._entityID
- marshalSize += 1; // this._forceId
- marshalSize += 1; // this._articulationParameterCount
- marshalSize += this._entityType.GetMarshalledSize(); // this._entityType
- marshalSize += this._alternativeEntityType.GetMarshalledSize(); // this._alternativeEntityType
- marshalSize += this._entityLinearVelocity.GetMarshalledSize(); // this._entityLinearVelocity
- marshalSize += this._entityLocation.GetMarshalledSize(); // this._entityLocation
- marshalSize += this._entityOrientation.GetMarshalledSize(); // this._entityOrientation
- marshalSize += 4; // this._entityAppearance
- marshalSize += this._deadReckoningParameters.GetMarshalledSize(); // this._deadReckoningParameters
- marshalSize += 12 * 1; // _marking
- marshalSize += 4; // this._capabilities
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- ArticulationParameter listElement = (ArticulationParameter)this._articulationParameters[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Unique ID for an entity that is tied to this state information
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "entityID")]
- public EntityID EntityID
- {
- get
- {
- return this._entityID;
- }
-
- set
- {
- this._entityID = value;
- }
- }
-
- ///
- /// Gets or sets the forceId
- ///
- [XmlElement(Type = typeof(byte), ElementName = "forceId")]
- public byte ForceId
- {
- get
- {
- return this._forceId;
- }
-
- set
- {
- this._forceId = value;
- }
- }
-
- ///
- /// Gets or sets the How many articulation parameters are in the variable length list
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getarticulationParameterCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "articulationParameterCount")]
- public byte ArticulationParameterCount
- {
- get
- {
- return this._articulationParameterCount;
- }
-
- set
- {
- this._articulationParameterCount = value;
- }
- }
-
- ///
- /// Gets or sets the Describes the type of entity in the world
- ///
- [XmlElement(Type = typeof(EntityType), ElementName = "entityType")]
- public EntityType EntityType
- {
- get
- {
- return this._entityType;
- }
-
- set
- {
- this._entityType = value;
- }
- }
-
- ///
- /// Gets or sets the alternativeEntityType
- ///
- [XmlElement(Type = typeof(EntityType), ElementName = "alternativeEntityType")]
- public EntityType AlternativeEntityType
- {
- get
- {
- return this._alternativeEntityType;
- }
-
- set
- {
- this._alternativeEntityType = value;
- }
- }
-
- ///
- /// Gets or sets the Describes the speed of the entity in the world
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "entityLinearVelocity")]
- public Vector3Float EntityLinearVelocity
- {
- get
- {
- return this._entityLinearVelocity;
- }
-
- set
- {
- this._entityLinearVelocity = value;
- }
- }
-
- ///
- /// Gets or sets the describes the location of the entity in the world
- ///
- [XmlElement(Type = typeof(Vector3Double), ElementName = "entityLocation")]
- public Vector3Double EntityLocation
- {
- get
- {
- return this._entityLocation;
- }
-
- set
- {
- this._entityLocation = value;
- }
- }
-
- ///
- /// Gets or sets the describes the orientation of the entity, in euler angles
- ///
- [XmlElement(Type = typeof(Orientation), ElementName = "entityOrientation")]
- public Orientation EntityOrientation
- {
- get
- {
- return this._entityOrientation;
- }
-
- set
- {
- this._entityOrientation = value;
- }
- }
-
- ///
- /// Gets or sets the a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.
- ///
- [XmlElement(Type = typeof(int), ElementName = "entityAppearance")]
- public int EntityAppearance
- {
- get
- {
- return this._entityAppearance;
- }
-
- set
- {
- this._entityAppearance = value;
- }
- }
-
- ///
- /// Gets or sets the parameters used for dead reckoning
- ///
- [XmlElement(Type = typeof(DeadReckoningParameter), ElementName = "deadReckoningParameters")]
- public DeadReckoningParameter DeadReckoningParameters
- {
- get
- {
- return this._deadReckoningParameters;
- }
-
- set
- {
- this._deadReckoningParameters = value;
- }
- }
-
- ///
- /// Gets or sets the characters that can be used for debugging, or to draw unique strings on the side of entities in the world
- ///
- [XmlArray(ElementName = "marking")]
- public byte[] Marking
- {
- get
- {
- return this._marking;
- }
-
- set
- {
- this._marking = value;
- }
-}
-
- ///
- /// Gets or sets the a series of bit flags
- ///
- [XmlElement(Type = typeof(int), ElementName = "capabilities")]
- public int Capabilities
- {
- get
- {
- return this._capabilities;
- }
-
- set
- {
- this._capabilities = value;
- }
- }
-
- ///
- /// Gets the variable length list of articulation parameters
- ///
- [XmlElement(ElementName = "articulationParametersList", Type = typeof(List))]
- public List ArticulationParameters
- {
- get
- {
- return this._articulationParameters;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._entityID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._forceId);
- dos.WriteByte((byte)this._articulationParameters.Count);
- this._entityType.Marshal(dos);
- this._alternativeEntityType.Marshal(dos);
- this._entityLinearVelocity.Marshal(dos);
- this._entityLocation.Marshal(dos);
- this._entityOrientation.Marshal(dos);
- dos.WriteInt((int)this._entityAppearance);
- this._deadReckoningParameters.Marshal(dos);
-
- for (int idx = 0; idx < this._marking.Length; idx++)
- {
- dos.WriteByte(this._marking[idx]);
- }
-
- dos.WriteInt((int)this._capabilities);
-
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
- aArticulationParameter.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._entityID.Unmarshal(dis);
- this._forceId = dis.ReadUnsignedByte();
- this._articulationParameterCount = dis.ReadByte();
- this._entityType.Unmarshal(dis);
- this._alternativeEntityType.Unmarshal(dis);
- this._entityLinearVelocity.Unmarshal(dis);
- this._entityLocation.Unmarshal(dis);
- this._entityOrientation.Unmarshal(dis);
- this._entityAppearance = dis.ReadInt();
- this._deadReckoningParameters.Unmarshal(dis);
-
- for (int idx = 0; idx < this._marking.Length; idx++)
- {
- this._marking[idx] = dis.ReadByte();
- }
-
- this._capabilities = dis.ReadInt();
-
- for (int idx = 0; idx < this.ArticulationParameterCount; idx++)
- {
- ArticulationParameter anX = new ArticulationParameter();
- anX.Unmarshal(dis);
- this._articulationParameters.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._entityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._forceId.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._articulationParameters.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._entityType.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._alternativeEntityType.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._entityLinearVelocity.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._entityLocation.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._entityOrientation.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._entityAppearance.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._deadReckoningParameters.Reflection(sb);
- sb.AppendLine("");
- for (int idx = 0; idx < this._marking.Length; idx++)
- {
- sb.AppendLine("" + this._marking[idx] + "");
- }
-
- sb.AppendLine("" + this._capabilities.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- sb.AppendLine("");
- ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
- aArticulationParameter.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EntityStatePdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EntityStatePdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._entityID.Equals(obj._entityID))
- {
- ivarsEqual = false;
- }
-
- if (this._forceId != obj._forceId)
- {
- ivarsEqual = false;
- }
-
- if (this._articulationParameterCount != obj._articulationParameterCount)
- {
- ivarsEqual = false;
- }
-
- if (!this._entityType.Equals(obj._entityType))
- {
- ivarsEqual = false;
- }
-
- if (!this._alternativeEntityType.Equals(obj._alternativeEntityType))
- {
- ivarsEqual = false;
- }
-
- if (!this._entityLinearVelocity.Equals(obj._entityLinearVelocity))
- {
- ivarsEqual = false;
- }
-
- if (!this._entityLocation.Equals(obj._entityLocation))
- {
- ivarsEqual = false;
- }
-
- if (!this._entityOrientation.Equals(obj._entityOrientation))
- {
- ivarsEqual = false;
- }
-
- if (this._entityAppearance != obj._entityAppearance)
- {
- ivarsEqual = false;
- }
-
- if (!this._deadReckoningParameters.Equals(obj._deadReckoningParameters))
- {
- ivarsEqual = false;
- }
-
- if (obj._marking.Length != 12)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < 12; idx++)
- {
- if (this._marking[idx] != obj._marking[idx])
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._capabilities != obj._capabilities)
- {
- ivarsEqual = false;
- }
-
- if (this._articulationParameters.Count != obj._articulationParameters.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- if (!this._articulationParameters[idx].Equals(obj._articulationParameters[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._entityID.GetHashCode();
- result = GenerateHash(result) ^ this._forceId.GetHashCode();
- result = GenerateHash(result) ^ this._articulationParameterCount.GetHashCode();
- result = GenerateHash(result) ^ this._entityType.GetHashCode();
- result = GenerateHash(result) ^ this._alternativeEntityType.GetHashCode();
- result = GenerateHash(result) ^ this._entityLinearVelocity.GetHashCode();
- result = GenerateHash(result) ^ this._entityLocation.GetHashCode();
- result = GenerateHash(result) ^ this._entityOrientation.GetHashCode();
- result = GenerateHash(result) ^ this._entityAppearance.GetHashCode();
- result = GenerateHash(result) ^ this._deadReckoningParameters.GetHashCode();
-
- for (int idx = 0; idx < 12; idx++)
- {
- result = GenerateHash(result) ^ this._marking[idx].GetHashCode();
- }
-
- result = GenerateHash(result) ^ this._capabilities.GetHashCode();
-
- if (this._articulationParameters.Count > 0)
- {
- for (int idx = 0; idx < this._articulationParameters.Count; idx++)
- {
- result = GenerateHash(result) ^ this._articulationParameters[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.3.1. Represents the postion and state of one entity in the world
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(EntityType))]
+ [XmlInclude(typeof(Vector3Float))]
+ [XmlInclude(typeof(Vector3Double))]
+ [XmlInclude(typeof(Orientation))]
+ [XmlInclude(typeof(DeadReckoningParameter))]
+ [XmlInclude(typeof(ArticulationParameter))]
+ public partial class EntityStatePdu : EntityInformationPdu, IEquatable
+ {
+ ///
+ /// Unique ID for an entity that is tied to this state information
+ ///
+ private EntityID _entityID = new EntityID();
+
+ private byte _forceId;
+
+ ///
+ /// How many articulation parameters are in the variable length list
+ ///
+ private byte _articulationParameterCount;
+
+ ///
+ /// Describes the type of entity in the world
+ ///
+ private EntityType _entityType = new EntityType();
+
+ private EntityType _alternativeEntityType = new EntityType();
+
+ ///
+ /// Describes the speed of the entity in the world
+ ///
+ private Vector3Float _entityLinearVelocity = new Vector3Float();
+
+ ///
+ /// describes the location of the entity in the world
+ ///
+ private Vector3Double _entityLocation = new Vector3Double();
+
+ ///
+ /// describes the orientation of the entity, in euler angles
+ ///
+ private Orientation _entityOrientation = new Orientation();
+
+ ///
+ /// a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.
+ ///
+ private int _entityAppearance;
+
+ ///
+ /// parameters used for dead reckoning
+ ///
+ private DeadReckoningParameter _deadReckoningParameters = new DeadReckoningParameter();
+
+ ///
+ /// characters that can be used for debugging, or to draw unique strings on the side of entities in the world
+ ///
+ private byte[] _marking = new byte[12];
+
+ ///
+ /// a series of bit flags
+ ///
+ private int _capabilities;
+
+ ///
+ /// variable length list of articulation parameters
+ ///
+ private List _articulationParameters = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EntityStatePdu()
+ {
+ PduType = (byte)1;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EntityStatePdu left, EntityStatePdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EntityStatePdu left, EntityStatePdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._entityID.GetMarshalledSize(); // this._entityID
+ marshalSize += 1; // this._forceId
+ marshalSize += 1; // this._articulationParameterCount
+ marshalSize += this._entityType.GetMarshalledSize(); // this._entityType
+ marshalSize += this._alternativeEntityType.GetMarshalledSize(); // this._alternativeEntityType
+ marshalSize += this._entityLinearVelocity.GetMarshalledSize(); // this._entityLinearVelocity
+ marshalSize += this._entityLocation.GetMarshalledSize(); // this._entityLocation
+ marshalSize += this._entityOrientation.GetMarshalledSize(); // this._entityOrientation
+ marshalSize += 4; // this._entityAppearance
+ marshalSize += this._deadReckoningParameters.GetMarshalledSize(); // this._deadReckoningParameters
+ marshalSize += 12 * 1; // _marking
+ marshalSize += 4; // this._capabilities
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ ArticulationParameter listElement = (ArticulationParameter)this._articulationParameters[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Unique ID for an entity that is tied to this state information
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "entityID")]
+ public EntityID EntityID
+ {
+ get
+ {
+ return this._entityID;
+ }
+
+ set
+ {
+ this._entityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the forceId
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "forceId")]
+ public byte ForceId
+ {
+ get
+ {
+ return this._forceId;
+ }
+
+ set
+ {
+ this._forceId = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the How many articulation parameters are in the variable length list
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getarticulationParameterCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "articulationParameterCount")]
+ public byte ArticulationParameterCount
+ {
+ get
+ {
+ return this._articulationParameterCount;
+ }
+
+ set
+ {
+ this._articulationParameterCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Describes the type of entity in the world
+ ///
+ [XmlElement(Type = typeof(EntityType), ElementName = "entityType")]
+ public EntityType EntityType
+ {
+ get
+ {
+ return this._entityType;
+ }
+
+ set
+ {
+ this._entityType = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the alternativeEntityType
+ ///
+ [XmlElement(Type = typeof(EntityType), ElementName = "alternativeEntityType")]
+ public EntityType AlternativeEntityType
+ {
+ get
+ {
+ return this._alternativeEntityType;
+ }
+
+ set
+ {
+ this._alternativeEntityType = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Describes the speed of the entity in the world
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "entityLinearVelocity")]
+ public Vector3Float EntityLinearVelocity
+ {
+ get
+ {
+ return this._entityLinearVelocity;
+ }
+
+ set
+ {
+ this._entityLinearVelocity = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the describes the location of the entity in the world
+ ///
+ [XmlElement(Type = typeof(Vector3Double), ElementName = "entityLocation")]
+ public Vector3Double EntityLocation
+ {
+ get
+ {
+ return this._entityLocation;
+ }
+
+ set
+ {
+ this._entityLocation = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the describes the orientation of the entity, in euler angles
+ ///
+ [XmlElement(Type = typeof(Orientation), ElementName = "entityOrientation")]
+ public Orientation EntityOrientation
+ {
+ get
+ {
+ return this._entityOrientation;
+ }
+
+ set
+ {
+ this._entityOrientation = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.
+ ///
+ [XmlElement(Type = typeof(int), ElementName = "entityAppearance")]
+ public int EntityAppearance
+ {
+ get
+ {
+ return this._entityAppearance;
+ }
+
+ set
+ {
+ this._entityAppearance = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the parameters used for dead reckoning
+ ///
+ [XmlElement(Type = typeof(DeadReckoningParameter), ElementName = "deadReckoningParameters")]
+ public DeadReckoningParameter DeadReckoningParameters
+ {
+ get
+ {
+ return this._deadReckoningParameters;
+ }
+
+ set
+ {
+ this._deadReckoningParameters = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the characters that can be used for debugging, or to draw unique strings on the side of entities in the world
+ ///
+ [XmlArray(ElementName = "marking")]
+ public byte[] Marking
+ {
+ get
+ {
+ return this._marking;
+ }
+
+ set
+ {
+ this._marking = value;
+ }
+}
+
+ ///
+ /// Gets or sets the a series of bit flags
+ ///
+ [XmlElement(Type = typeof(int), ElementName = "capabilities")]
+ public int Capabilities
+ {
+ get
+ {
+ return this._capabilities;
+ }
+
+ set
+ {
+ this._capabilities = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of articulation parameters
+ ///
+ [XmlElement(ElementName = "articulationParametersList", Type = typeof(List))]
+ public List ArticulationParameters
+ {
+ get
+ {
+ return this._articulationParameters;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._entityID.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._forceId);
+ dos.WriteByte((byte)this._articulationParameters.Count);
+ this._entityType.Marshal(dos);
+ this._alternativeEntityType.Marshal(dos);
+ this._entityLinearVelocity.Marshal(dos);
+ this._entityLocation.Marshal(dos);
+ this._entityOrientation.Marshal(dos);
+ dos.WriteInt((int)this._entityAppearance);
+ this._deadReckoningParameters.Marshal(dos);
+
+ for (int idx = 0; idx < this._marking.Length; idx++)
+ {
+ dos.WriteByte(this._marking[idx]);
+ }
+
+ dos.WriteInt((int)this._capabilities);
+
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
+ aArticulationParameter.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._entityID.Unmarshal(dis);
+ this._forceId = dis.ReadUnsignedByte();
+ this._articulationParameterCount = dis.ReadByte();
+ this._entityType.Unmarshal(dis);
+ this._alternativeEntityType.Unmarshal(dis);
+ this._entityLinearVelocity.Unmarshal(dis);
+ this._entityLocation.Unmarshal(dis);
+ this._entityOrientation.Unmarshal(dis);
+ this._entityAppearance = dis.ReadInt();
+ this._deadReckoningParameters.Unmarshal(dis);
+
+ for (int idx = 0; idx < this._marking.Length; idx++)
+ {
+ this._marking[idx] = dis.ReadByte();
+ }
+
+ this._capabilities = dis.ReadInt();
+
+ for (int idx = 0; idx < this.ArticulationParameterCount; idx++)
+ {
+ ArticulationParameter anX = new ArticulationParameter();
+ anX.Unmarshal(dis);
+ this._articulationParameters.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._entityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._forceId.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._articulationParameters.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._entityType.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._alternativeEntityType.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._entityLinearVelocity.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._entityLocation.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._entityOrientation.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._entityAppearance.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._deadReckoningParameters.Reflection(sb);
+ sb.AppendLine("");
+ for (int idx = 0; idx < this._marking.Length; idx++)
+ {
+ sb.AppendLine("" + this._marking[idx] + "");
+ }
+
+ sb.AppendLine("" + this._capabilities.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ sb.AppendLine("");
+ ArticulationParameter aArticulationParameter = (ArticulationParameter)this._articulationParameters[idx];
+ aArticulationParameter.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EntityStatePdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EntityStatePdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._entityID.Equals(obj._entityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._forceId != obj._forceId)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._articulationParameterCount != obj._articulationParameterCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._entityType.Equals(obj._entityType))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._alternativeEntityType.Equals(obj._alternativeEntityType))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._entityLinearVelocity.Equals(obj._entityLinearVelocity))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._entityLocation.Equals(obj._entityLocation))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._entityOrientation.Equals(obj._entityOrientation))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._entityAppearance != obj._entityAppearance)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._deadReckoningParameters.Equals(obj._deadReckoningParameters))
+ {
+ ivarsEqual = false;
+ }
+
+ if (obj._marking.Length != 12)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < 12; idx++)
+ {
+ if (this._marking[idx] != obj._marking[idx])
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._capabilities != obj._capabilities)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._articulationParameters.Count != obj._articulationParameters.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ if (!this._articulationParameters[idx].Equals(obj._articulationParameters[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._entityID.GetHashCode();
+ result = GenerateHash(result) ^ this._forceId.GetHashCode();
+ result = GenerateHash(result) ^ this._articulationParameterCount.GetHashCode();
+ result = GenerateHash(result) ^ this._entityType.GetHashCode();
+ result = GenerateHash(result) ^ this._alternativeEntityType.GetHashCode();
+ result = GenerateHash(result) ^ this._entityLinearVelocity.GetHashCode();
+ result = GenerateHash(result) ^ this._entityLocation.GetHashCode();
+ result = GenerateHash(result) ^ this._entityOrientation.GetHashCode();
+ result = GenerateHash(result) ^ this._entityAppearance.GetHashCode();
+ result = GenerateHash(result) ^ this._deadReckoningParameters.GetHashCode();
+
+ for (int idx = 0; idx < 12; idx++)
+ {
+ result = GenerateHash(result) ^ this._marking[idx].GetHashCode();
+ }
+
+ result = GenerateHash(result) ^ this._capabilities.GetHashCode();
+
+ if (this._articulationParameters.Count > 0)
+ {
+ for (int idx = 0; idx < this._articulationParameters.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._articulationParameters[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EntityType.cs b/Libs/CsharpDis6/Dis1995/Generated/EntityType.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EntityType.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EntityType.cs
index ed3094a..fdc937b 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EntityType.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EntityType.cs
@@ -1,489 +1,489 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.16. Identifies the type of entity, including kind of entity, domain (surface, subsurface, air, etc) country, category, etc.
- ///
- [Serializable]
- [XmlRoot]
- public partial class EntityType
- {
- ///
- /// Kind of entity
- ///
- private byte _entityKind;
-
- ///
- /// Domain of entity (air, surface, subsurface, space, etc)
- ///
- private byte _domain;
-
- ///
- /// country to which the design of the entity is attributed
- ///
- private ushort _country;
-
- ///
- /// category of entity
- ///
- private byte _category;
-
- ///
- /// subcategory of entity
- ///
- private byte _subcategory;
-
- ///
- /// specific info based on subcategory field
- ///
- private byte _specific;
-
- private byte _extra;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EntityType()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EntityType left, EntityType right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EntityType left, EntityType right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 1; // this._entityKind
- marshalSize += 1; // this._domain
- marshalSize += 2; // this._country
- marshalSize += 1; // this._category
- marshalSize += 1; // this._subcategory
- marshalSize += 1; // this._specific
- marshalSize += 1; // this._extra
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Kind of entity
- ///
- [XmlElement(Type = typeof(byte), ElementName = "entityKind")]
- public byte EntityKind
- {
- get
- {
- return this._entityKind;
- }
-
- set
- {
- this._entityKind = value;
- }
- }
-
- ///
- /// Gets or sets the Domain of entity (air, surface, subsurface, space, etc)
- ///
- [XmlElement(Type = typeof(byte), ElementName = "domain")]
- public byte Domain
- {
- get
- {
- return this._domain;
- }
-
- set
- {
- this._domain = value;
- }
- }
-
- ///
- /// Gets or sets the country to which the design of the entity is attributed
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "country")]
- public ushort Country
- {
- get
- {
- return this._country;
- }
-
- set
- {
- this._country = value;
- }
- }
-
- ///
- /// Gets or sets the category of entity
- ///
- [XmlElement(Type = typeof(byte), ElementName = "category")]
- public byte Category
- {
- get
- {
- return this._category;
- }
-
- set
- {
- this._category = value;
- }
- }
-
- ///
- /// Gets or sets the subcategory of entity
- ///
- [XmlElement(Type = typeof(byte), ElementName = "subcategory")]
- public byte Subcategory
- {
- get
- {
- return this._subcategory;
- }
-
- set
- {
- this._subcategory = value;
- }
- }
-
- ///
- /// Gets or sets the specific info based on subcategory field
- ///
- [XmlElement(Type = typeof(byte), ElementName = "specific")]
- public byte Specific
- {
- get
- {
- return this._specific;
- }
-
- set
- {
- this._specific = value;
- }
- }
-
- ///
- /// Gets or sets the extra
- ///
- [XmlElement(Type = typeof(byte), ElementName = "extra")]
- public byte Extra
- {
- get
- {
- return this._extra;
- }
-
- set
- {
- this._extra = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedByte((byte)this._entityKind);
- dos.WriteUnsignedByte((byte)this._domain);
- dos.WriteUnsignedShort((ushort)this._country);
- dos.WriteUnsignedByte((byte)this._category);
- dos.WriteUnsignedByte((byte)this._subcategory);
- dos.WriteUnsignedByte((byte)this._specific);
- dos.WriteUnsignedByte((byte)this._extra);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._entityKind = dis.ReadUnsignedByte();
- this._domain = dis.ReadUnsignedByte();
- this._country = dis.ReadUnsignedShort();
- this._category = dis.ReadUnsignedByte();
- this._subcategory = dis.ReadUnsignedByte();
- this._specific = dis.ReadUnsignedByte();
- this._extra = dis.ReadUnsignedByte();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._entityKind.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._domain.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._country.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._category.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._subcategory.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._specific.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._extra.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EntityType;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EntityType obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._entityKind != obj._entityKind)
- {
- ivarsEqual = false;
- }
-
- if (this._domain != obj._domain)
- {
- ivarsEqual = false;
- }
-
- if (this._country != obj._country)
- {
- ivarsEqual = false;
- }
-
- if (this._category != obj._category)
- {
- ivarsEqual = false;
- }
-
- if (this._subcategory != obj._subcategory)
- {
- ivarsEqual = false;
- }
-
- if (this._specific != obj._specific)
- {
- ivarsEqual = false;
- }
-
- if (this._extra != obj._extra)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._entityKind.GetHashCode();
- result = GenerateHash(result) ^ this._domain.GetHashCode();
- result = GenerateHash(result) ^ this._country.GetHashCode();
- result = GenerateHash(result) ^ this._category.GetHashCode();
- result = GenerateHash(result) ^ this._subcategory.GetHashCode();
- result = GenerateHash(result) ^ this._specific.GetHashCode();
- result = GenerateHash(result) ^ this._extra.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.16. Identifies the type of entity, including kind of entity, domain (surface, subsurface, air, etc) country, category, etc.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class EntityType
+ {
+ ///
+ /// Kind of entity
+ ///
+ private byte _entityKind;
+
+ ///
+ /// Domain of entity (air, surface, subsurface, space, etc)
+ ///
+ private byte _domain;
+
+ ///
+ /// country to which the design of the entity is attributed
+ ///
+ private ushort _country;
+
+ ///
+ /// category of entity
+ ///
+ private byte _category;
+
+ ///
+ /// subcategory of entity
+ ///
+ private byte _subcategory;
+
+ ///
+ /// specific info based on subcategory field
+ ///
+ private byte _specific;
+
+ private byte _extra;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EntityType()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EntityType left, EntityType right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EntityType left, EntityType right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 1; // this._entityKind
+ marshalSize += 1; // this._domain
+ marshalSize += 2; // this._country
+ marshalSize += 1; // this._category
+ marshalSize += 1; // this._subcategory
+ marshalSize += 1; // this._specific
+ marshalSize += 1; // this._extra
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Kind of entity
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "entityKind")]
+ public byte EntityKind
+ {
+ get
+ {
+ return this._entityKind;
+ }
+
+ set
+ {
+ this._entityKind = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Domain of entity (air, surface, subsurface, space, etc)
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "domain")]
+ public byte Domain
+ {
+ get
+ {
+ return this._domain;
+ }
+
+ set
+ {
+ this._domain = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the country to which the design of the entity is attributed
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "country")]
+ public ushort Country
+ {
+ get
+ {
+ return this._country;
+ }
+
+ set
+ {
+ this._country = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the category of entity
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "category")]
+ public byte Category
+ {
+ get
+ {
+ return this._category;
+ }
+
+ set
+ {
+ this._category = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the subcategory of entity
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "subcategory")]
+ public byte Subcategory
+ {
+ get
+ {
+ return this._subcategory;
+ }
+
+ set
+ {
+ this._subcategory = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the specific info based on subcategory field
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "specific")]
+ public byte Specific
+ {
+ get
+ {
+ return this._specific;
+ }
+
+ set
+ {
+ this._specific = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the extra
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "extra")]
+ public byte Extra
+ {
+ get
+ {
+ return this._extra;
+ }
+
+ set
+ {
+ this._extra = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedByte((byte)this._entityKind);
+ dos.WriteUnsignedByte((byte)this._domain);
+ dos.WriteUnsignedShort((ushort)this._country);
+ dos.WriteUnsignedByte((byte)this._category);
+ dos.WriteUnsignedByte((byte)this._subcategory);
+ dos.WriteUnsignedByte((byte)this._specific);
+ dos.WriteUnsignedByte((byte)this._extra);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._entityKind = dis.ReadUnsignedByte();
+ this._domain = dis.ReadUnsignedByte();
+ this._country = dis.ReadUnsignedShort();
+ this._category = dis.ReadUnsignedByte();
+ this._subcategory = dis.ReadUnsignedByte();
+ this._specific = dis.ReadUnsignedByte();
+ this._extra = dis.ReadUnsignedByte();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._entityKind.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._domain.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._country.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._category.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._subcategory.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._specific.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._extra.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EntityType;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EntityType obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._entityKind != obj._entityKind)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._domain != obj._domain)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._country != obj._country)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._category != obj._category)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._subcategory != obj._subcategory)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._specific != obj._specific)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._extra != obj._extra)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._entityKind.GetHashCode();
+ result = GenerateHash(result) ^ this._domain.GetHashCode();
+ result = GenerateHash(result) ^ this._country.GetHashCode();
+ result = GenerateHash(result) ^ this._category.GetHashCode();
+ result = GenerateHash(result) ^ this._subcategory.GetHashCode();
+ result = GenerateHash(result) ^ this._specific.GetHashCode();
+ result = GenerateHash(result) ^ this._extra.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EventID.cs b/Libs/CsharpDis6/Dis1995/Generated/EventID.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EventID.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EventID.cs
index 6a91db4..b20d071 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EventID.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EventID.cs
@@ -1,364 +1,364 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.18. Identifies a unique event in a simulation via the combination of three values
- ///
- [Serializable]
- [XmlRoot]
- public partial class EventID
- {
- ///
- /// The application ID
- ///
- private ushort _application;
-
- ///
- /// The site ID
- ///
- private ushort _site;
-
- ///
- /// the number of the event
- ///
- private ushort _eventNumber;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EventID()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EventID left, EventID right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EventID left, EventID right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 2; // this._application
- marshalSize += 2; // this._site
- marshalSize += 2; // this._eventNumber
- return marshalSize;
- }
-
- ///
- /// Gets or sets the The application ID
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "application")]
- public ushort Application
- {
- get
- {
- return this._application;
- }
-
- set
- {
- this._application = value;
- }
- }
-
- ///
- /// Gets or sets the The site ID
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "site")]
- public ushort Site
- {
- get
- {
- return this._site;
- }
-
- set
- {
- this._site = value;
- }
- }
-
- ///
- /// Gets or sets the the number of the event
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "eventNumber")]
- public ushort EventNumber
- {
- get
- {
- return this._eventNumber;
- }
-
- set
- {
- this._eventNumber = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedShort((ushort)this._application);
- dos.WriteUnsignedShort((ushort)this._site);
- dos.WriteUnsignedShort((ushort)this._eventNumber);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._application = dis.ReadUnsignedShort();
- this._site = dis.ReadUnsignedShort();
- this._eventNumber = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._application.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._site.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._eventNumber.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EventID;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EventID obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._application != obj._application)
- {
- ivarsEqual = false;
- }
-
- if (this._site != obj._site)
- {
- ivarsEqual = false;
- }
-
- if (this._eventNumber != obj._eventNumber)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._application.GetHashCode();
- result = GenerateHash(result) ^ this._site.GetHashCode();
- result = GenerateHash(result) ^ this._eventNumber.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.18. Identifies a unique event in a simulation via the combination of three values
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class EventID
+ {
+ ///
+ /// The application ID
+ ///
+ private ushort _application;
+
+ ///
+ /// The site ID
+ ///
+ private ushort _site;
+
+ ///
+ /// the number of the event
+ ///
+ private ushort _eventNumber;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EventID()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EventID left, EventID right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EventID left, EventID right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 2; // this._application
+ marshalSize += 2; // this._site
+ marshalSize += 2; // this._eventNumber
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the The application ID
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "application")]
+ public ushort Application
+ {
+ get
+ {
+ return this._application;
+ }
+
+ set
+ {
+ this._application = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the The site ID
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "site")]
+ public ushort Site
+ {
+ get
+ {
+ return this._site;
+ }
+
+ set
+ {
+ this._site = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the the number of the event
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "eventNumber")]
+ public ushort EventNumber
+ {
+ get
+ {
+ return this._eventNumber;
+ }
+
+ set
+ {
+ this._eventNumber = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedShort((ushort)this._application);
+ dos.WriteUnsignedShort((ushort)this._site);
+ dos.WriteUnsignedShort((ushort)this._eventNumber);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._application = dis.ReadUnsignedShort();
+ this._site = dis.ReadUnsignedShort();
+ this._eventNumber = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._application.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._site.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._eventNumber.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EventID;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EventID obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._application != obj._application)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._site != obj._site)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._eventNumber != obj._eventNumber)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._application.GetHashCode();
+ result = GenerateHash(result) ^ this._site.GetHashCode();
+ result = GenerateHash(result) ^ this._eventNumber.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/EventReportPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/EventReportPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/EventReportPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/EventReportPdu.cs
index ea9df59..5cddc46 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/EventReportPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/EventReportPdu.cs
@@ -1,548 +1,548 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.11. Reports occurance of a significant event to the simulation manager
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(FixedDatum))]
- [XmlInclude(typeof(VariableDatum))]
- public partial class EventReportPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// Type of event
- ///
- private uint _eventType;
-
- ///
- /// padding
- ///
- private uint _padding1;
-
- ///
- /// Number of fixed datum records
- ///
- private uint _fixedDatumRecordCount;
-
- ///
- /// Number of variable datum records
- ///
- private uint _variableDatumRecordCount;
-
- ///
- /// variable length list of fixed datums
- ///
- private List _fixedDatums = new List();
-
- ///
- /// variable length list of variable length datums
- ///
- private List _variableDatums = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public EventReportPdu()
- {
- PduType = (byte)21;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(EventReportPdu left, EventReportPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(EventReportPdu left, EventReportPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._eventType
- marshalSize += 4; // this._padding1
- marshalSize += 4; // this._fixedDatumRecordCount
- marshalSize += 4; // this._variableDatumRecordCount
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Type of event
- ///
- [XmlElement(Type = typeof(uint), ElementName = "eventType")]
- public uint EventType
- {
- get
- {
- return this._eventType;
- }
-
- set
- {
- this._eventType = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(uint), ElementName = "padding1")]
- public uint Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the Number of fixed datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
- public uint FixedDatumRecordCount
- {
- get
- {
- return this._fixedDatumRecordCount;
- }
-
- set
- {
- this._fixedDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets or sets the Number of variable datum records
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
- public uint VariableDatumRecordCount
- {
- get
- {
- return this._variableDatumRecordCount;
- }
-
- set
- {
- this._variableDatumRecordCount = value;
- }
- }
-
- ///
- /// Gets the variable length list of fixed datums
- ///
- [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
- public List FixedDatums
- {
- get
- {
- return this._fixedDatums;
- }
- }
-
- ///
- /// Gets the variable length list of variable length datums
- ///
- [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
- public List VariableDatums
- {
- get
- {
- return this._variableDatums;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._eventType);
- dos.WriteUnsignedInt((uint)this._padding1);
- dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
- dos.WriteUnsignedInt((uint)this._variableDatums.Count);
-
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Marshal(dos);
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._eventType = dis.ReadUnsignedInt();
- this._padding1 = dis.ReadUnsignedInt();
- this._fixedDatumRecordCount = dis.ReadUnsignedInt();
- this._variableDatumRecordCount = dis.ReadUnsignedInt();
-
- for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
- {
- FixedDatum anX = new FixedDatum();
- anX.Unmarshal(dis);
- this._fixedDatums.Add(anX);
- }
-
- for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
- {
- VariableDatum anX = new VariableDatum();
- anX.Unmarshal(dis);
- this._variableDatums.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._eventType.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- sb.AppendLine("");
- FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
- aFixedDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- sb.AppendLine("");
- VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
- aVariableDatum.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as EventReportPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(EventReportPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._eventType != obj._eventType)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatums.Count != obj._fixedDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- if (this._variableDatums.Count != obj._variableDatums.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._eventType.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
- result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
-
- if (this._fixedDatums.Count > 0)
- {
- for (int idx = 0; idx < this._fixedDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
- }
- }
-
- if (this._variableDatums.Count > 0)
- {
- for (int idx = 0; idx < this._variableDatums.Count; idx++)
- {
- result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.11. Reports occurance of a significant event to the simulation manager
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(FixedDatum))]
+ [XmlInclude(typeof(VariableDatum))]
+ public partial class EventReportPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// Type of event
+ ///
+ private uint _eventType;
+
+ ///
+ /// padding
+ ///
+ private uint _padding1;
+
+ ///
+ /// Number of fixed datum records
+ ///
+ private uint _fixedDatumRecordCount;
+
+ ///
+ /// Number of variable datum records
+ ///
+ private uint _variableDatumRecordCount;
+
+ ///
+ /// variable length list of fixed datums
+ ///
+ private List _fixedDatums = new List();
+
+ ///
+ /// variable length list of variable length datums
+ ///
+ private List _variableDatums = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EventReportPdu()
+ {
+ PduType = (byte)21;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(EventReportPdu left, EventReportPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(EventReportPdu left, EventReportPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._eventType
+ marshalSize += 4; // this._padding1
+ marshalSize += 4; // this._fixedDatumRecordCount
+ marshalSize += 4; // this._variableDatumRecordCount
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum listElement = (FixedDatum)this._fixedDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum listElement = (VariableDatum)this._variableDatums[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Type of event
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "eventType")]
+ public uint EventType
+ {
+ get
+ {
+ return this._eventType;
+ }
+
+ set
+ {
+ this._eventType = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "padding1")]
+ public uint Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of fixed datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getfixedDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumRecordCount")]
+ public uint FixedDatumRecordCount
+ {
+ get
+ {
+ return this._fixedDatumRecordCount;
+ }
+
+ set
+ {
+ this._fixedDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Number of variable datum records
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getvariableDatumRecordCount method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "variableDatumRecordCount")]
+ public uint VariableDatumRecordCount
+ {
+ get
+ {
+ return this._variableDatumRecordCount;
+ }
+
+ set
+ {
+ this._variableDatumRecordCount = value;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of fixed datums
+ ///
+ [XmlElement(ElementName = "fixedDatumsList", Type = typeof(List))]
+ public List FixedDatums
+ {
+ get
+ {
+ return this._fixedDatums;
+ }
+ }
+
+ ///
+ /// Gets the variable length list of variable length datums
+ ///
+ [XmlElement(ElementName = "variableDatumsList", Type = typeof(List))]
+ public List VariableDatums
+ {
+ get
+ {
+ return this._variableDatums;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._eventType);
+ dos.WriteUnsignedInt((uint)this._padding1);
+ dos.WriteUnsignedInt((uint)this._fixedDatums.Count);
+ dos.WriteUnsignedInt((uint)this._variableDatums.Count);
+
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Marshal(dos);
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._eventType = dis.ReadUnsignedInt();
+ this._padding1 = dis.ReadUnsignedInt();
+ this._fixedDatumRecordCount = dis.ReadUnsignedInt();
+ this._variableDatumRecordCount = dis.ReadUnsignedInt();
+
+ for (int idx = 0; idx < this.FixedDatumRecordCount; idx++)
+ {
+ FixedDatum anX = new FixedDatum();
+ anX.Unmarshal(dis);
+ this._fixedDatums.Add(anX);
+ }
+
+ for (int idx = 0; idx < this.VariableDatumRecordCount; idx++)
+ {
+ VariableDatum anX = new VariableDatum();
+ anX.Unmarshal(dis);
+ this._variableDatums.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._eventType.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
+ aFixedDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ sb.AppendLine("");
+ VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
+ aVariableDatum.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as EventReportPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(EventReportPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._eventType != obj._eventType)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatumRecordCount != obj._fixedDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._variableDatumRecordCount != obj._variableDatumRecordCount)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatums.Count != obj._fixedDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ if (!this._fixedDatums[idx].Equals(obj._fixedDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ if (this._variableDatums.Count != obj._variableDatums.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ if (!this._variableDatums[idx].Equals(obj._variableDatums[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._eventType.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._fixedDatumRecordCount.GetHashCode();
+ result = GenerateHash(result) ^ this._variableDatumRecordCount.GetHashCode();
+
+ if (this._fixedDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._fixedDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._fixedDatums[idx].GetHashCode();
+ }
+ }
+
+ if (this._variableDatums.Count > 0)
+ {
+ for (int idx = 0; idx < this._variableDatums.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._variableDatums[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/FirePdu.cs b/Libs/CsharpDis6/Dis1995/Generated/FirePdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/FirePdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/FirePdu.cs
index 52472c1..e29c7b2 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/FirePdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/FirePdu.cs
@@ -1,508 +1,508 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Sectioin 5.3.4.1. Information about someone firing something
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(EventID))]
- [XmlInclude(typeof(Vector3Double))]
- [XmlInclude(typeof(BurstDescriptor))]
- [XmlInclude(typeof(Vector3Float))]
- public partial class FirePdu : Warfare, IEquatable
- {
- ///
- /// ID of the munition that is being shot
- ///
- private EntityID _munitionID = new EntityID();
-
- ///
- /// ID of event
- ///
- private EventID _eventID = new EventID();
-
- private int _fireMissionIndex;
-
- ///
- /// location of the firing event
- ///
- private Vector3Double _locationInWorldCoordinates = new Vector3Double();
-
- ///
- /// Describes munitions used in the firing event
- ///
- private BurstDescriptor _burstDescriptor = new BurstDescriptor();
-
- ///
- /// Velocity of the ammunition
- ///
- private Vector3Float _velocity = new Vector3Float();
-
- ///
- /// range to the target
- ///
- private float _range;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FirePdu()
- {
- PduType = (byte)2;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(FirePdu left, FirePdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(FirePdu left, FirePdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._munitionID.GetMarshalledSize(); // this._munitionID
- marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
- marshalSize += 4; // this._fireMissionIndex
- marshalSize += this._locationInWorldCoordinates.GetMarshalledSize(); // this._locationInWorldCoordinates
- marshalSize += this._burstDescriptor.GetMarshalledSize(); // this._burstDescriptor
- marshalSize += this._velocity.GetMarshalledSize(); // this._velocity
- marshalSize += 4; // this._range
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of the munition that is being shot
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "munitionID")]
- public EntityID MunitionID
- {
- get
- {
- return this._munitionID;
- }
-
- set
- {
- this._munitionID = value;
- }
- }
-
- ///
- /// Gets or sets the ID of event
- ///
- [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
- public EventID EventID
- {
- get
- {
- return this._eventID;
- }
-
- set
- {
- this._eventID = value;
- }
- }
-
- ///
- /// Gets or sets the fireMissionIndex
- ///
- [XmlElement(Type = typeof(int), ElementName = "fireMissionIndex")]
- public int FireMissionIndex
- {
- get
- {
- return this._fireMissionIndex;
- }
-
- set
- {
- this._fireMissionIndex = value;
- }
- }
-
- ///
- /// Gets or sets the location of the firing event
- ///
- [XmlElement(Type = typeof(Vector3Double), ElementName = "locationInWorldCoordinates")]
- public Vector3Double LocationInWorldCoordinates
- {
- get
- {
- return this._locationInWorldCoordinates;
- }
-
- set
- {
- this._locationInWorldCoordinates = value;
- }
- }
-
- ///
- /// Gets or sets the Describes munitions used in the firing event
- ///
- [XmlElement(Type = typeof(BurstDescriptor), ElementName = "burstDescriptor")]
- public BurstDescriptor BurstDescriptor
- {
- get
- {
- return this._burstDescriptor;
- }
-
- set
- {
- this._burstDescriptor = value;
- }
- }
-
- ///
- /// Gets or sets the Velocity of the ammunition
- ///
- [XmlElement(Type = typeof(Vector3Float), ElementName = "velocity")]
- public Vector3Float Velocity
- {
- get
- {
- return this._velocity;
- }
-
- set
- {
- this._velocity = value;
- }
- }
-
- ///
- /// Gets or sets the range to the target
- ///
- [XmlElement(Type = typeof(float), ElementName = "range")]
- public float Range
- {
- get
- {
- return this._range;
- }
-
- set
- {
- this._range = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._munitionID.Marshal(dos);
- this._eventID.Marshal(dos);
- dos.WriteInt((int)this._fireMissionIndex);
- this._locationInWorldCoordinates.Marshal(dos);
- this._burstDescriptor.Marshal(dos);
- this._velocity.Marshal(dos);
- dos.WriteFloat((float)this._range);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._munitionID.Unmarshal(dis);
- this._eventID.Unmarshal(dis);
- this._fireMissionIndex = dis.ReadInt();
- this._locationInWorldCoordinates.Unmarshal(dis);
- this._burstDescriptor.Unmarshal(dis);
- this._velocity.Unmarshal(dis);
- this._range = dis.ReadFloat();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._munitionID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._eventID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._fireMissionIndex.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._locationInWorldCoordinates.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._burstDescriptor.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._velocity.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._range.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as FirePdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(FirePdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._munitionID.Equals(obj._munitionID))
- {
- ivarsEqual = false;
- }
-
- if (!this._eventID.Equals(obj._eventID))
- {
- ivarsEqual = false;
- }
-
- if (this._fireMissionIndex != obj._fireMissionIndex)
- {
- ivarsEqual = false;
- }
-
- if (!this._locationInWorldCoordinates.Equals(obj._locationInWorldCoordinates))
- {
- ivarsEqual = false;
- }
-
- if (!this._burstDescriptor.Equals(obj._burstDescriptor))
- {
- ivarsEqual = false;
- }
-
- if (!this._velocity.Equals(obj._velocity))
- {
- ivarsEqual = false;
- }
-
- if (this._range != obj._range)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._munitionID.GetHashCode();
- result = GenerateHash(result) ^ this._eventID.GetHashCode();
- result = GenerateHash(result) ^ this._fireMissionIndex.GetHashCode();
- result = GenerateHash(result) ^ this._locationInWorldCoordinates.GetHashCode();
- result = GenerateHash(result) ^ this._burstDescriptor.GetHashCode();
- result = GenerateHash(result) ^ this._velocity.GetHashCode();
- result = GenerateHash(result) ^ this._range.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Sectioin 5.3.4.1. Information about someone firing something
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(EventID))]
+ [XmlInclude(typeof(Vector3Double))]
+ [XmlInclude(typeof(BurstDescriptor))]
+ [XmlInclude(typeof(Vector3Float))]
+ public partial class FirePdu : Warfare, IEquatable
+ {
+ ///
+ /// ID of the munition that is being shot
+ ///
+ private EntityID _munitionID = new EntityID();
+
+ ///
+ /// ID of event
+ ///
+ private EventID _eventID = new EventID();
+
+ private int _fireMissionIndex;
+
+ ///
+ /// location of the firing event
+ ///
+ private Vector3Double _locationInWorldCoordinates = new Vector3Double();
+
+ ///
+ /// Describes munitions used in the firing event
+ ///
+ private BurstDescriptor _burstDescriptor = new BurstDescriptor();
+
+ ///
+ /// Velocity of the ammunition
+ ///
+ private Vector3Float _velocity = new Vector3Float();
+
+ ///
+ /// range to the target
+ ///
+ private float _range;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public FirePdu()
+ {
+ PduType = (byte)2;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(FirePdu left, FirePdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(FirePdu left, FirePdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._munitionID.GetMarshalledSize(); // this._munitionID
+ marshalSize += this._eventID.GetMarshalledSize(); // this._eventID
+ marshalSize += 4; // this._fireMissionIndex
+ marshalSize += this._locationInWorldCoordinates.GetMarshalledSize(); // this._locationInWorldCoordinates
+ marshalSize += this._burstDescriptor.GetMarshalledSize(); // this._burstDescriptor
+ marshalSize += this._velocity.GetMarshalledSize(); // this._velocity
+ marshalSize += 4; // this._range
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of the munition that is being shot
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "munitionID")]
+ public EntityID MunitionID
+ {
+ get
+ {
+ return this._munitionID;
+ }
+
+ set
+ {
+ this._munitionID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of event
+ ///
+ [XmlElement(Type = typeof(EventID), ElementName = "eventID")]
+ public EventID EventID
+ {
+ get
+ {
+ return this._eventID;
+ }
+
+ set
+ {
+ this._eventID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the fireMissionIndex
+ ///
+ [XmlElement(Type = typeof(int), ElementName = "fireMissionIndex")]
+ public int FireMissionIndex
+ {
+ get
+ {
+ return this._fireMissionIndex;
+ }
+
+ set
+ {
+ this._fireMissionIndex = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the location of the firing event
+ ///
+ [XmlElement(Type = typeof(Vector3Double), ElementName = "locationInWorldCoordinates")]
+ public Vector3Double LocationInWorldCoordinates
+ {
+ get
+ {
+ return this._locationInWorldCoordinates;
+ }
+
+ set
+ {
+ this._locationInWorldCoordinates = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Describes munitions used in the firing event
+ ///
+ [XmlElement(Type = typeof(BurstDescriptor), ElementName = "burstDescriptor")]
+ public BurstDescriptor BurstDescriptor
+ {
+ get
+ {
+ return this._burstDescriptor;
+ }
+
+ set
+ {
+ this._burstDescriptor = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Velocity of the ammunition
+ ///
+ [XmlElement(Type = typeof(Vector3Float), ElementName = "velocity")]
+ public Vector3Float Velocity
+ {
+ get
+ {
+ return this._velocity;
+ }
+
+ set
+ {
+ this._velocity = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the range to the target
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "range")]
+ public float Range
+ {
+ get
+ {
+ return this._range;
+ }
+
+ set
+ {
+ this._range = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._munitionID.Marshal(dos);
+ this._eventID.Marshal(dos);
+ dos.WriteInt((int)this._fireMissionIndex);
+ this._locationInWorldCoordinates.Marshal(dos);
+ this._burstDescriptor.Marshal(dos);
+ this._velocity.Marshal(dos);
+ dos.WriteFloat((float)this._range);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._munitionID.Unmarshal(dis);
+ this._eventID.Unmarshal(dis);
+ this._fireMissionIndex = dis.ReadInt();
+ this._locationInWorldCoordinates.Unmarshal(dis);
+ this._burstDescriptor.Unmarshal(dis);
+ this._velocity.Unmarshal(dis);
+ this._range = dis.ReadFloat();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._munitionID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._eventID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._fireMissionIndex.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._locationInWorldCoordinates.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._burstDescriptor.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._velocity.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._range.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as FirePdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(FirePdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._munitionID.Equals(obj._munitionID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._eventID.Equals(obj._eventID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fireMissionIndex != obj._fireMissionIndex)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._locationInWorldCoordinates.Equals(obj._locationInWorldCoordinates))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._burstDescriptor.Equals(obj._burstDescriptor))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._velocity.Equals(obj._velocity))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._range != obj._range)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._munitionID.GetHashCode();
+ result = GenerateHash(result) ^ this._eventID.GetHashCode();
+ result = GenerateHash(result) ^ this._fireMissionIndex.GetHashCode();
+ result = GenerateHash(result) ^ this._locationInWorldCoordinates.GetHashCode();
+ result = GenerateHash(result) ^ this._burstDescriptor.GetHashCode();
+ result = GenerateHash(result) ^ this._velocity.GetHashCode();
+ result = GenerateHash(result) ^ this._range.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/FixedDatum.cs b/Libs/CsharpDis6/Dis1995/Generated/FixedDatum.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/FixedDatum.cs
rename to Libs/CsharpDis6/Dis1995/Generated/FixedDatum.cs
index 2622206..4246664 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/FixedDatum.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/FixedDatum.cs
@@ -1,332 +1,332 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.18. Fixed Datum Record
- ///
- [Serializable]
- [XmlRoot]
- public partial class FixedDatum
- {
- ///
- /// ID of the fixed datum
- ///
- private uint _fixedDatumID;
-
- ///
- /// Value for the fixed datum
- ///
- private uint _fixedDatumValue;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FixedDatum()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(FixedDatum left, FixedDatum right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(FixedDatum left, FixedDatum right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 4; // this._fixedDatumID
- marshalSize += 4; // this._fixedDatumValue
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of the fixed datum
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumID")]
- public uint FixedDatumID
- {
- get
- {
- return this._fixedDatumID;
- }
-
- set
- {
- this._fixedDatumID = value;
- }
- }
-
- ///
- /// Gets or sets the Value for the fixed datum
- ///
- [XmlElement(Type = typeof(uint), ElementName = "fixedDatumValue")]
- public uint FixedDatumValue
- {
- get
- {
- return this._fixedDatumValue;
- }
-
- set
- {
- this._fixedDatumValue = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._fixedDatumID);
- dos.WriteUnsignedInt((uint)this._fixedDatumValue);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._fixedDatumID = dis.ReadUnsignedInt();
- this._fixedDatumValue = dis.ReadUnsignedInt();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._fixedDatumID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._fixedDatumValue.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as FixedDatum;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(FixedDatum obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._fixedDatumID != obj._fixedDatumID)
- {
- ivarsEqual = false;
- }
-
- if (this._fixedDatumValue != obj._fixedDatumValue)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._fixedDatumID.GetHashCode();
- result = GenerateHash(result) ^ this._fixedDatumValue.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.18. Fixed Datum Record
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class FixedDatum
+ {
+ ///
+ /// ID of the fixed datum
+ ///
+ private uint _fixedDatumID;
+
+ ///
+ /// Value for the fixed datum
+ ///
+ private uint _fixedDatumValue;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public FixedDatum()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(FixedDatum left, FixedDatum right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(FixedDatum left, FixedDatum right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 4; // this._fixedDatumID
+ marshalSize += 4; // this._fixedDatumValue
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of the fixed datum
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumID")]
+ public uint FixedDatumID
+ {
+ get
+ {
+ return this._fixedDatumID;
+ }
+
+ set
+ {
+ this._fixedDatumID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Value for the fixed datum
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "fixedDatumValue")]
+ public uint FixedDatumValue
+ {
+ get
+ {
+ return this._fixedDatumValue;
+ }
+
+ set
+ {
+ this._fixedDatumValue = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._fixedDatumID);
+ dos.WriteUnsignedInt((uint)this._fixedDatumValue);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._fixedDatumID = dis.ReadUnsignedInt();
+ this._fixedDatumValue = dis.ReadUnsignedInt();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._fixedDatumID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._fixedDatumValue.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as FixedDatum;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(FixedDatum obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._fixedDatumID != obj._fixedDatumID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._fixedDatumValue != obj._fixedDatumValue)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._fixedDatumID.GetHashCode();
+ result = GenerateHash(result) ^ this._fixedDatumValue.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/FundamentalParameterData.cs b/Libs/CsharpDis6/Dis1995/Generated/FundamentalParameterData.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/FundamentalParameterData.cs
rename to Libs/CsharpDis6/Dis1995/Generated/FundamentalParameterData.cs
index 73eb03c..a893a74 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/FundamentalParameterData.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/FundamentalParameterData.cs
@@ -1,588 +1,588 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.22. Contains electromagnetic emmision regineratin parameters that are variable throughout a scenario dependent on the actions of the participants in the simulation. Also provides basic parametric data that may be used to support low-fidelity simulations.
- ///
- [Serializable]
- [XmlRoot]
- public partial class FundamentalParameterData
- {
- ///
- /// center frequency of the emission in hertz.
- ///
- private float _frequency;
-
- ///
- /// Bandwidth of the frequencies corresponding to the fequency field.
- ///
- private float _frequencyRange;
-
- ///
- /// Effective radiated power for the emission in DdBm. For a radar noise jammer, indicates the peak of the transmitted power.
- ///
- private float _effectiveRadiatedPower;
-
- ///
- /// Average repetition frequency of the emission in hertz.
- ///
- private float _pulseRepetitionFrequency;
-
- ///
- /// Average pulse width of the emission in microseconds.
- ///
- private float _pusleWidth;
-
- ///
- /// Specifies the beam azimuth an elevation centers and corresponding half-angles to describe the scan volume
- ///
- private float _beamAzimuthCenter;
-
- ///
- /// Specifies the beam azimuth sweep to determine scan volume
- ///
- private float _beamAzimuthSweep;
-
- ///
- /// Specifies the beam elevation center to determine scan volume
- ///
- private float _beamElevationCenter;
-
- ///
- /// Specifies the beam elevation sweep to determine scan volume
- ///
- private float _beamElevationSweep;
-
- ///
- /// allows receiver to synchronize its regenerated scan pattern to that of the emmitter. Specifies the percentage of time a scan is through its pattern from its origion.
- ///
- private float _beamSweepSync;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FundamentalParameterData()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(FundamentalParameterData left, FundamentalParameterData right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(FundamentalParameterData left, FundamentalParameterData right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 4; // this._frequency
- marshalSize += 4; // this._frequencyRange
- marshalSize += 4; // this._effectiveRadiatedPower
- marshalSize += 4; // this._pulseRepetitionFrequency
- marshalSize += 4; // this._pusleWidth
- marshalSize += 4; // this._beamAzimuthCenter
- marshalSize += 4; // this._beamAzimuthSweep
- marshalSize += 4; // this._beamElevationCenter
- marshalSize += 4; // this._beamElevationSweep
- marshalSize += 4; // this._beamSweepSync
- return marshalSize;
- }
-
- ///
- /// Gets or sets the center frequency of the emission in hertz.
- ///
- [XmlElement(Type = typeof(float), ElementName = "frequency")]
- public float Frequency
- {
- get
- {
- return this._frequency;
- }
-
- set
- {
- this._frequency = value;
- }
- }
-
- ///
- /// Gets or sets the Bandwidth of the frequencies corresponding to the fequency field.
- ///
- [XmlElement(Type = typeof(float), ElementName = "frequencyRange")]
- public float FrequencyRange
- {
- get
- {
- return this._frequencyRange;
- }
-
- set
- {
- this._frequencyRange = value;
- }
- }
-
- ///
- /// Gets or sets the Effective radiated power for the emission in DdBm. For a radar noise jammer, indicates the peak of the transmitted power.
- ///
- [XmlElement(Type = typeof(float), ElementName = "effectiveRadiatedPower")]
- public float EffectiveRadiatedPower
- {
- get
- {
- return this._effectiveRadiatedPower;
- }
-
- set
- {
- this._effectiveRadiatedPower = value;
- }
- }
-
- ///
- /// Gets or sets the Average repetition frequency of the emission in hertz.
- ///
- [XmlElement(Type = typeof(float), ElementName = "pulseRepetitionFrequency")]
- public float PulseRepetitionFrequency
- {
- get
- {
- return this._pulseRepetitionFrequency;
- }
-
- set
- {
- this._pulseRepetitionFrequency = value;
- }
- }
-
- ///
- /// Gets or sets the Average pulse width of the emission in microseconds.
- ///
- [XmlElement(Type = typeof(float), ElementName = "pusleWidth")]
- public float PusleWidth
- {
- get
- {
- return this._pusleWidth;
- }
-
- set
- {
- this._pusleWidth = value;
- }
- }
-
- ///
- /// Gets or sets the Specifies the beam azimuth an elevation centers and corresponding half-angles to describe the scan volume
- ///
- [XmlElement(Type = typeof(float), ElementName = "beamAzimuthCenter")]
- public float BeamAzimuthCenter
- {
- get
- {
- return this._beamAzimuthCenter;
- }
-
- set
- {
- this._beamAzimuthCenter = value;
- }
- }
-
- ///
- /// Gets or sets the Specifies the beam azimuth sweep to determine scan volume
- ///
- [XmlElement(Type = typeof(float), ElementName = "beamAzimuthSweep")]
- public float BeamAzimuthSweep
- {
- get
- {
- return this._beamAzimuthSweep;
- }
-
- set
- {
- this._beamAzimuthSweep = value;
- }
- }
-
- ///
- /// Gets or sets the Specifies the beam elevation center to determine scan volume
- ///
- [XmlElement(Type = typeof(float), ElementName = "beamElevationCenter")]
- public float BeamElevationCenter
- {
- get
- {
- return this._beamElevationCenter;
- }
-
- set
- {
- this._beamElevationCenter = value;
- }
- }
-
- ///
- /// Gets or sets the Specifies the beam elevation sweep to determine scan volume
- ///
- [XmlElement(Type = typeof(float), ElementName = "beamElevationSweep")]
- public float BeamElevationSweep
- {
- get
- {
- return this._beamElevationSweep;
- }
-
- set
- {
- this._beamElevationSweep = value;
- }
- }
-
- ///
- /// Gets or sets the allows receiver to synchronize its regenerated scan pattern to that of the emmitter. Specifies the percentage of time a scan is through its pattern from its origion.
- ///
- [XmlElement(Type = typeof(float), ElementName = "beamSweepSync")]
- public float BeamSweepSync
- {
- get
- {
- return this._beamSweepSync;
- }
-
- set
- {
- this._beamSweepSync = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteFloat((float)this._frequency);
- dos.WriteFloat((float)this._frequencyRange);
- dos.WriteFloat((float)this._effectiveRadiatedPower);
- dos.WriteFloat((float)this._pulseRepetitionFrequency);
- dos.WriteFloat((float)this._pusleWidth);
- dos.WriteFloat((float)this._beamAzimuthCenter);
- dos.WriteFloat((float)this._beamAzimuthSweep);
- dos.WriteFloat((float)this._beamElevationCenter);
- dos.WriteFloat((float)this._beamElevationSweep);
- dos.WriteFloat((float)this._beamSweepSync);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._frequency = dis.ReadFloat();
- this._frequencyRange = dis.ReadFloat();
- this._effectiveRadiatedPower = dis.ReadFloat();
- this._pulseRepetitionFrequency = dis.ReadFloat();
- this._pusleWidth = dis.ReadFloat();
- this._beamAzimuthCenter = dis.ReadFloat();
- this._beamAzimuthSweep = dis.ReadFloat();
- this._beamElevationCenter = dis.ReadFloat();
- this._beamElevationSweep = dis.ReadFloat();
- this._beamSweepSync = dis.ReadFloat();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._frequency.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._frequencyRange.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._effectiveRadiatedPower.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._pulseRepetitionFrequency.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._pusleWidth.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamAzimuthCenter.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamAzimuthSweep.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamElevationCenter.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamElevationSweep.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._beamSweepSync.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as FundamentalParameterData;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(FundamentalParameterData obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._frequency != obj._frequency)
- {
- ivarsEqual = false;
- }
-
- if (this._frequencyRange != obj._frequencyRange)
- {
- ivarsEqual = false;
- }
-
- if (this._effectiveRadiatedPower != obj._effectiveRadiatedPower)
- {
- ivarsEqual = false;
- }
-
- if (this._pulseRepetitionFrequency != obj._pulseRepetitionFrequency)
- {
- ivarsEqual = false;
- }
-
- if (this._pusleWidth != obj._pusleWidth)
- {
- ivarsEqual = false;
- }
-
- if (this._beamAzimuthCenter != obj._beamAzimuthCenter)
- {
- ivarsEqual = false;
- }
-
- if (this._beamAzimuthSweep != obj._beamAzimuthSweep)
- {
- ivarsEqual = false;
- }
-
- if (this._beamElevationCenter != obj._beamElevationCenter)
- {
- ivarsEqual = false;
- }
-
- if (this._beamElevationSweep != obj._beamElevationSweep)
- {
- ivarsEqual = false;
- }
-
- if (this._beamSweepSync != obj._beamSweepSync)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._frequency.GetHashCode();
- result = GenerateHash(result) ^ this._frequencyRange.GetHashCode();
- result = GenerateHash(result) ^ this._effectiveRadiatedPower.GetHashCode();
- result = GenerateHash(result) ^ this._pulseRepetitionFrequency.GetHashCode();
- result = GenerateHash(result) ^ this._pusleWidth.GetHashCode();
- result = GenerateHash(result) ^ this._beamAzimuthCenter.GetHashCode();
- result = GenerateHash(result) ^ this._beamAzimuthSweep.GetHashCode();
- result = GenerateHash(result) ^ this._beamElevationCenter.GetHashCode();
- result = GenerateHash(result) ^ this._beamElevationSweep.GetHashCode();
- result = GenerateHash(result) ^ this._beamSweepSync.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.22. Contains electromagnetic emmision regineratin parameters that are variable throughout a scenario dependent on the actions of the participants in the simulation. Also provides basic parametric data that may be used to support low-fidelity simulations.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class FundamentalParameterData
+ {
+ ///
+ /// center frequency of the emission in hertz.
+ ///
+ private float _frequency;
+
+ ///
+ /// Bandwidth of the frequencies corresponding to the fequency field.
+ ///
+ private float _frequencyRange;
+
+ ///
+ /// Effective radiated power for the emission in DdBm. For a radar noise jammer, indicates the peak of the transmitted power.
+ ///
+ private float _effectiveRadiatedPower;
+
+ ///
+ /// Average repetition frequency of the emission in hertz.
+ ///
+ private float _pulseRepetitionFrequency;
+
+ ///
+ /// Average pulse width of the emission in microseconds.
+ ///
+ private float _pusleWidth;
+
+ ///
+ /// Specifies the beam azimuth an elevation centers and corresponding half-angles to describe the scan volume
+ ///
+ private float _beamAzimuthCenter;
+
+ ///
+ /// Specifies the beam azimuth sweep to determine scan volume
+ ///
+ private float _beamAzimuthSweep;
+
+ ///
+ /// Specifies the beam elevation center to determine scan volume
+ ///
+ private float _beamElevationCenter;
+
+ ///
+ /// Specifies the beam elevation sweep to determine scan volume
+ ///
+ private float _beamElevationSweep;
+
+ ///
+ /// allows receiver to synchronize its regenerated scan pattern to that of the emmitter. Specifies the percentage of time a scan is through its pattern from its origion.
+ ///
+ private float _beamSweepSync;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public FundamentalParameterData()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(FundamentalParameterData left, FundamentalParameterData right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(FundamentalParameterData left, FundamentalParameterData right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 4; // this._frequency
+ marshalSize += 4; // this._frequencyRange
+ marshalSize += 4; // this._effectiveRadiatedPower
+ marshalSize += 4; // this._pulseRepetitionFrequency
+ marshalSize += 4; // this._pusleWidth
+ marshalSize += 4; // this._beamAzimuthCenter
+ marshalSize += 4; // this._beamAzimuthSweep
+ marshalSize += 4; // this._beamElevationCenter
+ marshalSize += 4; // this._beamElevationSweep
+ marshalSize += 4; // this._beamSweepSync
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the center frequency of the emission in hertz.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "frequency")]
+ public float Frequency
+ {
+ get
+ {
+ return this._frequency;
+ }
+
+ set
+ {
+ this._frequency = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Bandwidth of the frequencies corresponding to the fequency field.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "frequencyRange")]
+ public float FrequencyRange
+ {
+ get
+ {
+ return this._frequencyRange;
+ }
+
+ set
+ {
+ this._frequencyRange = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Effective radiated power for the emission in DdBm. For a radar noise jammer, indicates the peak of the transmitted power.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "effectiveRadiatedPower")]
+ public float EffectiveRadiatedPower
+ {
+ get
+ {
+ return this._effectiveRadiatedPower;
+ }
+
+ set
+ {
+ this._effectiveRadiatedPower = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Average repetition frequency of the emission in hertz.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "pulseRepetitionFrequency")]
+ public float PulseRepetitionFrequency
+ {
+ get
+ {
+ return this._pulseRepetitionFrequency;
+ }
+
+ set
+ {
+ this._pulseRepetitionFrequency = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Average pulse width of the emission in microseconds.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "pusleWidth")]
+ public float PusleWidth
+ {
+ get
+ {
+ return this._pusleWidth;
+ }
+
+ set
+ {
+ this._pusleWidth = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Specifies the beam azimuth an elevation centers and corresponding half-angles to describe the scan volume
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "beamAzimuthCenter")]
+ public float BeamAzimuthCenter
+ {
+ get
+ {
+ return this._beamAzimuthCenter;
+ }
+
+ set
+ {
+ this._beamAzimuthCenter = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Specifies the beam azimuth sweep to determine scan volume
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "beamAzimuthSweep")]
+ public float BeamAzimuthSweep
+ {
+ get
+ {
+ return this._beamAzimuthSweep;
+ }
+
+ set
+ {
+ this._beamAzimuthSweep = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Specifies the beam elevation center to determine scan volume
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "beamElevationCenter")]
+ public float BeamElevationCenter
+ {
+ get
+ {
+ return this._beamElevationCenter;
+ }
+
+ set
+ {
+ this._beamElevationCenter = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Specifies the beam elevation sweep to determine scan volume
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "beamElevationSweep")]
+ public float BeamElevationSweep
+ {
+ get
+ {
+ return this._beamElevationSweep;
+ }
+
+ set
+ {
+ this._beamElevationSweep = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the allows receiver to synchronize its regenerated scan pattern to that of the emmitter. Specifies the percentage of time a scan is through its pattern from its origion.
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "beamSweepSync")]
+ public float BeamSweepSync
+ {
+ get
+ {
+ return this._beamSweepSync;
+ }
+
+ set
+ {
+ this._beamSweepSync = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteFloat((float)this._frequency);
+ dos.WriteFloat((float)this._frequencyRange);
+ dos.WriteFloat((float)this._effectiveRadiatedPower);
+ dos.WriteFloat((float)this._pulseRepetitionFrequency);
+ dos.WriteFloat((float)this._pusleWidth);
+ dos.WriteFloat((float)this._beamAzimuthCenter);
+ dos.WriteFloat((float)this._beamAzimuthSweep);
+ dos.WriteFloat((float)this._beamElevationCenter);
+ dos.WriteFloat((float)this._beamElevationSweep);
+ dos.WriteFloat((float)this._beamSweepSync);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._frequency = dis.ReadFloat();
+ this._frequencyRange = dis.ReadFloat();
+ this._effectiveRadiatedPower = dis.ReadFloat();
+ this._pulseRepetitionFrequency = dis.ReadFloat();
+ this._pusleWidth = dis.ReadFloat();
+ this._beamAzimuthCenter = dis.ReadFloat();
+ this._beamAzimuthSweep = dis.ReadFloat();
+ this._beamElevationCenter = dis.ReadFloat();
+ this._beamElevationSweep = dis.ReadFloat();
+ this._beamSweepSync = dis.ReadFloat();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._frequency.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._frequencyRange.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._effectiveRadiatedPower.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._pulseRepetitionFrequency.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._pusleWidth.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamAzimuthCenter.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamAzimuthSweep.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamElevationCenter.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamElevationSweep.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._beamSweepSync.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as FundamentalParameterData;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(FundamentalParameterData obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._frequency != obj._frequency)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._frequencyRange != obj._frequencyRange)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._effectiveRadiatedPower != obj._effectiveRadiatedPower)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._pulseRepetitionFrequency != obj._pulseRepetitionFrequency)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._pusleWidth != obj._pusleWidth)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamAzimuthCenter != obj._beamAzimuthCenter)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamAzimuthSweep != obj._beamAzimuthSweep)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamElevationCenter != obj._beamElevationCenter)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamElevationSweep != obj._beamElevationSweep)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._beamSweepSync != obj._beamSweepSync)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._frequency.GetHashCode();
+ result = GenerateHash(result) ^ this._frequencyRange.GetHashCode();
+ result = GenerateHash(result) ^ this._effectiveRadiatedPower.GetHashCode();
+ result = GenerateHash(result) ^ this._pulseRepetitionFrequency.GetHashCode();
+ result = GenerateHash(result) ^ this._pusleWidth.GetHashCode();
+ result = GenerateHash(result) ^ this._beamAzimuthCenter.GetHashCode();
+ result = GenerateHash(result) ^ this._beamAzimuthSweep.GetHashCode();
+ result = GenerateHash(result) ^ this._beamElevationCenter.GetHashCode();
+ result = GenerateHash(result) ^ this._beamElevationSweep.GetHashCode();
+ result = GenerateHash(result) ^ this._beamSweepSync.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/LogisticsPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/LogisticsPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/LogisticsPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/LogisticsPdu.cs
index 1cca11c..7bcabf1 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/LogisticsPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/LogisticsPdu.cs
@@ -1,271 +1,271 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.5. Abstract superclass for logistics PDUs
- ///
- [Serializable]
- [XmlRoot]
- public partial class LogisticsPdu : Pdu, IEquatable
- {
- ///
- /// Initializes a new instance of the class.
- ///
- public LogisticsPdu()
- {
- ProtocolFamily = (byte)3;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(LogisticsPdu left, LogisticsPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(LogisticsPdu left, LogisticsPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- return marshalSize;
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public virtual void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as LogisticsPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(LogisticsPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.5. Abstract superclass for logistics PDUs
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class LogisticsPdu : Pdu, IEquatable
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public LogisticsPdu()
+ {
+ ProtocolFamily = (byte)3;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(LogisticsPdu left, LogisticsPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(LogisticsPdu left, LogisticsPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ return marshalSize;
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public virtual void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as LogisticsPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(LogisticsPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ModulationType.cs b/Libs/CsharpDis6/Dis1995/Generated/ModulationType.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ModulationType.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ModulationType.cs
index 1133dcd..dbd36ad 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ModulationType.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ModulationType.cs
@@ -1,396 +1,396 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Radio modulation
- ///
- [Serializable]
- [XmlRoot]
- public partial class ModulationType
- {
- ///
- /// spread spectrum, 16 bit boolean array
- ///
- private ushort _spreadSpectrum;
-
- ///
- /// major
- ///
- private ushort _major;
-
- ///
- /// detail
- ///
- private ushort _detail;
-
- ///
- /// system
- ///
- private ushort _system;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ModulationType()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ModulationType left, ModulationType right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ModulationType left, ModulationType right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 2; // this._spreadSpectrum
- marshalSize += 2; // this._major
- marshalSize += 2; // this._detail
- marshalSize += 2; // this._system
- return marshalSize;
- }
-
- ///
- /// Gets or sets the spread spectrum, 16 bit boolean array
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "spreadSpectrum")]
- public ushort SpreadSpectrum
- {
- get
- {
- return this._spreadSpectrum;
- }
-
- set
- {
- this._spreadSpectrum = value;
- }
- }
-
- ///
- /// Gets or sets the major
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "major")]
- public ushort Major
- {
- get
- {
- return this._major;
- }
-
- set
- {
- this._major = value;
- }
- }
-
- ///
- /// Gets or sets the detail
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "detail")]
- public ushort Detail
- {
- get
- {
- return this._detail;
- }
-
- set
- {
- this._detail = value;
- }
- }
-
- ///
- /// Gets or sets the system
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "system")]
- public ushort System_
- {
- get
- {
- return this._system;
- }
-
- set
- {
- this._system = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedShort((ushort)this._spreadSpectrum);
- dos.WriteUnsignedShort((ushort)this._major);
- dos.WriteUnsignedShort((ushort)this._detail);
- dos.WriteUnsignedShort((ushort)this._system);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._spreadSpectrum = dis.ReadUnsignedShort();
- this._major = dis.ReadUnsignedShort();
- this._detail = dis.ReadUnsignedShort();
- this._system = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._spreadSpectrum.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._major.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._detail.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._system.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ModulationType;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ModulationType obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._spreadSpectrum != obj._spreadSpectrum)
- {
- ivarsEqual = false;
- }
-
- if (this._major != obj._major)
- {
- ivarsEqual = false;
- }
-
- if (this._detail != obj._detail)
- {
- ivarsEqual = false;
- }
-
- if (this._system != obj._system)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._spreadSpectrum.GetHashCode();
- result = GenerateHash(result) ^ this._major.GetHashCode();
- result = GenerateHash(result) ^ this._detail.GetHashCode();
- result = GenerateHash(result) ^ this._system.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Radio modulation
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class ModulationType
+ {
+ ///
+ /// spread spectrum, 16 bit boolean array
+ ///
+ private ushort _spreadSpectrum;
+
+ ///
+ /// major
+ ///
+ private ushort _major;
+
+ ///
+ /// detail
+ ///
+ private ushort _detail;
+
+ ///
+ /// system
+ ///
+ private ushort _system;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ModulationType()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ModulationType left, ModulationType right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ModulationType left, ModulationType right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 2; // this._spreadSpectrum
+ marshalSize += 2; // this._major
+ marshalSize += 2; // this._detail
+ marshalSize += 2; // this._system
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the spread spectrum, 16 bit boolean array
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "spreadSpectrum")]
+ public ushort SpreadSpectrum
+ {
+ get
+ {
+ return this._spreadSpectrum;
+ }
+
+ set
+ {
+ this._spreadSpectrum = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the major
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "major")]
+ public ushort Major
+ {
+ get
+ {
+ return this._major;
+ }
+
+ set
+ {
+ this._major = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the detail
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "detail")]
+ public ushort Detail
+ {
+ get
+ {
+ return this._detail;
+ }
+
+ set
+ {
+ this._detail = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the system
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "system")]
+ public ushort System_
+ {
+ get
+ {
+ return this._system;
+ }
+
+ set
+ {
+ this._system = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedShort((ushort)this._spreadSpectrum);
+ dos.WriteUnsignedShort((ushort)this._major);
+ dos.WriteUnsignedShort((ushort)this._detail);
+ dos.WriteUnsignedShort((ushort)this._system);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._spreadSpectrum = dis.ReadUnsignedShort();
+ this._major = dis.ReadUnsignedShort();
+ this._detail = dis.ReadUnsignedShort();
+ this._system = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._spreadSpectrum.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._major.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._detail.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._system.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ModulationType;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ModulationType obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._spreadSpectrum != obj._spreadSpectrum)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._major != obj._major)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._detail != obj._detail)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._system != obj._system)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._spreadSpectrum.GetHashCode();
+ result = GenerateHash(result) ^ this._major.GetHashCode();
+ result = GenerateHash(result) ^ this._detail.GetHashCode();
+ result = GenerateHash(result) ^ this._system.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/Orientation.cs b/Libs/CsharpDis6/Dis1995/Generated/Orientation.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/Orientation.cs
rename to Libs/CsharpDis6/Dis1995/Generated/Orientation.cs
index 0d53662..c6fe174 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/Orientation.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/Orientation.cs
@@ -1,355 +1,355 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.17. Three floating point values representing an orientation, psi, theta, and phi, aka the euler angles, in radians
- ///
- [Serializable]
- [XmlRoot]
- public partial class Orientation
- {
- private float _psi;
-
- private float _theta;
-
- private float _phi;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public Orientation()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(Orientation left, Orientation right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(Orientation left, Orientation right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 4; // this._psi
- marshalSize += 4; // this._theta
- marshalSize += 4; // this._phi
- return marshalSize;
- }
-
- ///
- /// Gets or sets the psi
- ///
- [XmlElement(Type = typeof(float), ElementName = "psi")]
- public float Psi
- {
- get
- {
- return this._psi;
- }
-
- set
- {
- this._psi = value;
- }
- }
-
- ///
- /// Gets or sets the theta
- ///
- [XmlElement(Type = typeof(float), ElementName = "theta")]
- public float Theta
- {
- get
- {
- return this._theta;
- }
-
- set
- {
- this._theta = value;
- }
- }
-
- ///
- /// Gets or sets the phi
- ///
- [XmlElement(Type = typeof(float), ElementName = "phi")]
- public float Phi
- {
- get
- {
- return this._phi;
- }
-
- set
- {
- this._phi = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteFloat((float)this._psi);
- dos.WriteFloat((float)this._theta);
- dos.WriteFloat((float)this._phi);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._psi = dis.ReadFloat();
- this._theta = dis.ReadFloat();
- this._phi = dis.ReadFloat();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._psi.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._theta.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._phi.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as Orientation;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(Orientation obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._psi != obj._psi)
- {
- ivarsEqual = false;
- }
-
- if (this._theta != obj._theta)
- {
- ivarsEqual = false;
- }
-
- if (this._phi != obj._phi)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._psi.GetHashCode();
- result = GenerateHash(result) ^ this._theta.GetHashCode();
- result = GenerateHash(result) ^ this._phi.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.17. Three floating point values representing an orientation, psi, theta, and phi, aka the euler angles, in radians
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class Orientation
+ {
+ private float _psi;
+
+ private float _theta;
+
+ private float _phi;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public Orientation()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(Orientation left, Orientation right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(Orientation left, Orientation right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 4; // this._psi
+ marshalSize += 4; // this._theta
+ marshalSize += 4; // this._phi
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the psi
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "psi")]
+ public float Psi
+ {
+ get
+ {
+ return this._psi;
+ }
+
+ set
+ {
+ this._psi = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the theta
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "theta")]
+ public float Theta
+ {
+ get
+ {
+ return this._theta;
+ }
+
+ set
+ {
+ this._theta = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the phi
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "phi")]
+ public float Phi
+ {
+ get
+ {
+ return this._phi;
+ }
+
+ set
+ {
+ this._phi = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteFloat((float)this._psi);
+ dos.WriteFloat((float)this._theta);
+ dos.WriteFloat((float)this._phi);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._psi = dis.ReadFloat();
+ this._theta = dis.ReadFloat();
+ this._phi = dis.ReadFloat();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._psi.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._theta.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._phi.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as Orientation;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(Orientation obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._psi != obj._psi)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._theta != obj._theta)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._phi != obj._phi)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._psi.GetHashCode();
+ result = GenerateHash(result) ^ this._theta.GetHashCode();
+ result = GenerateHash(result) ^ this._phi.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/Pdu.cs b/Libs/CsharpDis6/Dis1995/Generated/Pdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/Pdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/Pdu.cs
index 7552217..997673a 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/Pdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/Pdu.cs
@@ -1,492 +1,492 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// The superclass for all PDUs. This incorporates the PduHeader record, section 5.2.29.
- ///
- [Serializable]
- [XmlRoot]
- public partial class Pdu : PduBase, IPdu
- {
- ///
- /// The version of the protocol. 5=DIS-1995, 6=DIS-1998.
- ///
- private byte _protocolVersion = 5;
-
- ///
- /// Exercise ID
- ///
- private byte _exerciseID;
-
- ///
- /// Type of pdu, unique for each PDU class
- ///
- private byte _pduType;
-
- ///
- /// value that refers to the protocol family, eg SimulationManagement, et
- ///
- private byte _protocolFamily;
-
- ///
- /// Timestamp value
- ///
- private uint _timestamp;
-
- ///
- /// Length, in bytes, of the PDU
- ///
- private ushort _length;
-
- ///
- /// zero-filled array of padding
- ///
- private short _padding;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public Pdu()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(Pdu left, Pdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(Pdu left, Pdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 1; // this._protocolVersion
- marshalSize += 1; // this._exerciseID
- marshalSize += 1; // this._pduType
- marshalSize += 1; // this._protocolFamily
- marshalSize += 4; // this._timestamp
- marshalSize += 2; // this._length
- marshalSize += 2; // this._padding
- return marshalSize;
- }
-
- ///
- /// Gets or sets the The version of the protocol. 5=DIS-1995, 6=DIS-1998.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "protocolVersion")]
- public byte ProtocolVersion
- {
- get
- {
- return this._protocolVersion;
- }
-
- set
- {
- this._protocolVersion = value;
- }
- }
-
- ///
- /// Gets or sets the Exercise ID
- ///
- [XmlElement(Type = typeof(byte), ElementName = "exerciseID")]
- public byte ExerciseID
- {
- get
- {
- return this._exerciseID;
- }
-
- set
- {
- this._exerciseID = value;
- }
- }
-
- ///
- /// Gets or sets the Type of pdu, unique for each PDU class
- ///
- [XmlElement(Type = typeof(byte), ElementName = "pduType")]
- public byte PduType
- {
- get
- {
- return this._pduType;
- }
-
- set
- {
- this._pduType = value;
- }
- }
-
- ///
- /// Gets or sets the value that refers to the protocol family, eg SimulationManagement, et
- ///
- [XmlElement(Type = typeof(byte), ElementName = "protocolFamily")]
- public byte ProtocolFamily
- {
- get
- {
- return this._protocolFamily;
- }
-
- set
- {
- this._protocolFamily = value;
- }
- }
-
- ///
- /// Gets or sets the Timestamp value
- ///
- [XmlElement(Type = typeof(uint), ElementName = "timestamp")]
- public uint Timestamp
- {
- get
- {
- return this._timestamp;
- }
-
- set
- {
- this._timestamp = value;
- }
- }
-
- ///
- /// Gets or sets the Length, in bytes, of the PDU
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "length")]
- public ushort Length
- {
- get
- {
- return this._length;
- }
-
- set
- {
- this._length = value;
- }
- }
-
- ///
- /// Gets or sets the zero-filled array of padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "padding")]
- public short Padding
- {
- get
- {
- return this._padding;
- }
-
- set
- {
- this._padding = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedByte((byte)this._protocolVersion);
- dos.WriteUnsignedByte((byte)this._exerciseID);
- dos.WriteUnsignedByte((byte)this._pduType);
- dos.WriteUnsignedByte((byte)this._protocolFamily);
- dos.WriteUnsignedInt((uint)this._timestamp);
- dos.WriteUnsignedShort((ushort)this._length);
- dos.WriteShort((short)this._padding);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._protocolVersion = dis.ReadUnsignedByte();
- this._exerciseID = dis.ReadUnsignedByte();
- this._pduType = dis.ReadUnsignedByte();
- this._protocolFamily = dis.ReadUnsignedByte();
- this._timestamp = dis.ReadUnsignedInt();
- this._length = dis.ReadUnsignedShort();
- this._padding = dis.ReadShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._protocolVersion.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._exerciseID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._pduType.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._protocolFamily.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._timestamp.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._length.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as Pdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(Pdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._protocolVersion != obj._protocolVersion)
- {
- ivarsEqual = false;
- }
-
- if (this._exerciseID != obj._exerciseID)
- {
- ivarsEqual = false;
- }
-
- if (this._pduType != obj._pduType)
- {
- ivarsEqual = false;
- }
-
- if (this._protocolFamily != obj._protocolFamily)
- {
- ivarsEqual = false;
- }
-
- if (this._timestamp != obj._timestamp)
- {
- ivarsEqual = false;
- }
-
- if (this._length != obj._length)
- {
- ivarsEqual = false;
- }
-
- if (this._padding != obj._padding)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._protocolVersion.GetHashCode();
- result = GenerateHash(result) ^ this._exerciseID.GetHashCode();
- result = GenerateHash(result) ^ this._pduType.GetHashCode();
- result = GenerateHash(result) ^ this._protocolFamily.GetHashCode();
- result = GenerateHash(result) ^ this._timestamp.GetHashCode();
- result = GenerateHash(result) ^ this._length.GetHashCode();
- result = GenerateHash(result) ^ this._padding.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// The superclass for all PDUs. This incorporates the PduHeader record, section 5.2.29.
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class Pdu : PduBase, IPdu
+ {
+ ///
+ /// The version of the protocol. 5=DIS-1995, 6=DIS-1998.
+ ///
+ private byte _protocolVersion = 5;
+
+ ///
+ /// Exercise ID
+ ///
+ private byte _exerciseID;
+
+ ///
+ /// Type of pdu, unique for each PDU class
+ ///
+ private byte _pduType;
+
+ ///
+ /// value that refers to the protocol family, eg SimulationManagement, et
+ ///
+ private byte _protocolFamily;
+
+ ///
+ /// Timestamp value
+ ///
+ private uint _timestamp;
+
+ ///
+ /// Length, in bytes, of the PDU
+ ///
+ private ushort _length;
+
+ ///
+ /// zero-filled array of padding
+ ///
+ private short _padding;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public Pdu()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(Pdu left, Pdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(Pdu left, Pdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 1; // this._protocolVersion
+ marshalSize += 1; // this._exerciseID
+ marshalSize += 1; // this._pduType
+ marshalSize += 1; // this._protocolFamily
+ marshalSize += 4; // this._timestamp
+ marshalSize += 2; // this._length
+ marshalSize += 2; // this._padding
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the The version of the protocol. 5=DIS-1995, 6=DIS-1998.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "protocolVersion")]
+ public byte ProtocolVersion
+ {
+ get
+ {
+ return this._protocolVersion;
+ }
+
+ set
+ {
+ this._protocolVersion = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Exercise ID
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "exerciseID")]
+ public byte ExerciseID
+ {
+ get
+ {
+ return this._exerciseID;
+ }
+
+ set
+ {
+ this._exerciseID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Type of pdu, unique for each PDU class
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "pduType")]
+ public byte PduType
+ {
+ get
+ {
+ return this._pduType;
+ }
+
+ set
+ {
+ this._pduType = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the value that refers to the protocol family, eg SimulationManagement, et
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "protocolFamily")]
+ public byte ProtocolFamily
+ {
+ get
+ {
+ return this._protocolFamily;
+ }
+
+ set
+ {
+ this._protocolFamily = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Timestamp value
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "timestamp")]
+ public uint Timestamp
+ {
+ get
+ {
+ return this._timestamp;
+ }
+
+ set
+ {
+ this._timestamp = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Length, in bytes, of the PDU
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "length")]
+ public ushort Length
+ {
+ get
+ {
+ return this._length;
+ }
+
+ set
+ {
+ this._length = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the zero-filled array of padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "padding")]
+ public short Padding
+ {
+ get
+ {
+ return this._padding;
+ }
+
+ set
+ {
+ this._padding = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedByte((byte)this._protocolVersion);
+ dos.WriteUnsignedByte((byte)this._exerciseID);
+ dos.WriteUnsignedByte((byte)this._pduType);
+ dos.WriteUnsignedByte((byte)this._protocolFamily);
+ dos.WriteUnsignedInt((uint)this._timestamp);
+ dos.WriteUnsignedShort((ushort)this._length);
+ dos.WriteShort((short)this._padding);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._protocolVersion = dis.ReadUnsignedByte();
+ this._exerciseID = dis.ReadUnsignedByte();
+ this._pduType = dis.ReadUnsignedByte();
+ this._protocolFamily = dis.ReadUnsignedByte();
+ this._timestamp = dis.ReadUnsignedInt();
+ this._length = dis.ReadUnsignedShort();
+ this._padding = dis.ReadShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._protocolVersion.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._exerciseID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._pduType.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._protocolFamily.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._timestamp.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._length.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as Pdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(Pdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._protocolVersion != obj._protocolVersion)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._exerciseID != obj._exerciseID)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._pduType != obj._pduType)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._protocolFamily != obj._protocolFamily)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._timestamp != obj._timestamp)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._length != obj._length)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding != obj._padding)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._protocolVersion.GetHashCode();
+ result = GenerateHash(result) ^ this._exerciseID.GetHashCode();
+ result = GenerateHash(result) ^ this._pduType.GetHashCode();
+ result = GenerateHash(result) ^ this._protocolFamily.GetHashCode();
+ result = GenerateHash(result) ^ this._timestamp.GetHashCode();
+ result = GenerateHash(result) ^ this._length.GetHashCode();
+ result = GenerateHash(result) ^ this._padding.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/RadioCommunicationsPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/RadioCommunicationsPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/RadioCommunicationsPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/RadioCommunicationsPdu.cs
index 9867fd2..e0bfb44 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/RadioCommunicationsPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/RadioCommunicationsPdu.cs
@@ -1,339 +1,339 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.8. Abstract superclass for radio communications PDUs.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- public partial class RadioCommunicationsPdu : Pdu, IEquatable
- {
- ///
- /// ID of the entitythat is the source of the communication
- ///
- private EntityID _entityId = new EntityID();
-
- ///
- /// particular radio within an entity
- ///
- private ushort _radioId;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RadioCommunicationsPdu()
- {
- ProtocolFamily = (byte)4;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(RadioCommunicationsPdu left, RadioCommunicationsPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(RadioCommunicationsPdu left, RadioCommunicationsPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._entityId.GetMarshalledSize(); // this._entityId
- marshalSize += 2; // this._radioId
- return marshalSize;
- }
-
- ///
- /// Gets or sets the ID of the entitythat is the source of the communication
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "entityId")]
- public EntityID EntityId
- {
- get
- {
- return this._entityId;
- }
-
- set
- {
- this._entityId = value;
- }
- }
-
- ///
- /// Gets or sets the particular radio within an entity
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "radioId")]
- public ushort RadioId
- {
- get
- {
- return this._radioId;
- }
-
- set
- {
- this._radioId = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public virtual void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._entityId.Marshal(dos);
- dos.WriteUnsignedShort((ushort)this._radioId);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._entityId.Unmarshal(dis);
- this._radioId = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._entityId.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._radioId.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as RadioCommunicationsPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(RadioCommunicationsPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._entityId.Equals(obj._entityId))
- {
- ivarsEqual = false;
- }
-
- if (this._radioId != obj._radioId)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._entityId.GetHashCode();
- result = GenerateHash(result) ^ this._radioId.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.8. Abstract superclass for radio communications PDUs.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ public partial class RadioCommunicationsPdu : Pdu, IEquatable
+ {
+ ///
+ /// ID of the entitythat is the source of the communication
+ ///
+ private EntityID _entityId = new EntityID();
+
+ ///
+ /// particular radio within an entity
+ ///
+ private ushort _radioId;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RadioCommunicationsPdu()
+ {
+ ProtocolFamily = (byte)4;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(RadioCommunicationsPdu left, RadioCommunicationsPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(RadioCommunicationsPdu left, RadioCommunicationsPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._entityId.GetMarshalledSize(); // this._entityId
+ marshalSize += 2; // this._radioId
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the ID of the entitythat is the source of the communication
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "entityId")]
+ public EntityID EntityId
+ {
+ get
+ {
+ return this._entityId;
+ }
+
+ set
+ {
+ this._entityId = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the particular radio within an entity
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "radioId")]
+ public ushort RadioId
+ {
+ get
+ {
+ return this._radioId;
+ }
+
+ set
+ {
+ this._radioId = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public virtual void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._entityId.Marshal(dos);
+ dos.WriteUnsignedShort((ushort)this._radioId);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._entityId.Unmarshal(dis);
+ this._radioId = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._entityId.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._radioId.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as RadioCommunicationsPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(RadioCommunicationsPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._entityId.Equals(obj._entityId))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._radioId != obj._radioId)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._entityId.GetHashCode();
+ result = GenerateHash(result) ^ this._radioId.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/RadioEntityType.cs b/Libs/CsharpDis6/Dis1995/Generated/RadioEntityType.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/RadioEntityType.cs
rename to Libs/CsharpDis6/Dis1995/Generated/RadioEntityType.cs
index 2bd679a..c4b918c 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/RadioEntityType.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/RadioEntityType.cs
@@ -1,489 +1,489 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.25. Identifies the type of radio
- ///
- [Serializable]
- [XmlRoot]
- public partial class RadioEntityType
- {
- ///
- /// Kind of entity
- ///
- private byte _entityKind;
-
- ///
- /// Domain of entity (air, surface, subsurface, space, etc)
- ///
- private byte _domain;
-
- ///
- /// country to which the design of the entity is attributed
- ///
- private ushort _country;
-
- ///
- /// category of entity
- ///
- private byte _category;
-
- ///
- /// subcategory of entity
- ///
- private byte _subcategory;
-
- ///
- /// specific info based on subcategory field
- ///
- private byte _nomenclatureVersion;
-
- private ushort _nomenclature;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RadioEntityType()
- {
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(RadioEntityType left, RadioEntityType right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(RadioEntityType left, RadioEntityType right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public virtual int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize += 1; // this._entityKind
- marshalSize += 1; // this._domain
- marshalSize += 2; // this._country
- marshalSize += 1; // this._category
- marshalSize += 1; // this._subcategory
- marshalSize += 1; // this._nomenclatureVersion
- marshalSize += 2; // this._nomenclature
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Kind of entity
- ///
- [XmlElement(Type = typeof(byte), ElementName = "entityKind")]
- public byte EntityKind
- {
- get
- {
- return this._entityKind;
- }
-
- set
- {
- this._entityKind = value;
- }
- }
-
- ///
- /// Gets or sets the Domain of entity (air, surface, subsurface, space, etc)
- ///
- [XmlElement(Type = typeof(byte), ElementName = "domain")]
- public byte Domain
- {
- get
- {
- return this._domain;
- }
-
- set
- {
- this._domain = value;
- }
- }
-
- ///
- /// Gets or sets the country to which the design of the entity is attributed
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "country")]
- public ushort Country
- {
- get
- {
- return this._country;
- }
-
- set
- {
- this._country = value;
- }
- }
-
- ///
- /// Gets or sets the category of entity
- ///
- [XmlElement(Type = typeof(byte), ElementName = "category")]
- public byte Category
- {
- get
- {
- return this._category;
- }
-
- set
- {
- this._category = value;
- }
- }
-
- ///
- /// Gets or sets the subcategory of entity
- ///
- [XmlElement(Type = typeof(byte), ElementName = "subcategory")]
- public byte Subcategory
- {
- get
- {
- return this._subcategory;
- }
-
- set
- {
- this._subcategory = value;
- }
- }
-
- ///
- /// Gets or sets the specific info based on subcategory field
- ///
- [XmlElement(Type = typeof(byte), ElementName = "nomenclatureVersion")]
- public byte NomenclatureVersion
- {
- get
- {
- return this._nomenclatureVersion;
- }
-
- set
- {
- this._nomenclatureVersion = value;
- }
- }
-
- ///
- /// Gets or sets the nomenclature
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "nomenclature")]
- public ushort Nomenclature
- {
- get
- {
- return this._nomenclature;
- }
-
- set
- {
- this._nomenclature = value;
- }
- }
-
- ///
- /// Occurs when exception when processing PDU is caught.
- ///
- public event EventHandler ExceptionOccured;
-
- ///
- /// Called when exception occurs (raises the event).
- ///
- /// The exception.
- protected void RaiseExceptionOccured(Exception e)
- {
- if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
- {
- this.ExceptionOccured(this, new PduExceptionEventArgs(e));
- }
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Marshal(DataOutputStream dos)
- {
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedByte((byte)this._entityKind);
- dos.WriteUnsignedByte((byte)this._domain);
- dos.WriteUnsignedShort((ushort)this._country);
- dos.WriteUnsignedByte((byte)this._category);
- dos.WriteUnsignedByte((byte)this._subcategory);
- dos.WriteUnsignedByte((byte)this._nomenclatureVersion);
- dos.WriteUnsignedShort((ushort)this._nomenclature);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Unmarshal(DataInputStream dis)
- {
- if (dis != null)
- {
- try
- {
- this._entityKind = dis.ReadUnsignedByte();
- this._domain = dis.ReadUnsignedByte();
- this._country = dis.ReadUnsignedShort();
- this._category = dis.ReadUnsignedByte();
- this._subcategory = dis.ReadUnsignedByte();
- this._nomenclatureVersion = dis.ReadUnsignedByte();
- this._nomenclature = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public virtual void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- try
- {
- sb.AppendLine("" + this._entityKind.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._domain.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._country.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._category.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._subcategory.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._nomenclatureVersion.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._nomenclature.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as RadioEntityType;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(RadioEntityType obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- if (this._entityKind != obj._entityKind)
- {
- ivarsEqual = false;
- }
-
- if (this._domain != obj._domain)
- {
- ivarsEqual = false;
- }
-
- if (this._country != obj._country)
- {
- ivarsEqual = false;
- }
-
- if (this._category != obj._category)
- {
- ivarsEqual = false;
- }
-
- if (this._subcategory != obj._subcategory)
- {
- ivarsEqual = false;
- }
-
- if (this._nomenclatureVersion != obj._nomenclatureVersion)
- {
- ivarsEqual = false;
- }
-
- if (this._nomenclature != obj._nomenclature)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ this._entityKind.GetHashCode();
- result = GenerateHash(result) ^ this._domain.GetHashCode();
- result = GenerateHash(result) ^ this._country.GetHashCode();
- result = GenerateHash(result) ^ this._category.GetHashCode();
- result = GenerateHash(result) ^ this._subcategory.GetHashCode();
- result = GenerateHash(result) ^ this._nomenclatureVersion.GetHashCode();
- result = GenerateHash(result) ^ this._nomenclature.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.25. Identifies the type of radio
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class RadioEntityType
+ {
+ ///
+ /// Kind of entity
+ ///
+ private byte _entityKind;
+
+ ///
+ /// Domain of entity (air, surface, subsurface, space, etc)
+ ///
+ private byte _domain;
+
+ ///
+ /// country to which the design of the entity is attributed
+ ///
+ private ushort _country;
+
+ ///
+ /// category of entity
+ ///
+ private byte _category;
+
+ ///
+ /// subcategory of entity
+ ///
+ private byte _subcategory;
+
+ ///
+ /// specific info based on subcategory field
+ ///
+ private byte _nomenclatureVersion;
+
+ private ushort _nomenclature;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RadioEntityType()
+ {
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(RadioEntityType left, RadioEntityType right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(RadioEntityType left, RadioEntityType right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public virtual int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize += 1; // this._entityKind
+ marshalSize += 1; // this._domain
+ marshalSize += 2; // this._country
+ marshalSize += 1; // this._category
+ marshalSize += 1; // this._subcategory
+ marshalSize += 1; // this._nomenclatureVersion
+ marshalSize += 2; // this._nomenclature
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Kind of entity
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "entityKind")]
+ public byte EntityKind
+ {
+ get
+ {
+ return this._entityKind;
+ }
+
+ set
+ {
+ this._entityKind = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Domain of entity (air, surface, subsurface, space, etc)
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "domain")]
+ public byte Domain
+ {
+ get
+ {
+ return this._domain;
+ }
+
+ set
+ {
+ this._domain = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the country to which the design of the entity is attributed
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "country")]
+ public ushort Country
+ {
+ get
+ {
+ return this._country;
+ }
+
+ set
+ {
+ this._country = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the category of entity
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "category")]
+ public byte Category
+ {
+ get
+ {
+ return this._category;
+ }
+
+ set
+ {
+ this._category = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the subcategory of entity
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "subcategory")]
+ public byte Subcategory
+ {
+ get
+ {
+ return this._subcategory;
+ }
+
+ set
+ {
+ this._subcategory = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the specific info based on subcategory field
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "nomenclatureVersion")]
+ public byte NomenclatureVersion
+ {
+ get
+ {
+ return this._nomenclatureVersion;
+ }
+
+ set
+ {
+ this._nomenclatureVersion = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the nomenclature
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "nomenclature")]
+ public ushort Nomenclature
+ {
+ get
+ {
+ return this._nomenclature;
+ }
+
+ set
+ {
+ this._nomenclature = value;
+ }
+ }
+
+ ///
+ /// Occurs when exception when processing PDU is caught.
+ ///
+ public event EventHandler ExceptionOccured;
+
+ ///
+ /// Called when exception occurs (raises the event).
+ ///
+ /// The exception.
+ protected void RaiseExceptionOccured(Exception e)
+ {
+ if (Pdu.FireExceptionEvents && this.ExceptionOccured != null)
+ {
+ this.ExceptionOccured(this, new PduExceptionEventArgs(e));
+ }
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Marshal(DataOutputStream dos)
+ {
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedByte((byte)this._entityKind);
+ dos.WriteUnsignedByte((byte)this._domain);
+ dos.WriteUnsignedShort((ushort)this._country);
+ dos.WriteUnsignedByte((byte)this._category);
+ dos.WriteUnsignedByte((byte)this._subcategory);
+ dos.WriteUnsignedByte((byte)this._nomenclatureVersion);
+ dos.WriteUnsignedShort((ushort)this._nomenclature);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Unmarshal(DataInputStream dis)
+ {
+ if (dis != null)
+ {
+ try
+ {
+ this._entityKind = dis.ReadUnsignedByte();
+ this._domain = dis.ReadUnsignedByte();
+ this._country = dis.ReadUnsignedShort();
+ this._category = dis.ReadUnsignedByte();
+ this._subcategory = dis.ReadUnsignedByte();
+ this._nomenclatureVersion = dis.ReadUnsignedByte();
+ this._nomenclature = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public virtual void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ try
+ {
+ sb.AppendLine("" + this._entityKind.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._domain.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._country.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._category.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._subcategory.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._nomenclatureVersion.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._nomenclature.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as RadioEntityType;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(RadioEntityType obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ if (this._entityKind != obj._entityKind)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._domain != obj._domain)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._country != obj._country)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._category != obj._category)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._subcategory != obj._subcategory)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._nomenclatureVersion != obj._nomenclatureVersion)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._nomenclature != obj._nomenclature)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ this._entityKind.GetHashCode();
+ result = GenerateHash(result) ^ this._domain.GetHashCode();
+ result = GenerateHash(result) ^ this._country.GetHashCode();
+ result = GenerateHash(result) ^ this._category.GetHashCode();
+ result = GenerateHash(result) ^ this._subcategory.GetHashCode();
+ result = GenerateHash(result) ^ this._nomenclatureVersion.GetHashCode();
+ result = GenerateHash(result) ^ this._nomenclature.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ReceiverPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ReceiverPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ReceiverPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ReceiverPdu.cs
index 1cd0e58..21b1890 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ReceiverPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ReceiverPdu.cs
@@ -1,435 +1,435 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.8.3. Communication of a receiver state.
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- public partial class ReceiverPdu : RadioCommunicationsPdu, IEquatable
- {
- ///
- /// encoding scheme used, and enumeration
- ///
- private ushort _receiverState;
-
- ///
- /// padding
- ///
- private ushort _padding1;
-
- ///
- /// received power
- ///
- private float _receivedPoser;
-
- ///
- /// ID of transmitter
- ///
- private EntityID _transmitterEntityId = new EntityID();
-
- ///
- /// ID of transmitting radio
- ///
- private ushort _transmitterRadioId;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ReceiverPdu()
- {
- PduType = (byte)27;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ReceiverPdu left, ReceiverPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ReceiverPdu left, ReceiverPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 2; // this._receiverState
- marshalSize += 2; // this._padding1
- marshalSize += 4; // this._receivedPoser
- marshalSize += this._transmitterEntityId.GetMarshalledSize(); // this._transmitterEntityId
- marshalSize += 2; // this._transmitterRadioId
- return marshalSize;
- }
-
- ///
- /// Gets or sets the encoding scheme used, and enumeration
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "receiverState")]
- public ushort ReceiverState
- {
- get
- {
- return this._receiverState;
- }
-
- set
- {
- this._receiverState = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "padding1")]
- public ushort Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the received power
- ///
- [XmlElement(Type = typeof(float), ElementName = "receivedPoser")]
- public float ReceivedPoser
- {
- get
- {
- return this._receivedPoser;
- }
-
- set
- {
- this._receivedPoser = value;
- }
- }
-
- ///
- /// Gets or sets the ID of transmitter
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "transmitterEntityId")]
- public EntityID TransmitterEntityId
- {
- get
- {
- return this._transmitterEntityId;
- }
-
- set
- {
- this._transmitterEntityId = value;
- }
- }
-
- ///
- /// Gets or sets the ID of transmitting radio
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "transmitterRadioId")]
- public ushort TransmitterRadioId
- {
- get
- {
- return this._transmitterRadioId;
- }
-
- set
- {
- this._transmitterRadioId = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedShort((ushort)this._receiverState);
- dos.WriteUnsignedShort((ushort)this._padding1);
- dos.WriteFloat((float)this._receivedPoser);
- this._transmitterEntityId.Marshal(dos);
- dos.WriteUnsignedShort((ushort)this._transmitterRadioId);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._receiverState = dis.ReadUnsignedShort();
- this._padding1 = dis.ReadUnsignedShort();
- this._receivedPoser = dis.ReadFloat();
- this._transmitterEntityId.Unmarshal(dis);
- this._transmitterRadioId = dis.ReadUnsignedShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._receiverState.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._receivedPoser.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- this._transmitterEntityId.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._transmitterRadioId.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ReceiverPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ReceiverPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._receiverState != obj._receiverState)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._receivedPoser != obj._receivedPoser)
- {
- ivarsEqual = false;
- }
-
- if (!this._transmitterEntityId.Equals(obj._transmitterEntityId))
- {
- ivarsEqual = false;
- }
-
- if (this._transmitterRadioId != obj._transmitterRadioId)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._receiverState.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._receivedPoser.GetHashCode();
- result = GenerateHash(result) ^ this._transmitterEntityId.GetHashCode();
- result = GenerateHash(result) ^ this._transmitterRadioId.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.8.3. Communication of a receiver state.
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ public partial class ReceiverPdu : RadioCommunicationsPdu, IEquatable
+ {
+ ///
+ /// encoding scheme used, and enumeration
+ ///
+ private ushort _receiverState;
+
+ ///
+ /// padding
+ ///
+ private ushort _padding1;
+
+ ///
+ /// received power
+ ///
+ private float _receivedPoser;
+
+ ///
+ /// ID of transmitter
+ ///
+ private EntityID _transmitterEntityId = new EntityID();
+
+ ///
+ /// ID of transmitting radio
+ ///
+ private ushort _transmitterRadioId;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ReceiverPdu()
+ {
+ PduType = (byte)27;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ReceiverPdu left, ReceiverPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ReceiverPdu left, ReceiverPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 2; // this._receiverState
+ marshalSize += 2; // this._padding1
+ marshalSize += 4; // this._receivedPoser
+ marshalSize += this._transmitterEntityId.GetMarshalledSize(); // this._transmitterEntityId
+ marshalSize += 2; // this._transmitterRadioId
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the encoding scheme used, and enumeration
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "receiverState")]
+ public ushort ReceiverState
+ {
+ get
+ {
+ return this._receiverState;
+ }
+
+ set
+ {
+ this._receiverState = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "padding1")]
+ public ushort Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the received power
+ ///
+ [XmlElement(Type = typeof(float), ElementName = "receivedPoser")]
+ public float ReceivedPoser
+ {
+ get
+ {
+ return this._receivedPoser;
+ }
+
+ set
+ {
+ this._receivedPoser = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of transmitter
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "transmitterEntityId")]
+ public EntityID TransmitterEntityId
+ {
+ get
+ {
+ return this._transmitterEntityId;
+ }
+
+ set
+ {
+ this._transmitterEntityId = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the ID of transmitting radio
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "transmitterRadioId")]
+ public ushort TransmitterRadioId
+ {
+ get
+ {
+ return this._transmitterRadioId;
+ }
+
+ set
+ {
+ this._transmitterRadioId = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedShort((ushort)this._receiverState);
+ dos.WriteUnsignedShort((ushort)this._padding1);
+ dos.WriteFloat((float)this._receivedPoser);
+ this._transmitterEntityId.Marshal(dos);
+ dos.WriteUnsignedShort((ushort)this._transmitterRadioId);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._receiverState = dis.ReadUnsignedShort();
+ this._padding1 = dis.ReadUnsignedShort();
+ this._receivedPoser = dis.ReadFloat();
+ this._transmitterEntityId.Unmarshal(dis);
+ this._transmitterRadioId = dis.ReadUnsignedShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._receiverState.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._receivedPoser.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ this._transmitterEntityId.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._transmitterRadioId.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ReceiverPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ReceiverPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._receiverState != obj._receiverState)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._receivedPoser != obj._receivedPoser)
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._transmitterEntityId.Equals(obj._transmitterEntityId))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._transmitterRadioId != obj._transmitterRadioId)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._receiverState.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._receivedPoser.GetHashCode();
+ result = GenerateHash(result) ^ this._transmitterEntityId.GetHashCode();
+ result = GenerateHash(result) ^ this._transmitterRadioId.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/RemoveEntityPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/RemoveEntityPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/RemoveEntityPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/RemoveEntityPdu.cs
index de12c63..7c11457 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/RemoveEntityPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/RemoveEntityPdu.cs
@@ -1,304 +1,304 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.6.2. Remove an entity
- ///
- [Serializable]
- [XmlRoot]
- public partial class RemoveEntityPdu : SimulationManagementPdu, IEquatable
- {
- ///
- /// Identifier for the request
- ///
- private uint _requestID;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RemoveEntityPdu()
- {
- PduType = (byte)12;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(RemoveEntityPdu left, RemoveEntityPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(RemoveEntityPdu left, RemoveEntityPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += 4; // this._requestID
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Identifier for the request
- ///
- [XmlElement(Type = typeof(uint), ElementName = "requestID")]
- public uint RequestID
- {
- get
- {
- return this._requestID;
- }
-
- set
- {
- this._requestID = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- dos.WriteUnsignedInt((uint)this._requestID);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestID = dis.ReadUnsignedInt();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as RemoveEntityPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(RemoveEntityPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (this._requestID != obj._requestID)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestID.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.6.2. Remove an entity
+ ///
+ [Serializable]
+ [XmlRoot]
+ public partial class RemoveEntityPdu : SimulationManagementPdu, IEquatable
+ {
+ ///
+ /// Identifier for the request
+ ///
+ private uint _requestID;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RemoveEntityPdu()
+ {
+ PduType = (byte)12;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(RemoveEntityPdu left, RemoveEntityPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(RemoveEntityPdu left, RemoveEntityPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += 4; // this._requestID
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Identifier for the request
+ ///
+ [XmlElement(Type = typeof(uint), ElementName = "requestID")]
+ public uint RequestID
+ {
+ get
+ {
+ return this._requestID;
+ }
+
+ set
+ {
+ this._requestID = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ dos.WriteUnsignedInt((uint)this._requestID);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._requestID = dis.ReadUnsignedInt();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("" + this._requestID.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as RemoveEntityPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(RemoveEntityPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (this._requestID != obj._requestID)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._requestID.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/RepairCompletePdu.cs b/Libs/CsharpDis6/Dis1995/Generated/RepairCompletePdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/RepairCompletePdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/RepairCompletePdu.cs
index 6949caa..5a42e21 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/RepairCompletePdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/RepairCompletePdu.cs
@@ -1,405 +1,405 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.5.5. Repair is complete
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- public partial class RepairCompletePdu : LogisticsPdu, IEquatable
- {
- ///
- /// Entity that is receiving service
- ///
- private EntityID _receivingEntityID = new EntityID();
-
- ///
- /// Entity that is supplying
- ///
- private EntityID _repairingEntityID = new EntityID();
-
- ///
- /// Enumeration for type of repair
- ///
- private ushort _repair;
-
- ///
- /// padding
- ///
- private short _padding;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RepairCompletePdu()
- {
- PduType = (byte)9;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(RepairCompletePdu left, RepairCompletePdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(RepairCompletePdu left, RepairCompletePdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
- marshalSize += this._repairingEntityID.GetMarshalledSize(); // this._repairingEntityID
- marshalSize += 2; // this._repair
- marshalSize += 2; // this._padding
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Entity that is receiving service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
- public EntityID ReceivingEntityID
- {
- get
- {
- return this._receivingEntityID;
- }
-
- set
- {
- this._receivingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Entity that is supplying
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "repairingEntityID")]
- public EntityID RepairingEntityID
- {
- get
- {
- return this._repairingEntityID;
- }
-
- set
- {
- this._repairingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Enumeration for type of repair
- ///
- [XmlElement(Type = typeof(ushort), ElementName = "repair")]
- public ushort Repair
- {
- get
- {
- return this._repair;
- }
-
- set
- {
- this._repair = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "padding")]
- public short Padding
- {
- get
- {
- return this._padding;
- }
-
- set
- {
- this._padding = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._receivingEntityID.Marshal(dos);
- this._repairingEntityID.Marshal(dos);
- dos.WriteUnsignedShort((ushort)this._repair);
- dos.WriteShort((short)this._padding);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._receivingEntityID.Unmarshal(dis);
- this._repairingEntityID.Unmarshal(dis);
- this._repair = dis.ReadUnsignedShort();
- this._padding = dis.ReadShort();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._receivingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._repairingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._repair.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as RepairCompletePdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(RepairCompletePdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._receivingEntityID.Equals(obj._receivingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._repairingEntityID.Equals(obj._repairingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._repair != obj._repair)
- {
- ivarsEqual = false;
- }
-
- if (this._padding != obj._padding)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._repairingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._repair.GetHashCode();
- result = GenerateHash(result) ^ this._padding.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.5.5. Repair is complete
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ public partial class RepairCompletePdu : LogisticsPdu, IEquatable
+ {
+ ///
+ /// Entity that is receiving service
+ ///
+ private EntityID _receivingEntityID = new EntityID();
+
+ ///
+ /// Entity that is supplying
+ ///
+ private EntityID _repairingEntityID = new EntityID();
+
+ ///
+ /// Enumeration for type of repair
+ ///
+ private ushort _repair;
+
+ ///
+ /// padding
+ ///
+ private short _padding;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RepairCompletePdu()
+ {
+ PduType = (byte)9;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(RepairCompletePdu left, RepairCompletePdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(RepairCompletePdu left, RepairCompletePdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
+ marshalSize += this._repairingEntityID.GetMarshalledSize(); // this._repairingEntityID
+ marshalSize += 2; // this._repair
+ marshalSize += 2; // this._padding
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Entity that is receiving service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
+ public EntityID ReceivingEntityID
+ {
+ get
+ {
+ return this._receivingEntityID;
+ }
+
+ set
+ {
+ this._receivingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Entity that is supplying
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "repairingEntityID")]
+ public EntityID RepairingEntityID
+ {
+ get
+ {
+ return this._repairingEntityID;
+ }
+
+ set
+ {
+ this._repairingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Enumeration for type of repair
+ ///
+ [XmlElement(Type = typeof(ushort), ElementName = "repair")]
+ public ushort Repair
+ {
+ get
+ {
+ return this._repair;
+ }
+
+ set
+ {
+ this._repair = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "padding")]
+ public short Padding
+ {
+ get
+ {
+ return this._padding;
+ }
+
+ set
+ {
+ this._padding = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._receivingEntityID.Marshal(dos);
+ this._repairingEntityID.Marshal(dos);
+ dos.WriteUnsignedShort((ushort)this._repair);
+ dos.WriteShort((short)this._padding);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._receivingEntityID.Unmarshal(dis);
+ this._repairingEntityID.Unmarshal(dis);
+ this._repair = dis.ReadUnsignedShort();
+ this._padding = dis.ReadShort();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._receivingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._repairingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._repair.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as RepairCompletePdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(RepairCompletePdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._receivingEntityID.Equals(obj._receivingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._repairingEntityID.Equals(obj._repairingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._repair != obj._repair)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding != obj._padding)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._repairingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._repair.GetHashCode();
+ result = GenerateHash(result) ^ this._padding.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/RepairResponsePdu.cs b/Libs/CsharpDis6/Dis1995/Generated/RepairResponsePdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/RepairResponsePdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/RepairResponsePdu.cs
index 6c69c14..6bea994 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/RepairResponsePdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/RepairResponsePdu.cs
@@ -1,437 +1,437 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.5.6. Sent after repair conplete PDU
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- public partial class RepairResponsePdu : LogisticsPdu, IEquatable
- {
- ///
- /// Entity that is receiving service
- ///
- private EntityID _receivingEntityID = new EntityID();
-
- ///
- /// Entity that is supplying
- ///
- private EntityID _repairingEntityID = new EntityID();
-
- ///
- /// Result of repair operation
- ///
- private byte _repairResult;
-
- ///
- /// padding
- ///
- private short _padding1;
-
- ///
- /// padding
- ///
- private byte _padding2;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RepairResponsePdu()
- {
- PduType = (byte)10;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(RepairResponsePdu left, RepairResponsePdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(RepairResponsePdu left, RepairResponsePdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
- marshalSize += this._repairingEntityID.GetMarshalledSize(); // this._repairingEntityID
- marshalSize += 1; // this._repairResult
- marshalSize += 2; // this._padding1
- marshalSize += 1; // this._padding2
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Entity that is receiving service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
- public EntityID ReceivingEntityID
- {
- get
- {
- return this._receivingEntityID;
- }
-
- set
- {
- this._receivingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Entity that is supplying
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "repairingEntityID")]
- public EntityID RepairingEntityID
- {
- get
- {
- return this._repairingEntityID;
- }
-
- set
- {
- this._repairingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Result of repair operation
- ///
- [XmlElement(Type = typeof(byte), ElementName = "repairResult")]
- public byte RepairResult
- {
- get
- {
- return this._repairResult;
- }
-
- set
- {
- this._repairResult = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "padding1")]
- public short Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(byte), ElementName = "padding2")]
- public byte Padding2
- {
- get
- {
- return this._padding2;
- }
-
- set
- {
- this._padding2 = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._receivingEntityID.Marshal(dos);
- this._repairingEntityID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._repairResult);
- dos.WriteShort((short)this._padding1);
- dos.WriteByte((byte)this._padding2);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._receivingEntityID.Unmarshal(dis);
- this._repairingEntityID.Unmarshal(dis);
- this._repairResult = dis.ReadUnsignedByte();
- this._padding1 = dis.ReadShort();
- this._padding2 = dis.ReadByte();
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._receivingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._repairingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._repairResult.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as RepairResponsePdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(RepairResponsePdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._receivingEntityID.Equals(obj._receivingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._repairingEntityID.Equals(obj._repairingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._repairResult != obj._repairResult)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._padding2 != obj._padding2)
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._repairingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._repairResult.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._padding2.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.5.6. Sent after repair conplete PDU
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ public partial class RepairResponsePdu : LogisticsPdu, IEquatable
+ {
+ ///
+ /// Entity that is receiving service
+ ///
+ private EntityID _receivingEntityID = new EntityID();
+
+ ///
+ /// Entity that is supplying
+ ///
+ private EntityID _repairingEntityID = new EntityID();
+
+ ///
+ /// Result of repair operation
+ ///
+ private byte _repairResult;
+
+ ///
+ /// padding
+ ///
+ private short _padding1;
+
+ ///
+ /// padding
+ ///
+ private byte _padding2;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RepairResponsePdu()
+ {
+ PduType = (byte)10;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(RepairResponsePdu left, RepairResponsePdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(RepairResponsePdu left, RepairResponsePdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
+ marshalSize += this._repairingEntityID.GetMarshalledSize(); // this._repairingEntityID
+ marshalSize += 1; // this._repairResult
+ marshalSize += 2; // this._padding1
+ marshalSize += 1; // this._padding2
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Entity that is receiving service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
+ public EntityID ReceivingEntityID
+ {
+ get
+ {
+ return this._receivingEntityID;
+ }
+
+ set
+ {
+ this._receivingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Entity that is supplying
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "repairingEntityID")]
+ public EntityID RepairingEntityID
+ {
+ get
+ {
+ return this._repairingEntityID;
+ }
+
+ set
+ {
+ this._repairingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Result of repair operation
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "repairResult")]
+ public byte RepairResult
+ {
+ get
+ {
+ return this._repairResult;
+ }
+
+ set
+ {
+ this._repairResult = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "padding1")]
+ public short Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "padding2")]
+ public byte Padding2
+ {
+ get
+ {
+ return this._padding2;
+ }
+
+ set
+ {
+ this._padding2 = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._receivingEntityID.Marshal(dos);
+ this._repairingEntityID.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._repairResult);
+ dos.WriteShort((short)this._padding1);
+ dos.WriteByte((byte)this._padding2);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._receivingEntityID.Unmarshal(dis);
+ this._repairingEntityID.Unmarshal(dis);
+ this._repairResult = dis.ReadUnsignedByte();
+ this._padding1 = dis.ReadShort();
+ this._padding2 = dis.ReadByte();
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._receivingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._repairingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._repairResult.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as RepairResponsePdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(RepairResponsePdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._receivingEntityID.Equals(obj._receivingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._repairingEntityID.Equals(obj._repairingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._repairResult != obj._repairResult)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding2 != obj._padding2)
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._repairingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._repairResult.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._padding2.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ResupplyCancelPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ResupplyCancelPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ResupplyCancelPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ResupplyCancelPdu.cs
index a090dd7..9627e0e 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ResupplyCancelPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ResupplyCancelPdu.cs
@@ -1,341 +1,341 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.2.5.4. Cancel of resupply by either the receiving or supplying entity
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- public partial class ResupplyCancelPdu : LogisticsPdu, IEquatable
- {
- ///
- /// Entity that is receiving service
- ///
- private EntityID _receivingEntityID = new EntityID();
-
- ///
- /// Entity that is supplying
- ///
- private EntityID _supplyingEntityID = new EntityID();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ResupplyCancelPdu()
- {
- PduType = (byte)8;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ResupplyCancelPdu left, ResupplyCancelPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ResupplyCancelPdu left, ResupplyCancelPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
- marshalSize += this._supplyingEntityID.GetMarshalledSize(); // this._supplyingEntityID
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Entity that is receiving service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
- public EntityID ReceivingEntityID
- {
- get
- {
- return this._receivingEntityID;
- }
-
- set
- {
- this._receivingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Entity that is supplying
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "supplyingEntityID")]
- public EntityID SupplyingEntityID
- {
- get
- {
- return this._supplyingEntityID;
- }
-
- set
- {
- this._supplyingEntityID = value;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._receivingEntityID.Marshal(dos);
- this._supplyingEntityID.Marshal(dos);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._receivingEntityID.Unmarshal(dis);
- this._supplyingEntityID.Unmarshal(dis);
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._receivingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._supplyingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ResupplyCancelPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ResupplyCancelPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._receivingEntityID.Equals(obj._receivingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._supplyingEntityID.Equals(obj._supplyingEntityID))
- {
- ivarsEqual = false;
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._supplyingEntityID.GetHashCode();
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.2.5.4. Cancel of resupply by either the receiving or supplying entity
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ public partial class ResupplyCancelPdu : LogisticsPdu, IEquatable
+ {
+ ///
+ /// Entity that is receiving service
+ ///
+ private EntityID _receivingEntityID = new EntityID();
+
+ ///
+ /// Entity that is supplying
+ ///
+ private EntityID _supplyingEntityID = new EntityID();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ResupplyCancelPdu()
+ {
+ PduType = (byte)8;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ResupplyCancelPdu left, ResupplyCancelPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ResupplyCancelPdu left, ResupplyCancelPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
+ marshalSize += this._supplyingEntityID.GetMarshalledSize(); // this._supplyingEntityID
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Entity that is receiving service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
+ public EntityID ReceivingEntityID
+ {
+ get
+ {
+ return this._receivingEntityID;
+ }
+
+ set
+ {
+ this._receivingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Entity that is supplying
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "supplyingEntityID")]
+ public EntityID SupplyingEntityID
+ {
+ get
+ {
+ return this._supplyingEntityID;
+ }
+
+ set
+ {
+ this._supplyingEntityID = value;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._receivingEntityID.Marshal(dos);
+ this._supplyingEntityID.Marshal(dos);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._receivingEntityID.Unmarshal(dis);
+ this._supplyingEntityID.Unmarshal(dis);
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._receivingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._supplyingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ResupplyCancelPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ResupplyCancelPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._receivingEntityID.Equals(obj._receivingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._supplyingEntityID.Equals(obj._supplyingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._supplyingEntityID.GetHashCode();
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ResupplyOfferPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ResupplyOfferPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ResupplyOfferPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ResupplyOfferPdu.cs
index b85e3fb..1811317 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ResupplyOfferPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ResupplyOfferPdu.cs
@@ -1,508 +1,508 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.5.2. Information about a request for supplies
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(SupplyQuantity))]
- public partial class ResupplyOfferPdu : LogisticsPdu, IEquatable
- {
- ///
- /// Entity that is receiving service
- ///
- private EntityID _receivingEntityID = new EntityID();
-
- ///
- /// Entity that is supplying
- ///
- private EntityID _supplyingEntityID = new EntityID();
-
- ///
- /// how many supplies are being offered
- ///
- private byte _numberOfSupplyTypes;
-
- ///
- /// padding
- ///
- private short _padding1;
-
- ///
- /// padding
- ///
- private byte _padding2;
-
- private List _supplies = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ResupplyOfferPdu()
- {
- PduType = (byte)6;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ResupplyOfferPdu left, ResupplyOfferPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ResupplyOfferPdu left, ResupplyOfferPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
- marshalSize += this._supplyingEntityID.GetMarshalledSize(); // this._supplyingEntityID
- marshalSize += 1; // this._numberOfSupplyTypes
- marshalSize += 2; // this._padding1
- marshalSize += 1; // this._padding2
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- SupplyQuantity listElement = (SupplyQuantity)this._supplies[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Entity that is receiving service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
- public EntityID ReceivingEntityID
- {
- get
- {
- return this._receivingEntityID;
- }
-
- set
- {
- this._receivingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Entity that is supplying
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "supplyingEntityID")]
- public EntityID SupplyingEntityID
- {
- get
- {
- return this._supplyingEntityID;
- }
-
- set
- {
- this._supplyingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the how many supplies are being offered
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getnumberOfSupplyTypes method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "numberOfSupplyTypes")]
- public byte NumberOfSupplyTypes
- {
- get
- {
- return this._numberOfSupplyTypes;
- }
-
- set
- {
- this._numberOfSupplyTypes = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "padding1")]
- public short Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(byte), ElementName = "padding2")]
- public byte Padding2
- {
- get
- {
- return this._padding2;
- }
-
- set
- {
- this._padding2 = value;
- }
- }
-
- ///
- /// Gets the supplies
- ///
- [XmlElement(ElementName = "suppliesList", Type = typeof(List))]
- public List Supplies
- {
- get
- {
- return this._supplies;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._receivingEntityID.Marshal(dos);
- this._supplyingEntityID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._supplies.Count);
- dos.WriteShort((short)this._padding1);
- dos.WriteByte((byte)this._padding2);
-
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
- aSupplyQuantity.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._receivingEntityID.Unmarshal(dis);
- this._supplyingEntityID.Unmarshal(dis);
- this._numberOfSupplyTypes = dis.ReadUnsignedByte();
- this._padding1 = dis.ReadShort();
- this._padding2 = dis.ReadByte();
-
- for (int idx = 0; idx < this.NumberOfSupplyTypes; idx++)
- {
- SupplyQuantity anX = new SupplyQuantity();
- anX.Unmarshal(dis);
- this._supplies.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._receivingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._supplyingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- sb.AppendLine("");
- SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
- aSupplyQuantity.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ResupplyOfferPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ResupplyOfferPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._receivingEntityID.Equals(obj._receivingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._supplyingEntityID.Equals(obj._supplyingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._numberOfSupplyTypes != obj._numberOfSupplyTypes)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._padding2 != obj._padding2)
- {
- ivarsEqual = false;
- }
-
- if (this._supplies.Count != obj._supplies.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- if (!this._supplies[idx].Equals(obj._supplies[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._supplyingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._numberOfSupplyTypes.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._padding2.GetHashCode();
-
- if (this._supplies.Count > 0)
- {
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- result = GenerateHash(result) ^ this._supplies[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.5.2. Information about a request for supplies
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(SupplyQuantity))]
+ public partial class ResupplyOfferPdu : LogisticsPdu, IEquatable
+ {
+ ///
+ /// Entity that is receiving service
+ ///
+ private EntityID _receivingEntityID = new EntityID();
+
+ ///
+ /// Entity that is supplying
+ ///
+ private EntityID _supplyingEntityID = new EntityID();
+
+ ///
+ /// how many supplies are being offered
+ ///
+ private byte _numberOfSupplyTypes;
+
+ ///
+ /// padding
+ ///
+ private short _padding1;
+
+ ///
+ /// padding
+ ///
+ private byte _padding2;
+
+ private List _supplies = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ResupplyOfferPdu()
+ {
+ PduType = (byte)6;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ResupplyOfferPdu left, ResupplyOfferPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ResupplyOfferPdu left, ResupplyOfferPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
+ marshalSize += this._supplyingEntityID.GetMarshalledSize(); // this._supplyingEntityID
+ marshalSize += 1; // this._numberOfSupplyTypes
+ marshalSize += 2; // this._padding1
+ marshalSize += 1; // this._padding2
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ SupplyQuantity listElement = (SupplyQuantity)this._supplies[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Entity that is receiving service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
+ public EntityID ReceivingEntityID
+ {
+ get
+ {
+ return this._receivingEntityID;
+ }
+
+ set
+ {
+ this._receivingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Entity that is supplying
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "supplyingEntityID")]
+ public EntityID SupplyingEntityID
+ {
+ get
+ {
+ return this._supplyingEntityID;
+ }
+
+ set
+ {
+ this._supplyingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the how many supplies are being offered
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getnumberOfSupplyTypes method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "numberOfSupplyTypes")]
+ public byte NumberOfSupplyTypes
+ {
+ get
+ {
+ return this._numberOfSupplyTypes;
+ }
+
+ set
+ {
+ this._numberOfSupplyTypes = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "padding1")]
+ public short Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "padding2")]
+ public byte Padding2
+ {
+ get
+ {
+ return this._padding2;
+ }
+
+ set
+ {
+ this._padding2 = value;
+ }
+ }
+
+ ///
+ /// Gets the supplies
+ ///
+ [XmlElement(ElementName = "suppliesList", Type = typeof(List))]
+ public List Supplies
+ {
+ get
+ {
+ return this._supplies;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._receivingEntityID.Marshal(dos);
+ this._supplyingEntityID.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._supplies.Count);
+ dos.WriteShort((short)this._padding1);
+ dos.WriteByte((byte)this._padding2);
+
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
+ aSupplyQuantity.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._receivingEntityID.Unmarshal(dis);
+ this._supplyingEntityID.Unmarshal(dis);
+ this._numberOfSupplyTypes = dis.ReadUnsignedByte();
+ this._padding1 = dis.ReadShort();
+ this._padding2 = dis.ReadByte();
+
+ for (int idx = 0; idx < this.NumberOfSupplyTypes; idx++)
+ {
+ SupplyQuantity anX = new SupplyQuantity();
+ anX.Unmarshal(dis);
+ this._supplies.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._receivingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._supplyingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ sb.AppendLine("");
+ SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
+ aSupplyQuantity.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ResupplyOfferPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ResupplyOfferPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._receivingEntityID.Equals(obj._receivingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._supplyingEntityID.Equals(obj._supplyingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._numberOfSupplyTypes != obj._numberOfSupplyTypes)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding2 != obj._padding2)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._supplies.Count != obj._supplies.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ if (!this._supplies[idx].Equals(obj._supplies[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._supplyingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._numberOfSupplyTypes.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._padding2.GetHashCode();
+
+ if (this._supplies.Count > 0)
+ {
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._supplies[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ResupplyReceivedPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ResupplyReceivedPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ResupplyReceivedPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ResupplyReceivedPdu.cs
index 49ca659..ec39047 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ResupplyReceivedPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ResupplyReceivedPdu.cs
@@ -1,508 +1,508 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.5.3. Receipt of supplies is communiated
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(SupplyQuantity))]
- public partial class ResupplyReceivedPdu : LogisticsPdu, IEquatable
- {
- ///
- /// Entity that is receiving service
- ///
- private EntityID _receivingEntityID = new EntityID();
-
- ///
- /// Entity that is supplying
- ///
- private EntityID _supplyingEntityID = new EntityID();
-
- ///
- /// how many supplies are being offered
- ///
- private byte _numberOfSupplyTypes;
-
- ///
- /// padding
- ///
- private short _padding1;
-
- ///
- /// padding
- ///
- private byte _padding2;
-
- private List _supplies = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ResupplyReceivedPdu()
- {
- PduType = (byte)7;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ResupplyReceivedPdu left, ResupplyReceivedPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ResupplyReceivedPdu left, ResupplyReceivedPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
- marshalSize += this._supplyingEntityID.GetMarshalledSize(); // this._supplyingEntityID
- marshalSize += 1; // this._numberOfSupplyTypes
- marshalSize += 2; // this._padding1
- marshalSize += 1; // this._padding2
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- SupplyQuantity listElement = (SupplyQuantity)this._supplies[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Entity that is receiving service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
- public EntityID ReceivingEntityID
- {
- get
- {
- return this._receivingEntityID;
- }
-
- set
- {
- this._receivingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Entity that is supplying
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "supplyingEntityID")]
- public EntityID SupplyingEntityID
- {
- get
- {
- return this._supplyingEntityID;
- }
-
- set
- {
- this._supplyingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the how many supplies are being offered
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getnumberOfSupplyTypes method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "numberOfSupplyTypes")]
- public byte NumberOfSupplyTypes
- {
- get
- {
- return this._numberOfSupplyTypes;
- }
-
- set
- {
- this._numberOfSupplyTypes = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "padding1")]
- public short Padding1
- {
- get
- {
- return this._padding1;
- }
-
- set
- {
- this._padding1 = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(byte), ElementName = "padding2")]
- public byte Padding2
- {
- get
- {
- return this._padding2;
- }
-
- set
- {
- this._padding2 = value;
- }
- }
-
- ///
- /// Gets the supplies
- ///
- [XmlElement(ElementName = "suppliesList", Type = typeof(List))]
- public List Supplies
- {
- get
- {
- return this._supplies;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._receivingEntityID.Marshal(dos);
- this._supplyingEntityID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._supplies.Count);
- dos.WriteShort((short)this._padding1);
- dos.WriteByte((byte)this._padding2);
-
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
- aSupplyQuantity.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._receivingEntityID.Unmarshal(dis);
- this._supplyingEntityID.Unmarshal(dis);
- this._numberOfSupplyTypes = dis.ReadUnsignedByte();
- this._padding1 = dis.ReadShort();
- this._padding2 = dis.ReadByte();
-
- for (int idx = 0; idx < this.NumberOfSupplyTypes; idx++)
- {
- SupplyQuantity anX = new SupplyQuantity();
- anX.Unmarshal(dis);
- this._supplies.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._receivingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._supplyingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- sb.AppendLine("");
- SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
- aSupplyQuantity.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ResupplyReceivedPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ResupplyReceivedPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._receivingEntityID.Equals(obj._receivingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._supplyingEntityID.Equals(obj._supplyingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._numberOfSupplyTypes != obj._numberOfSupplyTypes)
- {
- ivarsEqual = false;
- }
-
- if (this._padding1 != obj._padding1)
- {
- ivarsEqual = false;
- }
-
- if (this._padding2 != obj._padding2)
- {
- ivarsEqual = false;
- }
-
- if (this._supplies.Count != obj._supplies.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- if (!this._supplies[idx].Equals(obj._supplies[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._supplyingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._numberOfSupplyTypes.GetHashCode();
- result = GenerateHash(result) ^ this._padding1.GetHashCode();
- result = GenerateHash(result) ^ this._padding2.GetHashCode();
-
- if (this._supplies.Count > 0)
- {
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- result = GenerateHash(result) ^ this._supplies[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.5.3. Receipt of supplies is communiated
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(SupplyQuantity))]
+ public partial class ResupplyReceivedPdu : LogisticsPdu, IEquatable
+ {
+ ///
+ /// Entity that is receiving service
+ ///
+ private EntityID _receivingEntityID = new EntityID();
+
+ ///
+ /// Entity that is supplying
+ ///
+ private EntityID _supplyingEntityID = new EntityID();
+
+ ///
+ /// how many supplies are being offered
+ ///
+ private byte _numberOfSupplyTypes;
+
+ ///
+ /// padding
+ ///
+ private short _padding1;
+
+ ///
+ /// padding
+ ///
+ private byte _padding2;
+
+ private List _supplies = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ResupplyReceivedPdu()
+ {
+ PduType = (byte)7;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ResupplyReceivedPdu left, ResupplyReceivedPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ResupplyReceivedPdu left, ResupplyReceivedPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._receivingEntityID.GetMarshalledSize(); // this._receivingEntityID
+ marshalSize += this._supplyingEntityID.GetMarshalledSize(); // this._supplyingEntityID
+ marshalSize += 1; // this._numberOfSupplyTypes
+ marshalSize += 2; // this._padding1
+ marshalSize += 1; // this._padding2
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ SupplyQuantity listElement = (SupplyQuantity)this._supplies[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Entity that is receiving service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "receivingEntityID")]
+ public EntityID ReceivingEntityID
+ {
+ get
+ {
+ return this._receivingEntityID;
+ }
+
+ set
+ {
+ this._receivingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Entity that is supplying
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "supplyingEntityID")]
+ public EntityID SupplyingEntityID
+ {
+ get
+ {
+ return this._supplyingEntityID;
+ }
+
+ set
+ {
+ this._supplyingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the how many supplies are being offered
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getnumberOfSupplyTypes method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "numberOfSupplyTypes")]
+ public byte NumberOfSupplyTypes
+ {
+ get
+ {
+ return this._numberOfSupplyTypes;
+ }
+
+ set
+ {
+ this._numberOfSupplyTypes = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "padding1")]
+ public short Padding1
+ {
+ get
+ {
+ return this._padding1;
+ }
+
+ set
+ {
+ this._padding1 = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "padding2")]
+ public byte Padding2
+ {
+ get
+ {
+ return this._padding2;
+ }
+
+ set
+ {
+ this._padding2 = value;
+ }
+ }
+
+ ///
+ /// Gets the supplies
+ ///
+ [XmlElement(ElementName = "suppliesList", Type = typeof(List))]
+ public List Supplies
+ {
+ get
+ {
+ return this._supplies;
+ }
+ }
+
+ ///
+ /// Automatically sets the length of the marshalled data, then calls the marshal method.
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ public override void MarshalAutoLengthSet(DataOutputStream dos)
+ {
+ // Set the length prior to marshalling data
+ this.Length = (ushort)this.GetMarshalledSize();
+ this.Marshal(dos);
+ }
+
+ ///
+ /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
+ ///
+ /// The DataOutputStream instance to which the PDU is marshaled.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Marshal(DataOutputStream dos)
+ {
+ base.Marshal(dos);
+ if (dos != null)
+ {
+ try
+ {
+ this._receivingEntityID.Marshal(dos);
+ this._supplyingEntityID.Marshal(dos);
+ dos.WriteUnsignedByte((byte)this._supplies.Count);
+ dos.WriteShort((short)this._padding1);
+ dos.WriteByte((byte)this._padding2);
+
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
+ aSupplyQuantity.Marshal(dos);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Unmarshal(DataInputStream dis)
+ {
+ base.Unmarshal(dis);
+
+ if (dis != null)
+ {
+ try
+ {
+ this._receivingEntityID.Unmarshal(dis);
+ this._supplyingEntityID.Unmarshal(dis);
+ this._numberOfSupplyTypes = dis.ReadUnsignedByte();
+ this._padding1 = dis.ReadShort();
+ this._padding2 = dis.ReadByte();
+
+ for (int idx = 0; idx < this.NumberOfSupplyTypes; idx++)
+ {
+ SupplyQuantity anX = new SupplyQuantity();
+ anX.Unmarshal(dis);
+ this._supplies.Add(anX);
+ }
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+ }
+
+ ///
+ /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
+ /// This will be modified in the future to provide a better display. Usage:
+ /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
+ /// where pdu is an object representing a single pdu and sb is a StringBuilder.
+ /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
+ ///
+ /// The StringBuilder instance to which the PDU is written to.
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
+ public override void Reflection(StringBuilder sb)
+ {
+ sb.AppendLine("");
+ base.Reflection(sb);
+ try
+ {
+ sb.AppendLine("");
+ this._receivingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("");
+ this._supplyingEntityID.Reflection(sb);
+ sb.AppendLine("");
+ sb.AppendLine("" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding1.ToString(CultureInfo.InvariantCulture) + "");
+ sb.AppendLine("" + this._padding2.ToString(CultureInfo.InvariantCulture) + "");
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ sb.AppendLine("");
+ SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
+ aSupplyQuantity.Reflection(sb);
+ sb.AppendLine("");
+ }
+
+ sb.AppendLine("");
+ }
+ catch (Exception e)
+ {
+ if (PduBase.TraceExceptions)
+ {
+ Trace.WriteLine(e);
+ Trace.Flush();
+ }
+
+ this.RaiseExceptionOccured(e);
+
+ if (PduBase.ThrowExceptions)
+ {
+ throw e;
+ }
+ }
+ }
+
+ ///
+ /// Determines whether the specified is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ return this == obj as ResupplyReceivedPdu;
+ }
+
+ ///
+ /// Compares for reference AND value equality.
+ ///
+ /// The object to compare with this instance.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public bool Equals(ResupplyReceivedPdu obj)
+ {
+ bool ivarsEqual = true;
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ ivarsEqual = base.Equals(obj);
+
+ if (!this._receivingEntityID.Equals(obj._receivingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (!this._supplyingEntityID.Equals(obj._supplyingEntityID))
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._numberOfSupplyTypes != obj._numberOfSupplyTypes)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding1 != obj._padding1)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._padding2 != obj._padding2)
+ {
+ ivarsEqual = false;
+ }
+
+ if (this._supplies.Count != obj._supplies.Count)
+ {
+ ivarsEqual = false;
+ }
+
+ if (ivarsEqual)
+ {
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ if (!this._supplies[idx].Equals(obj._supplies[idx]))
+ {
+ ivarsEqual = false;
+ }
+ }
+ }
+
+ return ivarsEqual;
+ }
+
+ ///
+ /// HashCode Helper
+ ///
+ /// The hash value.
+ /// The new hash value.
+ private static int GenerateHash(int hash)
+ {
+ hash = hash << (5 + hash);
+ return hash;
+ }
+
+ ///
+ /// Gets the hash code.
+ ///
+ /// The hash code.
+ public override int GetHashCode()
+ {
+ int result = 0;
+
+ result = GenerateHash(result) ^ base.GetHashCode();
+
+ result = GenerateHash(result) ^ this._receivingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._supplyingEntityID.GetHashCode();
+ result = GenerateHash(result) ^ this._numberOfSupplyTypes.GetHashCode();
+ result = GenerateHash(result) ^ this._padding1.GetHashCode();
+ result = GenerateHash(result) ^ this._padding2.GetHashCode();
+
+ if (this._supplies.Count > 0)
+ {
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ result = GenerateHash(result) ^ this._supplies[idx].GetHashCode();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/CsharpDis6/OpenDis/Dis1995/Generated/ServiceRequestPdu.cs b/Libs/CsharpDis6/Dis1995/Generated/ServiceRequestPdu.cs
similarity index 97%
rename from CsharpDis6/OpenDis/Dis1995/Generated/ServiceRequestPdu.cs
rename to Libs/CsharpDis6/Dis1995/Generated/ServiceRequestPdu.cs
index 3877693..4150574 100644
--- a/CsharpDis6/OpenDis/Dis1995/Generated/ServiceRequestPdu.cs
+++ b/Libs/CsharpDis6/Dis1995/Generated/ServiceRequestPdu.cs
@@ -1,508 +1,508 @@
-// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the names of the Naval Postgraduate School (NPS)
-// Modeling Virtual Environments and Simulation (MOVES) Institute
-// (http://www.nps.edu and http://www.MovesInstitute.org)
-// nor the names of its contributors may be used to endorse or
-// promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
-// rights reserved. This work is licensed under the BSD open source license,
-// available at https://www.movesinstitute.org/licenses/bsd.html
-//
-// Author: DMcG
-// Modified for use with C#:
-// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
-// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.Text;
-using System.Xml.Serialization;
-using OpenDis.Core;
-
-namespace OpenDis.Dis1995
-{
- ///
- /// Section 5.3.5.1. Information about a request for supplies
- ///
- [Serializable]
- [XmlRoot]
- [XmlInclude(typeof(EntityID))]
- [XmlInclude(typeof(SupplyQuantity))]
- public partial class ServiceRequestPdu : LogisticsPdu, IEquatable
- {
- ///
- /// Entity that is requesting service
- ///
- private EntityID _requestingEntityID = new EntityID();
-
- ///
- /// Entity that is providing the service
- ///
- private EntityID _servicingEntityID = new EntityID();
-
- ///
- /// type of service requested
- ///
- private byte _serviceTypeRequested;
-
- ///
- /// How many requested
- ///
- private byte _numberOfSupplyTypes;
-
- ///
- /// padding
- ///
- private short _serviceRequestPadding;
-
- private List _supplies = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ServiceRequestPdu()
- {
- PduType = (byte)5;
- }
-
- ///
- /// Implements the operator !=.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if operands are not equal; otherwise, false.
- ///
- public static bool operator !=(ServiceRequestPdu left, ServiceRequestPdu right)
- {
- return !(left == right);
- }
-
- ///
- /// Implements the operator ==.
- ///
- /// The left operand.
- /// The right operand.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public static bool operator ==(ServiceRequestPdu left, ServiceRequestPdu right)
- {
- if (object.ReferenceEquals(left, right))
- {
- return true;
- }
-
- if (((object)left == null) || ((object)right == null))
- {
- return false;
- }
-
- return left.Equals(right);
- }
-
- public override int GetMarshalledSize()
- {
- int marshalSize = 0;
-
- marshalSize = base.GetMarshalledSize();
- marshalSize += this._requestingEntityID.GetMarshalledSize(); // this._requestingEntityID
- marshalSize += this._servicingEntityID.GetMarshalledSize(); // this._servicingEntityID
- marshalSize += 1; // this._serviceTypeRequested
- marshalSize += 1; // this._numberOfSupplyTypes
- marshalSize += 2; // this._serviceRequestPadding
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- SupplyQuantity listElement = (SupplyQuantity)this._supplies[idx];
- marshalSize += listElement.GetMarshalledSize();
- }
-
- return marshalSize;
- }
-
- ///
- /// Gets or sets the Entity that is requesting service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "requestingEntityID")]
- public EntityID RequestingEntityID
- {
- get
- {
- return this._requestingEntityID;
- }
-
- set
- {
- this._requestingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the Entity that is providing the service
- ///
- [XmlElement(Type = typeof(EntityID), ElementName = "servicingEntityID")]
- public EntityID ServicingEntityID
- {
- get
- {
- return this._servicingEntityID;
- }
-
- set
- {
- this._servicingEntityID = value;
- }
- }
-
- ///
- /// Gets or sets the type of service requested
- ///
- [XmlElement(Type = typeof(byte), ElementName = "serviceTypeRequested")]
- public byte ServiceTypeRequested
- {
- get
- {
- return this._serviceTypeRequested;
- }
-
- set
- {
- this._serviceTypeRequested = value;
- }
- }
-
- ///
- /// Gets or sets the How many requested
- ///
- ///
- /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
- /// The getnumberOfSupplyTypes method will also be based on the actual list length rather than this value.
- /// The method is simply here for completeness and should not be used for any computations.
- ///
- [XmlElement(Type = typeof(byte), ElementName = "numberOfSupplyTypes")]
- public byte NumberOfSupplyTypes
- {
- get
- {
- return this._numberOfSupplyTypes;
- }
-
- set
- {
- this._numberOfSupplyTypes = value;
- }
- }
-
- ///
- /// Gets or sets the padding
- ///
- [XmlElement(Type = typeof(short), ElementName = "serviceRequestPadding")]
- public short ServiceRequestPadding
- {
- get
- {
- return this._serviceRequestPadding;
- }
-
- set
- {
- this._serviceRequestPadding = value;
- }
- }
-
- ///
- /// Gets the supplies
- ///
- [XmlElement(ElementName = "suppliesList", Type = typeof(List))]
- public List Supplies
- {
- get
- {
- return this._supplies;
- }
- }
-
- ///
- /// Automatically sets the length of the marshalled data, then calls the marshal method.
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- public override void MarshalAutoLengthSet(DataOutputStream dos)
- {
- // Set the length prior to marshalling data
- this.Length = (ushort)this.GetMarshalledSize();
- this.Marshal(dos);
- }
-
- ///
- /// Marshal the data to the DataOutputStream. Note: Length needs to be set before calling this method
- ///
- /// The DataOutputStream instance to which the PDU is marshaled.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Marshal(DataOutputStream dos)
- {
- base.Marshal(dos);
- if (dos != null)
- {
- try
- {
- this._requestingEntityID.Marshal(dos);
- this._servicingEntityID.Marshal(dos);
- dos.WriteUnsignedByte((byte)this._serviceTypeRequested);
- dos.WriteUnsignedByte((byte)this._supplies.Count);
- dos.WriteShort((short)this._serviceRequestPadding);
-
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
- aSupplyQuantity.Marshal(dos);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Unmarshal(DataInputStream dis)
- {
- base.Unmarshal(dis);
-
- if (dis != null)
- {
- try
- {
- this._requestingEntityID.Unmarshal(dis);
- this._servicingEntityID.Unmarshal(dis);
- this._serviceTypeRequested = dis.ReadUnsignedByte();
- this._numberOfSupplyTypes = dis.ReadUnsignedByte();
- this._serviceRequestPadding = dis.ReadShort();
-
- for (int idx = 0; idx < this.NumberOfSupplyTypes; idx++)
- {
- SupplyQuantity anX = new SupplyQuantity();
- anX.Unmarshal(dis);
- this._supplies.Add(anX);
- }
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
- }
-
- ///
- /// This allows for a quick display of PDU data. The current format is unacceptable and only used for debugging.
- /// This will be modified in the future to provide a better display. Usage:
- /// pdu.GetType().InvokeMember("Reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
- /// where pdu is an object representing a single pdu and sb is a StringBuilder.
- /// Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
- ///
- /// The StringBuilder instance to which the PDU is written to.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Due to ignoring errors.")]
- public override void Reflection(StringBuilder sb)
- {
- sb.AppendLine("");
- base.Reflection(sb);
- try
- {
- sb.AppendLine("");
- this._requestingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("");
- this._servicingEntityID.Reflection(sb);
- sb.AppendLine("");
- sb.AppendLine("" + this._serviceTypeRequested.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "");
- sb.AppendLine("" + this._serviceRequestPadding.ToString(CultureInfo.InvariantCulture) + "");
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- sb.AppendLine("");
- SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
- aSupplyQuantity.Reflection(sb);
- sb.AppendLine("");
- }
-
- sb.AppendLine("");
- }
- catch (Exception e)
- {
- if (PduBase.TraceExceptions)
- {
- Trace.WriteLine(e);
- Trace.Flush();
- }
-
- this.RaiseExceptionOccured(e);
-
- if (PduBase.ThrowExceptions)
- {
- throw e;
- }
- }
- }
-
- ///
- /// Determines whether the specified is equal to this instance.
- ///
- /// The to compare with this instance.
- ///
- /// true if the specified is equal to this instance; otherwise, false.
- ///
- public override bool Equals(object obj)
- {
- return this == obj as ServiceRequestPdu;
- }
-
- ///
- /// Compares for reference AND value equality.
- ///
- /// The object to compare with this instance.
- ///
- /// true if both operands are equal; otherwise, false.
- ///
- public bool Equals(ServiceRequestPdu obj)
- {
- bool ivarsEqual = true;
-
- if (obj.GetType() != this.GetType())
- {
- return false;
- }
-
- ivarsEqual = base.Equals(obj);
-
- if (!this._requestingEntityID.Equals(obj._requestingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (!this._servicingEntityID.Equals(obj._servicingEntityID))
- {
- ivarsEqual = false;
- }
-
- if (this._serviceTypeRequested != obj._serviceTypeRequested)
- {
- ivarsEqual = false;
- }
-
- if (this._numberOfSupplyTypes != obj._numberOfSupplyTypes)
- {
- ivarsEqual = false;
- }
-
- if (this._serviceRequestPadding != obj._serviceRequestPadding)
- {
- ivarsEqual = false;
- }
-
- if (this._supplies.Count != obj._supplies.Count)
- {
- ivarsEqual = false;
- }
-
- if (ivarsEqual)
- {
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- if (!this._supplies[idx].Equals(obj._supplies[idx]))
- {
- ivarsEqual = false;
- }
- }
- }
-
- return ivarsEqual;
- }
-
- ///
- /// HashCode Helper
- ///
- /// The hash value.
- /// The new hash value.
- private static int GenerateHash(int hash)
- {
- hash = hash << (5 + hash);
- return hash;
- }
-
- ///
- /// Gets the hash code.
- ///
- /// The hash code.
- public override int GetHashCode()
- {
- int result = 0;
-
- result = GenerateHash(result) ^ base.GetHashCode();
-
- result = GenerateHash(result) ^ this._requestingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._servicingEntityID.GetHashCode();
- result = GenerateHash(result) ^ this._serviceTypeRequested.GetHashCode();
- result = GenerateHash(result) ^ this._numberOfSupplyTypes.GetHashCode();
- result = GenerateHash(result) ^ this._serviceRequestPadding.GetHashCode();
-
- if (this._supplies.Count > 0)
- {
- for (int idx = 0; idx < this._supplies.Count; idx++)
- {
- result = GenerateHash(result) ^ this._supplies[idx].GetHashCode();
- }
- }
-
- return result;
- }
- }
-}
+// Copyright (c) 1995-2009 held by the author(s). All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the names of the Naval Postgraduate School (NPS)
+// Modeling Virtual Environments and Simulation (MOVES) Institute
+// (http://www.nps.edu and http://www.MovesInstitute.org)
+// nor the names of its contributors may be used to endorse or
+// promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Copyright (c) 2008, MOVES Institute, Naval Postgraduate School. All
+// rights reserved. This work is licensed under the BSD open source license,
+// available at https://www.movesinstitute.org/licenses/bsd.html
+//
+// Author: DMcG
+// Modified for use with C#:
+// - Peter Smith (Naval Air Warfare Center - Training Systems Division)
+// - Zvonko Bostjancic (Blubit d.o.o. - zvonko.bostjancic@blubit.si)
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml.Serialization;
+using OpenDis.Core;
+
+namespace OpenDis.Dis1995
+{
+ ///
+ /// Section 5.3.5.1. Information about a request for supplies
+ ///
+ [Serializable]
+ [XmlRoot]
+ [XmlInclude(typeof(EntityID))]
+ [XmlInclude(typeof(SupplyQuantity))]
+ public partial class ServiceRequestPdu : LogisticsPdu, IEquatable
+ {
+ ///
+ /// Entity that is requesting service
+ ///
+ private EntityID _requestingEntityID = new EntityID();
+
+ ///
+ /// Entity that is providing the service
+ ///
+ private EntityID _servicingEntityID = new EntityID();
+
+ ///
+ /// type of service requested
+ ///
+ private byte _serviceTypeRequested;
+
+ ///
+ /// How many requested
+ ///
+ private byte _numberOfSupplyTypes;
+
+ ///
+ /// padding
+ ///
+ private short _serviceRequestPadding;
+
+ private List _supplies = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ServiceRequestPdu()
+ {
+ PduType = (byte)5;
+ }
+
+ ///
+ /// Implements the operator !=.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if operands are not equal; otherwise, false.
+ ///
+ public static bool operator !=(ServiceRequestPdu left, ServiceRequestPdu right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Implements the operator ==.
+ ///
+ /// The left operand.
+ /// The right operand.
+ ///
+ /// true if both operands are equal; otherwise, false.
+ ///
+ public static bool operator ==(ServiceRequestPdu left, ServiceRequestPdu right)
+ {
+ if (object.ReferenceEquals(left, right))
+ {
+ return true;
+ }
+
+ if (((object)left == null) || ((object)right == null))
+ {
+ return false;
+ }
+
+ return left.Equals(right);
+ }
+
+ public override int GetMarshalledSize()
+ {
+ int marshalSize = 0;
+
+ marshalSize = base.GetMarshalledSize();
+ marshalSize += this._requestingEntityID.GetMarshalledSize(); // this._requestingEntityID
+ marshalSize += this._servicingEntityID.GetMarshalledSize(); // this._servicingEntityID
+ marshalSize += 1; // this._serviceTypeRequested
+ marshalSize += 1; // this._numberOfSupplyTypes
+ marshalSize += 2; // this._serviceRequestPadding
+ for (int idx = 0; idx < this._supplies.Count; idx++)
+ {
+ SupplyQuantity listElement = (SupplyQuantity)this._supplies[idx];
+ marshalSize += listElement.GetMarshalledSize();
+ }
+
+ return marshalSize;
+ }
+
+ ///
+ /// Gets or sets the Entity that is requesting service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "requestingEntityID")]
+ public EntityID RequestingEntityID
+ {
+ get
+ {
+ return this._requestingEntityID;
+ }
+
+ set
+ {
+ this._requestingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Entity that is providing the service
+ ///
+ [XmlElement(Type = typeof(EntityID), ElementName = "servicingEntityID")]
+ public EntityID ServicingEntityID
+ {
+ get
+ {
+ return this._servicingEntityID;
+ }
+
+ set
+ {
+ this._servicingEntityID = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the type of service requested
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "serviceTypeRequested")]
+ public byte ServiceTypeRequested
+ {
+ get
+ {
+ return this._serviceTypeRequested;
+ }
+
+ set
+ {
+ this._serviceTypeRequested = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the How many requested
+ ///
+ ///
+ /// Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose.
+ /// The getnumberOfSupplyTypes method will also be based on the actual list length rather than this value.
+ /// The method is simply here for completeness and should not be used for any computations.
+ ///
+ [XmlElement(Type = typeof(byte), ElementName = "numberOfSupplyTypes")]
+ public byte NumberOfSupplyTypes
+ {
+ get
+ {
+ return this._numberOfSupplyTypes;
+ }
+
+ set
+ {
+ this._numberOfSupplyTypes = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the padding
+ ///
+ [XmlElement(Type = typeof(short), ElementName = "serviceRequestPadding")]
+ public short ServiceRequestPadding
+ {
+ get
+ {
+ return this._serviceRequestPadding;
+ }
+
+ set
+ {
+ this._serviceRequestPadding = value;
+ }
+ }
+
+ ///
+ /// Gets the supplies
+ ///
+ [XmlElement(ElementName = "suppliesList", Type = typeof(List))]
+ public List Supplies
+ {
+ get
+ {
+ return this._supplies;
+ }
+ }
+
+ ///