From 8388e97c92165e16c26c554aadf1e204ebcf93cf Mon Sep 17 00:00:00 2001 From: Rob Fisher Date: Tue, 19 Oct 2021 14:00:22 -0400 Subject: [PATCH] Public release MSCL 62.1.2 --- .../{Topics.txt => Comments.txt} | 214 +++--- .../MSCL_API_Docs_Project/Languages.txt | 10 +- .../MSCL_API_Docs_Project/Project.txt | 36 +- .../msclDocsStyle/Style.txt | 36 +- .../{Topics.txt => Comments.txt} | 214 +++--- .../MSCL_Docs_Project/Languages.txt | 10 +- .../MSCL_Docs_Project/Project.txt | 36 +- .../MSCL_Docs_Project/msclDocsStyle/Style.txt | 36 +- BuildScripts/buildDocs.cmd | 82 +-- BuildScripts/buildReadme_Linux.md | 84 +-- BuildScripts/buildReadme_Windows.md | 12 +- BuildScripts/build_Python_x64.cmd | 35 +- BuildScripts/build_Python_x86.cmd | 35 +- CHANGELOG.txt | 16 + HowToUseMSCL.md | 9 +- MSCL/Jamfile | 23 +- MSCL/MSCL.vcxproj | 2 + MSCL/MSCL.vcxproj.filters | 6 + MSCL/source/mscl/LibVersion.h | 4 +- .../Inertial/ExposedInertialTypes.h | 1 + .../Wireless/Commands/AutoCalResult.h | 10 +- .../Wireless/Configuration/InputRange.cpp | 19 +- .../Wireless/Configuration/InputRange.h | 1 + .../Features/AvailableTransmitPowers.cpp | 4 + .../Wireless/Features/NodeFeatures.cpp | 4 + .../NodeFeatures_torqueLink200_3ch.cpp | 7 +- .../Features/NodeFeatures_torqueLink200_3ch.h | 5 +- .../NodeFeatures_torqueLink200_3ch_s.cpp | 88 +++ .../NodeFeatures_torqueLink200_3ch_s.h | 37 + .../MicroStrain/Wireless/WirelessModels.h | 2 + .../mscl/MicroStrain/Wireless/WirelessNode.h | 2 +- .../Wireless/WirelessNode_Impl.cpp | 3 + .../mscl/MicroStrain/Wireless/WirelessTypes.h | 9 +- .../source/mscl/Wrapper/MSCL_Main_Interface.i | 6 +- .../enableDisableBeacon.h | 3 +- MSCL_Examples/Wireless/Jamfile | 4 +- MSCL_Managed/Properties/AssemblyInfo.cs | 4 +- MSCL_Managed/mscl/AdaptiveFilterLevels.cs | 664 +++++++++--------- .../mscl/AntennaLeverArmCalConfiguration.cs | 154 ++-- .../mscl/AutoAdaptiveFilterOptions.cs | 162 ++--- MSCL_Managed/mscl/Bitfield.cs | 180 ++--- MSCL_Managed/mscl/CfcFilters.cs | 664 +++++++++--------- MSCL_Managed/mscl/CommPortInfo.cs | 664 +++++++++--------- MSCL_Managed/mscl/DeviceCommPort.cs | 172 ++--- MSCL_Managed/mscl/DeviceStatusMap.cs | 602 ++++++++-------- MSCL_Managed/mscl/DeviceStatusValueMap.cs | 602 ++++++++-------- MSCL_Managed/mscl/DeviceStatusValues.cs | 92 +-- .../mscl/FilterInitialValuesSource.cs | 40 +- .../mscl/FilterInitializationValues.cs | 318 ++++----- MSCL_Managed/mscl/GnssAidingStatus.cs | 46 +- MSCL_Managed/mscl/GnssReceiverInfo.cs | 186 ++--- MSCL_Managed/mscl/GnssReceivers.cs | 664 +++++++++--------- MSCL_Managed/mscl/GnssSignalConfiguration.cs | 362 +++++----- MSCL_Managed/mscl/GpioBehaviorModes.cs | 602 ++++++++-------- MSCL_Managed/mscl/GpioConfiguration.cs | 290 ++++---- MSCL_Managed/mscl/GpioFeatureBehaviors.cs | 602 ++++++++-------- MSCL_Managed/mscl/GpioPinModeOptions.cs | 664 +++++++++--------- MSCL_Managed/mscl/GpioPinOptions.cs | 602 ++++++++-------- MSCL_Managed/mscl/HeadingAlignmentMethod.cs | 170 ++--- MSCL_Managed/mscl/HeadingAlignmentOption.cs | 38 +- MSCL_Managed/mscl/InertialTypes.cs | 1 + MSCL_Managed/mscl/MipChannelIdentifier.cs | 382 +++++----- MSCL_Managed/mscl/MipChannelIdentifiers.cs | 664 +++++++++--------- MSCL_Managed/mscl/MipCommandParamPair.cs | 172 ++--- MSCL_Managed/mscl/MipCommandParameters.cs | 664 +++++++++--------- MSCL_Managed/mscl/MipFieldValues.cs | 664 +++++++++--------- MSCL_Managed/mscl/MipModels.cs | 178 ++--- MSCL_Managed/mscl/MipNode.cs | 608 ++++++++-------- MSCL_Managed/mscl/OdometerConfiguration.cs | 194 ++--- .../mscl/PositionReferenceConfiguration.cs | 156 ++-- .../mscl/PositionVelocityReferenceFrame.cs | 36 +- MSCL_Managed/mscl/PpsSourceOptions.cs | 664 +++++++++--------- MSCL_Managed/mscl/Quaternion.cs | 146 ++-- MSCL_Managed/mscl/RTKDeviceStatusFlags.cs | 328 ++++----- MSCL_Managed/mscl/RTKNode.cs | 132 ++-- MSCL_Managed/mscl/RawBytePacket.cs | 196 +++--- MSCL_Managed/mscl/RawBytePackets.cs | 664 +++++++++--------- MSCL_Managed/mscl/StatusSelectors.cs | 664 +++++++++--------- MSCL_Managed/mscl/WirelessModels.cs | 1 + MSCL_Managed/mscl/WirelessPollData.cs | 602 ++++++++-------- MSCL_Managed/mscl/WirelessTypes.cs | 5 +- README.md | 48 +- 82 files changed, 8537 insertions(+), 8281 deletions(-) rename BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/{Topics.txt => Comments.txt} (60%) rename BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/{Topics.txt => Comments.txt} (52%) create mode 100644 MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.cpp create mode 100644 MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.h diff --git a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Topics.txt b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Comments.txt similarity index 60% rename from BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Topics.txt rename to BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Comments.txt index 288f5291c..ba7f89595 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Topics.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Comments.txt @@ -1,9 +1,9 @@ -Format: 2.0 (Development Release 08-22-2015) +Format: 2.0.2 -# This is the Natural Docs topics file for this project. If you change anything -# here, it will apply to THIS PROJECT ONLY. You can edit the version in -# Natural Docs' Config folder to make the changes apply to all projects, but -# it's recommended that you edit this version instead. +# This is the Natural Docs comments file for this project. If you change +# anything here, it will apply to THIS PROJECT ONLY. You can edit the version +# in Natural Docs' Config folder to make the changes apply to all projects, +# but it's recommended that you edit this version instead. # Ignored Keywords @@ -148,21 +148,16 @@ Ignore Keywords: dbtrigger, dbtriggers -# Tags -# ------------------------------------------------------------------------ - Tags: API - - -# Topic Types +# Comment Types # ------------------------------------------------------------------------ # The syntax reference is after the definitions. -Alter Topic Type: Class +Alter Comment Type: Class - Display Name from Locale: Topics.txt.Class.DisplayName - Plural Display Name from Locale: Topics.txt.Class.PluralDisplayName + Display Name from Locale: Comments.txt.Class.DisplayName + Plural Display Name from Locale: Comments.txt.Class.PluralDisplayName Scope: Start Flags: Code, Variable Type, Class Hierarchy @@ -173,10 +168,10 @@ Alter Topic Type: Class api namespace, api namespaces -Alter Topic Type: Interface +Alter Comment Type: Interface - Display Name from Locale: Topics.txt.Interface.DisplayName - Plural Display Name from Locale: Topics.txt.Interface.PluralDisplayName + Display Name from Locale: Comments.txt.Interface.DisplayName + Plural Display Name from Locale: Comments.txt.Interface.PluralDisplayName Index: with Class Scope: Start @@ -186,10 +181,10 @@ Alter Topic Type: Interface api interface, api interfaces -Alter Topic Type: Struct +Alter Comment Type: Struct - Display Name from Locale: Topics.txt.Struct.DisplayName - Plural Display Name from Locale: Topics.txt.Struct.PluralDisplayName + Display Name from Locale: Comments.txt.Struct.DisplayName + Plural Display Name from Locale: Comments.txt.Struct.PluralDisplayName Index: with Class Scope: Start @@ -200,10 +195,10 @@ Alter Topic Type: Struct api structure, api structures -Alter Topic Type: Section +Alter Comment Type: Section - Display Name from Locale: Topics.txt.Section.DisplayName - Plural Display Name from Locale: Topics.txt.Section.PluralDisplayName + Display Name from Locale: Comments.txt.Section.DisplayName + Plural Display Name from Locale: Comments.txt.Section.PluralDisplayName Index: No Scope: End @@ -214,10 +209,10 @@ Alter Topic Type: Section api title -Alter Topic Type: Group +Alter Comment Type: Group - Display Name from Locale: Topics.txt.Group.DisplayName - Plural Display Name from Locale: Topics.txt.Group.PluralDisplayName + Display Name from Locale: Comments.txt.Group.DisplayName + Plural Display Name from Locale: Comments.txt.Group.PluralDisplayName Index: No Flags: Documentation @@ -226,10 +221,10 @@ Alter Topic Type: Group api group -Alter Topic Type: Information +Alter Comment Type: Information - Display Name from Locale: Topics.txt.Information.DisplayName - Plural Display Name from Locale: Topics.txt.Information.PluralDisplayName + Display Name from Locale: Comments.txt.Information.DisplayName + Plural Display Name from Locale: Comments.txt.Information.PluralDisplayName Index: No Flags: Documentation @@ -239,10 +234,10 @@ Alter Topic Type: Information api about, api list -Alter Topic Type: File +Alter Comment Type: File - Display Name from Locale: Topics.txt.File.DisplayName - Plural Display Name from Locale: Topics.txt.File.PluralDisplayName + Display Name from Locale: Comments.txt.File.DisplayName + Plural Display Name from Locale: Comments.txt.File.PluralDisplayName Scope: Always Global Flags: File @@ -256,10 +251,10 @@ Alter Topic Type: File api header, api headers -Alter Topic Type: Type +Alter Comment Type: Type - Display Name from Locale: Topics.txt.Type.DisplayName - Plural Display Name from Locale: Topics.txt.Type.PluralDisplayName + Display Name from Locale: Comments.txt.Type.DisplayName + Plural Display Name from Locale: Comments.txt.Type.PluralDisplayName Flags: Code, Variable Type @@ -268,10 +263,10 @@ Alter Topic Type: Type api typedef, api typedefs -Alter Topic Type: Enumeration +Alter Comment Type: Enumeration - Display Name from Locale: Topics.txt.Enumeration.DisplayName - Plural Display Name from Locale: Topics.txt.Enumeration.PluralDisplayName + Display Name from Locale: Comments.txt.Enumeration.DisplayName + Plural Display Name from Locale: Comments.txt.Enumeration.PluralDisplayName Index: with Type Flags: Code, Variable Type, Enum @@ -281,10 +276,10 @@ Alter Topic Type: Enumeration api enumeration, api enumerations -Alter Topic Type: Delegate +Alter Comment Type: Delegate - Display Name from Locale: Topics.txt.Delegate.DisplayName - Plural Display Name from Locale: Topics.txt.Delegate.PluralDisplayName + Display Name from Locale: Comments.txt.Delegate.DisplayName + Plural Display Name from Locale: Comments.txt.Delegate.PluralDisplayName Index: with Type Flags: Code, Variable Type @@ -293,10 +288,10 @@ Alter Topic Type: Delegate api delegate, api delegates -Alter Topic Type: Function +Alter Comment Type: Function - Display Name from Locale: Topics.txt.Function.DisplayName - Plural Display Name from Locale: Topics.txt.Function.PluralDisplayName + Display Name from Locale: Comments.txt.Function.DisplayName + Plural Display Name from Locale: Comments.txt.Function.PluralDisplayName Flags: Code @@ -314,10 +309,10 @@ Alter Topic Type: Function api destructor, api destructors -Alter Topic Type: Operator +Alter Comment Type: Operator - Display Name from Locale: Topics.txt.Operator.DisplayName - Plural Display Name from Locale: Topics.txt.Operator.PluralDisplayName + Display Name from Locale: Comments.txt.Operator.DisplayName + Plural Display Name from Locale: Comments.txt.Operator.PluralDisplayName Index: with Function Flags: Code @@ -326,10 +321,10 @@ Alter Topic Type: Operator api operator, api operators -Alter Topic Type: Macro +Alter Comment Type: Macro - Display Name from Locale: Topics.txt.Macro.DisplayName - Plural Display Name from Locale: Topics.txt.Macro.PluralDisplayName + Display Name from Locale: Comments.txt.Macro.DisplayName + Plural Display Name from Locale: Comments.txt.Macro.PluralDisplayName Flags: Code @@ -339,10 +334,10 @@ Alter Topic Type: Macro api macro, api macros -Alter Topic Type: Property +Alter Comment Type: Property - Display Name from Locale: Topics.txt.Property.DisplayName - Plural Display Name from Locale: Topics.txt.Property.PluralDisplayName + Display Name from Locale: Comments.txt.Property.DisplayName + Plural Display Name from Locale: Comments.txt.Property.PluralDisplayName Index: with Function Flags: Code @@ -352,10 +347,10 @@ Alter Topic Type: Property api prop, api props -Alter Topic Type: Event +Alter Comment Type: Event - Display Name from Locale: Topics.txt.Event.DisplayName - Plural Display Name from Locale: Topics.txt.Event.PluralDisplayName + Display Name from Locale: Comments.txt.Event.DisplayName + Plural Display Name from Locale: Comments.txt.Event.PluralDisplayName Flags: Code @@ -363,10 +358,10 @@ Alter Topic Type: Event api event, api events -Alter Topic Type: Constant +Alter Comment Type: Constant - Display Name from Locale: Topics.txt.Constant.DisplayName - Plural Display Name from Locale: Topics.txt.Constant.PluralDisplayName + Display Name from Locale: Comments.txt.Constant.DisplayName + Plural Display Name from Locale: Comments.txt.Constant.PluralDisplayName Flags: Code @@ -375,10 +370,10 @@ Alter Topic Type: Constant api const, api consts -Alter Topic Type: Variable +Alter Comment Type: Variable - Display Name from Locale: Topics.txt.Variable.DisplayName - Plural Display Name from Locale: Topics.txt.Variable.PluralDisplayName + Display Name from Locale: Comments.txt.Variable.DisplayName + Plural Display Name from Locale: Comments.txt.Variable.PluralDisplayName Flags: Code @@ -427,10 +422,10 @@ Alter Topic Type: Variable api handle, api handles -Alter Topic Type: Database +Alter Comment Type: Database - Display Name from Locale: Topics.txt.Database.DisplayName - Plural Display Name from Locale: Topics.txt.Database.PluralDisplayName + Display Name from Locale: Comments.txt.Database.DisplayName + Plural Display Name from Locale: Comments.txt.Database.PluralDisplayName Scope: Start Flags: Code, Database Hierarchy @@ -440,10 +435,10 @@ Alter Topic Type: Database api db, api dbs -Alter Topic Type: Database Table +Alter Comment Type: Database Table - Display Name from Locale: Topics.txt.DatabaseTable.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseTable.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseTable.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseTable.PluralDisplayName Scope: Start Flags: Code, Database Hierarchy @@ -456,10 +451,10 @@ Alter Topic Type: Database Table api dbtable, api dbtables -Alter Topic Type: Database Field +Alter Comment Type: Database Field - Display Name from Locale: Topics.txt.DatabaseField.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseField.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseField.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseField.PluralDisplayName Flags: Code @@ -475,10 +470,10 @@ Alter Topic Type: Database Field api column, api columns -Alter Topic Type: Database View +Alter Comment Type: Database View - Display Name from Locale: Topics.txt.DatabaseView.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseView.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseView.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseView.PluralDisplayName Scope: Start Flags: Code, Database Hierarchy @@ -491,10 +486,10 @@ Alter Topic Type: Database View api dbview, api dbviews -Alter Topic Type: Database Index +Alter Comment Type: Database Index - Display Name from Locale: Topics.txt.DatabaseIndex.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseIndex.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseIndex.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseIndex.PluralDisplayName Flags: Code @@ -522,10 +517,10 @@ Alter Topic Type: Database Index api dbprimarykey, api dbprimarykeys -Alter Topic Type: Database Cursor +Alter Comment Type: Database Cursor - Display Name from Locale: Topics.txt.DatabaseCursor.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseCursor.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseCursor.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseCursor.PluralDisplayName Flags: Code @@ -537,10 +532,10 @@ Alter Topic Type: Database Cursor api dbcursor, api dbcursors -Alter Topic Type: Database Trigger +Alter Comment Type: Database Trigger - Display Name from Locale: Topics.txt.DatabaseTrigger.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseTrigger.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseTrigger.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseTrigger.PluralDisplayName Flags: Code @@ -552,42 +547,37 @@ Alter Topic Type: Database Trigger api dbtrigger, api dbtriggers -# Each Natural Docs topic has a corresponding type which determine things -# like how they are indexed. You can define your own here or override the -# settings of the existing ones. +# Each Natural Docs comment has a corresponding type which determine its +# behavior. You can define your own here or override the settings of the +# existing ones. # -# Topic Type: [name] -# Alter Topic Type: [name] -# Creates a new topic type or changes an existing one. +# Comment Type: [name] +# Alter Comment Type: [name] +# Creates a new comment type or changes an existing one. # # Display Name: [name] # Plural Display Name: [name] -# The singular and plural name of the topic type as it should appear in the -# output. +# The singular and plural name of the comment type as it should appear in +# the output. # # Simple Identifier: [name] -# The name of the topic type using only the letters A to Z. No spaces, -# numbers, symbols, or Unicode allowed. Defaults to the topic type name +# The name of the comment type using only the letters A to Z. No spaces, +# numbers, symbols, or Unicode allowed. Defaults to the comment type name # minus any unacceptable characters. This is used to generate things like # CSS class names. # -# Index: [yes|no|with [topic type]] -# Whether an index should be generated for the topic type. Defaults to -# yes. If "with [topic type]" is specified, the type is indexed but only -# as part of the other topic type's index. -# # Scope: [normal|start|end|always global] -# How the topic affects scope. Defaults to normal. -# normal - The topic stays within the current scope. -# start - The topic starts a new scope for all the topics beneath -# it, like class topics. -# end - The topic resets the scope back to global for all the -# topics beneath it, like section topics. -# always global - The topic is defined as a global symbol, but does not -# change the scope for any other topics. +# How the comment affects scope. Defaults to normal. +# normal - The comment stays within the current scope. +# start - The comment starts a new scope for all the comments +# beneath it, like class comments. +# end - The comment resets the scope back to global for all the +# comments beneath it, like section comments. +# always global - The comment is defined as a global symbol, but does not +# change the scope for any other comments. # # Flags: [flag], [flag], ... -# A combination of settings that apply to the topic type. +# A combination of settings that apply to the comment type. # Code, File, or Documentation # Whether it's used to describe a code element, a file, or is a # standalone documentation comment. Defaults to Code. @@ -604,8 +594,8 @@ Alter Topic Type: Database Trigger # [keyword] # [keyword], [plural keyword] # ... -# A list of the topic type's keywords. Each line after the heading is the -# keyword and optionally its plural form for list topics. You can reuse -# existing keywords to change their definition. When using -# "Alter Topic Type", these keywords are added to the existing ones rather -# than replacing them. +# A list of the comment type's keywords. Each line after the heading is +# the keyword and optionally its plural form for list comments. You can +# reuse existing keywords to change their definition. When using +# "Alter Comment Type", these keywords are added to the existing ones +# rather than replacing them. diff --git a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Languages.txt b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Languages.txt index 17b06699a..6b236442d 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Languages.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Languages.txt @@ -1,4 +1,4 @@ -Format: 2.0 (Development Release 05-04-2015) +Format: 2.0.2 # This is the Natural Docs languages file for this project. If you change # anything here, it will apply to THIS PROJECT ONLY. You can edit the version @@ -54,8 +54,8 @@ # # Aliases: [alias] [alias] ... # [Add/Replace] Aliases: [alias] [alias] ... -# Defines alternate names for the language that can be used in code block -# tags like (start c++ code). +# Defines alternate names for the language that can be used to start a code +# block. # # # Properties for Basic Language Support Only @@ -89,7 +89,7 @@ # Defines whether the language's identifiers are case sensitive. The # default is yes. # -# [Topic Type] Prototype Enders: [symbol] [symbol] ... +# [Comment Type] Prototype Enders: [symbol] [symbol] ... # When defined, Natural Docs will attempt to get a prototype from the code -# immediately following the topic type. It stops when it reaches one of +# immediately following the comment type. It stops when it reaches one of # these symbols. Use \n for line breaks. diff --git a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Project.txt b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Project.txt index 591a9880f..84fb1a820 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Project.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/Project.txt @@ -1,4 +1,4 @@ -Format: 2.0 (Development Release 08-22-2015) +Format: 2.0.2 # This is the file you use to provide information about your project. It can # also be used to specify input and output settings so you don't have to @@ -29,10 +29,12 @@ Timestamp: Updated mm/dd/yyyy # This is where you specify general information about your project. # # Style: [style] -# The style to apply to the generated output. +# The style to apply to the generated documentation. It can be the name of +# a CSS file in the project configuration folder or a subfolder that +# contains Style.txt. Do not include ".css" if using a CSS file. -# Input +# Source Code # ------------------------------------------------------------------------ Source Folder: ..\..\..\MSCL\source\mscl @@ -43,9 +45,10 @@ Source Folder: ..\..\..\MSCL\source\mscl # scanning. If you use any of these options on the command line, this entire # section is ignored except for names and numbers. # -# All paths are relative to the project folder, which lets this file remain -# portable across computers and not cause problems in version control systems. -# You can enter absolute paths and they will be converted automatically. +# All paths are relative to the project configuration folder, which lets this +# file remain portable across computers and not cause problems in version +# control systems. You can enter absolute paths and they will be converted +# automatically. # # Source Folder: [path] # Name: [name] @@ -53,15 +56,12 @@ Source Folder: ..\..\..\MSCL\source\mscl # Specifies a folder which will be searched for source files. If you have # more than one, add the Name property to set how it will show up in the # menu. -# -# Image Folder: [path] -# Specifies a folder which will be searched for image files. -# Filtering +# Source Filtering # ------------------------------------------------------------------------ -# If there are any subfolders of the input folders that you would like Natural +# If there are any subfolders in the source code that you would like Natural # Docs to ignore, they can be specified here. If you use any of these options # on the command line, this entire section is ignored. # @@ -69,13 +69,16 @@ Source Folder: ..\..\..\MSCL\source\mscl # Tells Natural Docs to skip this folder when scanning files. # # Ignore Source Folder Pattern: [pattern] -# Tells Natural Docs to skip all folders which match this pattern when +# Tells Natural Docs to skip all folder names which match this pattern when # scanning files. ? matches a single character, * matches zero or more # characters. It applies to the entire folder name, so "cli" will not # match "client", although "cli*" will. +# +# The data folders of common version control systems (.git, .svn, .cvs, .hg) +# are ignored automatically. You do not have to specify them here. -# Output +# Generated Documentation # ------------------------------------------------------------------------ HTML Output Folder: ..\..\..\Output\Documentation\MSCL_API_Docs @@ -85,9 +88,10 @@ HTML Output Folder: ..\..\..\Output\Documentation\MSCL_API_Docs # to build and where it should be put. If you use any of these options on the # command line, this entire section is ignored except for secondary settings. # -# All paths are relative to the project folder, which lets this file remain -# portable across computers and not cause problems in version control systems. -# You can enter absolute paths and they will be converted automatically. +# All paths are relative to the project configuration folder, which lets this +# file remain portable across computers and not cause problems in version +# control systems. You can enter absolute paths and they will be converted +# automatically. # # You can override any of the project information settings under each entry, # so if you have multiple output folders you can give them each different diff --git a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/msclDocsStyle/Style.txt b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/msclDocsStyle/Style.txt index 12f349260..37057c4c9 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/msclDocsStyle/Style.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_API_Docs_Project/msclDocsStyle/Style.txt @@ -1,4 +1,4 @@ -Format: 2.0 (Development Release 08-22-2015) +Format: 2.0.2 # This is a configuration file for a Natural Docs HTML output style. @@ -13,11 +13,10 @@ Inherit: Default # # Inherit: [style] # -# All of its settings will be applied before yours. You can inherit more than -# one style. +# All of its settings will be applied before yours. You can add this line +# multiple times to inherit more than one style. # -# If you're building your own style from scratch, do not inherit anything. If -# you just want to make some changes to the default style, inherit Default. +# If you just want to make some changes to the default style, inherit Default. # If you're building your own page design from scratch but want to keep the # default JavaScript functions, inherit DefaultJS. This will include the code # but not the CSS or images. @@ -35,13 +34,15 @@ Link: msclDocsStyle.css # Frame Link: [file] # Content Link: [file] # -# These files will be included the generated output via link or script tags. -# If you do not specify a page type, it will be included in every page. +# These files will be added to the generated output via link or script tags. # -# While all files will be copied to the output folder automatically, they are -# not linked automatically. Since JavaScript files can be loaded dynamically -# and CSS files can be imported from other ones, you must explicitly link the -# ones you want here. +# You can limit them to just to the frame page, which handles the header, +# footer, menu, and summary, or to content pages, which is the documentation +# in the rightmost panel. If you do not specify a page type, they will be +# linked to every page. +# +# All files will be copied to the output folder even if you don't link them, +# but they will not be added to the pages automatically. # OnLoad @@ -53,9 +54,12 @@ Link: msclDocsStyle.css # Frame OnLoad: [statement] # Content OnLoad: [statement] # -# If you do not specify a page type, it will be called for every page. +# You can limit it to just to the frame page, which handles the header, +# footer, menu, and summary, or to content pages, which is the documentation +# in the rightmost panel. If you do not specify a page type, it will be added +# to every page. # -# The OnLoad statement is confined to a single line. It's recommended that -# you make your OnLoad code a function in a separate .js file, link that file -# from here, and then call it from this statement rather than trying to cram -# it on this line. +# The OnLoad statement is limited to a single line. If you have a lot of code +# it's recommended that you make it a function in a separate .js file, link +# that file, and then call the function from this statement rather than trying +# to cram it all on this line. diff --git a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Topics.txt b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Comments.txt similarity index 52% rename from BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Topics.txt rename to BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Comments.txt index 56b06c13b..aadb55cee 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Topics.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Comments.txt @@ -1,9 +1,9 @@ -Format: 2.0 (Development Release 08-22-2015) +Format: 2.0.2 -# This is the Natural Docs topics file for this project. If you change anything -# here, it will apply to THIS PROJECT ONLY. You can edit the version in -# Natural Docs' Config folder to make the changes apply to all projects, but -# it's recommended that you edit this version instead. +# This is the Natural Docs comments file for this project. If you change +# anything here, it will apply to THIS PROJECT ONLY. You can edit the version +# in Natural Docs' Config folder to make the changes apply to all projects, +# but it's recommended that you edit this version instead. # Ignored Keywords @@ -18,21 +18,16 @@ # ... -# Tags -# ------------------------------------------------------------------------ - Tags: API - - -# Topic Types +# Comment Types # ------------------------------------------------------------------------ # The syntax reference is after the definitions. -Alter Topic Type: Class +Alter Comment Type: Class - Display Name from Locale: Topics.txt.Class.DisplayName - Plural Display Name from Locale: Topics.txt.Class.PluralDisplayName + Display Name from Locale: Comments.txt.Class.DisplayName + Plural Display Name from Locale: Comments.txt.Class.PluralDisplayName Scope: Start Flags: Code, Variable Type, Class Hierarchy @@ -43,10 +38,10 @@ Alter Topic Type: Class api namespace, api namespaces -Alter Topic Type: Interface +Alter Comment Type: Interface - Display Name from Locale: Topics.txt.Interface.DisplayName - Plural Display Name from Locale: Topics.txt.Interface.PluralDisplayName + Display Name from Locale: Comments.txt.Interface.DisplayName + Plural Display Name from Locale: Comments.txt.Interface.PluralDisplayName Index: with Class Scope: Start @@ -56,10 +51,10 @@ Alter Topic Type: Interface api interface, api interfaces -Alter Topic Type: Struct +Alter Comment Type: Struct - Display Name from Locale: Topics.txt.Struct.DisplayName - Plural Display Name from Locale: Topics.txt.Struct.PluralDisplayName + Display Name from Locale: Comments.txt.Struct.DisplayName + Plural Display Name from Locale: Comments.txt.Struct.PluralDisplayName Index: with Class Scope: Start @@ -70,10 +65,10 @@ Alter Topic Type: Struct api structure, api structures -Alter Topic Type: Section +Alter Comment Type: Section - Display Name from Locale: Topics.txt.Section.DisplayName - Plural Display Name from Locale: Topics.txt.Section.PluralDisplayName + Display Name from Locale: Comments.txt.Section.DisplayName + Plural Display Name from Locale: Comments.txt.Section.PluralDisplayName Index: No Scope: End @@ -84,10 +79,10 @@ Alter Topic Type: Section api title -Alter Topic Type: Group +Alter Comment Type: Group - Display Name from Locale: Topics.txt.Group.DisplayName - Plural Display Name from Locale: Topics.txt.Group.PluralDisplayName + Display Name from Locale: Comments.txt.Group.DisplayName + Plural Display Name from Locale: Comments.txt.Group.PluralDisplayName Index: No Flags: Documentation @@ -96,10 +91,10 @@ Alter Topic Type: Group api group -Alter Topic Type: Information +Alter Comment Type: Information - Display Name from Locale: Topics.txt.Information.DisplayName - Plural Display Name from Locale: Topics.txt.Information.PluralDisplayName + Display Name from Locale: Comments.txt.Information.DisplayName + Plural Display Name from Locale: Comments.txt.Information.PluralDisplayName Index: No Flags: Documentation @@ -109,10 +104,10 @@ Alter Topic Type: Information api about, api list -Alter Topic Type: File +Alter Comment Type: File - Display Name from Locale: Topics.txt.File.DisplayName - Plural Display Name from Locale: Topics.txt.File.PluralDisplayName + Display Name from Locale: Comments.txt.File.DisplayName + Plural Display Name from Locale: Comments.txt.File.PluralDisplayName Scope: Always Global Flags: File @@ -126,10 +121,10 @@ Alter Topic Type: File api header, api headers -Alter Topic Type: Type +Alter Comment Type: Type - Display Name from Locale: Topics.txt.Type.DisplayName - Plural Display Name from Locale: Topics.txt.Type.PluralDisplayName + Display Name from Locale: Comments.txt.Type.DisplayName + Plural Display Name from Locale: Comments.txt.Type.PluralDisplayName Flags: Code, Variable Type @@ -138,10 +133,10 @@ Alter Topic Type: Type api typedef, api typedefs -Alter Topic Type: Enumeration +Alter Comment Type: Enumeration - Display Name from Locale: Topics.txt.Enumeration.DisplayName - Plural Display Name from Locale: Topics.txt.Enumeration.PluralDisplayName + Display Name from Locale: Comments.txt.Enumeration.DisplayName + Plural Display Name from Locale: Comments.txt.Enumeration.PluralDisplayName Index: with Type Flags: Code, Variable Type, Enum @@ -151,10 +146,10 @@ Alter Topic Type: Enumeration api enumeration, api enumerations -Alter Topic Type: Delegate +Alter Comment Type: Delegate - Display Name from Locale: Topics.txt.Delegate.DisplayName - Plural Display Name from Locale: Topics.txt.Delegate.PluralDisplayName + Display Name from Locale: Comments.txt.Delegate.DisplayName + Plural Display Name from Locale: Comments.txt.Delegate.PluralDisplayName Index: with Type Flags: Code, Variable Type @@ -163,10 +158,10 @@ Alter Topic Type: Delegate api delegate, api delegates -Alter Topic Type: Function +Alter Comment Type: Function - Display Name from Locale: Topics.txt.Function.DisplayName - Plural Display Name from Locale: Topics.txt.Function.PluralDisplayName + Display Name from Locale: Comments.txt.Function.DisplayName + Plural Display Name from Locale: Comments.txt.Function.PluralDisplayName Flags: Code @@ -184,10 +179,10 @@ Alter Topic Type: Function api destructor, api destructors -Alter Topic Type: Operator +Alter Comment Type: Operator - Display Name from Locale: Topics.txt.Operator.DisplayName - Plural Display Name from Locale: Topics.txt.Operator.PluralDisplayName + Display Name from Locale: Comments.txt.Operator.DisplayName + Plural Display Name from Locale: Comments.txt.Operator.PluralDisplayName Index: with Function Flags: Code @@ -196,10 +191,10 @@ Alter Topic Type: Operator api operator, api operators -Alter Topic Type: Macro +Alter Comment Type: Macro - Display Name from Locale: Topics.txt.Macro.DisplayName - Plural Display Name from Locale: Topics.txt.Macro.PluralDisplayName + Display Name from Locale: Comments.txt.Macro.DisplayName + Plural Display Name from Locale: Comments.txt.Macro.PluralDisplayName Flags: Code @@ -209,10 +204,10 @@ Alter Topic Type: Macro api macro, api macros -Alter Topic Type: Property +Alter Comment Type: Property - Display Name from Locale: Topics.txt.Property.DisplayName - Plural Display Name from Locale: Topics.txt.Property.PluralDisplayName + Display Name from Locale: Comments.txt.Property.DisplayName + Plural Display Name from Locale: Comments.txt.Property.PluralDisplayName Index: with Function Flags: Code @@ -222,10 +217,10 @@ Alter Topic Type: Property api prop, api props -Alter Topic Type: Event +Alter Comment Type: Event - Display Name from Locale: Topics.txt.Event.DisplayName - Plural Display Name from Locale: Topics.txt.Event.PluralDisplayName + Display Name from Locale: Comments.txt.Event.DisplayName + Plural Display Name from Locale: Comments.txt.Event.PluralDisplayName Flags: Code @@ -233,10 +228,10 @@ Alter Topic Type: Event api event, api events -Alter Topic Type: Constant +Alter Comment Type: Constant - Display Name from Locale: Topics.txt.Constant.DisplayName - Plural Display Name from Locale: Topics.txt.Constant.PluralDisplayName + Display Name from Locale: Comments.txt.Constant.DisplayName + Plural Display Name from Locale: Comments.txt.Constant.PluralDisplayName Flags: Code @@ -245,10 +240,10 @@ Alter Topic Type: Constant api const, api consts -Alter Topic Type: Variable +Alter Comment Type: Variable - Display Name from Locale: Topics.txt.Variable.DisplayName - Plural Display Name from Locale: Topics.txt.Variable.PluralDisplayName + Display Name from Locale: Comments.txt.Variable.DisplayName + Plural Display Name from Locale: Comments.txt.Variable.PluralDisplayName Flags: Code @@ -297,10 +292,10 @@ Alter Topic Type: Variable api handle, api handles -Alter Topic Type: Database +Alter Comment Type: Database - Display Name from Locale: Topics.txt.Database.DisplayName - Plural Display Name from Locale: Topics.txt.Database.PluralDisplayName + Display Name from Locale: Comments.txt.Database.DisplayName + Plural Display Name from Locale: Comments.txt.Database.PluralDisplayName Scope: Start Flags: Code, Database Hierarchy @@ -310,10 +305,10 @@ Alter Topic Type: Database api db, api dbs -Alter Topic Type: Database Table +Alter Comment Type: Database Table - Display Name from Locale: Topics.txt.DatabaseTable.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseTable.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseTable.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseTable.PluralDisplayName Scope: Start Flags: Code, Database Hierarchy @@ -326,10 +321,10 @@ Alter Topic Type: Database Table api dbtable, api dbtables -Alter Topic Type: Database Field +Alter Comment Type: Database Field - Display Name from Locale: Topics.txt.DatabaseField.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseField.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseField.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseField.PluralDisplayName Flags: Code @@ -345,10 +340,10 @@ Alter Topic Type: Database Field api column, api columns -Alter Topic Type: Database View +Alter Comment Type: Database View - Display Name from Locale: Topics.txt.DatabaseView.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseView.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseView.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseView.PluralDisplayName Scope: Start Flags: Code, Database Hierarchy @@ -361,10 +356,10 @@ Alter Topic Type: Database View api dbview, api dbviews -Alter Topic Type: Database Index +Alter Comment Type: Database Index - Display Name from Locale: Topics.txt.DatabaseIndex.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseIndex.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseIndex.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseIndex.PluralDisplayName Flags: Code @@ -392,10 +387,10 @@ Alter Topic Type: Database Index api dbprimarykey, api dbprimarykeys -Alter Topic Type: Database Cursor +Alter Comment Type: Database Cursor - Display Name from Locale: Topics.txt.DatabaseCursor.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseCursor.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseCursor.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseCursor.PluralDisplayName Flags: Code @@ -407,10 +402,10 @@ Alter Topic Type: Database Cursor api dbcursor, api dbcursors -Alter Topic Type: Database Trigger +Alter Comment Type: Database Trigger - Display Name from Locale: Topics.txt.DatabaseTrigger.DisplayName - Plural Display Name from Locale: Topics.txt.DatabaseTrigger.PluralDisplayName + Display Name from Locale: Comments.txt.DatabaseTrigger.DisplayName + Plural Display Name from Locale: Comments.txt.DatabaseTrigger.PluralDisplayName Flags: Code @@ -422,42 +417,37 @@ Alter Topic Type: Database Trigger api dbtrigger, api dbtriggers -# Each Natural Docs topic has a corresponding type which determine things -# like how they are indexed. You can define your own here or override the -# settings of the existing ones. +# Each Natural Docs comment has a corresponding type which determine its +# behavior. You can define your own here or override the settings of the +# existing ones. # -# Topic Type: [name] -# Alter Topic Type: [name] -# Creates a new topic type or changes an existing one. +# Comment Type: [name] +# Alter Comment Type: [name] +# Creates a new comment type or changes an existing one. # # Display Name: [name] # Plural Display Name: [name] -# The singular and plural name of the topic type as it should appear in the -# output. +# The singular and plural name of the comment type as it should appear in +# the output. # # Simple Identifier: [name] -# The name of the topic type using only the letters A to Z. No spaces, -# numbers, symbols, or Unicode allowed. Defaults to the topic type name +# The name of the comment type using only the letters A to Z. No spaces, +# numbers, symbols, or Unicode allowed. Defaults to the comment type name # minus any unacceptable characters. This is used to generate things like # CSS class names. # -# Index: [yes|no|with [topic type]] -# Whether an index should be generated for the topic type. Defaults to -# yes. If "with [topic type]" is specified, the type is indexed but only -# as part of the other topic type's index. -# # Scope: [normal|start|end|always global] -# How the topic affects scope. Defaults to normal. -# normal - The topic stays within the current scope. -# start - The topic starts a new scope for all the topics beneath -# it, like class topics. -# end - The topic resets the scope back to global for all the -# topics beneath it, like section topics. -# always global - The topic is defined as a global symbol, but does not -# change the scope for any other topics. +# How the comment affects scope. Defaults to normal. +# normal - The comment stays within the current scope. +# start - The comment starts a new scope for all the comments +# beneath it, like class comments. +# end - The comment resets the scope back to global for all the +# comments beneath it, like section comments. +# always global - The comment is defined as a global symbol, but does not +# change the scope for any other comments. # # Flags: [flag], [flag], ... -# A combination of settings that apply to the topic type. +# A combination of settings that apply to the comment type. # Code, File, or Documentation # Whether it's used to describe a code element, a file, or is a # standalone documentation comment. Defaults to Code. @@ -474,8 +464,8 @@ Alter Topic Type: Database Trigger # [keyword] # [keyword], [plural keyword] # ... -# A list of the topic type's keywords. Each line after the heading is the -# keyword and optionally its plural form for list topics. You can reuse -# existing keywords to change their definition. When using -# "Alter Topic Type", these keywords are added to the existing ones rather -# than replacing them. +# A list of the comment type's keywords. Each line after the heading is +# the keyword and optionally its plural form for list comments. You can +# reuse existing keywords to change their definition. When using +# "Alter Comment Type", these keywords are added to the existing ones +# rather than replacing them. diff --git a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Languages.txt b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Languages.txt index 17b06699a..6b236442d 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Languages.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Languages.txt @@ -1,4 +1,4 @@ -Format: 2.0 (Development Release 05-04-2015) +Format: 2.0.2 # This is the Natural Docs languages file for this project. If you change # anything here, it will apply to THIS PROJECT ONLY. You can edit the version @@ -54,8 +54,8 @@ # # Aliases: [alias] [alias] ... # [Add/Replace] Aliases: [alias] [alias] ... -# Defines alternate names for the language that can be used in code block -# tags like (start c++ code). +# Defines alternate names for the language that can be used to start a code +# block. # # # Properties for Basic Language Support Only @@ -89,7 +89,7 @@ # Defines whether the language's identifiers are case sensitive. The # default is yes. # -# [Topic Type] Prototype Enders: [symbol] [symbol] ... +# [Comment Type] Prototype Enders: [symbol] [symbol] ... # When defined, Natural Docs will attempt to get a prototype from the code -# immediately following the topic type. It stops when it reaches one of +# immediately following the comment type. It stops when it reaches one of # these symbols. Use \n for line breaks. diff --git a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Project.txt b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Project.txt index 19602065b..e7ae9eef1 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Project.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/Project.txt @@ -1,4 +1,4 @@ -Format: 2.0 (Development Release 08-22-2015) +Format: 2.0.2 # This is the file you use to provide information about your project. It can # also be used to specify input and output settings so you don't have to @@ -29,10 +29,12 @@ Timestamp: Updated mm/dd/yyyy # This is where you specify general information about your project. # # Style: [style] -# The style to apply to the generated output. +# The style to apply to the generated documentation. It can be the name of +# a CSS file in the project configuration folder or a subfolder that +# contains Style.txt. Do not include ".css" if using a CSS file. -# Input +# Source Code # ------------------------------------------------------------------------ Source Folder: ..\..\..\MSCL\source\mscl @@ -43,9 +45,10 @@ Source Folder: ..\..\..\MSCL\source\mscl # scanning. If you use any of these options on the command line, this entire # section is ignored except for names and numbers. # -# All paths are relative to the project folder, which lets this file remain -# portable across computers and not cause problems in version control systems. -# You can enter absolute paths and they will be converted automatically. +# All paths are relative to the project configuration folder, which lets this +# file remain portable across computers and not cause problems in version +# control systems. You can enter absolute paths and they will be converted +# automatically. # # Source Folder: [path] # Name: [name] @@ -53,15 +56,12 @@ Source Folder: ..\..\..\MSCL\source\mscl # Specifies a folder which will be searched for source files. If you have # more than one, add the Name property to set how it will show up in the # menu. -# -# Image Folder: [path] -# Specifies a folder which will be searched for image files. -# Filtering +# Source Filtering # ------------------------------------------------------------------------ -# If there are any subfolders of the input folders that you would like Natural +# If there are any subfolders in the source code that you would like Natural # Docs to ignore, they can be specified here. If you use any of these options # on the command line, this entire section is ignored. # @@ -69,13 +69,16 @@ Source Folder: ..\..\..\MSCL\source\mscl # Tells Natural Docs to skip this folder when scanning files. # # Ignore Source Folder Pattern: [pattern] -# Tells Natural Docs to skip all folders which match this pattern when +# Tells Natural Docs to skip all folder names which match this pattern when # scanning files. ? matches a single character, * matches zero or more # characters. It applies to the entire folder name, so "cli" will not # match "client", although "cli*" will. +# +# The data folders of common version control systems (.git, .svn, .cvs, .hg) +# are ignored automatically. You do not have to specify them here. -# Output +# Generated Documentation # ------------------------------------------------------------------------ HTML Output Folder: ..\..\..\Output\Documentation\MSCL_Docs @@ -85,9 +88,10 @@ HTML Output Folder: ..\..\..\Output\Documentation\MSCL_Docs # to build and where it should be put. If you use any of these options on the # command line, this entire section is ignored except for secondary settings. # -# All paths are relative to the project folder, which lets this file remain -# portable across computers and not cause problems in version control systems. -# You can enter absolute paths and they will be converted automatically. +# All paths are relative to the project configuration folder, which lets this +# file remain portable across computers and not cause problems in version +# control systems. You can enter absolute paths and they will be converted +# automatically. # # You can override any of the project information settings under each entry, # so if you have multiple output folders you can give them each different diff --git a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/msclDocsStyle/Style.txt b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/msclDocsStyle/Style.txt index 12f349260..37057c4c9 100644 --- a/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/msclDocsStyle/Style.txt +++ b/BuildScripts/NaturalDocsProjects/MSCL_Docs_Project/msclDocsStyle/Style.txt @@ -1,4 +1,4 @@ -Format: 2.0 (Development Release 08-22-2015) +Format: 2.0.2 # This is a configuration file for a Natural Docs HTML output style. @@ -13,11 +13,10 @@ Inherit: Default # # Inherit: [style] # -# All of its settings will be applied before yours. You can inherit more than -# one style. +# All of its settings will be applied before yours. You can add this line +# multiple times to inherit more than one style. # -# If you're building your own style from scratch, do not inherit anything. If -# you just want to make some changes to the default style, inherit Default. +# If you just want to make some changes to the default style, inherit Default. # If you're building your own page design from scratch but want to keep the # default JavaScript functions, inherit DefaultJS. This will include the code # but not the CSS or images. @@ -35,13 +34,15 @@ Link: msclDocsStyle.css # Frame Link: [file] # Content Link: [file] # -# These files will be included the generated output via link or script tags. -# If you do not specify a page type, it will be included in every page. +# These files will be added to the generated output via link or script tags. # -# While all files will be copied to the output folder automatically, they are -# not linked automatically. Since JavaScript files can be loaded dynamically -# and CSS files can be imported from other ones, you must explicitly link the -# ones you want here. +# You can limit them to just to the frame page, which handles the header, +# footer, menu, and summary, or to content pages, which is the documentation +# in the rightmost panel. If you do not specify a page type, they will be +# linked to every page. +# +# All files will be copied to the output folder even if you don't link them, +# but they will not be added to the pages automatically. # OnLoad @@ -53,9 +54,12 @@ Link: msclDocsStyle.css # Frame OnLoad: [statement] # Content OnLoad: [statement] # -# If you do not specify a page type, it will be called for every page. +# You can limit it to just to the frame page, which handles the header, +# footer, menu, and summary, or to content pages, which is the documentation +# in the rightmost panel. If you do not specify a page type, it will be added +# to every page. # -# The OnLoad statement is confined to a single line. It's recommended that -# you make your OnLoad code a function in a separate .js file, link that file -# from here, and then call it from this statement rather than trying to cram -# it on this line. +# The OnLoad statement is limited to a single line. If you have a lot of code +# it's recommended that you make it a function in a separate .js file, link +# that file, and then call the function from this statement rather than trying +# to cram it all on this line. diff --git a/BuildScripts/buildDocs.cmd b/BuildScripts/buildDocs.cmd index 7ac12f047..523c93854 100644 --- a/BuildScripts/buildDocs.cmd +++ b/BuildScripts/buildDocs.cmd @@ -1,42 +1,42 @@ -@echo off - -REM NaturalDocs must be set to an Environment Variable - -REM Set Build Variables -SET OUTPUT_DIR=..\Output\Documentation\MSCL_Docs -SET OUTPUT_ZIP=..\Output\Documentation\MSCL_Docs.zip -SET DOCS_PROJECT_DIR=NaturalDocsProjects\MSCL_Docs_Project -SET API_OUTPUT_DIR=..\Output\Documentation\MSCL_API_Docs -SET API_DOCS_PROJECT_DIR=NaturalDocsProjects\MSCL_API_Docs_Project - -:CREATEDOCS -echo. -echo ================================================================== -echo (buildDocs.cmd) START BUILDING NATURALDOCS DOCUMENTATION -echo. - -REM set the current directory to this file's directory -cd /d %~dp0 - -echo (buildDocs.cmd) Creating NaturalDocs Output Directories - -mkdir ..\Output\Documentation -mkdir %OUTPUT_DIR% -mkdir %DOCS_PROJECT_DIR% -mkdir %API_OUTPUT_DIR% -mkdir %API_DOCS_PROJECT_DIR% - -echo (buildDocs.cmd) Creating MSCL Full (Internal) Documentation - -REM create the documentation using NaturalDocs -call NaturalDocs -i "..\MSCL\source\mscl" -o FramedHTML %OUTPUT_DIR% -p %DOCS_PROJECT_DIR% -s msclDocsStyle - -echo (buildDocs.cmd) Creating MSCL API Documentation - -call NaturalDocs -i "..\MSCL\source\mscl" -o FramedHTML %API_OUTPUT_DIR% -p %API_DOCS_PROJECT_DIR% -s msclDocsStyle - -echo. -echo (buildDocs.cmd) DONE -echo ================================================================== - +@echo off + +REM NaturalDocs must be set to an Environment Variable + +REM Set Build Variables +SET OUTPUT_DIR=..\Output\Documentation\MSCL_Docs +SET OUTPUT_ZIP=..\Output\Documentation\MSCL_Docs.zip +SET DOCS_PROJECT_DIR=NaturalDocsProjects\MSCL_Docs_Project +SET API_OUTPUT_DIR=..\Output\Documentation\MSCL_API_Docs +SET API_DOCS_PROJECT_DIR=NaturalDocsProjects\MSCL_API_Docs_Project + +:CREATEDOCS +echo. +echo ================================================================== +echo (buildDocs.cmd) START BUILDING NATURALDOCS DOCUMENTATION +echo. + +REM set the current directory to this file's directory +cd /d %~dp0 + +echo (buildDocs.cmd) Creating NaturalDocs Output Directories + +mkdir ..\Output\Documentation +mkdir %OUTPUT_DIR% +mkdir %DOCS_PROJECT_DIR% +mkdir %API_OUTPUT_DIR% +mkdir %API_DOCS_PROJECT_DIR% + +echo (buildDocs.cmd) Creating MSCL Full (Internal) Documentation + +REM create the documentation using NaturalDocs +call %LIB_PATH%\NaturalDocs\NaturalDocs -i "..\MSCL\source\mscl" -o FramedHTML %OUTPUT_DIR% -p %DOCS_PROJECT_DIR% -s msclDocsStyle + +echo (buildDocs.cmd) Creating MSCL API Documentation + +call %LIB_PATH%\NaturalDocs\NaturalDocs -i "..\MSCL\source\mscl" -o FramedHTML %API_OUTPUT_DIR% -p %API_DOCS_PROJECT_DIR% -s msclDocsStyle + +echo. +echo (buildDocs.cmd) DONE +echo ================================================================== + :end \ No newline at end of file diff --git a/BuildScripts/buildReadme_Linux.md b/BuildScripts/buildReadme_Linux.md index 420e6b399..3c3d93cc6 100644 --- a/BuildScripts/buildReadme_Linux.md +++ b/BuildScripts/buildReadme_Linux.md @@ -1,42 +1,42 @@ -# **Building MSCL for Linux** - -## Hold up! -Most users will not need to build MSCL themselves! - -Pre-built versions are available for download. To get it, head over to the [MSCL Releases Page](https://github.com/LORD-MicroStrain/MSCL/releases), for the latest release. Under the `Downloads` section of that release, you will find the C++, Python, and .NET versions of MSCL, as well as Example Code and Documentation. - -#### Dependencies - -- \>= gcc 4.9.1-5 -- \>= [Boost 1.68](http://www.boost.org/) -- \>= libssl1.0.0 (OpenSSL is optional, see below) -- \>= libssl-dev (OpenSSL is optional, see below) -- \>= libcrypto (OpenSSL is optional, see below) -- = [SWIG 4.0.0](http://swig.org/download.html) (for Python build) -- \>= python2.7 (for Python build) -- \>= python2.7-dev (for Python build) - -#### Note -On some systems, you may get a virtual memory error when compiling MSCL (ex. `Virtual memory exhausted: Cannot allocate memory`). It may be necessary to temporarily increase your Swapfile size. For an example, see [this post](https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/) explaining this for the Raspberry Pi. Keep in mind that you may want to change back to the original swapfile size when you are done compiling MSCL (especially if using an SD card), as it can cause a lot of unnecessary writes to your disk. - -## Building MSCL for C++ - -1. Download the Debian or RedHat based MSCL [manual build scripts](https://github.com/LORD-MicroStrain/MSCL/tree/master/BuildScripts/linuxManualBuild). -2. Inside the folder, open the `config.cfg` file. -3. Under the "PACKAGE_INFO" section, there is a `package_name` variable. This can be changed to whatever you would like. -4. In the same section, there is a `python_version` variable. Change this to `None` to build for C++. -5. Open a terminal to the location of the `config.cfg` file and run the following command: `python MSCL_Install.py` (see note below for optional parameters). -6. The latest MSCL will automatically be downloaded, as well as it's dependencies. The build process will take a while, but once it is complete, the package will be installed in `/usr/share/`. - -Note: OpenSSL and Beast are optional and are used for creating secure WebSocket connections to an ethernet connected WSDA from anywhere in the world. If this is a feature you do not want, you can avoid adding these extra dependencies by adding `--without-ssl` (for OpenSSL) and `--without-websockets` (for Beast) as parameters to the MSCL_Install.py command run above. - -## Building MSCL for Python - -1. Download the Debian or RedHat based MSCL [manual build scripts](https://github.com/LORD-MicroStrain/MSCL/tree/master/BuildScripts/linuxManualBuild). -2. Inside the folder, open the `config.cfg` file. -3. Under the "PACKAGE_INFO" section, there is a `package_name` variable. This can be changed to whatever you would like. -4. In the same section, there is a `python_version` variable. Change this to whichever version of Python you wish to build MSCL for. -5. Open a terminal to the location of the `config.cfg` file and run the following command: `python MSCL_Install.py` (see note below for optional parameters). -6. The latest MSCL will automatically be downloaded, as well as it's dependencies. The build process will take a while, but once it is complete, the package will be installed in `/usr/share/`. - -Note: OpenSSL and Beast are optional and are used for creating secure WebSocket connections to an ethernet connected WSDA from anywhere in the world. If this is a feature you do not want, you can avoid adding these extra dependencies by adding `--without-ssl` (for OpenSSL) and `--without-websockets` (for Beast) as parameters to the MSCL_Install.py command run above. +# **Building MSCL for Linux** + +## Hold up! +Most users will not need to build MSCL themselves! + +Pre-built versions are available for download. To get it, head over to the [MSCL Releases Page](https://github.com/LORD-MicroStrain/MSCL/releases), for the latest release. Under the `Downloads` section of that release, you will find the C++, Python, and .NET versions of MSCL, as well as Example Code and Documentation. + +#### Dependencies + +- \>= gcc 4.9.1-5 +- \>= [Boost 1.68](http://www.boost.org/) +- \>= libssl1.0.0 (OpenSSL is optional, see below) +- \>= libssl-dev (OpenSSL is optional, see below) +- \>= libcrypto (OpenSSL is optional, see below) +- = [SWIG 4.0.0](http://swig.org/download.html) (for Python build) +- \>= python2.7 (for Python build) +- \>= python2.7-dev (for Python build) + +#### Note +On some systems, you may get a virtual memory error when compiling MSCL (ex. `Virtual memory exhausted: Cannot allocate memory`). It may be necessary to temporarily increase your Swapfile size. For an example, see [this post](https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/) explaining this for the Raspberry Pi. Keep in mind that you may want to change back to the original swapfile size when you are done compiling MSCL (especially if using an SD card), as it can cause a lot of unnecessary writes to your disk. + +## Building MSCL for C++ + +1. Download the Debian or RedHat based MSCL [manual build scripts](https://github.com/LORD-MicroStrain/MSCL/tree/master/BuildScripts/linuxManualBuild). +2. Inside the folder, open the `config.cfg` file. +3. Under the "PACKAGE_INFO" section, there is a `package_name` variable. This can be changed to whatever you would like. +4. In the same section, there is a `python_version` variable. Change this to `None` to build for C++. +5. Open a terminal to the location of the `config.cfg` file and run the following command: `python MSCL_Install.py` (see note below for optional parameters). +6. The latest MSCL will automatically be downloaded, as well as it's dependencies. The build process will take a while, but once it is complete, the package will be installed in `/usr/share/`. + +Note: OpenSSL and Beast are optional and are used for creating secure WebSocket connections to an ethernet connected WSDA from anywhere in the world. If this is a feature you do not want, you can avoid adding these extra dependencies by adding `--without-ssl` (for OpenSSL) and `--without-websockets` (for Beast) as parameters to the MSCL_Install.py command run above. + +## Building MSCL for Python + +1. Download the Debian or RedHat based MSCL [manual build scripts](https://github.com/LORD-MicroStrain/MSCL/tree/master/BuildScripts/linuxManualBuild). +2. Inside the folder, open the `config.cfg` file. +3. Under the "PACKAGE_INFO" section, there is a `package_name` variable. This can be changed to whatever you would like. +4. In the same section, there is a `python_version` variable. Change this to whichever version of Python you wish to build MSCL for. +5. Open a terminal to the location of the `config.cfg` file and run the following command: `python MSCL_Install.py` (see note below for optional parameters). +6. The latest MSCL will automatically be downloaded, as well as it's dependencies. The build process will take a while, but once it is complete, the package will be installed in `/usr/share/`. + +Note: OpenSSL and Beast are optional and are used for creating secure WebSocket connections to an ethernet connected WSDA from anywhere in the world. If this is a feature you do not want, you can avoid adding these extra dependencies by adding `--without-ssl` (for OpenSSL) and `--without-websockets` (for Beast) as parameters to the MSCL_Install.py command run above. diff --git a/BuildScripts/buildReadme_Windows.md b/BuildScripts/buildReadme_Windows.md index fd9ecf4f6..96dfa9be9 100644 --- a/BuildScripts/buildReadme_Windows.md +++ b/BuildScripts/buildReadme_Windows.md @@ -137,16 +137,22 @@ using msvc ; ``` -Edit the include (/I) and library (/LIBPATH) paths in the following command, and then run from the top level MSCL source directory. +Run the following command from the top level MSCL source directory. For 32-bit Python: ``` -"BuildScripts\build_Python_x86.cmd" "/bigobj /I"E:/Python27/include" /I"E:/Lib/boost/boost_1_68_0" /I"E:/Lib/openssl/include"" "/LIBPATH:"E:/Python27/libs" /LIBPATH:"E:/Lib/boost/boost_1_68_0/lib32-msvc-14.0" /LIBPATH:"E:/Lib/openssl/lib" libboost_system-vc140-mt-s-x32-1_68.lib libsslMT.lib libcryptoMT.lib crypt32.lib ws2_32.lib gdi32.lib advapi32.lib user32.lib" +"BuildScripts\build_Python_x86.cmd" "E:\Python27" + +REM To add custom compile and link flags +"BuildScripts\build_Python_x86.cmd" "E:\Python27" "/I:C:\dir" "/LIBPATH:C:\dir" ``` For 64-bit Python: ``` -"BuildScripts\build_Python_x64.cmd" "/bigobj /I"E:/Python27_64/include" /I"E:/Lib/boost/boost_1_68_0" /I"E:/Lib/openssl/include64"" "/LIBPATH:"E:/Python27_64/libs" /LIBPATH:"E:/Lib/boost/boost_1_68_0/lib64-msvc-14.0" /LIBPATH:"E:/Lib/openssl/lib64" libboost_system-vc140-mt-s-x64-1_68.lib libsslMT.lib libcryptoMT.lib crypt32.lib ws2_32.lib gdi32.lib advapi32.lib user32.lib" +"BuildScripts\build_Python_x64.cmd" "E:\Python27" + +REM To add custom compile and link flags +"BuildScripts\build_Python_x64.cmd" "E:\Python27_64" "/I:C:\dir" "/LIBPATH:C:\dir" ``` Output: diff --git a/BuildScripts/build_Python_x64.cmd b/BuildScripts/build_Python_x64.cmd index 7dbe7020a..0c0f9b419 100644 --- a/BuildScripts/build_Python_x64.cmd +++ b/BuildScripts/build_Python_x64.cmd @@ -21,14 +21,21 @@ echo Building MSCL for Python x64... (bjam) echo ******************************** echo. -SET msclCxxFlags="/bigobj /I""C:/Python27_64/include"" /I"C:/Dev/Lib/boost/boost_1_68_0" /I"C:/Dev/Lib/openssl/include64"" -IF NOT [%1]==[] SET msclCxxFlags=%1 -IF [%1]==["none"] SET msclCxxFlags=" " +SET pythonDir=C:/Python27 +IF NOT [%1]==[] SET pythonDir=%1 +IF [%1]==["none"] SET pythonDir=" " +SET pythonDir=%pythonDir:"=% -SET msclLinkFlags="/LIBPATH:""C:/Python27_64/libs"" /LIBPATH:"C:/Dev/Lib/boost/boost_1_68_0/lib64-msvc-14.0" /LIBPATH:"C:/Dev/Lib/openssl/lib64" libboost_system-vc140-mt-s-x64-1_68.lib libsslMT.lib libcryptoMT.lib crypt32.lib ws2_32.lib gdi32.lib advapi32.lib user32.lib" -IF NOT [%2]==[] SET msclLinkFlags=%2 -IF [%2]==["none"] SET msclLinkFlags=" " +SET extraMsclCxxFlags="" +IF NOT [%2]==[] SET extraMsclCxxFlags=%2 +SET extraMsclLinkFlags="" +IF NOT [%3]==[] SET extraMsclLinkFlags=%3 + +SET msclCxxFlags="%extraMsclCxxFlags:"=% /bigobj /I"%pythonDir%/include" /I"%LIB_PATH%/boost/boost_1_68_0" /I"%LIB_PATH%/openssl/include64"" +SET msclLinkFlags="%extraMsclLinkFlags:"=% /LIBPATH:"%pythonDir%/libs" /LIBPATH:"%LIB_PATH%/boost/boost_1_68_0/lib64-msvc-14.0" /LIBPATH:"%LIB_PATH%/openssl/lib64" libsslMT.lib libcryptoMT.lib crypt32.lib Advapi32.lib" + +echo pythonDir: %pythonDir% echo msclCxxFlags: %msclCxxFlags% echo msclLinkFlags: %msclLinkFlags% @@ -42,9 +49,21 @@ mkdir build\swig-python REM build the python version of MSCL (have to do this twice to copy the .py output file (BUG)) echo Running BJAM (1) REM linkflags=/SUBSYSTEM:WINDOWS",5.01" -bjam MSCL//stage_python_x64 runtime-link=static link=static release toolset=msvc-14.0 cxxflags=%msclCxxFlags% linkflags=%msclLinkFlags% address-model=64 -j4 +bjam MSCL//stage_python_x64 release -j %NUMBER_OF_PROCESSORS% ^ + runtime-link=static ^ + link=shared ^ + toolset=msvc-14.0 ^ + address-model=64 ^ + cxxflags=%msclCxxFlags% ^ + linkflags=%msclLinkFlags% echo Running BJAM (2) -bjam MSCL//stage_python_x64 runtime-link=static link=static release toolset=msvc-14.0 cxxflags=%msclCxxFlags% linkflags=%msclLinkFlags% address-model=64 -j4 +bjam MSCL//stage_python_x64 release -j %NUMBER_OF_PROCESSORS% ^ + runtime-link=static ^ + link=shared ^ + toolset=msvc-14.0 ^ + address-model=64 ^ + cxxflags=%msclCxxFlags% ^ + linkflags=%msclLinkFlags% REM rename _mscl.dll to _mscl.pyd echo Renaming _mscl.dll to _mscl.pyd diff --git a/BuildScripts/build_Python_x86.cmd b/BuildScripts/build_Python_x86.cmd index 3a571256a..1ee1eaaaf 100644 --- a/BuildScripts/build_Python_x86.cmd +++ b/BuildScripts/build_Python_x86.cmd @@ -21,14 +21,21 @@ echo Building MSCL for Python x86... (bjam) echo ******************************** echo. -SET msclCxxFlags="/I"C:/Python27/include" /I"C:/Dev/Lib/boost/boost_1_68_0" /I"C:/Dev/Lib/openssl/include"" -IF NOT [%1]==[] SET msclCxxFlags=%1 -IF [%1]==["none"] SET msclCxxFlags=" " +SET pythonDir=C:/Python27 +IF NOT [%1]==[] SET pythonDir=%1 +IF [%1]==["none"] SET pythonDir=" " +SET pythonDir=%pythonDir:"=% -SET msclLinkFlags="/LIBPATH:"C:/Python27/libs" /LIBPATH:"C:/Dev/Lib/boost/boost_1_68_0/lib32-msvc-14.0" /LIBPATH:"C:/Dev/Lib/openssl/lib" libboost_system-vc140-mt-s-x32-1_68.lib libsslMT.lib libcryptoMT.lib crypt32.lib ws2_32.lib gdi32.lib advapi32.lib user32.lib" -IF NOT [%2]==[] SET msclLinkFlags=%2 -IF [%2]==["none"] SET msclLinkFlags=" " +SET extraMsclCxxFlags="" +IF NOT [%2]==[] SET extraMsclCxxFlags=%2 +SET extraMsclLinkFlags="" +IF NOT [%3]==[] SET extraMsclLinkFlags=%3 + +SET msclCxxFlags="%extraMsclCxxFlags:"=% /bigobj /I"%pythonDir%/include" /I"%LIB_PATH%/boost/boost_1_68_0" /I"%LIB_PATH%/openssl/include"" +SET msclLinkFlags="%extraMsclLinkFlags:"=% /LIBPATH:"%pythonDir%/libs" /LIBPATH:"%LIB_PATH%/boost/boost_1_68_0/lib32-msvc-14.0" /LIBPATH:"%LIB_PATH%/openssl/lib" libsslMT.lib libcryptoMT.lib crypt32.lib Advapi32.lib" + +echo pythonDir: %pythonDir% echo msclCxxFlags: %msclCxxFlags% echo msclLinkFlags: %msclLinkFlags% @@ -42,9 +49,21 @@ mkdir build\swig-python REM build the python version of MSCL (have to do this twice to copy the .py output file (BUG)) echo Running BJAM (1) REM linkflags=/SUBSYSTEM:WINDOWS",5.01" -bjam MSCL//stage_python_x86 runtime-link=static link=static release toolset=msvc-14.0 cxxflags=%msclCxxFlags% linkflags=%msclLinkFlags% address-model=32 -j4 +bjam MSCL//stage_python_x86 release -j %NUMBER_OF_PROCESSORS% ^ + runtime-link=static ^ + link=shared ^ + toolset=msvc-14.0 ^ + address-model=32 ^ + cxxflags=%msclCxxFlags% ^ + linkflags=%msclLinkFlags% echo Running BJAM (2) -bjam MSCL//stage_python_x86 runtime-link=static link=static release toolset=msvc-14.0 cxxflags=%msclCxxFlags% linkflags=%msclLinkFlags% address-model=32 -j4 +bjam MSCL//stage_python_x86 release -j %NUMBER_OF_PROCESSORS% ^ + runtime-link=static ^ + link=shared ^ + toolset=msvc-14.0 ^ + address-model=32 ^ + cxxflags=%msclCxxFlags% ^ + linkflags=%msclLinkFlags% REM rename _mscl.dll to _mscl.pyd echo Renaming _mscl.dll to _mscl.pyd diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 77b920559..2a31cec53 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,22 @@ RENAMED - A function/class has been renamed. REMOVED - A function/class has been removed. ====================================================================================================== +62.1.2 - 2021-10-18 +- Fixes Windows python build, and updates windows python build scripts to work easier out of the box + +62.1.1 - 2021-10-13 +- Updates documentation definitions to work with new version of NaturalDocs + +62.1.0 - 2021-10-12 +- Add support for Torque-Link-200-3ch (s) + +62.0.2 - 2021-08-17 +- set South Africa region to the same as US instead of EU +- add merge option for factory streaming channel as enum mscl::InertialTypes::FACTORY_STREAMING_MERGE + +62.0.1 - 2021-05-27 +- add entry for South Africa to WirelessTypes::RegionCode enum (region_southAfrica) - set available transmit powers to the same as EU (RegionCode::region_europeanUnion) + 62.0.0 - 2021-05-19 - update inertial time of week channel names from _lastValidTow to _tow for accuracy: - GNSS Position Aiding Status (0x82,0x43) diff --git a/HowToUseMSCL.md b/HowToUseMSCL.md index 51a850ef8..7fceeb976 100644 --- a/HowToUseMSCL.md +++ b/HowToUseMSCL.md @@ -84,11 +84,4 @@ After installing the package, a folder was created in `/usr/share/` called `c++- This folder contains the MSCL headers, as well as a `boost` folder with the Boost library headers and libraries. You will need to tell your compiler to include these MSCL and Boost headers, as well as link to `libmscl.so`. For example: -```g++ -I/usr/share/c++-mscl/source -I/usr/share/c++-mscl/Boost/include YourFile.cpp -o YourProgram -L/usr/share/c++-mscl -lmscl -lstdc++ -std=c++11``` - -#### A couple common issues: -**Build error:** `/usr/bin/ld: /usr/share/c++-mscl/libmscl.so: undefined reference to 'pthread_...` -*Resolution:* add `-pthread` argument prior to linking MSCL (`... -pthread -L/usr/share/c++-mscl...`) - -**Runtime error:** `error while loading shared libraries: libmscl.so: cannot open shared object file: No such file or directory` -*Resolution:* in addition to linking at compile time, the application also needs to be able to find MSCL at runtime. There are a few ways to resolve this, one of which is to specify the runtime MSCL path in the build command: `... -L/usr/share/c++-mscl -Wl,-rpath,/usr/share/c++-mscl...` +```g++ -I/usr/share/c++-mscl/source -I/usr/share/c++-mscl/Boost/include YourFile.cpp -o YourProgram -L/usr/share/c++-mscl -lmscl -lstdc++ -std=c++11``` \ No newline at end of file diff --git a/MSCL/Jamfile b/MSCL/Jamfile index 3cad61489..238e23eec 100644 --- a/MSCL/Jamfile +++ b/MSCL/Jamfile @@ -4,6 +4,10 @@ import cast ; import path ; import common ; import set ; +import "class" : new ; +import type ; +import project ; +import targets ; #Setup path variables path-constant SWIG_PYTHON : $(BUILD_DIR)/swig-python ; @@ -147,8 +151,25 @@ DEPENDS _mscl : $(SWIG_PYTHON) ; alias MSCL_Main_Interface.cpp : [ cast _ swigi : source/mscl/Wrapper/MSCL_Main_Interface.i ] ; #Reference the .i file as a swig_i file +# Register a type so we can remove the prefix +type.register MSCL_PYTHON_EXTENSION : : SHARED_LIB ; +type.set-generated-target-prefix MSCL_PYTHON_EXTENSION : : "" ; + +rule mscl-python-extension ( name : sources * : requirements * : default-build * : + usage-requirements * ) +{ + local project = [ project.current ] ; + + targets.main-target-alternative + [ new typed-target $(name) : $(project) : MSCL_PYTHON_EXTENSION + : [ targets.main-target-sources $(sources) : $(name) ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; +} + #Define the python mscl build -python-extension _mscl +mscl-python-extension _mscl : MSCL_Main_Interface.cpp msclSrcs #Include the MSCL Source boostLibs diff --git a/MSCL/MSCL.vcxproj b/MSCL/MSCL.vcxproj index ba30edd3b..605e1fdbf 100644 --- a/MSCL/MSCL.vcxproj +++ b/MSCL/MSCL.vcxproj @@ -908,6 +908,7 @@ + @@ -1233,6 +1234,7 @@ + diff --git a/MSCL/MSCL.vcxproj.filters b/MSCL/MSCL.vcxproj.filters index 37e85fc82..dc8c4e74e 100644 --- a/MSCL/MSCL.vcxproj.filters +++ b/MSCL/MSCL.vcxproj.filters @@ -1013,6 +1013,9 @@ MicroStrain\Wireless\Features\Nodes + + MicroStrain\Wireless\Features\Nodes + @@ -1917,6 +1920,9 @@ MicroStrain\Wireless\Features\Nodes + + MicroStrain\Wireless\Features\Nodes + diff --git a/MSCL/source/mscl/LibVersion.h b/MSCL/source/mscl/LibVersion.h index c4314dcc5..537518480 100644 --- a/MSCL/source/mscl/LibVersion.h +++ b/MSCL/source/mscl/LibVersion.h @@ -11,8 +11,8 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. #ifndef SWIG //update with each release #define MSCL_MAJOR 62 -#define MSCL_MINOR 0 -#define MSCL_PATCH 0 +#define MSCL_MINOR 1 +#define MSCL_PATCH 2 #endif namespace mscl diff --git a/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h b/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h index 66a944fbe..411fe8cc5 100644 --- a/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h +++ b/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h @@ -542,6 +542,7 @@ namespace mscl enum FactoryStreamingOption { FACTORY_STREAMING_OVERWRITE = 0x00, + FACTORY_STREAMING_MERGE = 0x01, FACTORY_STREAMING_ADDITIVE = 0x02 }; diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Commands/AutoCalResult.h b/MSCL/source/mscl/MicroStrain/Wireless/Commands/AutoCalResult.h index 22fb68976..6802df634 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Commands/AutoCalResult.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Commands/AutoCalResult.h @@ -273,23 +273,23 @@ namespace mscl // Gets the median of the baseline data sampled during the shunt calibration. float baseMedian() const; - //API Function: + //API Function: baseMin // Gets the minimum of the baseline data sampled during the shunt calibration. float baseMin() const; - //API Function: + //API Function: baseMax // Gets the maximum of the baseline data sampled during the shunt calibration. float baseMax() const; - //API Function: + //API Function: shuntMedian // Gets the median of the shunted data sampled during the shunt calibration. float shuntMedian() const; - //API Function: + //API Function: shuntMin // Gets the minimum of the shunted data sampled during the shunt calibration. float shuntMin() const; - //API Function: + //API Function: shuntMax // Gets the maximum of the shunted data sampled during the shunt calibration. float shuntMax() const; diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp index d1e1ce648..56f23e8f5 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp @@ -217,6 +217,17 @@ namespace mscl {128, InputRangeEntry(WirelessTypes::range_0to78_74ohm, 128.0f)} }; + const InputRangeHelper::InputRangeMap InputRangeHelper::RANGES_TORQUELINK200_3CH_S_FULLDIFF_CHS_2500mV = { + { 0, InputRangeEntry(WirelessTypes::range_156_25mV, 16.0f) }, + { 1, InputRangeEntry(WirelessTypes::range_78_125mV, 32.0f) }, + { 2, InputRangeEntry(WirelessTypes::range_39_0625mV, 64.0f) }, + { 3, InputRangeEntry(WirelessTypes::range_19_5313mV, 128.0f) }, + { 4, InputRangeEntry(WirelessTypes::range_9_766mV, 256.0f) }, + { 5, InputRangeEntry(WirelessTypes::range_4_88mV, 512.0f) }, + { 6, InputRangeEntry(WirelessTypes::range_2_44mV, 1024.0f) }, + { 7, InputRangeEntry(WirelessTypes::range_1_22mV, 2048.0f) } + }; + const InputRangeHelper::InputRangeMap& InputRangeHelper::getRangeMap(WirelessModels::NodeModel nodeType, WirelessTypes::ChannelType channelType, WirelessTypes::Voltage excitationVoltage) { switch(nodeType) @@ -274,8 +285,14 @@ namespace mscl if(excitationVoltage == WirelessTypes::voltage_1500mV) { return RANGES_SGLINK200_SINGLEENDED_CHS_1500mV; } else if(excitationVoltage == WirelessTypes::voltage_2500mV) { return RANGES_SGLINK200_SINGLEENDED_CHS_2500mV; } } + } - throw Error_NotSupported("Input Range Map not found for this Node or Channel"); + case WirelessModels::node_torqueLink200_3ch_s: + { + if (channelType == WirelessTypes::chType_fullDifferential) + { + return RANGES_TORQUELINK200_3CH_S_FULLDIFF_CHS_2500mV; + } } case WirelessModels::node_ptLink200: diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.h b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.h index 8033abcaf..c4da434fb 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.h @@ -88,6 +88,7 @@ namespace mscl static const InputRangeMap RANGES_TCLINK_200_OEM; static const InputRangeMap RANGES_TCLINK_200; static const InputRangeMap RANGES_RTDLINK_200; + static const InputRangeMap RANGES_TORQUELINK200_3CH_S_FULLDIFF_CHS_2500mV; private: //Function: getRangeMap diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/AvailableTransmitPowers.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/AvailableTransmitPowers.cpp index ed385d714..d74ca48ce 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/AvailableTransmitPowers.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/AvailableTransmitPowers.cpp @@ -55,6 +55,7 @@ namespace mscl case WirelessTypes::region_canada: case WirelessTypes::region_brazil: case WirelessTypes::region_china: + case WirelessTypes::region_southAfrica: default: { return{ @@ -189,6 +190,7 @@ namespace mscl } } else if(info.regionCode() == WirelessTypes::region_usa || + info.regionCode() == WirelessTypes::region_southAfrica || info.regionCode() == WirelessTypes::region_canada) { if(commProtocol == WirelessTypes::commProtocol_lxrsPlus) @@ -247,6 +249,7 @@ namespace mscl case WirelessTypes::region_canada: case WirelessTypes::region_brazil: case WirelessTypes::region_china: + case WirelessTypes::region_southAfrica: default: { //if firmware supports 20dBm @@ -333,6 +336,7 @@ namespace mscl case WirelessTypes::region_canada: case WirelessTypes::region_brazil: case WirelessTypes::region_china: + case WirelessTypes::region_southAfrica: default: { //if firmware supports 20dBm diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp index 9f69d8ea8..14056dac1 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp @@ -47,6 +47,7 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. #include "NodeFeatures_torqueLink.h" #include "NodeFeatures_torqueLink200.h" #include "NodeFeatures_torqueLink200_3ch.h" +#include "NodeFeatures_torqueLink200_3ch_s.h" #include "NodeFeatures_vlink200.h" #include "NodeFeatures_vlink.h" #include "NodeFeatures_vlink_legacy.h" @@ -248,6 +249,9 @@ namespace mscl case WirelessModels::node_torqueLink200: return std::unique_ptr(new NodeFeatures_torqueLink200(info)); + case WirelessModels::node_torqueLink200_3ch_s: + return std::unique_ptr(new NodeFeatures_torqueLink200_3ch_s(info)); + //TODO: add Watt-Link default: diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.cpp index 563ac9f62..6a065a24c 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.cpp @@ -11,9 +11,14 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. namespace mscl { - NodeFeatures_torqueLink200_3ch::NodeFeatures_torqueLink200_3ch(const NodeInfo& info): + NodeFeatures_torqueLink200_3ch::NodeFeatures_torqueLink200_3ch(const NodeInfo& info, bool ext): NodeFeatures_200series(info) { + if (ext) + { + return; + } + addCalCoeffChannelGroup(1, "Differential", NodeEepromMap::CH_ACTION_SLOPE_1, NodeEepromMap::CH_ACTION_ID_1); addCalCoeffChannelGroup(2, "Differential", NodeEepromMap::CH_ACTION_SLOPE_2, NodeEepromMap::CH_ACTION_ID_2); addCalCoeffChannelGroup(3, "Differential", NodeEepromMap::CH_ACTION_SLOPE_3, NodeEepromMap::CH_ACTION_ID_3); diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.h index b367e3a6a..3a9dec1c1 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch.h @@ -21,7 +21,10 @@ namespace mscl //Constructor: NodeFeatures_torqueLink200_3ch // Creates a NodeFeatures_torqueLink200_3ch object. - NodeFeatures_torqueLink200_3ch(const NodeInfo& info); + //Parameters: + // info - NodeInfo object for reference features + // ext - bool indicating whether this is being called from a child class (default false) + NodeFeatures_torqueLink200_3ch(const NodeInfo& info, bool ext = false); virtual bool supportsSensorDelayConfig() const override; diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.cpp new file mode 100644 index 000000000..943e6bd92 --- /dev/null +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.cpp @@ -0,0 +1,88 @@ +/******************************************************************************* +Copyright(c) 2015-2021 Parker Hannifin Corp. All rights reserved. + +MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. +*******************************************************************************/ +#include "stdafx.h" +#include "NodeFeatures_torqueLink200_3ch_s.h" +#include "AvailableSampleRates.h" +#include "mscl/MicroStrain/Wireless/Configuration/NodeEepromMap.h" +#include "mscl/Utils.h" + +namespace mscl +{ + NodeFeatures_torqueLink200_3ch_s::NodeFeatures_torqueLink200_3ch_s(const NodeInfo& info): + NodeFeatures_torqueLink200_3ch(info, true) + { + addCalCoeffChannelGroup(1, "Differential", NodeEepromMap::CH_ACTION_SLOPE_1, NodeEepromMap::CH_ACTION_ID_1); + addCalCoeffChannelGroup(2, "Differential", NodeEepromMap::CH_ACTION_SLOPE_2, NodeEepromMap::CH_ACTION_ID_2); + addCalCoeffChannelGroup(3, "Differential", NodeEepromMap::CH_ACTION_SLOPE_3, NodeEepromMap::CH_ACTION_ID_3); + + static const ChannelMask DIFFERENTIAL_CHS(BOOST_BINARY(00000001)); //ch1 + static const ChannelMask DIFFERENTIAL_CH2(BOOST_BINARY(00000010)); //ch2 + static const ChannelMask DIFFERENTIAL_CH3(BOOST_BINARY(00000100)); //ch3 + static const ChannelMask DIFFERENTIAL_ALL(BOOST_BINARY(00000111)); // all differential (1, 2, 3) + + m_channelGroups.emplace_back(DIFFERENTIAL_CHS, "Differential", + ChannelGroup::SettingsMap{ + {WirelessTypes::chSetting_inputRange, NodeEepromMap::HW_GAIN_1}, + {WirelessTypes::chSetting_autoShuntCal, NodeEepromMap::CH_ACTION_SLOPE_1}} + ); + + m_channelGroups.emplace_back(DIFFERENTIAL_CH2, "Differential", + ChannelGroup::SettingsMap{ + { WirelessTypes::chSetting_inputRange, NodeEepromMap::HW_GAIN_2 }, + { WirelessTypes::chSetting_autoShuntCal, NodeEepromMap::CH_ACTION_SLOPE_2 } } + ); + + m_channelGroups.emplace_back(DIFFERENTIAL_CH3, "Differential", + ChannelGroup::SettingsMap{ + { WirelessTypes::chSetting_inputRange, NodeEepromMap::HW_GAIN_3 }, + { WirelessTypes::chSetting_autoShuntCal, NodeEepromMap::CH_ACTION_SLOPE_3 } } + ); + + //all channels configured with 1 low pass filter setting in this firmware + m_channelGroups.emplace_back(DIFFERENTIAL_ALL, "Differential", + ChannelGroup::SettingsMap{ + { WirelessTypes::chSetting_lowPassFilter, NodeEepromMap::LOW_PASS_FILTER_1 } } + ); + + //Channels + m_channels.emplace_back(1, WirelessChannel::channel_1, WirelessTypes::chType_fullDifferential, "Differential", 24); + m_channels.emplace_back(2, WirelessChannel::channel_2, WirelessTypes::chType_fullDifferential, "Differential", 24); + m_channels.emplace_back(3, WirelessChannel::channel_3, WirelessTypes::chType_fullDifferential, "Differential", 24); + } + + const WirelessTypes::DerivedChannelMasks NodeFeatures_torqueLink200_3ch_s::channelsPerDerivedCategory() const + { + const ChannelMask ALL_CHS(BOOST_BINARY(00000111)); + + const WirelessTypes::DerivedChannelMasks result = { + { std::make_pair(WirelessTypes::derivedCategory_rms, ALL_CHS) }, + { std::make_pair(WirelessTypes::derivedCategory_peakToPeak, ALL_CHS) }, + { std::make_pair(WirelessTypes::derivedCategory_mean, ALL_CHS) } + }; + + return result; + } + + bool NodeFeatures_torqueLink200_3ch_s::supportsPullUpResistor() const + { + return false; + } + + bool NodeFeatures_torqueLink200_3ch_s::supportsDebounceFilter() const + { + return false; + } + + bool NodeFeatures_torqueLink200_3ch_s::supportsExcitationVoltageConfig() const + { + return false; + } + + const WirelessTypes::Voltages NodeFeatures_torqueLink200_3ch_s::excitationVoltages() const + { + return {}; + } +} \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.h new file mode 100644 index 000000000..4217d903c --- /dev/null +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.h @@ -0,0 +1,37 @@ +/******************************************************************************* +Copyright(c) 2015-2021 Parker Hannifin Corp. All rights reserved. + +MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. +*******************************************************************************/ +#pragma once + +#include "NodeFeatures_torqueLink200_3ch.h" + +namespace mscl +{ + //Class: NodeFeatures_torqueLink200_3ch_s_s + // Contains information on features for the Torque-Link-200-3ch nodes. Inherits from . + class NodeFeatures_torqueLink200_3ch_s: public NodeFeatures_torqueLink200_3ch + { + private: + NodeFeatures_torqueLink200_3ch_s(); //disabled default constructor + + public: + virtual ~NodeFeatures_torqueLink200_3ch_s(){}; + + //Constructor: NodeFeatures_torqueLink200_3ch_s + // Creates a NodeFeatures_torqueLink200_3ch_s object. + NodeFeatures_torqueLink200_3ch_s(const NodeInfo& info); + + virtual const WirelessTypes::DerivedChannelMasks channelsPerDerivedCategory() const override; + + virtual bool supportsPullUpResistor() const override; + + virtual bool supportsDebounceFilter() const override; + + virtual bool supportsExcitationVoltageConfig() const override; + + virtual const WirelessTypes::Voltages excitationVoltages() const override; + }; +} + diff --git a/MSCL/source/mscl/MicroStrain/Wireless/WirelessModels.h b/MSCL/source/mscl/MicroStrain/Wireless/WirelessModels.h index ccee72d66..c85b0107b 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/WirelessModels.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/WirelessModels.h @@ -112,6 +112,7 @@ namespace mscl // node_torqueLink - 63309999 - Torque-Link // node_torqueLink200_3ch - 63313000 - Torque-Link-200-3ch // node_torqueLink200 - 63319999 - Torque-Link-200 + // node_torqueLink200_3ch_s - 63323350 - Torque-Link-200-3ch // node_sgLink_herm - 65010000 - SG-Link-Hermetic // node_sgLink_herm_2600 - 65011110 - SG-Link-Hermetic 2600 belt assembly // node_sgLink_herm_2700 - 65011210 - SG-Link-Hermetic 2700 belt assembly @@ -213,6 +214,7 @@ namespace mscl node_torqueLink = 63309999, //Torque-Link node_torqueLink200_3ch = 63313000, //Torque-Link-200-3ch node_torqueLink200 = 63319999, //Torque-Link-200 + node_torqueLink200_3ch_s = 63323350, //Torque-Link-200-3ch node_sgLink_herm = 65010000, //SG-Link-Hermetic node_sgLink_herm_2600 = 65011110, //SG-Link-Hermetic 2600 belt assembly node_sgLink_herm_2700 = 65011210, //SG-Link-Hermetic 2700 belt assembly diff --git a/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode.h b/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode.h index 8f779368c..c82d6aa5f 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode.h @@ -332,7 +332,7 @@ namespace mscl // Gets the number of bytes available for data storage on the Node. // //Returns: - // The number of bytes avaialbe + // The number of bytes available // //Exceptions: // - : Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL. diff --git a/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode_Impl.cpp b/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode_Impl.cpp index 616b68b1b..5869a955e 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode_Impl.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/WirelessNode_Impl.cpp @@ -619,6 +619,7 @@ namespace mscl case WirelessModels::node_shmLink201_fullbridge: case WirelessModels::node_shmLink210_fullbridge: case WirelessModels::node_shmLink210_qbridge_3K: + case WirelessModels::node_torqueLink200_3ch_s: return WirelessTypes::voltage_2500mV; case WirelessModels::node_sgLink200: @@ -725,6 +726,7 @@ namespace mscl case WirelessModels::node_shmLink201_hbridge_1K: case WirelessModels::node_shmLink201_hbridge_348: case WirelessModels::node_shmLink201_fullbridge: + case WirelessModels::node_torqueLink200_3ch_s: return WirelessTypes::voltage_2500mV; default: @@ -803,6 +805,7 @@ namespace mscl case WirelessModels::node_shmLink201_hbridge_1K: case WirelessModels::node_shmLink201_hbridge_348: case WirelessModels::node_shmLink201_fullbridge: + case WirelessModels::node_torqueLink200_3ch_s: return WirelessTypes::voltage_2500mV; default: diff --git a/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h b/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h index 477461188..df20dbcd2 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h @@ -855,6 +855,7 @@ namespace mscl // region_australia_newzealand - 6 // region_singapore - 7 // region_canada - 8 + // region_southAfrica - 9 enum RegionCode { region_usa = 0, @@ -865,7 +866,8 @@ namespace mscl region_china = 5, region_australia_newzealand = 6, region_singapore = 7, - region_canada = 8 + region_canada = 8, + region_southAfrica = 9 }; //API Enum: ChannelGroupSetting @@ -1256,6 +1258,8 @@ namespace mscl // range_0to322ohm - 130 - 0 to 322 ohms // range_0to161ohm - 131 - 0 to 161 ohms // range_0to80ohm - 132 - 0 to 80 ohms + // range_39_0625mV - 133 - +- 39.0625 milliVolts + // range_19_5313mV - 134 - +- 19.5313 milliVolts // range_invalid - 65535 - invalid input range enum InputRange { @@ -1411,6 +1415,9 @@ namespace mscl range_0to158_73ohm = 131, //0 to 158.73 ohms range_0to78_74ohm = 132, //0 to 78.74 ohms + range_39_0625mV = 133, //+- 39.0625 milliVolts + range_19_5313mV = 134, //+- 19.5313 milliVolts + range_invalid = 65535 //invalid input range }; diff --git a/MSCL/source/mscl/Wrapper/MSCL_Main_Interface.i b/MSCL/source/mscl/Wrapper/MSCL_Main_Interface.i index 4e3dc81ca..88b7234cd 100644 --- a/MSCL/source/mscl/Wrapper/MSCL_Main_Interface.i +++ b/MSCL/source/mscl/Wrapper/MSCL_Main_Interface.i @@ -315,9 +315,9 @@ namespace std %template(AdaptiveFilterLevels) vector; %template(AdvancedLowPassFilterConfig)vector; %template(PpsSourceOptions) vector; - %template(GpioPinModeOptions) vector; - %template(GpioBehaviorModes) map>; - %template(GpioFeatureBehaviors) map>>; + %template(GpioPinModeOptions) vector; + %template(GpioBehaviorModes) map>; + %template(GpioFeatureBehaviors) map>>; %template(GpioPinOptions) map>>>; diff --git a/MSCL_Examples/Wireless/C++/MSCL_Wireless_Example_C++/MSCL_Wireless_Example_C++/enableDisableBeacon.h b/MSCL_Examples/Wireless/C++/MSCL_Wireless_Example_C++/MSCL_Wireless_Example_C++/enableDisableBeacon.h index 2ccb604bc..cc7103427 100644 --- a/MSCL_Examples/Wireless/C++/MSCL_Wireless_Example_C++/MSCL_Wireless_Example_C++/enableDisableBeacon.h +++ b/MSCL_Examples/Wireless/C++/MSCL_Wireless_Example_C++/MSCL_Wireless_Example_C++/enableDisableBeacon.h @@ -1,5 +1,6 @@ #pragma once +#include #include "mscl/mscl.h" static void enableDisableBeacon(mscl::BaseStation& base) @@ -34,4 +35,4 @@ static void enableDisableBeacon(mscl::BaseStation& base) //if we got here, no exception was thrown, so disableBeacon was successful cout << "Successfully disabled the beacon on the Base Station" << endl; -} \ No newline at end of file +} diff --git a/MSCL_Examples/Wireless/Jamfile b/MSCL_Examples/Wireless/Jamfile index 8656ea8d6..ff2c5a33b 100644 --- a/MSCL_Examples/Wireless/Jamfile +++ b/MSCL_Examples/Wireless/Jamfile @@ -3,6 +3,6 @@ project ; exe MSCL_Example_Wireless_CPP - : [ glob C++/MSCL_Example_Project_C++/MSCL_Example_Project_C++/*.cpp ] /mscl-lib//mscl + : [ glob C++/MSCL_Wireless_Example_C++/MSCL_Wireless_Example_C++/*.cpp ] /mscl-lib//mscl : . - ; \ No newline at end of file + ; diff --git a/MSCL_Managed/Properties/AssemblyInfo.cs b/MSCL_Managed/Properties/AssemblyInfo.cs index 151457573..5231b85c2 100644 --- a/MSCL_Managed/Properties/AssemblyInfo.cs +++ b/MSCL_Managed/Properties/AssemblyInfo.cs @@ -33,5 +33,5 @@ // [assembly: AssemblyVersion("1.0.*")] // //update with each release -[assembly: AssemblyVersion("62.0.0.0")] -[assembly: AssemblyFileVersion("62.0.0.0")] +[assembly: AssemblyVersion("62.1.2.0")] +[assembly: AssemblyFileVersion("62.1.2.0")] diff --git a/MSCL_Managed/mscl/AdaptiveFilterLevels.cs b/MSCL_Managed/mscl/AdaptiveFilterLevels.cs index 6c3a6f3fa..54ce77183 100644 --- a/MSCL_Managed/mscl/AdaptiveFilterLevels.cs +++ b/MSCL_Managed/mscl/AdaptiveFilterLevels.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class AdaptiveFilterLevels : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal AdaptiveFilterLevels(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AdaptiveFilterLevels obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~AdaptiveFilterLevels() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_AdaptiveFilterLevels(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public AdaptiveFilterLevels(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (InertialTypes.AutoAdaptiveFilteringLevel element in c) { - this.Add(element); - } - } - - public AdaptiveFilterLevels(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (InertialTypes.AutoAdaptiveFilteringLevel element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public InertialTypes.AutoAdaptiveFilteringLevel this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(InertialTypes.AutoAdaptiveFilteringLevel[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(InertialTypes.AutoAdaptiveFilteringLevel[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, InertialTypes.AutoAdaptiveFilteringLevel[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new AdaptiveFilterLevelsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new AdaptiveFilterLevelsEnumerator(this); - } - - public AdaptiveFilterLevelsEnumerator GetEnumerator() { - return new AdaptiveFilterLevelsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class AdaptiveFilterLevelsEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private AdaptiveFilterLevels collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public AdaptiveFilterLevelsEnumerator(AdaptiveFilterLevels collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public InertialTypes.AutoAdaptiveFilteringLevel Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (InertialTypes.AutoAdaptiveFilteringLevel)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.AdaptiveFilterLevels_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(InertialTypes.AutoAdaptiveFilteringLevel x) { - msclPINVOKE.AdaptiveFilterLevels_Add(swigCPtr, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.AdaptiveFilterLevels_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.AdaptiveFilterLevels_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.AdaptiveFilterLevels_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public AdaptiveFilterLevels() : this(msclPINVOKE.new_AdaptiveFilterLevels__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public AdaptiveFilterLevels(AdaptiveFilterLevels other) : this(msclPINVOKE.new_AdaptiveFilterLevels__SWIG_1(AdaptiveFilterLevels.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public AdaptiveFilterLevels(int capacity) : this(msclPINVOKE.new_AdaptiveFilterLevels__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private InertialTypes.AutoAdaptiveFilteringLevel getitemcopy(int index) { - InertialTypes.AutoAdaptiveFilteringLevel ret = (InertialTypes.AutoAdaptiveFilteringLevel)msclPINVOKE.AdaptiveFilterLevels_getitemcopy(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private InertialTypes.AutoAdaptiveFilteringLevel getitem(int index) { - InertialTypes.AutoAdaptiveFilteringLevel ret = (InertialTypes.AutoAdaptiveFilteringLevel)msclPINVOKE.AdaptiveFilterLevels_getitem(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, InertialTypes.AutoAdaptiveFilteringLevel val) { - msclPINVOKE.AdaptiveFilterLevels_setitem(swigCPtr, index, (int)val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(AdaptiveFilterLevels values) { - msclPINVOKE.AdaptiveFilterLevels_AddRange(swigCPtr, AdaptiveFilterLevels.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public AdaptiveFilterLevels GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.AdaptiveFilterLevels_GetRange(swigCPtr, index, count); - AdaptiveFilterLevels ret = (cPtr == global::System.IntPtr.Zero) ? null : new AdaptiveFilterLevels(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, InertialTypes.AutoAdaptiveFilteringLevel x) { - msclPINVOKE.AdaptiveFilterLevels_Insert(swigCPtr, index, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, AdaptiveFilterLevels values) { - msclPINVOKE.AdaptiveFilterLevels_InsertRange(swigCPtr, index, AdaptiveFilterLevels.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.AdaptiveFilterLevels_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.AdaptiveFilterLevels_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static AdaptiveFilterLevels Repeat(InertialTypes.AutoAdaptiveFilteringLevel value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.AdaptiveFilterLevels_Repeat((int)value, count); - AdaptiveFilterLevels ret = (cPtr == global::System.IntPtr.Zero) ? null : new AdaptiveFilterLevels(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.AdaptiveFilterLevels_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.AdaptiveFilterLevels_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, AdaptiveFilterLevels values) { - msclPINVOKE.AdaptiveFilterLevels_SetRange(swigCPtr, index, AdaptiveFilterLevels.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class AdaptiveFilterLevels : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal AdaptiveFilterLevels(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AdaptiveFilterLevels obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~AdaptiveFilterLevels() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_AdaptiveFilterLevels(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public AdaptiveFilterLevels(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (InertialTypes.AutoAdaptiveFilteringLevel element in c) { + this.Add(element); + } + } + + public AdaptiveFilterLevels(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (InertialTypes.AutoAdaptiveFilteringLevel element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public InertialTypes.AutoAdaptiveFilteringLevel this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(InertialTypes.AutoAdaptiveFilteringLevel[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(InertialTypes.AutoAdaptiveFilteringLevel[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, InertialTypes.AutoAdaptiveFilteringLevel[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new AdaptiveFilterLevelsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new AdaptiveFilterLevelsEnumerator(this); + } + + public AdaptiveFilterLevelsEnumerator GetEnumerator() { + return new AdaptiveFilterLevelsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class AdaptiveFilterLevelsEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private AdaptiveFilterLevels collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public AdaptiveFilterLevelsEnumerator(AdaptiveFilterLevels collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public InertialTypes.AutoAdaptiveFilteringLevel Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (InertialTypes.AutoAdaptiveFilteringLevel)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.AdaptiveFilterLevels_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(InertialTypes.AutoAdaptiveFilteringLevel x) { + msclPINVOKE.AdaptiveFilterLevels_Add(swigCPtr, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.AdaptiveFilterLevels_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.AdaptiveFilterLevels_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.AdaptiveFilterLevels_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public AdaptiveFilterLevels() : this(msclPINVOKE.new_AdaptiveFilterLevels__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public AdaptiveFilterLevels(AdaptiveFilterLevels other) : this(msclPINVOKE.new_AdaptiveFilterLevels__SWIG_1(AdaptiveFilterLevels.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public AdaptiveFilterLevels(int capacity) : this(msclPINVOKE.new_AdaptiveFilterLevels__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private InertialTypes.AutoAdaptiveFilteringLevel getitemcopy(int index) { + InertialTypes.AutoAdaptiveFilteringLevel ret = (InertialTypes.AutoAdaptiveFilteringLevel)msclPINVOKE.AdaptiveFilterLevels_getitemcopy(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private InertialTypes.AutoAdaptiveFilteringLevel getitem(int index) { + InertialTypes.AutoAdaptiveFilteringLevel ret = (InertialTypes.AutoAdaptiveFilteringLevel)msclPINVOKE.AdaptiveFilterLevels_getitem(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, InertialTypes.AutoAdaptiveFilteringLevel val) { + msclPINVOKE.AdaptiveFilterLevels_setitem(swigCPtr, index, (int)val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(AdaptiveFilterLevels values) { + msclPINVOKE.AdaptiveFilterLevels_AddRange(swigCPtr, AdaptiveFilterLevels.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public AdaptiveFilterLevels GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.AdaptiveFilterLevels_GetRange(swigCPtr, index, count); + AdaptiveFilterLevels ret = (cPtr == global::System.IntPtr.Zero) ? null : new AdaptiveFilterLevels(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, InertialTypes.AutoAdaptiveFilteringLevel x) { + msclPINVOKE.AdaptiveFilterLevels_Insert(swigCPtr, index, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, AdaptiveFilterLevels values) { + msclPINVOKE.AdaptiveFilterLevels_InsertRange(swigCPtr, index, AdaptiveFilterLevels.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.AdaptiveFilterLevels_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.AdaptiveFilterLevels_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static AdaptiveFilterLevels Repeat(InertialTypes.AutoAdaptiveFilteringLevel value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.AdaptiveFilterLevels_Repeat((int)value, count); + AdaptiveFilterLevels ret = (cPtr == global::System.IntPtr.Zero) ? null : new AdaptiveFilterLevels(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.AdaptiveFilterLevels_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.AdaptiveFilterLevels_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, AdaptiveFilterLevels values) { + msclPINVOKE.AdaptiveFilterLevels_SetRange(swigCPtr, index, AdaptiveFilterLevels.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/AntennaLeverArmCalConfiguration.cs b/MSCL_Managed/mscl/AntennaLeverArmCalConfiguration.cs index e918e9601..3c7475bc2 100644 --- a/MSCL_Managed/mscl/AntennaLeverArmCalConfiguration.cs +++ b/MSCL_Managed/mscl/AntennaLeverArmCalConfiguration.cs @@ -1,77 +1,77 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class AntennaLeverArmCalConfiguration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal AntennaLeverArmCalConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AntennaLeverArmCalConfiguration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~AntennaLeverArmCalConfiguration() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_AntennaLeverArmCalConfiguration(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public bool enabled { - set { - msclPINVOKE.AntennaLeverArmCalConfiguration_enabled_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - bool ret = msclPINVOKE.AntennaLeverArmCalConfiguration_enabled_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float maxOffsetError { - set { - msclPINVOKE.AntennaLeverArmCalConfiguration_maxOffsetError_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = msclPINVOKE.AntennaLeverArmCalConfiguration_maxOffsetError_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public AntennaLeverArmCalConfiguration() : this(msclPINVOKE.new_AntennaLeverArmCalConfiguration(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class AntennaLeverArmCalConfiguration : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal AntennaLeverArmCalConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AntennaLeverArmCalConfiguration obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~AntennaLeverArmCalConfiguration() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_AntennaLeverArmCalConfiguration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public bool enabled { + set { + msclPINVOKE.AntennaLeverArmCalConfiguration_enabled_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + bool ret = msclPINVOKE.AntennaLeverArmCalConfiguration_enabled_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float maxOffsetError { + set { + msclPINVOKE.AntennaLeverArmCalConfiguration_maxOffsetError_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + float ret = msclPINVOKE.AntennaLeverArmCalConfiguration_maxOffsetError_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public AntennaLeverArmCalConfiguration() : this(msclPINVOKE.new_AntennaLeverArmCalConfiguration(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/AutoAdaptiveFilterOptions.cs b/MSCL_Managed/mscl/AutoAdaptiveFilterOptions.cs index 6a9ae7a5b..6d9c92375 100644 --- a/MSCL_Managed/mscl/AutoAdaptiveFilterOptions.cs +++ b/MSCL_Managed/mscl/AutoAdaptiveFilterOptions.cs @@ -1,81 +1,81 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class AutoAdaptiveFilterOptions : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal AutoAdaptiveFilterOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AutoAdaptiveFilterOptions obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~AutoAdaptiveFilterOptions() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_AutoAdaptiveFilterOptions(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public AutoAdaptiveFilterOptions() : this(msclPINVOKE.new_AutoAdaptiveFilterOptions__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public AutoAdaptiveFilterOptions(InertialTypes.AutoAdaptiveFilteringLevel lvl, ushort limit) : this(msclPINVOKE.new_AutoAdaptiveFilterOptions__SWIG_1((int)lvl, limit), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public InertialTypes.AutoAdaptiveFilteringLevel level { - set { - msclPINVOKE.AutoAdaptiveFilterOptions_level_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - InertialTypes.AutoAdaptiveFilteringLevel ret = (InertialTypes.AutoAdaptiveFilteringLevel)msclPINVOKE.AutoAdaptiveFilterOptions_level_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public ushort timeLimit { - set { - msclPINVOKE.AutoAdaptiveFilterOptions_timeLimit_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - ushort ret = msclPINVOKE.AutoAdaptiveFilterOptions_timeLimit_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class AutoAdaptiveFilterOptions : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal AutoAdaptiveFilterOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AutoAdaptiveFilterOptions obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~AutoAdaptiveFilterOptions() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_AutoAdaptiveFilterOptions(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public AutoAdaptiveFilterOptions() : this(msclPINVOKE.new_AutoAdaptiveFilterOptions__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public AutoAdaptiveFilterOptions(InertialTypes.AutoAdaptiveFilteringLevel lvl, ushort limit) : this(msclPINVOKE.new_AutoAdaptiveFilterOptions__SWIG_1((int)lvl, limit), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public InertialTypes.AutoAdaptiveFilteringLevel level { + set { + msclPINVOKE.AutoAdaptiveFilterOptions_level_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + InertialTypes.AutoAdaptiveFilteringLevel ret = (InertialTypes.AutoAdaptiveFilteringLevel)msclPINVOKE.AutoAdaptiveFilterOptions_level_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public ushort timeLimit { + set { + msclPINVOKE.AutoAdaptiveFilterOptions_timeLimit_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + ushort ret = msclPINVOKE.AutoAdaptiveFilterOptions_timeLimit_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + +} + +} diff --git a/MSCL_Managed/mscl/Bitfield.cs b/MSCL_Managed/mscl/Bitfield.cs index c8356ad26..2b597fb25 100644 --- a/MSCL_Managed/mscl/Bitfield.cs +++ b/MSCL_Managed/mscl/Bitfield.cs @@ -1,90 +1,90 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class Bitfield : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Bitfield(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Bitfield obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Bitfield() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_Bitfield(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public Bitfield() : this(msclPINVOKE.new_Bitfield__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public Bitfield(ulong val) : this(msclPINVOKE.new_Bitfield__SWIG_1(val), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public ulong value() { - ulong ret = msclPINVOKE.Bitfield_value__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void value(ulong val) { - msclPINVOKE.Bitfield_value__SWIG_1(swigCPtr, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public ulong get(ulong mask, bool shiftToLsb) { - ulong ret = msclPINVOKE.Bitfield_get__SWIG_0(swigCPtr, mask, shiftToLsb); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ulong get(ulong mask) { - ulong ret = msclPINVOKE.Bitfield_get__SWIG_1(swigCPtr, mask); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void set(ulong mask, ulong value, bool shiftRequired) { - msclPINVOKE.Bitfield_set__SWIG_0(swigCPtr, mask, value, shiftRequired); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void set(ulong mask, ulong value) { - msclPINVOKE.Bitfield_set__SWIG_1(swigCPtr, mask, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class Bitfield : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Bitfield(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Bitfield obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~Bitfield() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_Bitfield(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public Bitfield() : this(msclPINVOKE.new_Bitfield__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public Bitfield(ulong val) : this(msclPINVOKE.new_Bitfield__SWIG_1(val), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public ulong value() { + ulong ret = msclPINVOKE.Bitfield_value__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void value(ulong val) { + msclPINVOKE.Bitfield_value__SWIG_1(swigCPtr, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public ulong get(ulong mask, bool shiftToLsb) { + ulong ret = msclPINVOKE.Bitfield_get__SWIG_0(swigCPtr, mask, shiftToLsb); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ulong get(ulong mask) { + ulong ret = msclPINVOKE.Bitfield_get__SWIG_1(swigCPtr, mask); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void set(ulong mask, ulong value, bool shiftRequired) { + msclPINVOKE.Bitfield_set__SWIG_0(swigCPtr, mask, value, shiftRequired); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void set(ulong mask, ulong value) { + msclPINVOKE.Bitfield_set__SWIG_1(swigCPtr, mask, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/CfcFilters.cs b/MSCL_Managed/mscl/CfcFilters.cs index 3704dbb10..e7197e2ed 100644 --- a/MSCL_Managed/mscl/CfcFilters.cs +++ b/MSCL_Managed/mscl/CfcFilters.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class CfcFilters : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal CfcFilters(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CfcFilters obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~CfcFilters() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_CfcFilters(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public CfcFilters(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (WirelessTypes.ChannelFrequencyClass element in c) { - this.Add(element); - } - } - - public CfcFilters(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (WirelessTypes.ChannelFrequencyClass element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public WirelessTypes.ChannelFrequencyClass this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(WirelessTypes.ChannelFrequencyClass[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(WirelessTypes.ChannelFrequencyClass[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, WirelessTypes.ChannelFrequencyClass[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new CfcFiltersEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new CfcFiltersEnumerator(this); - } - - public CfcFiltersEnumerator GetEnumerator() { - return new CfcFiltersEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class CfcFiltersEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private CfcFilters collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public CfcFiltersEnumerator(CfcFilters collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public WirelessTypes.ChannelFrequencyClass Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (WirelessTypes.ChannelFrequencyClass)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.CfcFilters_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(WirelessTypes.ChannelFrequencyClass x) { - msclPINVOKE.CfcFilters_Add(swigCPtr, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.CfcFilters_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.CfcFilters_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.CfcFilters_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CfcFilters() : this(msclPINVOKE.new_CfcFilters__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CfcFilters(CfcFilters other) : this(msclPINVOKE.new_CfcFilters__SWIG_1(CfcFilters.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CfcFilters(int capacity) : this(msclPINVOKE.new_CfcFilters__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private WirelessTypes.ChannelFrequencyClass getitemcopy(int index) { - WirelessTypes.ChannelFrequencyClass ret = (WirelessTypes.ChannelFrequencyClass)msclPINVOKE.CfcFilters_getitemcopy(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private WirelessTypes.ChannelFrequencyClass getitem(int index) { - WirelessTypes.ChannelFrequencyClass ret = (WirelessTypes.ChannelFrequencyClass)msclPINVOKE.CfcFilters_getitem(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, WirelessTypes.ChannelFrequencyClass val) { - msclPINVOKE.CfcFilters_setitem(swigCPtr, index, (int)val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(CfcFilters values) { - msclPINVOKE.CfcFilters_AddRange(swigCPtr, CfcFilters.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CfcFilters GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.CfcFilters_GetRange(swigCPtr, index, count); - CfcFilters ret = (cPtr == global::System.IntPtr.Zero) ? null : new CfcFilters(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, WirelessTypes.ChannelFrequencyClass x) { - msclPINVOKE.CfcFilters_Insert(swigCPtr, index, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, CfcFilters values) { - msclPINVOKE.CfcFilters_InsertRange(swigCPtr, index, CfcFilters.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.CfcFilters_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.CfcFilters_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static CfcFilters Repeat(WirelessTypes.ChannelFrequencyClass value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.CfcFilters_Repeat((int)value, count); - CfcFilters ret = (cPtr == global::System.IntPtr.Zero) ? null : new CfcFilters(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.CfcFilters_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.CfcFilters_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, CfcFilters values) { - msclPINVOKE.CfcFilters_SetRange(swigCPtr, index, CfcFilters.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class CfcFilters : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal CfcFilters(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CfcFilters obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~CfcFilters() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_CfcFilters(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public CfcFilters(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (WirelessTypes.ChannelFrequencyClass element in c) { + this.Add(element); + } + } + + public CfcFilters(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (WirelessTypes.ChannelFrequencyClass element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public WirelessTypes.ChannelFrequencyClass this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(WirelessTypes.ChannelFrequencyClass[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(WirelessTypes.ChannelFrequencyClass[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, WirelessTypes.ChannelFrequencyClass[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new CfcFiltersEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new CfcFiltersEnumerator(this); + } + + public CfcFiltersEnumerator GetEnumerator() { + return new CfcFiltersEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class CfcFiltersEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private CfcFilters collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public CfcFiltersEnumerator(CfcFilters collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public WirelessTypes.ChannelFrequencyClass Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (WirelessTypes.ChannelFrequencyClass)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.CfcFilters_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(WirelessTypes.ChannelFrequencyClass x) { + msclPINVOKE.CfcFilters_Add(swigCPtr, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.CfcFilters_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.CfcFilters_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.CfcFilters_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CfcFilters() : this(msclPINVOKE.new_CfcFilters__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CfcFilters(CfcFilters other) : this(msclPINVOKE.new_CfcFilters__SWIG_1(CfcFilters.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CfcFilters(int capacity) : this(msclPINVOKE.new_CfcFilters__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private WirelessTypes.ChannelFrequencyClass getitemcopy(int index) { + WirelessTypes.ChannelFrequencyClass ret = (WirelessTypes.ChannelFrequencyClass)msclPINVOKE.CfcFilters_getitemcopy(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private WirelessTypes.ChannelFrequencyClass getitem(int index) { + WirelessTypes.ChannelFrequencyClass ret = (WirelessTypes.ChannelFrequencyClass)msclPINVOKE.CfcFilters_getitem(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, WirelessTypes.ChannelFrequencyClass val) { + msclPINVOKE.CfcFilters_setitem(swigCPtr, index, (int)val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(CfcFilters values) { + msclPINVOKE.CfcFilters_AddRange(swigCPtr, CfcFilters.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CfcFilters GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.CfcFilters_GetRange(swigCPtr, index, count); + CfcFilters ret = (cPtr == global::System.IntPtr.Zero) ? null : new CfcFilters(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, WirelessTypes.ChannelFrequencyClass x) { + msclPINVOKE.CfcFilters_Insert(swigCPtr, index, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, CfcFilters values) { + msclPINVOKE.CfcFilters_InsertRange(swigCPtr, index, CfcFilters.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.CfcFilters_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.CfcFilters_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static CfcFilters Repeat(WirelessTypes.ChannelFrequencyClass value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.CfcFilters_Repeat((int)value, count); + CfcFilters ret = (cPtr == global::System.IntPtr.Zero) ? null : new CfcFilters(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.CfcFilters_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.CfcFilters_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, CfcFilters values) { + msclPINVOKE.CfcFilters_SetRange(swigCPtr, index, CfcFilters.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/CommPortInfo.cs b/MSCL_Managed/mscl/CommPortInfo.cs index d7d479fe7..1f5fcf0a2 100644 --- a/MSCL_Managed/mscl/CommPortInfo.cs +++ b/MSCL_Managed/mscl/CommPortInfo.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class CommPortInfo : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal CommPortInfo(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CommPortInfo obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~CommPortInfo() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_CommPortInfo(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public CommPortInfo(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (DeviceCommPort element in c) { - this.Add(element); - } - } - - public CommPortInfo(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (DeviceCommPort element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public DeviceCommPort this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(DeviceCommPort[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(DeviceCommPort[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, DeviceCommPort[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new CommPortInfoEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new CommPortInfoEnumerator(this); - } - - public CommPortInfoEnumerator GetEnumerator() { - return new CommPortInfoEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class CommPortInfoEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private CommPortInfo collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public CommPortInfoEnumerator(CommPortInfo collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public DeviceCommPort Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (DeviceCommPort)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.CommPortInfo_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(DeviceCommPort x) { - msclPINVOKE.CommPortInfo_Add(swigCPtr, DeviceCommPort.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.CommPortInfo_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.CommPortInfo_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.CommPortInfo_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CommPortInfo() : this(msclPINVOKE.new_CommPortInfo__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CommPortInfo(CommPortInfo other) : this(msclPINVOKE.new_CommPortInfo__SWIG_1(CommPortInfo.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CommPortInfo(int capacity) : this(msclPINVOKE.new_CommPortInfo__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private DeviceCommPort getitemcopy(int index) { - DeviceCommPort ret = new DeviceCommPort(msclPINVOKE.CommPortInfo_getitemcopy(swigCPtr, index), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private DeviceCommPort getitem(int index) { - DeviceCommPort ret = new DeviceCommPort(msclPINVOKE.CommPortInfo_getitem(swigCPtr, index), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, DeviceCommPort val) { - msclPINVOKE.CommPortInfo_setitem(swigCPtr, index, DeviceCommPort.getCPtr(val)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(CommPortInfo values) { - msclPINVOKE.CommPortInfo_AddRange(swigCPtr, CommPortInfo.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public CommPortInfo GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.CommPortInfo_GetRange(swigCPtr, index, count); - CommPortInfo ret = (cPtr == global::System.IntPtr.Zero) ? null : new CommPortInfo(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, DeviceCommPort x) { - msclPINVOKE.CommPortInfo_Insert(swigCPtr, index, DeviceCommPort.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, CommPortInfo values) { - msclPINVOKE.CommPortInfo_InsertRange(swigCPtr, index, CommPortInfo.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.CommPortInfo_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.CommPortInfo_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static CommPortInfo Repeat(DeviceCommPort value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.CommPortInfo_Repeat(DeviceCommPort.getCPtr(value), count); - CommPortInfo ret = (cPtr == global::System.IntPtr.Zero) ? null : new CommPortInfo(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.CommPortInfo_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.CommPortInfo_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, CommPortInfo values) { - msclPINVOKE.CommPortInfo_SetRange(swigCPtr, index, CommPortInfo.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class CommPortInfo : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal CommPortInfo(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CommPortInfo obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~CommPortInfo() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_CommPortInfo(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public CommPortInfo(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (DeviceCommPort element in c) { + this.Add(element); + } + } + + public CommPortInfo(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (DeviceCommPort element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public DeviceCommPort this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(DeviceCommPort[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(DeviceCommPort[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, DeviceCommPort[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new CommPortInfoEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new CommPortInfoEnumerator(this); + } + + public CommPortInfoEnumerator GetEnumerator() { + return new CommPortInfoEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class CommPortInfoEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private CommPortInfo collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public CommPortInfoEnumerator(CommPortInfo collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public DeviceCommPort Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (DeviceCommPort)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.CommPortInfo_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(DeviceCommPort x) { + msclPINVOKE.CommPortInfo_Add(swigCPtr, DeviceCommPort.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.CommPortInfo_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.CommPortInfo_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.CommPortInfo_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CommPortInfo() : this(msclPINVOKE.new_CommPortInfo__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CommPortInfo(CommPortInfo other) : this(msclPINVOKE.new_CommPortInfo__SWIG_1(CommPortInfo.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CommPortInfo(int capacity) : this(msclPINVOKE.new_CommPortInfo__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private DeviceCommPort getitemcopy(int index) { + DeviceCommPort ret = new DeviceCommPort(msclPINVOKE.CommPortInfo_getitemcopy(swigCPtr, index), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private DeviceCommPort getitem(int index) { + DeviceCommPort ret = new DeviceCommPort(msclPINVOKE.CommPortInfo_getitem(swigCPtr, index), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, DeviceCommPort val) { + msclPINVOKE.CommPortInfo_setitem(swigCPtr, index, DeviceCommPort.getCPtr(val)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(CommPortInfo values) { + msclPINVOKE.CommPortInfo_AddRange(swigCPtr, CommPortInfo.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public CommPortInfo GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.CommPortInfo_GetRange(swigCPtr, index, count); + CommPortInfo ret = (cPtr == global::System.IntPtr.Zero) ? null : new CommPortInfo(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, DeviceCommPort x) { + msclPINVOKE.CommPortInfo_Insert(swigCPtr, index, DeviceCommPort.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, CommPortInfo values) { + msclPINVOKE.CommPortInfo_InsertRange(swigCPtr, index, CommPortInfo.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.CommPortInfo_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.CommPortInfo_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static CommPortInfo Repeat(DeviceCommPort value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.CommPortInfo_Repeat(DeviceCommPort.getCPtr(value), count); + CommPortInfo ret = (cPtr == global::System.IntPtr.Zero) ? null : new CommPortInfo(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.CommPortInfo_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.CommPortInfo_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, CommPortInfo values) { + msclPINVOKE.CommPortInfo_SetRange(swigCPtr, index, CommPortInfo.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/DeviceCommPort.cs b/MSCL_Managed/mscl/DeviceCommPort.cs index 24213792a..fc292890e 100644 --- a/MSCL_Managed/mscl/DeviceCommPort.cs +++ b/MSCL_Managed/mscl/DeviceCommPort.cs @@ -1,86 +1,86 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class DeviceCommPort : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal DeviceCommPort(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceCommPort obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~DeviceCommPort() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_DeviceCommPort(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public DeviceCommPort() : this(msclPINVOKE.new_DeviceCommPort__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public DeviceCommPort(DeviceCommPort.Type portType, byte portId) : this(msclPINVOKE.new_DeviceCommPort__SWIG_1((int)portType, portId), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public DeviceCommPort.Type type { - set { - msclPINVOKE.DeviceCommPort_type_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - DeviceCommPort.Type ret = (DeviceCommPort.Type)msclPINVOKE.DeviceCommPort_type_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public byte id { - set { - msclPINVOKE.DeviceCommPort_id_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - byte ret = msclPINVOKE.DeviceCommPort_id_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public enum Type { - PRIMARY = 0, - AUX = 1 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class DeviceCommPort : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal DeviceCommPort(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceCommPort obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~DeviceCommPort() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_DeviceCommPort(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public DeviceCommPort() : this(msclPINVOKE.new_DeviceCommPort__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public DeviceCommPort(DeviceCommPort.Type portType, byte portId) : this(msclPINVOKE.new_DeviceCommPort__SWIG_1((int)portType, portId), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public DeviceCommPort.Type type { + set { + msclPINVOKE.DeviceCommPort_type_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + DeviceCommPort.Type ret = (DeviceCommPort.Type)msclPINVOKE.DeviceCommPort_type_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public byte id { + set { + msclPINVOKE.DeviceCommPort_id_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + byte ret = msclPINVOKE.DeviceCommPort_id_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public enum Type { + PRIMARY = 0, + AUX = 1 + } + +} + +} diff --git a/MSCL_Managed/mscl/DeviceStatusMap.cs b/MSCL_Managed/mscl/DeviceStatusMap.cs index d35d03d3b..bdd345668 100644 --- a/MSCL_Managed/mscl/DeviceStatusMap.cs +++ b/MSCL_Managed/mscl/DeviceStatusMap.cs @@ -1,301 +1,301 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class DeviceStatusMap : global::System.IDisposable - , global::System.Collections.Generic.IDictionary - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal DeviceStatusMap(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceStatusMap obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~DeviceStatusMap() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_DeviceStatusMap(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - - public string this[DeviceStatusValues key] { - get { - return getitem(key); - } - - set { - setitem(key, value); - } - } - - public bool TryGetValue(DeviceStatusValues key, out string value) { - if (this.ContainsKey(key)) { - value = this[key]; - return true; - } - value = default(string); - return false; - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public global::System.Collections.Generic.ICollection Keys { - get { - global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); - int size = this.Count; - if (size > 0) { - global::System.IntPtr iter = create_iterator_begin(); - for (int i = 0; i < size; i++) { - keys.Add(get_next_key(iter)); - } - destroy_iterator(iter); - } - return keys; - } - } - - public global::System.Collections.Generic.ICollection Values { - get { - global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); - foreach (global::System.Collections.Generic.KeyValuePair pair in this) { - vals.Add(pair.Value); - } - return vals; - } - } - - public void Add(global::System.Collections.Generic.KeyValuePair item) { - Add(item.Key, item.Value); - } - - public bool Remove(global::System.Collections.Generic.KeyValuePair item) { - if (Contains(item)) { - return Remove(item.Key); - } else { - return false; - } - } - - public bool Contains(global::System.Collections.Generic.KeyValuePair item) { - if (this[item.Key] == item.Value) { - return true; - } else { - return false; - } - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { - CopyTo(array, 0); - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (arrayIndex+this.Count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - - global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); - for (int i = 0; i < keyList.Count; i++) { - DeviceStatusValues currentKey = keyList[i]; - array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); - } - } - - global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { - return new DeviceStatusMapEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new DeviceStatusMapEnumerator(this); - } - - public DeviceStatusMapEnumerator GetEnumerator() { - return new DeviceStatusMapEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class DeviceStatusMapEnumerator : global::System.Collections.IEnumerator, - global::System.Collections.Generic.IEnumerator> - { - private DeviceStatusMap collectionRef; - private global::System.Collections.Generic.IList keyCollection; - private int currentIndex; - private object currentObject; - private int currentSize; - - public DeviceStatusMapEnumerator(DeviceStatusMap collection) { - collectionRef = collection; - keyCollection = new global::System.Collections.Generic.List(collection.Keys); - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public global::System.Collections.Generic.KeyValuePair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (global::System.Collections.Generic.KeyValuePair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - DeviceStatusValues currentKey = keyCollection[currentIndex]; - currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - - public DeviceStatusMap() : this(msclPINVOKE.new_DeviceStatusMap__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public DeviceStatusMap(DeviceStatusMap other) : this(msclPINVOKE.new_DeviceStatusMap__SWIG_1(DeviceStatusMap.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.DeviceStatusMap_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool empty() { - bool ret = msclPINVOKE.DeviceStatusMap_empty(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Clear() { - msclPINVOKE.DeviceStatusMap_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private string getitem(DeviceStatusValues key) { - string ret = msclPINVOKE.DeviceStatusMap_getitem(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(DeviceStatusValues key, string x) { - msclPINVOKE.DeviceStatusMap_setitem(swigCPtr, (int)key, x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ContainsKey(DeviceStatusValues key) { - bool ret = msclPINVOKE.DeviceStatusMap_ContainsKey(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Add(DeviceStatusValues key, string value) { - msclPINVOKE.DeviceStatusMap_Add(swigCPtr, (int)key, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Remove(DeviceStatusValues key) { - bool ret = msclPINVOKE.DeviceStatusMap_Remove(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private global::System.IntPtr create_iterator_begin() { - global::System.IntPtr ret = msclPINVOKE.DeviceStatusMap_create_iterator_begin(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private DeviceStatusValues get_next_key(global::System.IntPtr swigiterator) { - DeviceStatusValues ret = (DeviceStatusValues)msclPINVOKE.DeviceStatusMap_get_next_key(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void destroy_iterator(global::System.IntPtr swigiterator) { - msclPINVOKE.DeviceStatusMap_destroy_iterator(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class DeviceStatusMap : global::System.IDisposable + , global::System.Collections.Generic.IDictionary + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal DeviceStatusMap(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceStatusMap obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~DeviceStatusMap() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_DeviceStatusMap(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + + public string this[DeviceStatusValues key] { + get { + return getitem(key); + } + + set { + setitem(key, value); + } + } + + public bool TryGetValue(DeviceStatusValues key, out string value) { + if (this.ContainsKey(key)) { + value = this[key]; + return true; + } + value = default(string); + return false; + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public global::System.Collections.Generic.ICollection Keys { + get { + global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); + int size = this.Count; + if (size > 0) { + global::System.IntPtr iter = create_iterator_begin(); + for (int i = 0; i < size; i++) { + keys.Add(get_next_key(iter)); + } + destroy_iterator(iter); + } + return keys; + } + } + + public global::System.Collections.Generic.ICollection Values { + get { + global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); + foreach (global::System.Collections.Generic.KeyValuePair pair in this) { + vals.Add(pair.Value); + } + return vals; + } + } + + public void Add(global::System.Collections.Generic.KeyValuePair item) { + Add(item.Key, item.Value); + } + + public bool Remove(global::System.Collections.Generic.KeyValuePair item) { + if (Contains(item)) { + return Remove(item.Key); + } else { + return false; + } + } + + public bool Contains(global::System.Collections.Generic.KeyValuePair item) { + if (this[item.Key] == item.Value) { + return true; + } else { + return false; + } + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { + CopyTo(array, 0); + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (arrayIndex+this.Count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + + global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); + for (int i = 0; i < keyList.Count; i++) { + DeviceStatusValues currentKey = keyList[i]; + array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); + } + } + + global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { + return new DeviceStatusMapEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new DeviceStatusMapEnumerator(this); + } + + public DeviceStatusMapEnumerator GetEnumerator() { + return new DeviceStatusMapEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class DeviceStatusMapEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator> + { + private DeviceStatusMap collectionRef; + private global::System.Collections.Generic.IList keyCollection; + private int currentIndex; + private object currentObject; + private int currentSize; + + public DeviceStatusMapEnumerator(DeviceStatusMap collection) { + collectionRef = collection; + keyCollection = new global::System.Collections.Generic.List(collection.Keys); + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public global::System.Collections.Generic.KeyValuePair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (global::System.Collections.Generic.KeyValuePair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + DeviceStatusValues currentKey = keyCollection[currentIndex]; + currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + + public DeviceStatusMap() : this(msclPINVOKE.new_DeviceStatusMap__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public DeviceStatusMap(DeviceStatusMap other) : this(msclPINVOKE.new_DeviceStatusMap__SWIG_1(DeviceStatusMap.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.DeviceStatusMap_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool empty() { + bool ret = msclPINVOKE.DeviceStatusMap_empty(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Clear() { + msclPINVOKE.DeviceStatusMap_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private string getitem(DeviceStatusValues key) { + string ret = msclPINVOKE.DeviceStatusMap_getitem(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(DeviceStatusValues key, string x) { + msclPINVOKE.DeviceStatusMap_setitem(swigCPtr, (int)key, x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ContainsKey(DeviceStatusValues key) { + bool ret = msclPINVOKE.DeviceStatusMap_ContainsKey(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Add(DeviceStatusValues key, string value) { + msclPINVOKE.DeviceStatusMap_Add(swigCPtr, (int)key, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Remove(DeviceStatusValues key) { + bool ret = msclPINVOKE.DeviceStatusMap_Remove(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private global::System.IntPtr create_iterator_begin() { + global::System.IntPtr ret = msclPINVOKE.DeviceStatusMap_create_iterator_begin(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private DeviceStatusValues get_next_key(global::System.IntPtr swigiterator) { + DeviceStatusValues ret = (DeviceStatusValues)msclPINVOKE.DeviceStatusMap_get_next_key(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void destroy_iterator(global::System.IntPtr swigiterator) { + msclPINVOKE.DeviceStatusMap_destroy_iterator(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/DeviceStatusValueMap.cs b/MSCL_Managed/mscl/DeviceStatusValueMap.cs index 4af07f4c2..df5e5ce09 100644 --- a/MSCL_Managed/mscl/DeviceStatusValueMap.cs +++ b/MSCL_Managed/mscl/DeviceStatusValueMap.cs @@ -1,301 +1,301 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class DeviceStatusValueMap : global::System.IDisposable - , global::System.Collections.Generic.IDictionary - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal DeviceStatusValueMap(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceStatusValueMap obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~DeviceStatusValueMap() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_DeviceStatusValueMap(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - - public Value this[DeviceStatusValues key] { - get { - return getitem(key); - } - - set { - setitem(key, value); - } - } - - public bool TryGetValue(DeviceStatusValues key, out Value value) { - if (this.ContainsKey(key)) { - value = this[key]; - return true; - } - value = default(Value); - return false; - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public global::System.Collections.Generic.ICollection Keys { - get { - global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); - int size = this.Count; - if (size > 0) { - global::System.IntPtr iter = create_iterator_begin(); - for (int i = 0; i < size; i++) { - keys.Add(get_next_key(iter)); - } - destroy_iterator(iter); - } - return keys; - } - } - - public global::System.Collections.Generic.ICollection Values { - get { - global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); - foreach (global::System.Collections.Generic.KeyValuePair pair in this) { - vals.Add(pair.Value); - } - return vals; - } - } - - public void Add(global::System.Collections.Generic.KeyValuePair item) { - Add(item.Key, item.Value); - } - - public bool Remove(global::System.Collections.Generic.KeyValuePair item) { - if (Contains(item)) { - return Remove(item.Key); - } else { - return false; - } - } - - public bool Contains(global::System.Collections.Generic.KeyValuePair item) { - if (this[item.Key] == item.Value) { - return true; - } else { - return false; - } - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { - CopyTo(array, 0); - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (arrayIndex+this.Count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - - global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); - for (int i = 0; i < keyList.Count; i++) { - DeviceStatusValues currentKey = keyList[i]; - array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); - } - } - - global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { - return new DeviceStatusValueMapEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new DeviceStatusValueMapEnumerator(this); - } - - public DeviceStatusValueMapEnumerator GetEnumerator() { - return new DeviceStatusValueMapEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class DeviceStatusValueMapEnumerator : global::System.Collections.IEnumerator, - global::System.Collections.Generic.IEnumerator> - { - private DeviceStatusValueMap collectionRef; - private global::System.Collections.Generic.IList keyCollection; - private int currentIndex; - private object currentObject; - private int currentSize; - - public DeviceStatusValueMapEnumerator(DeviceStatusValueMap collection) { - collectionRef = collection; - keyCollection = new global::System.Collections.Generic.List(collection.Keys); - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public global::System.Collections.Generic.KeyValuePair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (global::System.Collections.Generic.KeyValuePair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - DeviceStatusValues currentKey = keyCollection[currentIndex]; - currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - - public DeviceStatusValueMap() : this(msclPINVOKE.new_DeviceStatusValueMap__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public DeviceStatusValueMap(DeviceStatusValueMap other) : this(msclPINVOKE.new_DeviceStatusValueMap__SWIG_1(DeviceStatusValueMap.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.DeviceStatusValueMap_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool empty() { - bool ret = msclPINVOKE.DeviceStatusValueMap_empty(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Clear() { - msclPINVOKE.DeviceStatusValueMap_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private Value getitem(DeviceStatusValues key) { - Value ret = new Value(msclPINVOKE.DeviceStatusValueMap_getitem(swigCPtr, (int)key), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(DeviceStatusValues key, Value x) { - msclPINVOKE.DeviceStatusValueMap_setitem(swigCPtr, (int)key, Value.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ContainsKey(DeviceStatusValues key) { - bool ret = msclPINVOKE.DeviceStatusValueMap_ContainsKey(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Add(DeviceStatusValues key, Value value) { - msclPINVOKE.DeviceStatusValueMap_Add(swigCPtr, (int)key, Value.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Remove(DeviceStatusValues key) { - bool ret = msclPINVOKE.DeviceStatusValueMap_Remove(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private global::System.IntPtr create_iterator_begin() { - global::System.IntPtr ret = msclPINVOKE.DeviceStatusValueMap_create_iterator_begin(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private DeviceStatusValues get_next_key(global::System.IntPtr swigiterator) { - DeviceStatusValues ret = (DeviceStatusValues)msclPINVOKE.DeviceStatusValueMap_get_next_key(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void destroy_iterator(global::System.IntPtr swigiterator) { - msclPINVOKE.DeviceStatusValueMap_destroy_iterator(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class DeviceStatusValueMap : global::System.IDisposable + , global::System.Collections.Generic.IDictionary + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal DeviceStatusValueMap(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DeviceStatusValueMap obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~DeviceStatusValueMap() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_DeviceStatusValueMap(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + + public Value this[DeviceStatusValues key] { + get { + return getitem(key); + } + + set { + setitem(key, value); + } + } + + public bool TryGetValue(DeviceStatusValues key, out Value value) { + if (this.ContainsKey(key)) { + value = this[key]; + return true; + } + value = default(Value); + return false; + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public global::System.Collections.Generic.ICollection Keys { + get { + global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); + int size = this.Count; + if (size > 0) { + global::System.IntPtr iter = create_iterator_begin(); + for (int i = 0; i < size; i++) { + keys.Add(get_next_key(iter)); + } + destroy_iterator(iter); + } + return keys; + } + } + + public global::System.Collections.Generic.ICollection Values { + get { + global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); + foreach (global::System.Collections.Generic.KeyValuePair pair in this) { + vals.Add(pair.Value); + } + return vals; + } + } + + public void Add(global::System.Collections.Generic.KeyValuePair item) { + Add(item.Key, item.Value); + } + + public bool Remove(global::System.Collections.Generic.KeyValuePair item) { + if (Contains(item)) { + return Remove(item.Key); + } else { + return false; + } + } + + public bool Contains(global::System.Collections.Generic.KeyValuePair item) { + if (this[item.Key] == item.Value) { + return true; + } else { + return false; + } + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { + CopyTo(array, 0); + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (arrayIndex+this.Count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + + global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); + for (int i = 0; i < keyList.Count; i++) { + DeviceStatusValues currentKey = keyList[i]; + array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); + } + } + + global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { + return new DeviceStatusValueMapEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new DeviceStatusValueMapEnumerator(this); + } + + public DeviceStatusValueMapEnumerator GetEnumerator() { + return new DeviceStatusValueMapEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class DeviceStatusValueMapEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator> + { + private DeviceStatusValueMap collectionRef; + private global::System.Collections.Generic.IList keyCollection; + private int currentIndex; + private object currentObject; + private int currentSize; + + public DeviceStatusValueMapEnumerator(DeviceStatusValueMap collection) { + collectionRef = collection; + keyCollection = new global::System.Collections.Generic.List(collection.Keys); + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public global::System.Collections.Generic.KeyValuePair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (global::System.Collections.Generic.KeyValuePair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + DeviceStatusValues currentKey = keyCollection[currentIndex]; + currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + + public DeviceStatusValueMap() : this(msclPINVOKE.new_DeviceStatusValueMap__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public DeviceStatusValueMap(DeviceStatusValueMap other) : this(msclPINVOKE.new_DeviceStatusValueMap__SWIG_1(DeviceStatusValueMap.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.DeviceStatusValueMap_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool empty() { + bool ret = msclPINVOKE.DeviceStatusValueMap_empty(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Clear() { + msclPINVOKE.DeviceStatusValueMap_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private Value getitem(DeviceStatusValues key) { + Value ret = new Value(msclPINVOKE.DeviceStatusValueMap_getitem(swigCPtr, (int)key), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(DeviceStatusValues key, Value x) { + msclPINVOKE.DeviceStatusValueMap_setitem(swigCPtr, (int)key, Value.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ContainsKey(DeviceStatusValues key) { + bool ret = msclPINVOKE.DeviceStatusValueMap_ContainsKey(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Add(DeviceStatusValues key, Value value) { + msclPINVOKE.DeviceStatusValueMap_Add(swigCPtr, (int)key, Value.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Remove(DeviceStatusValues key) { + bool ret = msclPINVOKE.DeviceStatusValueMap_Remove(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private global::System.IntPtr create_iterator_begin() { + global::System.IntPtr ret = msclPINVOKE.DeviceStatusValueMap_create_iterator_begin(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private DeviceStatusValues get_next_key(global::System.IntPtr swigiterator) { + DeviceStatusValues ret = (DeviceStatusValues)msclPINVOKE.DeviceStatusValueMap_get_next_key(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void destroy_iterator(global::System.IntPtr swigiterator) { + msclPINVOKE.DeviceStatusValueMap_destroy_iterator(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/DeviceStatusValues.cs b/MSCL_Managed/mscl/DeviceStatusValues.cs index fe29b09d1..0a603b673 100644 --- a/MSCL_Managed/mscl/DeviceStatusValues.cs +++ b/MSCL_Managed/mscl/DeviceStatusValues.cs @@ -1,46 +1,46 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public enum DeviceStatusValues { - ModelNumber, - StatusStructure_Value, - SystemState_Value, - gnss1PpsPulseInfo_Count, - gnss1PpsPulseInfo_LastTimeinMS, - GnssPowerStateOn, - ImuStreamInfo_Enabled, - ImuStreamInfo_PacketsDropped, - GnssStreamInfo_Enabled, - GnssStreamInfo_PacketsDropped, - EstimationFilterStreamInfo_Enabled, - EstimationFilterStreamInfo_PacketsDropped, - ComPortInfo_BytesRead, - ComPortInfo_BytesWritten, - ComPortInfo_OverrunsOnRead, - ComPortInfo_OverrunsOnWrite, - ImuMessageInfo_LastMessageReadinMS, - ImuMessageInfo_MessageParsingErrors, - ImuMessageInfo_MessagesRead, - GnssMessageInfo_LastMessageReadinMS, - GnssMessageInfo_MessageParsingErrors, - GnssMessageInfo_MessagesRead, - TemperatureInfo_Error, - TemperatureInfo_LastReadInMS, - TemperatureInfo_OnBoardTemp, - PowerState, - GyroRange, - AccelRange, - HasMagnetometer, - HasPressure -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public enum DeviceStatusValues { + ModelNumber, + StatusStructure_Value, + SystemState_Value, + gnss1PpsPulseInfo_Count, + gnss1PpsPulseInfo_LastTimeinMS, + GnssPowerStateOn, + ImuStreamInfo_Enabled, + ImuStreamInfo_PacketsDropped, + GnssStreamInfo_Enabled, + GnssStreamInfo_PacketsDropped, + EstimationFilterStreamInfo_Enabled, + EstimationFilterStreamInfo_PacketsDropped, + ComPortInfo_BytesRead, + ComPortInfo_BytesWritten, + ComPortInfo_OverrunsOnRead, + ComPortInfo_OverrunsOnWrite, + ImuMessageInfo_LastMessageReadinMS, + ImuMessageInfo_MessageParsingErrors, + ImuMessageInfo_MessagesRead, + GnssMessageInfo_LastMessageReadinMS, + GnssMessageInfo_MessageParsingErrors, + GnssMessageInfo_MessagesRead, + TemperatureInfo_Error, + TemperatureInfo_LastReadInMS, + TemperatureInfo_OnBoardTemp, + PowerState, + GyroRange, + AccelRange, + HasMagnetometer, + HasPressure +} + +} diff --git a/MSCL_Managed/mscl/FilterInitialValuesSource.cs b/MSCL_Managed/mscl/FilterInitialValuesSource.cs index 0e9f5cc1c..453717e35 100644 --- a/MSCL_Managed/mscl/FilterInitialValuesSource.cs +++ b/MSCL_Managed/mscl/FilterInitialValuesSource.cs @@ -1,20 +1,20 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public enum FilterInitialValuesSource { - Automatic = 0, - UserSpecified_Heading = 1, - UserSpecified_Attitude = 2, - UserSpecified_All = 3 -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public enum FilterInitialValuesSource { + Automatic = 0, + UserSpecified_Heading = 1, + UserSpecified_Attitude = 2, + UserSpecified_All = 3 +} + +} diff --git a/MSCL_Managed/mscl/FilterInitializationValues.cs b/MSCL_Managed/mscl/FilterInitializationValues.cs index b7b940cc7..c05093ae8 100644 --- a/MSCL_Managed/mscl/FilterInitializationValues.cs +++ b/MSCL_Managed/mscl/FilterInitializationValues.cs @@ -1,159 +1,159 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class FilterInitializationValues : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal FilterInitializationValues(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FilterInitializationValues obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~FilterInitializationValues() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_FilterInitializationValues(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public FilterInitializationValues() : this(msclPINVOKE.new_FilterInitializationValues(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool autoInitialize { - set { - msclPINVOKE.FilterInitializationValues_autoInitialize_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - bool ret = msclPINVOKE.FilterInitializationValues_autoInitialize_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public FilterInitialValuesSource initialValuesSource { - set { - msclPINVOKE.FilterInitializationValues_initialValuesSource_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - FilterInitialValuesSource ret = (FilterInitialValuesSource)msclPINVOKE.FilterInitializationValues_initialValuesSource_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public HeadingAlignmentMethod autoHeadingAlignmentMethod { - set { - msclPINVOKE.FilterInitializationValues_autoHeadingAlignmentMethod_set(swigCPtr, HeadingAlignmentMethod.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_autoHeadingAlignmentMethod_get(swigCPtr); - HeadingAlignmentMethod ret = (cPtr == global::System.IntPtr.Zero) ? null : new HeadingAlignmentMethod(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public EulerAngles initialAttitude { - set { - msclPINVOKE.FilterInitializationValues_initialAttitude_set(swigCPtr, EulerAngles.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_initialAttitude_get(swigCPtr); - EulerAngles ret = (cPtr == global::System.IntPtr.Zero) ? null : new EulerAngles(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Position initialPosition { - set { - msclPINVOKE.FilterInitializationValues_initialPosition_set(swigCPtr, Position.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_initialPosition_get(swigCPtr); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public GeometricVector initialVelocity { - set { - msclPINVOKE.FilterInitializationValues_initialVelocity_set(swigCPtr, GeometricVector.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_initialVelocity_get(swigCPtr); - GeometricVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new GeometricVector(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public PositionVelocityReferenceFrame referenceFrame { - set { - msclPINVOKE.FilterInitializationValues_referenceFrame_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - PositionVelocityReferenceFrame ret = (PositionVelocityReferenceFrame)msclPINVOKE.FilterInitializationValues_referenceFrame_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public bool manualHeading() { - bool ret = msclPINVOKE.FilterInitializationValues_manualHeading(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool manualAttitude() { - bool ret = msclPINVOKE.FilterInitializationValues_manualAttitude(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool manualPositionVelocity() { - bool ret = msclPINVOKE.FilterInitializationValues_manualPositionVelocity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class FilterInitializationValues : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal FilterInitializationValues(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FilterInitializationValues obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~FilterInitializationValues() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_FilterInitializationValues(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public FilterInitializationValues() : this(msclPINVOKE.new_FilterInitializationValues(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool autoInitialize { + set { + msclPINVOKE.FilterInitializationValues_autoInitialize_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + bool ret = msclPINVOKE.FilterInitializationValues_autoInitialize_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public FilterInitialValuesSource initialValuesSource { + set { + msclPINVOKE.FilterInitializationValues_initialValuesSource_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + FilterInitialValuesSource ret = (FilterInitialValuesSource)msclPINVOKE.FilterInitializationValues_initialValuesSource_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public HeadingAlignmentMethod autoHeadingAlignmentMethod { + set { + msclPINVOKE.FilterInitializationValues_autoHeadingAlignmentMethod_set(swigCPtr, HeadingAlignmentMethod.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_autoHeadingAlignmentMethod_get(swigCPtr); + HeadingAlignmentMethod ret = (cPtr == global::System.IntPtr.Zero) ? null : new HeadingAlignmentMethod(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public EulerAngles initialAttitude { + set { + msclPINVOKE.FilterInitializationValues_initialAttitude_set(swigCPtr, EulerAngles.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_initialAttitude_get(swigCPtr); + EulerAngles ret = (cPtr == global::System.IntPtr.Zero) ? null : new EulerAngles(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Position initialPosition { + set { + msclPINVOKE.FilterInitializationValues_initialPosition_set(swigCPtr, Position.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_initialPosition_get(swigCPtr); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public GeometricVector initialVelocity { + set { + msclPINVOKE.FilterInitializationValues_initialVelocity_set(swigCPtr, GeometricVector.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.FilterInitializationValues_initialVelocity_get(swigCPtr); + GeometricVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new GeometricVector(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public PositionVelocityReferenceFrame referenceFrame { + set { + msclPINVOKE.FilterInitializationValues_referenceFrame_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + PositionVelocityReferenceFrame ret = (PositionVelocityReferenceFrame)msclPINVOKE.FilterInitializationValues_referenceFrame_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public bool manualHeading() { + bool ret = msclPINVOKE.FilterInitializationValues_manualHeading(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool manualAttitude() { + bool ret = msclPINVOKE.FilterInitializationValues_manualAttitude(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool manualPositionVelocity() { + bool ret = msclPINVOKE.FilterInitializationValues_manualPositionVelocity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + +} + +} diff --git a/MSCL_Managed/mscl/GnssAidingStatus.cs b/MSCL_Managed/mscl/GnssAidingStatus.cs index f3f700c3e..e832e52ab 100644 --- a/MSCL_Managed/mscl/GnssAidingStatus.cs +++ b/MSCL_Managed/mscl/GnssAidingStatus.cs @@ -1,23 +1,23 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public enum GnssAidingStatus { - GNSS_AIDING_TIGHT_COUPLING = 0x0001, - GNSS_AIDING_DIFFERENTIAL = 0x0002, - GNSS_AIDING_INTEGER_FIX = 0x0004, - GNSS_AIDING_GPS = 0x0018, - GNSS_AIDING_GLONASS = 0x0060, - GNSS_AIDING_GALILEO = 0x0180, - GNSS_AIDING_BEIDOU = 0x0600 -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public enum GnssAidingStatus { + GNSS_AIDING_TIGHT_COUPLING = 0x0001, + GNSS_AIDING_DIFFERENTIAL = 0x0002, + GNSS_AIDING_INTEGER_FIX = 0x0004, + GNSS_AIDING_GPS = 0x0018, + GNSS_AIDING_GLONASS = 0x0060, + GNSS_AIDING_GALILEO = 0x0180, + GNSS_AIDING_BEIDOU = 0x0600 +} + +} diff --git a/MSCL_Managed/mscl/GnssReceiverInfo.cs b/MSCL_Managed/mscl/GnssReceiverInfo.cs index 3557d6b80..d21bda1a3 100644 --- a/MSCL_Managed/mscl/GnssReceiverInfo.cs +++ b/MSCL_Managed/mscl/GnssReceiverInfo.cs @@ -1,93 +1,93 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GnssReceiverInfo : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GnssReceiverInfo(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GnssReceiverInfo obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GnssReceiverInfo() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GnssReceiverInfo(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public GnssReceiverInfo() : this(msclPINVOKE.new_GnssReceiverInfo__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GnssReceiverInfo(byte recId, MipTypes.DataClass target, string desc) : this(msclPINVOKE.new_GnssReceiverInfo__SWIG_1(recId, (int)target, desc), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte id { - set { - msclPINVOKE.GnssReceiverInfo_id_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - byte ret = msclPINVOKE.GnssReceiverInfo_id_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public MipTypes.DataClass targetDataClass { - set { - msclPINVOKE.GnssReceiverInfo_targetDataClass_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - MipTypes.DataClass ret = (MipTypes.DataClass)msclPINVOKE.GnssReceiverInfo_targetDataClass_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public string description { - set { - msclPINVOKE.GnssReceiverInfo_description_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - string ret = msclPINVOKE.GnssReceiverInfo_description_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GnssReceiverInfo : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GnssReceiverInfo(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GnssReceiverInfo obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GnssReceiverInfo() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GnssReceiverInfo(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public GnssReceiverInfo() : this(msclPINVOKE.new_GnssReceiverInfo__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GnssReceiverInfo(byte recId, MipTypes.DataClass target, string desc) : this(msclPINVOKE.new_GnssReceiverInfo__SWIG_1(recId, (int)target, desc), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte id { + set { + msclPINVOKE.GnssReceiverInfo_id_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + byte ret = msclPINVOKE.GnssReceiverInfo_id_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public MipTypes.DataClass targetDataClass { + set { + msclPINVOKE.GnssReceiverInfo_targetDataClass_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + MipTypes.DataClass ret = (MipTypes.DataClass)msclPINVOKE.GnssReceiverInfo_targetDataClass_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public string description { + set { + msclPINVOKE.GnssReceiverInfo_description_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + string ret = msclPINVOKE.GnssReceiverInfo_description_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + +} + +} diff --git a/MSCL_Managed/mscl/GnssReceivers.cs b/MSCL_Managed/mscl/GnssReceivers.cs index 26ab6fb48..42ab82ad6 100644 --- a/MSCL_Managed/mscl/GnssReceivers.cs +++ b/MSCL_Managed/mscl/GnssReceivers.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GnssReceivers : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GnssReceivers(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GnssReceivers obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GnssReceivers() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GnssReceivers(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public GnssReceivers(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (GnssReceiverInfo element in c) { - this.Add(element); - } - } - - public GnssReceivers(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (GnssReceiverInfo element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public GnssReceiverInfo this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(GnssReceiverInfo[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(GnssReceiverInfo[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, GnssReceiverInfo[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new GnssReceiversEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new GnssReceiversEnumerator(this); - } - - public GnssReceiversEnumerator GetEnumerator() { - return new GnssReceiversEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class GnssReceiversEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private GnssReceivers collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public GnssReceiversEnumerator(GnssReceivers collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public GnssReceiverInfo Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (GnssReceiverInfo)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.GnssReceivers_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(GnssReceiverInfo x) { - msclPINVOKE.GnssReceivers_Add(swigCPtr, GnssReceiverInfo.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.GnssReceivers_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.GnssReceivers_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.GnssReceivers_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GnssReceivers() : this(msclPINVOKE.new_GnssReceivers__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GnssReceivers(GnssReceivers other) : this(msclPINVOKE.new_GnssReceivers__SWIG_1(GnssReceivers.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GnssReceivers(int capacity) : this(msclPINVOKE.new_GnssReceivers__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private GnssReceiverInfo getitemcopy(int index) { - GnssReceiverInfo ret = new GnssReceiverInfo(msclPINVOKE.GnssReceivers_getitemcopy(swigCPtr, index), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private GnssReceiverInfo getitem(int index) { - GnssReceiverInfo ret = new GnssReceiverInfo(msclPINVOKE.GnssReceivers_getitem(swigCPtr, index), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, GnssReceiverInfo val) { - msclPINVOKE.GnssReceivers_setitem(swigCPtr, index, GnssReceiverInfo.getCPtr(val)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(GnssReceivers values) { - msclPINVOKE.GnssReceivers_AddRange(swigCPtr, GnssReceivers.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GnssReceivers GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.GnssReceivers_GetRange(swigCPtr, index, count); - GnssReceivers ret = (cPtr == global::System.IntPtr.Zero) ? null : new GnssReceivers(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, GnssReceiverInfo x) { - msclPINVOKE.GnssReceivers_Insert(swigCPtr, index, GnssReceiverInfo.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, GnssReceivers values) { - msclPINVOKE.GnssReceivers_InsertRange(swigCPtr, index, GnssReceivers.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.GnssReceivers_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.GnssReceivers_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static GnssReceivers Repeat(GnssReceiverInfo value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.GnssReceivers_Repeat(GnssReceiverInfo.getCPtr(value), count); - GnssReceivers ret = (cPtr == global::System.IntPtr.Zero) ? null : new GnssReceivers(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.GnssReceivers_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.GnssReceivers_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, GnssReceivers values) { - msclPINVOKE.GnssReceivers_SetRange(swigCPtr, index, GnssReceivers.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GnssReceivers : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GnssReceivers(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GnssReceivers obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GnssReceivers() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GnssReceivers(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public GnssReceivers(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (GnssReceiverInfo element in c) { + this.Add(element); + } + } + + public GnssReceivers(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (GnssReceiverInfo element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public GnssReceiverInfo this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(GnssReceiverInfo[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(GnssReceiverInfo[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, GnssReceiverInfo[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new GnssReceiversEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new GnssReceiversEnumerator(this); + } + + public GnssReceiversEnumerator GetEnumerator() { + return new GnssReceiversEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class GnssReceiversEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private GnssReceivers collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public GnssReceiversEnumerator(GnssReceivers collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public GnssReceiverInfo Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (GnssReceiverInfo)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.GnssReceivers_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(GnssReceiverInfo x) { + msclPINVOKE.GnssReceivers_Add(swigCPtr, GnssReceiverInfo.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.GnssReceivers_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.GnssReceivers_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.GnssReceivers_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GnssReceivers() : this(msclPINVOKE.new_GnssReceivers__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GnssReceivers(GnssReceivers other) : this(msclPINVOKE.new_GnssReceivers__SWIG_1(GnssReceivers.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GnssReceivers(int capacity) : this(msclPINVOKE.new_GnssReceivers__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private GnssReceiverInfo getitemcopy(int index) { + GnssReceiverInfo ret = new GnssReceiverInfo(msclPINVOKE.GnssReceivers_getitemcopy(swigCPtr, index), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private GnssReceiverInfo getitem(int index) { + GnssReceiverInfo ret = new GnssReceiverInfo(msclPINVOKE.GnssReceivers_getitem(swigCPtr, index), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, GnssReceiverInfo val) { + msclPINVOKE.GnssReceivers_setitem(swigCPtr, index, GnssReceiverInfo.getCPtr(val)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(GnssReceivers values) { + msclPINVOKE.GnssReceivers_AddRange(swigCPtr, GnssReceivers.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GnssReceivers GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.GnssReceivers_GetRange(swigCPtr, index, count); + GnssReceivers ret = (cPtr == global::System.IntPtr.Zero) ? null : new GnssReceivers(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, GnssReceiverInfo x) { + msclPINVOKE.GnssReceivers_Insert(swigCPtr, index, GnssReceiverInfo.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, GnssReceivers values) { + msclPINVOKE.GnssReceivers_InsertRange(swigCPtr, index, GnssReceivers.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.GnssReceivers_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.GnssReceivers_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static GnssReceivers Repeat(GnssReceiverInfo value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.GnssReceivers_Repeat(GnssReceiverInfo.getCPtr(value), count); + GnssReceivers ret = (cPtr == global::System.IntPtr.Zero) ? null : new GnssReceivers(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.GnssReceivers_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.GnssReceivers_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, GnssReceivers values) { + msclPINVOKE.GnssReceivers_SetRange(swigCPtr, index, GnssReceivers.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/GnssSignalConfiguration.cs b/MSCL_Managed/mscl/GnssSignalConfiguration.cs index 2ffcf35bf..7ea7941d0 100644 --- a/MSCL_Managed/mscl/GnssSignalConfiguration.cs +++ b/MSCL_Managed/mscl/GnssSignalConfiguration.cs @@ -1,181 +1,181 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GnssSignalConfiguration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GnssSignalConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GnssSignalConfiguration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GnssSignalConfiguration() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GnssSignalConfiguration(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public GnssSignalConfiguration() : this(msclPINVOKE.new_GnssSignalConfiguration(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void enableGpsSignal(GnssSignalConfiguration.GpsSignal signal, bool enable) { - msclPINVOKE.GnssSignalConfiguration_enableGpsSignal__SWIG_0(swigCPtr, (int)signal, enable); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void enableGpsSignal(GnssSignalConfiguration.GpsSignal signal) { - msclPINVOKE.GnssSignalConfiguration_enableGpsSignal__SWIG_1(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool gpsSignalEnabled(GnssSignalConfiguration.GpsSignal signal) { - bool ret = msclPINVOKE.GnssSignalConfiguration_gpsSignalEnabled(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void gpsSignalValue(byte val) { - msclPINVOKE.GnssSignalConfiguration_gpsSignalValue__SWIG_0(swigCPtr, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte gpsSignalValue() { - byte ret = msclPINVOKE.GnssSignalConfiguration_gpsSignalValue__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void enableGlonassSignal(GnssSignalConfiguration.GlonassSignal signal, bool enable) { - msclPINVOKE.GnssSignalConfiguration_enableGlonassSignal__SWIG_0(swigCPtr, (int)signal, enable); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void enableGlonassSignal(GnssSignalConfiguration.GlonassSignal signal) { - msclPINVOKE.GnssSignalConfiguration_enableGlonassSignal__SWIG_1(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool glonassSignalEnabled(GnssSignalConfiguration.GlonassSignal signal) { - bool ret = msclPINVOKE.GnssSignalConfiguration_glonassSignalEnabled(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void glonassSignalValue(byte val) { - msclPINVOKE.GnssSignalConfiguration_glonassSignalValue__SWIG_0(swigCPtr, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte glonassSignalValue() { - byte ret = msclPINVOKE.GnssSignalConfiguration_glonassSignalValue__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void enableGalileoSignal(GnssSignalConfiguration.GalileoSignal signal, bool enable) { - msclPINVOKE.GnssSignalConfiguration_enableGalileoSignal__SWIG_0(swigCPtr, (int)signal, enable); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void enableGalileoSignal(GnssSignalConfiguration.GalileoSignal signal) { - msclPINVOKE.GnssSignalConfiguration_enableGalileoSignal__SWIG_1(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool galileoSignalEnabled(GnssSignalConfiguration.GalileoSignal signal) { - bool ret = msclPINVOKE.GnssSignalConfiguration_galileoSignalEnabled(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void galileoSignalValue(byte val) { - msclPINVOKE.GnssSignalConfiguration_galileoSignalValue__SWIG_0(swigCPtr, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte galileoSignalValue() { - byte ret = msclPINVOKE.GnssSignalConfiguration_galileoSignalValue__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void enableBeiDouSignal(GnssSignalConfiguration.BeiDouSignal signal, bool enable) { - msclPINVOKE.GnssSignalConfiguration_enableBeiDouSignal__SWIG_0(swigCPtr, (int)signal, enable); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void enableBeiDouSignal(GnssSignalConfiguration.BeiDouSignal signal) { - msclPINVOKE.GnssSignalConfiguration_enableBeiDouSignal__SWIG_1(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool beidouSignalEnabled(GnssSignalConfiguration.BeiDouSignal signal) { - bool ret = msclPINVOKE.GnssSignalConfiguration_beidouSignalEnabled(swigCPtr, (int)signal); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void beidouSignalValue(byte val) { - msclPINVOKE.GnssSignalConfiguration_beidouSignalValue__SWIG_0(swigCPtr, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte beidouSignalValue() { - byte ret = msclPINVOKE.GnssSignalConfiguration_beidouSignalValue__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum GpsSignal { - L1CA = 0x01, - L2C = 0x02 - } - - public enum GlonassSignal { - L1OF = 0x01, - L2OF = 0x02 - } - - public enum GalileoSignal { - E1 = 0x01, - E5B = 0x02 - } - - public enum BeiDouSignal { - B1 = 0x01, - B2 = 0x02 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GnssSignalConfiguration : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GnssSignalConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GnssSignalConfiguration obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GnssSignalConfiguration() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GnssSignalConfiguration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public GnssSignalConfiguration() : this(msclPINVOKE.new_GnssSignalConfiguration(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void enableGpsSignal(GnssSignalConfiguration.GpsSignal signal, bool enable) { + msclPINVOKE.GnssSignalConfiguration_enableGpsSignal__SWIG_0(swigCPtr, (int)signal, enable); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void enableGpsSignal(GnssSignalConfiguration.GpsSignal signal) { + msclPINVOKE.GnssSignalConfiguration_enableGpsSignal__SWIG_1(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool gpsSignalEnabled(GnssSignalConfiguration.GpsSignal signal) { + bool ret = msclPINVOKE.GnssSignalConfiguration_gpsSignalEnabled(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void gpsSignalValue(byte val) { + msclPINVOKE.GnssSignalConfiguration_gpsSignalValue__SWIG_0(swigCPtr, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte gpsSignalValue() { + byte ret = msclPINVOKE.GnssSignalConfiguration_gpsSignalValue__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void enableGlonassSignal(GnssSignalConfiguration.GlonassSignal signal, bool enable) { + msclPINVOKE.GnssSignalConfiguration_enableGlonassSignal__SWIG_0(swigCPtr, (int)signal, enable); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void enableGlonassSignal(GnssSignalConfiguration.GlonassSignal signal) { + msclPINVOKE.GnssSignalConfiguration_enableGlonassSignal__SWIG_1(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool glonassSignalEnabled(GnssSignalConfiguration.GlonassSignal signal) { + bool ret = msclPINVOKE.GnssSignalConfiguration_glonassSignalEnabled(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void glonassSignalValue(byte val) { + msclPINVOKE.GnssSignalConfiguration_glonassSignalValue__SWIG_0(swigCPtr, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte glonassSignalValue() { + byte ret = msclPINVOKE.GnssSignalConfiguration_glonassSignalValue__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void enableGalileoSignal(GnssSignalConfiguration.GalileoSignal signal, bool enable) { + msclPINVOKE.GnssSignalConfiguration_enableGalileoSignal__SWIG_0(swigCPtr, (int)signal, enable); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void enableGalileoSignal(GnssSignalConfiguration.GalileoSignal signal) { + msclPINVOKE.GnssSignalConfiguration_enableGalileoSignal__SWIG_1(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool galileoSignalEnabled(GnssSignalConfiguration.GalileoSignal signal) { + bool ret = msclPINVOKE.GnssSignalConfiguration_galileoSignalEnabled(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void galileoSignalValue(byte val) { + msclPINVOKE.GnssSignalConfiguration_galileoSignalValue__SWIG_0(swigCPtr, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte galileoSignalValue() { + byte ret = msclPINVOKE.GnssSignalConfiguration_galileoSignalValue__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void enableBeiDouSignal(GnssSignalConfiguration.BeiDouSignal signal, bool enable) { + msclPINVOKE.GnssSignalConfiguration_enableBeiDouSignal__SWIG_0(swigCPtr, (int)signal, enable); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void enableBeiDouSignal(GnssSignalConfiguration.BeiDouSignal signal) { + msclPINVOKE.GnssSignalConfiguration_enableBeiDouSignal__SWIG_1(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool beidouSignalEnabled(GnssSignalConfiguration.BeiDouSignal signal) { + bool ret = msclPINVOKE.GnssSignalConfiguration_beidouSignalEnabled(swigCPtr, (int)signal); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void beidouSignalValue(byte val) { + msclPINVOKE.GnssSignalConfiguration_beidouSignalValue__SWIG_0(swigCPtr, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte beidouSignalValue() { + byte ret = msclPINVOKE.GnssSignalConfiguration_beidouSignalValue__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum GpsSignal { + L1CA = 0x01, + L2C = 0x02 + } + + public enum GlonassSignal { + L1OF = 0x01, + L2OF = 0x02 + } + + public enum GalileoSignal { + E1 = 0x01, + E5B = 0x02 + } + + public enum BeiDouSignal { + B1 = 0x01, + B2 = 0x02 + } + +} + +} diff --git a/MSCL_Managed/mscl/GpioBehaviorModes.cs b/MSCL_Managed/mscl/GpioBehaviorModes.cs index 4de620553..f7165e3f1 100644 --- a/MSCL_Managed/mscl/GpioBehaviorModes.cs +++ b/MSCL_Managed/mscl/GpioBehaviorModes.cs @@ -1,301 +1,301 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GpioBehaviorModes : global::System.IDisposable - , global::System.Collections.Generic.IDictionary - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GpioBehaviorModes(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioBehaviorModes obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GpioBehaviorModes() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GpioBehaviorModes(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - - public GpioPinModeOptions this[byte key] { - get { - return getitem(key); - } - - set { - setitem(key, value); - } - } - - public bool TryGetValue(byte key, out GpioPinModeOptions value) { - if (this.ContainsKey(key)) { - value = this[key]; - return true; - } - value = default(GpioPinModeOptions); - return false; - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public global::System.Collections.Generic.ICollection Keys { - get { - global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); - int size = this.Count; - if (size > 0) { - global::System.IntPtr iter = create_iterator_begin(); - for (int i = 0; i < size; i++) { - keys.Add(get_next_key(iter)); - } - destroy_iterator(iter); - } - return keys; - } - } - - public global::System.Collections.Generic.ICollection Values { - get { - global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); - foreach (global::System.Collections.Generic.KeyValuePair pair in this) { - vals.Add(pair.Value); - } - return vals; - } - } - - public void Add(global::System.Collections.Generic.KeyValuePair item) { - Add(item.Key, item.Value); - } - - public bool Remove(global::System.Collections.Generic.KeyValuePair item) { - if (Contains(item)) { - return Remove(item.Key); - } else { - return false; - } - } - - public bool Contains(global::System.Collections.Generic.KeyValuePair item) { - if (this[item.Key] == item.Value) { - return true; - } else { - return false; - } - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { - CopyTo(array, 0); - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (arrayIndex+this.Count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - - global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); - for (int i = 0; i < keyList.Count; i++) { - byte currentKey = keyList[i]; - array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); - } - } - - global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { - return new GpioBehaviorModesEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new GpioBehaviorModesEnumerator(this); - } - - public GpioBehaviorModesEnumerator GetEnumerator() { - return new GpioBehaviorModesEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class GpioBehaviorModesEnumerator : global::System.Collections.IEnumerator, - global::System.Collections.Generic.IEnumerator> - { - private GpioBehaviorModes collectionRef; - private global::System.Collections.Generic.IList keyCollection; - private int currentIndex; - private object currentObject; - private int currentSize; - - public GpioBehaviorModesEnumerator(GpioBehaviorModes collection) { - collectionRef = collection; - keyCollection = new global::System.Collections.Generic.List(collection.Keys); - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public global::System.Collections.Generic.KeyValuePair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (global::System.Collections.Generic.KeyValuePair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - byte currentKey = keyCollection[currentIndex]; - currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - - public GpioBehaviorModes() : this(msclPINVOKE.new_GpioBehaviorModes__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioBehaviorModes(GpioBehaviorModes other) : this(msclPINVOKE.new_GpioBehaviorModes__SWIG_1(GpioBehaviorModes.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.GpioBehaviorModes_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool empty() { - bool ret = msclPINVOKE.GpioBehaviorModes_empty(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Clear() { - msclPINVOKE.GpioBehaviorModes_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private GpioPinModeOptions getitem(byte key) { - GpioPinModeOptions ret = new GpioPinModeOptions(msclPINVOKE.GpioBehaviorModes_getitem(swigCPtr, key), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(byte key, GpioPinModeOptions x) { - msclPINVOKE.GpioBehaviorModes_setitem(swigCPtr, key, GpioPinModeOptions.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ContainsKey(byte key) { - bool ret = msclPINVOKE.GpioBehaviorModes_ContainsKey(swigCPtr, key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Add(byte key, GpioPinModeOptions value) { - msclPINVOKE.GpioBehaviorModes_Add(swigCPtr, key, GpioPinModeOptions.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Remove(byte key) { - bool ret = msclPINVOKE.GpioBehaviorModes_Remove(swigCPtr, key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private global::System.IntPtr create_iterator_begin() { - global::System.IntPtr ret = msclPINVOKE.GpioBehaviorModes_create_iterator_begin(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private byte get_next_key(global::System.IntPtr swigiterator) { - byte ret = msclPINVOKE.GpioBehaviorModes_get_next_key(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void destroy_iterator(global::System.IntPtr swigiterator) { - msclPINVOKE.GpioBehaviorModes_destroy_iterator(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GpioBehaviorModes : global::System.IDisposable + , global::System.Collections.Generic.IDictionary + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GpioBehaviorModes(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioBehaviorModes obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GpioBehaviorModes() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GpioBehaviorModes(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + + public GpioPinModeOptions this[byte key] { + get { + return getitem(key); + } + + set { + setitem(key, value); + } + } + + public bool TryGetValue(byte key, out GpioPinModeOptions value) { + if (this.ContainsKey(key)) { + value = this[key]; + return true; + } + value = default(GpioPinModeOptions); + return false; + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public global::System.Collections.Generic.ICollection Keys { + get { + global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); + int size = this.Count; + if (size > 0) { + global::System.IntPtr iter = create_iterator_begin(); + for (int i = 0; i < size; i++) { + keys.Add(get_next_key(iter)); + } + destroy_iterator(iter); + } + return keys; + } + } + + public global::System.Collections.Generic.ICollection Values { + get { + global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); + foreach (global::System.Collections.Generic.KeyValuePair pair in this) { + vals.Add(pair.Value); + } + return vals; + } + } + + public void Add(global::System.Collections.Generic.KeyValuePair item) { + Add(item.Key, item.Value); + } + + public bool Remove(global::System.Collections.Generic.KeyValuePair item) { + if (Contains(item)) { + return Remove(item.Key); + } else { + return false; + } + } + + public bool Contains(global::System.Collections.Generic.KeyValuePair item) { + if (this[item.Key] == item.Value) { + return true; + } else { + return false; + } + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { + CopyTo(array, 0); + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (arrayIndex+this.Count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + + global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); + for (int i = 0; i < keyList.Count; i++) { + byte currentKey = keyList[i]; + array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); + } + } + + global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { + return new GpioBehaviorModesEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new GpioBehaviorModesEnumerator(this); + } + + public GpioBehaviorModesEnumerator GetEnumerator() { + return new GpioBehaviorModesEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class GpioBehaviorModesEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator> + { + private GpioBehaviorModes collectionRef; + private global::System.Collections.Generic.IList keyCollection; + private int currentIndex; + private object currentObject; + private int currentSize; + + public GpioBehaviorModesEnumerator(GpioBehaviorModes collection) { + collectionRef = collection; + keyCollection = new global::System.Collections.Generic.List(collection.Keys); + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public global::System.Collections.Generic.KeyValuePair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (global::System.Collections.Generic.KeyValuePair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + byte currentKey = keyCollection[currentIndex]; + currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + + public GpioBehaviorModes() : this(msclPINVOKE.new_GpioBehaviorModes__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioBehaviorModes(GpioBehaviorModes other) : this(msclPINVOKE.new_GpioBehaviorModes__SWIG_1(GpioBehaviorModes.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.GpioBehaviorModes_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool empty() { + bool ret = msclPINVOKE.GpioBehaviorModes_empty(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Clear() { + msclPINVOKE.GpioBehaviorModes_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private GpioPinModeOptions getitem(byte key) { + GpioPinModeOptions ret = new GpioPinModeOptions(msclPINVOKE.GpioBehaviorModes_getitem(swigCPtr, key), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(byte key, GpioPinModeOptions x) { + msclPINVOKE.GpioBehaviorModes_setitem(swigCPtr, key, GpioPinModeOptions.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ContainsKey(byte key) { + bool ret = msclPINVOKE.GpioBehaviorModes_ContainsKey(swigCPtr, key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Add(byte key, GpioPinModeOptions value) { + msclPINVOKE.GpioBehaviorModes_Add(swigCPtr, key, GpioPinModeOptions.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Remove(byte key) { + bool ret = msclPINVOKE.GpioBehaviorModes_Remove(swigCPtr, key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private global::System.IntPtr create_iterator_begin() { + global::System.IntPtr ret = msclPINVOKE.GpioBehaviorModes_create_iterator_begin(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private byte get_next_key(global::System.IntPtr swigiterator) { + byte ret = msclPINVOKE.GpioBehaviorModes_get_next_key(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void destroy_iterator(global::System.IntPtr swigiterator) { + msclPINVOKE.GpioBehaviorModes_destroy_iterator(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/GpioConfiguration.cs b/MSCL_Managed/mscl/GpioConfiguration.cs index fdcc48ca7..31bf88089 100644 --- a/MSCL_Managed/mscl/GpioConfiguration.cs +++ b/MSCL_Managed/mscl/GpioConfiguration.cs @@ -1,145 +1,145 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GpioConfiguration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GpioConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioConfiguration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GpioConfiguration() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GpioConfiguration(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public Bitfield pinMode { - set { - msclPINVOKE.GpioConfiguration_pinMode_set(swigCPtr, Bitfield.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.GpioConfiguration_pinMode_get(swigCPtr); - Bitfield ret = (cPtr == global::System.IntPtr.Zero) ? null : new Bitfield(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public byte pin { - set { - msclPINVOKE.GpioConfiguration_pin_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - byte ret = msclPINVOKE.GpioConfiguration_pin_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public GpioConfiguration.Feature feature { - set { - msclPINVOKE.GpioConfiguration_feature_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - GpioConfiguration.Feature ret = (GpioConfiguration.Feature)msclPINVOKE.GpioConfiguration_feature_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public byte behavior { - set { - msclPINVOKE.GpioConfiguration_behavior_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - byte ret = msclPINVOKE.GpioConfiguration_behavior_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public void pinModeValue(byte val) { - msclPINVOKE.GpioConfiguration_pinModeValue__SWIG_0(swigCPtr, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte pinModeValue() { - byte ret = msclPINVOKE.GpioConfiguration_pinModeValue__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public GpioConfiguration() : this(msclPINVOKE.new_GpioConfiguration(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum Feature { - UNUSED_FEATURE = 0x00, - GPIO_FEATURE = 0x01, - PPS_FEATURE = 0x02, - ENCODER_FEATURE = 0x03 - } - - public enum GpioBehavior { - UNUSED_BEHAVIOR = 0x00, - GPIO_INPUT_BEHAVIOR = 0x01, - GPIO_OUTPUT_LOW_BEHAVIOR = 0x02, - GPIO_OUTPUT_HIGH_BEHAVIOR = 0x03 - } - - public enum PpsBehavior { - PPS_UNUSED = 0x00, - PPS_INPUT = 0x01, - PPS_OUTPUT = 0x02 - } - - public enum EncoderBehavior { - ENCODER_UNUSED = 0x00, - ENCODER_A = 0x01, - ENCODER_B = 0x02 - } - - public enum PinModes { - OPEN_DRAIN = 0x01, - PULLDOWN = 0x02, - PULLUP = 0x04 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GpioConfiguration : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GpioConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioConfiguration obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GpioConfiguration() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GpioConfiguration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public Bitfield pinMode { + set { + msclPINVOKE.GpioConfiguration_pinMode_set(swigCPtr, Bitfield.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.GpioConfiguration_pinMode_get(swigCPtr); + Bitfield ret = (cPtr == global::System.IntPtr.Zero) ? null : new Bitfield(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public byte pin { + set { + msclPINVOKE.GpioConfiguration_pin_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + byte ret = msclPINVOKE.GpioConfiguration_pin_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public GpioConfiguration.Feature feature { + set { + msclPINVOKE.GpioConfiguration_feature_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + GpioConfiguration.Feature ret = (GpioConfiguration.Feature)msclPINVOKE.GpioConfiguration_feature_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public byte behavior { + set { + msclPINVOKE.GpioConfiguration_behavior_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + byte ret = msclPINVOKE.GpioConfiguration_behavior_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public void pinModeValue(byte val) { + msclPINVOKE.GpioConfiguration_pinModeValue__SWIG_0(swigCPtr, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte pinModeValue() { + byte ret = msclPINVOKE.GpioConfiguration_pinModeValue__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public GpioConfiguration() : this(msclPINVOKE.new_GpioConfiguration(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Feature { + UNUSED_FEATURE = 0x00, + GPIO_FEATURE = 0x01, + PPS_FEATURE = 0x02, + ENCODER_FEATURE = 0x03 + } + + public enum GpioBehavior { + UNUSED_BEHAVIOR = 0x00, + GPIO_INPUT_BEHAVIOR = 0x01, + GPIO_OUTPUT_LOW_BEHAVIOR = 0x02, + GPIO_OUTPUT_HIGH_BEHAVIOR = 0x03 + } + + public enum PpsBehavior { + PPS_UNUSED = 0x00, + PPS_INPUT = 0x01, + PPS_OUTPUT = 0x02 + } + + public enum EncoderBehavior { + ENCODER_UNUSED = 0x00, + ENCODER_A = 0x01, + ENCODER_B = 0x02 + } + + public enum PinModes { + OPEN_DRAIN = 0x01, + PULLDOWN = 0x02, + PULLUP = 0x04 + } + +} + +} diff --git a/MSCL_Managed/mscl/GpioFeatureBehaviors.cs b/MSCL_Managed/mscl/GpioFeatureBehaviors.cs index ce49e951e..ec34776e9 100644 --- a/MSCL_Managed/mscl/GpioFeatureBehaviors.cs +++ b/MSCL_Managed/mscl/GpioFeatureBehaviors.cs @@ -1,301 +1,301 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GpioFeatureBehaviors : global::System.IDisposable - , global::System.Collections.Generic.IDictionary - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GpioFeatureBehaviors(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioFeatureBehaviors obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GpioFeatureBehaviors() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GpioFeatureBehaviors(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - - public GpioBehaviorModes this[GpioConfiguration.Feature key] { - get { - return getitem(key); - } - - set { - setitem(key, value); - } - } - - public bool TryGetValue(GpioConfiguration.Feature key, out GpioBehaviorModes value) { - if (this.ContainsKey(key)) { - value = this[key]; - return true; - } - value = default(GpioBehaviorModes); - return false; - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public global::System.Collections.Generic.ICollection Keys { - get { - global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); - int size = this.Count; - if (size > 0) { - global::System.IntPtr iter = create_iterator_begin(); - for (int i = 0; i < size; i++) { - keys.Add(get_next_key(iter)); - } - destroy_iterator(iter); - } - return keys; - } - } - - public global::System.Collections.Generic.ICollection Values { - get { - global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); - foreach (global::System.Collections.Generic.KeyValuePair pair in this) { - vals.Add(pair.Value); - } - return vals; - } - } - - public void Add(global::System.Collections.Generic.KeyValuePair item) { - Add(item.Key, item.Value); - } - - public bool Remove(global::System.Collections.Generic.KeyValuePair item) { - if (Contains(item)) { - return Remove(item.Key); - } else { - return false; - } - } - - public bool Contains(global::System.Collections.Generic.KeyValuePair item) { - if (this[item.Key] == item.Value) { - return true; - } else { - return false; - } - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { - CopyTo(array, 0); - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (arrayIndex+this.Count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - - global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); - for (int i = 0; i < keyList.Count; i++) { - GpioConfiguration.Feature currentKey = keyList[i]; - array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); - } - } - - global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { - return new GpioFeatureBehaviorsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new GpioFeatureBehaviorsEnumerator(this); - } - - public GpioFeatureBehaviorsEnumerator GetEnumerator() { - return new GpioFeatureBehaviorsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class GpioFeatureBehaviorsEnumerator : global::System.Collections.IEnumerator, - global::System.Collections.Generic.IEnumerator> - { - private GpioFeatureBehaviors collectionRef; - private global::System.Collections.Generic.IList keyCollection; - private int currentIndex; - private object currentObject; - private int currentSize; - - public GpioFeatureBehaviorsEnumerator(GpioFeatureBehaviors collection) { - collectionRef = collection; - keyCollection = new global::System.Collections.Generic.List(collection.Keys); - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public global::System.Collections.Generic.KeyValuePair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (global::System.Collections.Generic.KeyValuePair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - GpioConfiguration.Feature currentKey = keyCollection[currentIndex]; - currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - - public GpioFeatureBehaviors() : this(msclPINVOKE.new_GpioFeatureBehaviors__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioFeatureBehaviors(GpioFeatureBehaviors other) : this(msclPINVOKE.new_GpioFeatureBehaviors__SWIG_1(GpioFeatureBehaviors.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.GpioFeatureBehaviors_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool empty() { - bool ret = msclPINVOKE.GpioFeatureBehaviors_empty(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Clear() { - msclPINVOKE.GpioFeatureBehaviors_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private GpioBehaviorModes getitem(GpioConfiguration.Feature key) { - GpioBehaviorModes ret = new GpioBehaviorModes(msclPINVOKE.GpioFeatureBehaviors_getitem(swigCPtr, (int)key), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(GpioConfiguration.Feature key, GpioBehaviorModes x) { - msclPINVOKE.GpioFeatureBehaviors_setitem(swigCPtr, (int)key, GpioBehaviorModes.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ContainsKey(GpioConfiguration.Feature key) { - bool ret = msclPINVOKE.GpioFeatureBehaviors_ContainsKey(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Add(GpioConfiguration.Feature key, GpioBehaviorModes value) { - msclPINVOKE.GpioFeatureBehaviors_Add(swigCPtr, (int)key, GpioBehaviorModes.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Remove(GpioConfiguration.Feature key) { - bool ret = msclPINVOKE.GpioFeatureBehaviors_Remove(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private global::System.IntPtr create_iterator_begin() { - global::System.IntPtr ret = msclPINVOKE.GpioFeatureBehaviors_create_iterator_begin(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private GpioConfiguration.Feature get_next_key(global::System.IntPtr swigiterator) { - GpioConfiguration.Feature ret = (GpioConfiguration.Feature)msclPINVOKE.GpioFeatureBehaviors_get_next_key(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void destroy_iterator(global::System.IntPtr swigiterator) { - msclPINVOKE.GpioFeatureBehaviors_destroy_iterator(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GpioFeatureBehaviors : global::System.IDisposable + , global::System.Collections.Generic.IDictionary + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GpioFeatureBehaviors(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioFeatureBehaviors obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GpioFeatureBehaviors() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GpioFeatureBehaviors(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + + public GpioBehaviorModes this[GpioConfiguration.Feature key] { + get { + return getitem(key); + } + + set { + setitem(key, value); + } + } + + public bool TryGetValue(GpioConfiguration.Feature key, out GpioBehaviorModes value) { + if (this.ContainsKey(key)) { + value = this[key]; + return true; + } + value = default(GpioBehaviorModes); + return false; + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public global::System.Collections.Generic.ICollection Keys { + get { + global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); + int size = this.Count; + if (size > 0) { + global::System.IntPtr iter = create_iterator_begin(); + for (int i = 0; i < size; i++) { + keys.Add(get_next_key(iter)); + } + destroy_iterator(iter); + } + return keys; + } + } + + public global::System.Collections.Generic.ICollection Values { + get { + global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); + foreach (global::System.Collections.Generic.KeyValuePair pair in this) { + vals.Add(pair.Value); + } + return vals; + } + } + + public void Add(global::System.Collections.Generic.KeyValuePair item) { + Add(item.Key, item.Value); + } + + public bool Remove(global::System.Collections.Generic.KeyValuePair item) { + if (Contains(item)) { + return Remove(item.Key); + } else { + return false; + } + } + + public bool Contains(global::System.Collections.Generic.KeyValuePair item) { + if (this[item.Key] == item.Value) { + return true; + } else { + return false; + } + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { + CopyTo(array, 0); + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (arrayIndex+this.Count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + + global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); + for (int i = 0; i < keyList.Count; i++) { + GpioConfiguration.Feature currentKey = keyList[i]; + array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); + } + } + + global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { + return new GpioFeatureBehaviorsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new GpioFeatureBehaviorsEnumerator(this); + } + + public GpioFeatureBehaviorsEnumerator GetEnumerator() { + return new GpioFeatureBehaviorsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class GpioFeatureBehaviorsEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator> + { + private GpioFeatureBehaviors collectionRef; + private global::System.Collections.Generic.IList keyCollection; + private int currentIndex; + private object currentObject; + private int currentSize; + + public GpioFeatureBehaviorsEnumerator(GpioFeatureBehaviors collection) { + collectionRef = collection; + keyCollection = new global::System.Collections.Generic.List(collection.Keys); + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public global::System.Collections.Generic.KeyValuePair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (global::System.Collections.Generic.KeyValuePair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + GpioConfiguration.Feature currentKey = keyCollection[currentIndex]; + currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + + public GpioFeatureBehaviors() : this(msclPINVOKE.new_GpioFeatureBehaviors__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioFeatureBehaviors(GpioFeatureBehaviors other) : this(msclPINVOKE.new_GpioFeatureBehaviors__SWIG_1(GpioFeatureBehaviors.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.GpioFeatureBehaviors_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool empty() { + bool ret = msclPINVOKE.GpioFeatureBehaviors_empty(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Clear() { + msclPINVOKE.GpioFeatureBehaviors_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private GpioBehaviorModes getitem(GpioConfiguration.Feature key) { + GpioBehaviorModes ret = new GpioBehaviorModes(msclPINVOKE.GpioFeatureBehaviors_getitem(swigCPtr, (int)key), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(GpioConfiguration.Feature key, GpioBehaviorModes x) { + msclPINVOKE.GpioFeatureBehaviors_setitem(swigCPtr, (int)key, GpioBehaviorModes.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ContainsKey(GpioConfiguration.Feature key) { + bool ret = msclPINVOKE.GpioFeatureBehaviors_ContainsKey(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Add(GpioConfiguration.Feature key, GpioBehaviorModes value) { + msclPINVOKE.GpioFeatureBehaviors_Add(swigCPtr, (int)key, GpioBehaviorModes.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Remove(GpioConfiguration.Feature key) { + bool ret = msclPINVOKE.GpioFeatureBehaviors_Remove(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private global::System.IntPtr create_iterator_begin() { + global::System.IntPtr ret = msclPINVOKE.GpioFeatureBehaviors_create_iterator_begin(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private GpioConfiguration.Feature get_next_key(global::System.IntPtr swigiterator) { + GpioConfiguration.Feature ret = (GpioConfiguration.Feature)msclPINVOKE.GpioFeatureBehaviors_get_next_key(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void destroy_iterator(global::System.IntPtr swigiterator) { + msclPINVOKE.GpioFeatureBehaviors_destroy_iterator(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/GpioPinModeOptions.cs b/MSCL_Managed/mscl/GpioPinModeOptions.cs index 737149be7..4bdc9888f 100644 --- a/MSCL_Managed/mscl/GpioPinModeOptions.cs +++ b/MSCL_Managed/mscl/GpioPinModeOptions.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GpioPinModeOptions : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GpioPinModeOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioPinModeOptions obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GpioPinModeOptions() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GpioPinModeOptions(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public GpioPinModeOptions(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (GpioConfiguration.PinModes element in c) { - this.Add(element); - } - } - - public GpioPinModeOptions(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (GpioConfiguration.PinModes element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public GpioConfiguration.PinModes this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(GpioConfiguration.PinModes[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(GpioConfiguration.PinModes[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, GpioConfiguration.PinModes[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new GpioPinModeOptionsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new GpioPinModeOptionsEnumerator(this); - } - - public GpioPinModeOptionsEnumerator GetEnumerator() { - return new GpioPinModeOptionsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class GpioPinModeOptionsEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private GpioPinModeOptions collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public GpioPinModeOptionsEnumerator(GpioPinModeOptions collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public GpioConfiguration.PinModes Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (GpioConfiguration.PinModes)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.GpioPinModeOptions_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(GpioConfiguration.PinModes x) { - msclPINVOKE.GpioPinModeOptions_Add(swigCPtr, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.GpioPinModeOptions_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.GpioPinModeOptions_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.GpioPinModeOptions_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioPinModeOptions() : this(msclPINVOKE.new_GpioPinModeOptions__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioPinModeOptions(GpioPinModeOptions other) : this(msclPINVOKE.new_GpioPinModeOptions__SWIG_1(GpioPinModeOptions.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioPinModeOptions(int capacity) : this(msclPINVOKE.new_GpioPinModeOptions__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private GpioConfiguration.PinModes getitemcopy(int index) { - GpioConfiguration.PinModes ret = (GpioConfiguration.PinModes)msclPINVOKE.GpioPinModeOptions_getitemcopy(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private GpioConfiguration.PinModes getitem(int index) { - GpioConfiguration.PinModes ret = (GpioConfiguration.PinModes)msclPINVOKE.GpioPinModeOptions_getitem(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, GpioConfiguration.PinModes val) { - msclPINVOKE.GpioPinModeOptions_setitem(swigCPtr, index, (int)val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(GpioPinModeOptions values) { - msclPINVOKE.GpioPinModeOptions_AddRange(swigCPtr, GpioPinModeOptions.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioPinModeOptions GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.GpioPinModeOptions_GetRange(swigCPtr, index, count); - GpioPinModeOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new GpioPinModeOptions(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, GpioConfiguration.PinModes x) { - msclPINVOKE.GpioPinModeOptions_Insert(swigCPtr, index, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, GpioPinModeOptions values) { - msclPINVOKE.GpioPinModeOptions_InsertRange(swigCPtr, index, GpioPinModeOptions.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.GpioPinModeOptions_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.GpioPinModeOptions_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static GpioPinModeOptions Repeat(GpioConfiguration.PinModes value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.GpioPinModeOptions_Repeat((int)value, count); - GpioPinModeOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new GpioPinModeOptions(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.GpioPinModeOptions_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.GpioPinModeOptions_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, GpioPinModeOptions values) { - msclPINVOKE.GpioPinModeOptions_SetRange(swigCPtr, index, GpioPinModeOptions.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GpioPinModeOptions : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GpioPinModeOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioPinModeOptions obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GpioPinModeOptions() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GpioPinModeOptions(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public GpioPinModeOptions(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (GpioConfiguration.PinModes element in c) { + this.Add(element); + } + } + + public GpioPinModeOptions(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (GpioConfiguration.PinModes element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public GpioConfiguration.PinModes this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(GpioConfiguration.PinModes[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(GpioConfiguration.PinModes[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, GpioConfiguration.PinModes[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new GpioPinModeOptionsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new GpioPinModeOptionsEnumerator(this); + } + + public GpioPinModeOptionsEnumerator GetEnumerator() { + return new GpioPinModeOptionsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class GpioPinModeOptionsEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private GpioPinModeOptions collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public GpioPinModeOptionsEnumerator(GpioPinModeOptions collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public GpioConfiguration.PinModes Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (GpioConfiguration.PinModes)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.GpioPinModeOptions_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(GpioConfiguration.PinModes x) { + msclPINVOKE.GpioPinModeOptions_Add(swigCPtr, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.GpioPinModeOptions_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.GpioPinModeOptions_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.GpioPinModeOptions_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioPinModeOptions() : this(msclPINVOKE.new_GpioPinModeOptions__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioPinModeOptions(GpioPinModeOptions other) : this(msclPINVOKE.new_GpioPinModeOptions__SWIG_1(GpioPinModeOptions.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioPinModeOptions(int capacity) : this(msclPINVOKE.new_GpioPinModeOptions__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private GpioConfiguration.PinModes getitemcopy(int index) { + GpioConfiguration.PinModes ret = (GpioConfiguration.PinModes)msclPINVOKE.GpioPinModeOptions_getitemcopy(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private GpioConfiguration.PinModes getitem(int index) { + GpioConfiguration.PinModes ret = (GpioConfiguration.PinModes)msclPINVOKE.GpioPinModeOptions_getitem(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, GpioConfiguration.PinModes val) { + msclPINVOKE.GpioPinModeOptions_setitem(swigCPtr, index, (int)val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(GpioPinModeOptions values) { + msclPINVOKE.GpioPinModeOptions_AddRange(swigCPtr, GpioPinModeOptions.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioPinModeOptions GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.GpioPinModeOptions_GetRange(swigCPtr, index, count); + GpioPinModeOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new GpioPinModeOptions(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, GpioConfiguration.PinModes x) { + msclPINVOKE.GpioPinModeOptions_Insert(swigCPtr, index, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, GpioPinModeOptions values) { + msclPINVOKE.GpioPinModeOptions_InsertRange(swigCPtr, index, GpioPinModeOptions.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.GpioPinModeOptions_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.GpioPinModeOptions_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static GpioPinModeOptions Repeat(GpioConfiguration.PinModes value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.GpioPinModeOptions_Repeat((int)value, count); + GpioPinModeOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new GpioPinModeOptions(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.GpioPinModeOptions_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.GpioPinModeOptions_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, GpioPinModeOptions values) { + msclPINVOKE.GpioPinModeOptions_SetRange(swigCPtr, index, GpioPinModeOptions.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/GpioPinOptions.cs b/MSCL_Managed/mscl/GpioPinOptions.cs index aeb75b551..d15344ef0 100644 --- a/MSCL_Managed/mscl/GpioPinOptions.cs +++ b/MSCL_Managed/mscl/GpioPinOptions.cs @@ -1,301 +1,301 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class GpioPinOptions : global::System.IDisposable - , global::System.Collections.Generic.IDictionary - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal GpioPinOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioPinOptions obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~GpioPinOptions() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_GpioPinOptions(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - - public GpioFeatureBehaviors this[byte key] { - get { - return getitem(key); - } - - set { - setitem(key, value); - } - } - - public bool TryGetValue(byte key, out GpioFeatureBehaviors value) { - if (this.ContainsKey(key)) { - value = this[key]; - return true; - } - value = default(GpioFeatureBehaviors); - return false; - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public global::System.Collections.Generic.ICollection Keys { - get { - global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); - int size = this.Count; - if (size > 0) { - global::System.IntPtr iter = create_iterator_begin(); - for (int i = 0; i < size; i++) { - keys.Add(get_next_key(iter)); - } - destroy_iterator(iter); - } - return keys; - } - } - - public global::System.Collections.Generic.ICollection Values { - get { - global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); - foreach (global::System.Collections.Generic.KeyValuePair pair in this) { - vals.Add(pair.Value); - } - return vals; - } - } - - public void Add(global::System.Collections.Generic.KeyValuePair item) { - Add(item.Key, item.Value); - } - - public bool Remove(global::System.Collections.Generic.KeyValuePair item) { - if (Contains(item)) { - return Remove(item.Key); - } else { - return false; - } - } - - public bool Contains(global::System.Collections.Generic.KeyValuePair item) { - if (this[item.Key] == item.Value) { - return true; - } else { - return false; - } - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { - CopyTo(array, 0); - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (arrayIndex+this.Count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - - global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); - for (int i = 0; i < keyList.Count; i++) { - byte currentKey = keyList[i]; - array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); - } - } - - global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { - return new GpioPinOptionsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new GpioPinOptionsEnumerator(this); - } - - public GpioPinOptionsEnumerator GetEnumerator() { - return new GpioPinOptionsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class GpioPinOptionsEnumerator : global::System.Collections.IEnumerator, - global::System.Collections.Generic.IEnumerator> - { - private GpioPinOptions collectionRef; - private global::System.Collections.Generic.IList keyCollection; - private int currentIndex; - private object currentObject; - private int currentSize; - - public GpioPinOptionsEnumerator(GpioPinOptions collection) { - collectionRef = collection; - keyCollection = new global::System.Collections.Generic.List(collection.Keys); - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public global::System.Collections.Generic.KeyValuePair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (global::System.Collections.Generic.KeyValuePair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - byte currentKey = keyCollection[currentIndex]; - currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - - public GpioPinOptions() : this(msclPINVOKE.new_GpioPinOptions__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public GpioPinOptions(GpioPinOptions other) : this(msclPINVOKE.new_GpioPinOptions__SWIG_1(GpioPinOptions.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.GpioPinOptions_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool empty() { - bool ret = msclPINVOKE.GpioPinOptions_empty(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Clear() { - msclPINVOKE.GpioPinOptions_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private GpioFeatureBehaviors getitem(byte key) { - GpioFeatureBehaviors ret = new GpioFeatureBehaviors(msclPINVOKE.GpioPinOptions_getitem(swigCPtr, key), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(byte key, GpioFeatureBehaviors x) { - msclPINVOKE.GpioPinOptions_setitem(swigCPtr, key, GpioFeatureBehaviors.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ContainsKey(byte key) { - bool ret = msclPINVOKE.GpioPinOptions_ContainsKey(swigCPtr, key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Add(byte key, GpioFeatureBehaviors value) { - msclPINVOKE.GpioPinOptions_Add(swigCPtr, key, GpioFeatureBehaviors.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Remove(byte key) { - bool ret = msclPINVOKE.GpioPinOptions_Remove(swigCPtr, key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private global::System.IntPtr create_iterator_begin() { - global::System.IntPtr ret = msclPINVOKE.GpioPinOptions_create_iterator_begin(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private byte get_next_key(global::System.IntPtr swigiterator) { - byte ret = msclPINVOKE.GpioPinOptions_get_next_key(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void destroy_iterator(global::System.IntPtr swigiterator) { - msclPINVOKE.GpioPinOptions_destroy_iterator(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class GpioPinOptions : global::System.IDisposable + , global::System.Collections.Generic.IDictionary + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal GpioPinOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GpioPinOptions obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~GpioPinOptions() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_GpioPinOptions(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + + public GpioFeatureBehaviors this[byte key] { + get { + return getitem(key); + } + + set { + setitem(key, value); + } + } + + public bool TryGetValue(byte key, out GpioFeatureBehaviors value) { + if (this.ContainsKey(key)) { + value = this[key]; + return true; + } + value = default(GpioFeatureBehaviors); + return false; + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public global::System.Collections.Generic.ICollection Keys { + get { + global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); + int size = this.Count; + if (size > 0) { + global::System.IntPtr iter = create_iterator_begin(); + for (int i = 0; i < size; i++) { + keys.Add(get_next_key(iter)); + } + destroy_iterator(iter); + } + return keys; + } + } + + public global::System.Collections.Generic.ICollection Values { + get { + global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); + foreach (global::System.Collections.Generic.KeyValuePair pair in this) { + vals.Add(pair.Value); + } + return vals; + } + } + + public void Add(global::System.Collections.Generic.KeyValuePair item) { + Add(item.Key, item.Value); + } + + public bool Remove(global::System.Collections.Generic.KeyValuePair item) { + if (Contains(item)) { + return Remove(item.Key); + } else { + return false; + } + } + + public bool Contains(global::System.Collections.Generic.KeyValuePair item) { + if (this[item.Key] == item.Value) { + return true; + } else { + return false; + } + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { + CopyTo(array, 0); + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (arrayIndex+this.Count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + + global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); + for (int i = 0; i < keyList.Count; i++) { + byte currentKey = keyList[i]; + array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); + } + } + + global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { + return new GpioPinOptionsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new GpioPinOptionsEnumerator(this); + } + + public GpioPinOptionsEnumerator GetEnumerator() { + return new GpioPinOptionsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class GpioPinOptionsEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator> + { + private GpioPinOptions collectionRef; + private global::System.Collections.Generic.IList keyCollection; + private int currentIndex; + private object currentObject; + private int currentSize; + + public GpioPinOptionsEnumerator(GpioPinOptions collection) { + collectionRef = collection; + keyCollection = new global::System.Collections.Generic.List(collection.Keys); + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public global::System.Collections.Generic.KeyValuePair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (global::System.Collections.Generic.KeyValuePair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + byte currentKey = keyCollection[currentIndex]; + currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + + public GpioPinOptions() : this(msclPINVOKE.new_GpioPinOptions__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public GpioPinOptions(GpioPinOptions other) : this(msclPINVOKE.new_GpioPinOptions__SWIG_1(GpioPinOptions.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.GpioPinOptions_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool empty() { + bool ret = msclPINVOKE.GpioPinOptions_empty(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Clear() { + msclPINVOKE.GpioPinOptions_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private GpioFeatureBehaviors getitem(byte key) { + GpioFeatureBehaviors ret = new GpioFeatureBehaviors(msclPINVOKE.GpioPinOptions_getitem(swigCPtr, key), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(byte key, GpioFeatureBehaviors x) { + msclPINVOKE.GpioPinOptions_setitem(swigCPtr, key, GpioFeatureBehaviors.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ContainsKey(byte key) { + bool ret = msclPINVOKE.GpioPinOptions_ContainsKey(swigCPtr, key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Add(byte key, GpioFeatureBehaviors value) { + msclPINVOKE.GpioPinOptions_Add(swigCPtr, key, GpioFeatureBehaviors.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Remove(byte key) { + bool ret = msclPINVOKE.GpioPinOptions_Remove(swigCPtr, key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private global::System.IntPtr create_iterator_begin() { + global::System.IntPtr ret = msclPINVOKE.GpioPinOptions_create_iterator_begin(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private byte get_next_key(global::System.IntPtr swigiterator) { + byte ret = msclPINVOKE.GpioPinOptions_get_next_key(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void destroy_iterator(global::System.IntPtr swigiterator) { + msclPINVOKE.GpioPinOptions_destroy_iterator(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/HeadingAlignmentMethod.cs b/MSCL_Managed/mscl/HeadingAlignmentMethod.cs index ce8c7599a..d929e7e5c 100644 --- a/MSCL_Managed/mscl/HeadingAlignmentMethod.cs +++ b/MSCL_Managed/mscl/HeadingAlignmentMethod.cs @@ -1,85 +1,85 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class HeadingAlignmentMethod : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal HeadingAlignmentMethod(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(HeadingAlignmentMethod obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~HeadingAlignmentMethod() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_HeadingAlignmentMethod(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public HeadingAlignmentMethod() : this(msclPINVOKE.new_HeadingAlignmentMethod__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public HeadingAlignmentMethod(byte val) : this(msclPINVOKE.new_HeadingAlignmentMethod__SWIG_1(val), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte value { - set { - msclPINVOKE.HeadingAlignmentMethod_value_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - byte ret = msclPINVOKE.HeadingAlignmentMethod_value_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public void select(HeadingAlignmentOption option) { - msclPINVOKE.HeadingAlignmentMethod_select(swigCPtr, (int)option); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void deselect(HeadingAlignmentOption option) { - msclPINVOKE.HeadingAlignmentMethod_deselect(swigCPtr, (int)option); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool selected(HeadingAlignmentOption option) { - bool ret = msclPINVOKE.HeadingAlignmentMethod_selected(swigCPtr, (int)option); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class HeadingAlignmentMethod : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal HeadingAlignmentMethod(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(HeadingAlignmentMethod obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~HeadingAlignmentMethod() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_HeadingAlignmentMethod(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public HeadingAlignmentMethod() : this(msclPINVOKE.new_HeadingAlignmentMethod__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public HeadingAlignmentMethod(byte val) : this(msclPINVOKE.new_HeadingAlignmentMethod__SWIG_1(val), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte value { + set { + msclPINVOKE.HeadingAlignmentMethod_value_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + byte ret = msclPINVOKE.HeadingAlignmentMethod_value_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public void select(HeadingAlignmentOption option) { + msclPINVOKE.HeadingAlignmentMethod_select(swigCPtr, (int)option); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void deselect(HeadingAlignmentOption option) { + msclPINVOKE.HeadingAlignmentMethod_deselect(swigCPtr, (int)option); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool selected(HeadingAlignmentOption option) { + bool ret = msclPINVOKE.HeadingAlignmentMethod_selected(swigCPtr, (int)option); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + +} + +} diff --git a/MSCL_Managed/mscl/HeadingAlignmentOption.cs b/MSCL_Managed/mscl/HeadingAlignmentOption.cs index 3f14ed101..929aa3160 100644 --- a/MSCL_Managed/mscl/HeadingAlignmentOption.cs +++ b/MSCL_Managed/mscl/HeadingAlignmentOption.cs @@ -1,19 +1,19 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public enum HeadingAlignmentOption { - GNSS_DualAntenna = 0x01, - GNSS_Kinematic = 0x02, - Magnetometer = 0x04 -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public enum HeadingAlignmentOption { + GNSS_DualAntenna = 0x01, + GNSS_Kinematic = 0x02, + Magnetometer = 0x04 +} + +} diff --git a/MSCL_Managed/mscl/InertialTypes.cs b/MSCL_Managed/mscl/InertialTypes.cs index e9a28d075..9dd7ff25e 100644 --- a/MSCL_Managed/mscl/InertialTypes.cs +++ b/MSCL_Managed/mscl/InertialTypes.cs @@ -274,6 +274,7 @@ public enum AutoAdaptiveFilteringLevel { public enum FactoryStreamingOption { FACTORY_STREAMING_OVERWRITE = 0x00, + FACTORY_STREAMING_MERGE = 0x01, FACTORY_STREAMING_ADDITIVE = 0x02 } diff --git a/MSCL_Managed/mscl/MipChannelIdentifier.cs b/MSCL_Managed/mscl/MipChannelIdentifier.cs index e25a0b772..232d1c6e9 100644 --- a/MSCL_Managed/mscl/MipChannelIdentifier.cs +++ b/MSCL_Managed/mscl/MipChannelIdentifier.cs @@ -1,191 +1,191 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipChannelIdentifier : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipChannelIdentifier(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipChannelIdentifier obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipChannelIdentifier() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_MipChannelIdentifier(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public MipChannelIdentifier() : this(msclPINVOKE.new_MipChannelIdentifier__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifier(MipChannelIdentifier.Type identiferType, uint id) : this(msclPINVOKE.new_MipChannelIdentifier__SWIG_1((int)identiferType, id), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifier(MipChannelIdentifier.Type identiferType, uint id, uint specifier) : this(msclPINVOKE.new_MipChannelIdentifier__SWIG_2((int)identiferType, id, specifier), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifier.Type identifierType() { - MipChannelIdentifier.Type ret = (MipChannelIdentifier.Type)msclPINVOKE.MipChannelIdentifier_identifierType(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint id() { - uint ret = msclPINVOKE.MipChannelIdentifier_id(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool hasSpecifier() { - bool ret = msclPINVOKE.MipChannelIdentifier_hasSpecifier(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint specifier() { - uint ret = msclPINVOKE.MipChannelIdentifier_specifier(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string name(bool standardizedFormat) { - string ret = msclPINVOKE.MipChannelIdentifier_name__SWIG_0(swigCPtr, standardizedFormat); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string name() { - string ret = msclPINVOKE.MipChannelIdentifier_name__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum Type { - GNSS_RECEIVER_ID, - GNSS_BASE_STATION_ID, - GNSS_CONSTELLATION, - GNSS_SATELLITE_ID, - GNSS_SIGNAL_ID, - AIDING_MEASUREMENT_TYPE - } - - public enum AidingMeasurementTypes { - GNSS = 0x01, - DUAL_ANTENNA = 0x02, - HEADING = 0x03, - PRESSURE = 0x04, - MAGNETOMETER = 0x05, - SPEED = 0x06 - } - - public enum GnssConstellationIds { - UNKNOWN_CONSTELLATION = 0, - GPS = 1, - GLONASS = 2, - GALILEO = 3, - BEIDOU = 4 - } - - public enum GnssSignalIds { - UNKNOWN_SIGNAL = 0, - GPS_L1CA = 1, - GPS_L1P = 2, - GPS_L1Z = 3, - GPS_L2CA = 4, - GPS_L2P = 5, - GPS_L2Z = 6, - GPS_L2CL = 7, - GPS_L2CM = 8, - GPS_L2CML = 9, - GPS_L5I = 10, - GPS_L5Q = 11, - GPS_L5IQ = 12, - GPS_L1CD = 13, - GPS_L1CP = 14, - GPS_L1CDP = 15, - GLONASS_G1CA = 32, - GLONASS_G1P = 33, - GLONASS_G2C = 34, - GLONASS_G2P = 35, - GALILEO_E1C = 64, - GALILEO_E1A = 65, - GALILEO_E1B = 66, - GALILEO_E1BC = 67, - GALILEO_E1ABC = 68, - GALILEO_E6C = 69, - GALILEO_E6A = 70, - GALILEO_E6B = 71, - GALILEO_E6BC = 72, - GALILEO_E6ABC = 73, - GALILEO_E5BI = 74, - GALILEO_E5BQ = 75, - GALILEO_E5BIQ = 76, - GALILEO_E5ABI = 77, - GALILEO_E5ABQ = 78, - GALILEO_E5ABIQ = 79, - GALILEO_E5AI = 80, - GALILEO_E5AQ = 81, - GALILEO_E5AIQ = 82, - SBAS_L1CA = 96, - SBAS_L5I = 97, - SBAS_L5Q = 98, - SBAS_L5IQ = 99, - QZSS_L1CA = 128, - QZSS_LEXS = 129, - QZSS_LEXL = 130, - QZSS_LEXSL = 131, - QZSS_L2CM = 132, - QZSS_L2CL = 133, - QZSS_L2CML = 134, - QZSS_L5I = 135, - QZSS_L5Q = 136, - QZSS_L5IQ = 137, - QZSS_L1CD = 138, - QZSS_L1CP = 139, - QZSS_L1CDP = 140, - BEIDOU_B1I = 160, - BEIDOU_B1Q = 161, - BEIDOU_B1IQ = 162, - BEIDOU_B3I = 163, - BEIDOU_B3Q = 164, - BEIDOU_B3IQ = 165, - BEIDOU_B2I = 166, - BEIDOU_B2Q = 167, - BEIDOU_B2IQ = 168 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipChannelIdentifier : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipChannelIdentifier(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipChannelIdentifier obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipChannelIdentifier() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_MipChannelIdentifier(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public MipChannelIdentifier() : this(msclPINVOKE.new_MipChannelIdentifier__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifier(MipChannelIdentifier.Type identiferType, uint id) : this(msclPINVOKE.new_MipChannelIdentifier__SWIG_1((int)identiferType, id), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifier(MipChannelIdentifier.Type identiferType, uint id, uint specifier) : this(msclPINVOKE.new_MipChannelIdentifier__SWIG_2((int)identiferType, id, specifier), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifier.Type identifierType() { + MipChannelIdentifier.Type ret = (MipChannelIdentifier.Type)msclPINVOKE.MipChannelIdentifier_identifierType(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint id() { + uint ret = msclPINVOKE.MipChannelIdentifier_id(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool hasSpecifier() { + bool ret = msclPINVOKE.MipChannelIdentifier_hasSpecifier(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint specifier() { + uint ret = msclPINVOKE.MipChannelIdentifier_specifier(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string name(bool standardizedFormat) { + string ret = msclPINVOKE.MipChannelIdentifier_name__SWIG_0(swigCPtr, standardizedFormat); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string name() { + string ret = msclPINVOKE.MipChannelIdentifier_name__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum Type { + GNSS_RECEIVER_ID, + GNSS_BASE_STATION_ID, + GNSS_CONSTELLATION, + GNSS_SATELLITE_ID, + GNSS_SIGNAL_ID, + AIDING_MEASUREMENT_TYPE + } + + public enum AidingMeasurementTypes { + GNSS = 0x01, + DUAL_ANTENNA = 0x02, + HEADING = 0x03, + PRESSURE = 0x04, + MAGNETOMETER = 0x05, + SPEED = 0x06 + } + + public enum GnssConstellationIds { + UNKNOWN_CONSTELLATION = 0, + GPS = 1, + GLONASS = 2, + GALILEO = 3, + BEIDOU = 4 + } + + public enum GnssSignalIds { + UNKNOWN_SIGNAL = 0, + GPS_L1CA = 1, + GPS_L1P = 2, + GPS_L1Z = 3, + GPS_L2CA = 4, + GPS_L2P = 5, + GPS_L2Z = 6, + GPS_L2CL = 7, + GPS_L2CM = 8, + GPS_L2CML = 9, + GPS_L5I = 10, + GPS_L5Q = 11, + GPS_L5IQ = 12, + GPS_L1CD = 13, + GPS_L1CP = 14, + GPS_L1CDP = 15, + GLONASS_G1CA = 32, + GLONASS_G1P = 33, + GLONASS_G2C = 34, + GLONASS_G2P = 35, + GALILEO_E1C = 64, + GALILEO_E1A = 65, + GALILEO_E1B = 66, + GALILEO_E1BC = 67, + GALILEO_E1ABC = 68, + GALILEO_E6C = 69, + GALILEO_E6A = 70, + GALILEO_E6B = 71, + GALILEO_E6BC = 72, + GALILEO_E6ABC = 73, + GALILEO_E5BI = 74, + GALILEO_E5BQ = 75, + GALILEO_E5BIQ = 76, + GALILEO_E5ABI = 77, + GALILEO_E5ABQ = 78, + GALILEO_E5ABIQ = 79, + GALILEO_E5AI = 80, + GALILEO_E5AQ = 81, + GALILEO_E5AIQ = 82, + SBAS_L1CA = 96, + SBAS_L5I = 97, + SBAS_L5Q = 98, + SBAS_L5IQ = 99, + QZSS_L1CA = 128, + QZSS_LEXS = 129, + QZSS_LEXL = 130, + QZSS_LEXSL = 131, + QZSS_L2CM = 132, + QZSS_L2CL = 133, + QZSS_L2CML = 134, + QZSS_L5I = 135, + QZSS_L5Q = 136, + QZSS_L5IQ = 137, + QZSS_L1CD = 138, + QZSS_L1CP = 139, + QZSS_L1CDP = 140, + BEIDOU_B1I = 160, + BEIDOU_B1Q = 161, + BEIDOU_B1IQ = 162, + BEIDOU_B3I = 163, + BEIDOU_B3Q = 164, + BEIDOU_B3IQ = 165, + BEIDOU_B2I = 166, + BEIDOU_B2Q = 167, + BEIDOU_B2IQ = 168 + } + +} + +} diff --git a/MSCL_Managed/mscl/MipChannelIdentifiers.cs b/MSCL_Managed/mscl/MipChannelIdentifiers.cs index 0c6a8713e..9f432be5b 100644 --- a/MSCL_Managed/mscl/MipChannelIdentifiers.cs +++ b/MSCL_Managed/mscl/MipChannelIdentifiers.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipChannelIdentifiers : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipChannelIdentifiers(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipChannelIdentifiers obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipChannelIdentifiers() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_MipChannelIdentifiers(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public MipChannelIdentifiers(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (MipChannelIdentifier element in c) { - this.Add(element); - } - } - - public MipChannelIdentifiers(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (MipChannelIdentifier element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public MipChannelIdentifier this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(MipChannelIdentifier[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(MipChannelIdentifier[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, MipChannelIdentifier[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new MipChannelIdentifiersEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new MipChannelIdentifiersEnumerator(this); - } - - public MipChannelIdentifiersEnumerator GetEnumerator() { - return new MipChannelIdentifiersEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class MipChannelIdentifiersEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private MipChannelIdentifiers collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public MipChannelIdentifiersEnumerator(MipChannelIdentifiers collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public MipChannelIdentifier Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (MipChannelIdentifier)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.MipChannelIdentifiers_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(MipChannelIdentifier x) { - msclPINVOKE.MipChannelIdentifiers_Add(swigCPtr, MipChannelIdentifier.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.MipChannelIdentifiers_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.MipChannelIdentifiers_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.MipChannelIdentifiers_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifiers() : this(msclPINVOKE.new_MipChannelIdentifiers__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifiers(MipChannelIdentifiers other) : this(msclPINVOKE.new_MipChannelIdentifiers__SWIG_1(MipChannelIdentifiers.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifiers(int capacity) : this(msclPINVOKE.new_MipChannelIdentifiers__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private MipChannelIdentifier getitemcopy(int index) { - MipChannelIdentifier ret = new MipChannelIdentifier(msclPINVOKE.MipChannelIdentifiers_getitemcopy(swigCPtr, index), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private MipChannelIdentifier getitem(int index) { - MipChannelIdentifier ret = new MipChannelIdentifier(msclPINVOKE.MipChannelIdentifiers_getitem(swigCPtr, index), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, MipChannelIdentifier val) { - msclPINVOKE.MipChannelIdentifiers_setitem(swigCPtr, index, MipChannelIdentifier.getCPtr(val)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(MipChannelIdentifiers values) { - msclPINVOKE.MipChannelIdentifiers_AddRange(swigCPtr, MipChannelIdentifiers.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipChannelIdentifiers GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.MipChannelIdentifiers_GetRange(swigCPtr, index, count); - MipChannelIdentifiers ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipChannelIdentifiers(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, MipChannelIdentifier x) { - msclPINVOKE.MipChannelIdentifiers_Insert(swigCPtr, index, MipChannelIdentifier.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, MipChannelIdentifiers values) { - msclPINVOKE.MipChannelIdentifiers_InsertRange(swigCPtr, index, MipChannelIdentifiers.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.MipChannelIdentifiers_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.MipChannelIdentifiers_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static MipChannelIdentifiers Repeat(MipChannelIdentifier value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.MipChannelIdentifiers_Repeat(MipChannelIdentifier.getCPtr(value), count); - MipChannelIdentifiers ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipChannelIdentifiers(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.MipChannelIdentifiers_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.MipChannelIdentifiers_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, MipChannelIdentifiers values) { - msclPINVOKE.MipChannelIdentifiers_SetRange(swigCPtr, index, MipChannelIdentifiers.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipChannelIdentifiers : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipChannelIdentifiers(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipChannelIdentifiers obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipChannelIdentifiers() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_MipChannelIdentifiers(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public MipChannelIdentifiers(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (MipChannelIdentifier element in c) { + this.Add(element); + } + } + + public MipChannelIdentifiers(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (MipChannelIdentifier element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public MipChannelIdentifier this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(MipChannelIdentifier[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(MipChannelIdentifier[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, MipChannelIdentifier[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new MipChannelIdentifiersEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new MipChannelIdentifiersEnumerator(this); + } + + public MipChannelIdentifiersEnumerator GetEnumerator() { + return new MipChannelIdentifiersEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class MipChannelIdentifiersEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private MipChannelIdentifiers collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public MipChannelIdentifiersEnumerator(MipChannelIdentifiers collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public MipChannelIdentifier Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (MipChannelIdentifier)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.MipChannelIdentifiers_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(MipChannelIdentifier x) { + msclPINVOKE.MipChannelIdentifiers_Add(swigCPtr, MipChannelIdentifier.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.MipChannelIdentifiers_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.MipChannelIdentifiers_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.MipChannelIdentifiers_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifiers() : this(msclPINVOKE.new_MipChannelIdentifiers__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifiers(MipChannelIdentifiers other) : this(msclPINVOKE.new_MipChannelIdentifiers__SWIG_1(MipChannelIdentifiers.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifiers(int capacity) : this(msclPINVOKE.new_MipChannelIdentifiers__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private MipChannelIdentifier getitemcopy(int index) { + MipChannelIdentifier ret = new MipChannelIdentifier(msclPINVOKE.MipChannelIdentifiers_getitemcopy(swigCPtr, index), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private MipChannelIdentifier getitem(int index) { + MipChannelIdentifier ret = new MipChannelIdentifier(msclPINVOKE.MipChannelIdentifiers_getitem(swigCPtr, index), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, MipChannelIdentifier val) { + msclPINVOKE.MipChannelIdentifiers_setitem(swigCPtr, index, MipChannelIdentifier.getCPtr(val)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(MipChannelIdentifiers values) { + msclPINVOKE.MipChannelIdentifiers_AddRange(swigCPtr, MipChannelIdentifiers.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipChannelIdentifiers GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.MipChannelIdentifiers_GetRange(swigCPtr, index, count); + MipChannelIdentifiers ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipChannelIdentifiers(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, MipChannelIdentifier x) { + msclPINVOKE.MipChannelIdentifiers_Insert(swigCPtr, index, MipChannelIdentifier.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, MipChannelIdentifiers values) { + msclPINVOKE.MipChannelIdentifiers_InsertRange(swigCPtr, index, MipChannelIdentifiers.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.MipChannelIdentifiers_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.MipChannelIdentifiers_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static MipChannelIdentifiers Repeat(MipChannelIdentifier value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.MipChannelIdentifiers_Repeat(MipChannelIdentifier.getCPtr(value), count); + MipChannelIdentifiers ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipChannelIdentifiers(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.MipChannelIdentifiers_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.MipChannelIdentifiers_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, MipChannelIdentifiers values) { + msclPINVOKE.MipChannelIdentifiers_SetRange(swigCPtr, index, MipChannelIdentifiers.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/MipCommandParamPair.cs b/MSCL_Managed/mscl/MipCommandParamPair.cs index 6b09a802d..297423216 100644 --- a/MSCL_Managed/mscl/MipCommandParamPair.cs +++ b/MSCL_Managed/mscl/MipCommandParamPair.cs @@ -1,86 +1,86 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipCommandParamPair : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipCommandParamPair(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipCommandParamPair obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipCommandParamPair() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_MipCommandParamPair(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public MipCommandParamPair() : this(msclPINVOKE.new_MipCommandParamPair__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipCommandParamPair(MipTypes.Command first, MipFieldValues second) : this(msclPINVOKE.new_MipCommandParamPair__SWIG_1((int)first, MipFieldValues.getCPtr(second)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipCommandParamPair(MipCommandParamPair other) : this(msclPINVOKE.new_MipCommandParamPair__SWIG_2(MipCommandParamPair.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipTypes.Command first { - set { - msclPINVOKE.MipCommandParamPair_first_set(swigCPtr, (int)value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - MipTypes.Command ret = (MipTypes.Command)msclPINVOKE.MipCommandParamPair_first_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public MipFieldValues second { - set { - msclPINVOKE.MipCommandParamPair_second_set(swigCPtr, MipFieldValues.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.MipCommandParamPair_second_get(swigCPtr); - MipFieldValues ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipFieldValues(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipCommandParamPair : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipCommandParamPair(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipCommandParamPair obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipCommandParamPair() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_MipCommandParamPair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public MipCommandParamPair() : this(msclPINVOKE.new_MipCommandParamPair__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipCommandParamPair(MipTypes.Command first, MipFieldValues second) : this(msclPINVOKE.new_MipCommandParamPair__SWIG_1((int)first, MipFieldValues.getCPtr(second)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipCommandParamPair(MipCommandParamPair other) : this(msclPINVOKE.new_MipCommandParamPair__SWIG_2(MipCommandParamPair.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipTypes.Command first { + set { + msclPINVOKE.MipCommandParamPair_first_set(swigCPtr, (int)value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + MipTypes.Command ret = (MipTypes.Command)msclPINVOKE.MipCommandParamPair_first_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public MipFieldValues second { + set { + msclPINVOKE.MipCommandParamPair_second_set(swigCPtr, MipFieldValues.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.MipCommandParamPair_second_get(swigCPtr); + MipFieldValues ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipFieldValues(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + +} + +} diff --git a/MSCL_Managed/mscl/MipCommandParameters.cs b/MSCL_Managed/mscl/MipCommandParameters.cs index 9fcf9ca2a..a3cc75dad 100644 --- a/MSCL_Managed/mscl/MipCommandParameters.cs +++ b/MSCL_Managed/mscl/MipCommandParameters.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipCommandParameters : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipCommandParameters(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipCommandParameters obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipCommandParameters() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_MipCommandParameters(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public MipCommandParameters(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (MipCommandParamPair element in c) { - this.Add(element); - } - } - - public MipCommandParameters(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (MipCommandParamPair element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public MipCommandParamPair this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(MipCommandParamPair[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(MipCommandParamPair[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, MipCommandParamPair[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new MipCommandParametersEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new MipCommandParametersEnumerator(this); - } - - public MipCommandParametersEnumerator GetEnumerator() { - return new MipCommandParametersEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class MipCommandParametersEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private MipCommandParameters collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public MipCommandParametersEnumerator(MipCommandParameters collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public MipCommandParamPair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (MipCommandParamPair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.MipCommandParameters_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(MipCommandParamPair x) { - msclPINVOKE.MipCommandParameters_Add(swigCPtr, MipCommandParamPair.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.MipCommandParameters_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.MipCommandParameters_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.MipCommandParameters_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipCommandParameters() : this(msclPINVOKE.new_MipCommandParameters__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipCommandParameters(MipCommandParameters other) : this(msclPINVOKE.new_MipCommandParameters__SWIG_1(MipCommandParameters.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipCommandParameters(int capacity) : this(msclPINVOKE.new_MipCommandParameters__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private MipCommandParamPair getitemcopy(int index) { - MipCommandParamPair ret = new MipCommandParamPair(msclPINVOKE.MipCommandParameters_getitemcopy(swigCPtr, index), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private MipCommandParamPair getitem(int index) { - MipCommandParamPair ret = new MipCommandParamPair(msclPINVOKE.MipCommandParameters_getitem(swigCPtr, index), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, MipCommandParamPair val) { - msclPINVOKE.MipCommandParameters_setitem(swigCPtr, index, MipCommandParamPair.getCPtr(val)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(MipCommandParameters values) { - msclPINVOKE.MipCommandParameters_AddRange(swigCPtr, MipCommandParameters.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipCommandParameters GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.MipCommandParameters_GetRange(swigCPtr, index, count); - MipCommandParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipCommandParameters(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, MipCommandParamPair x) { - msclPINVOKE.MipCommandParameters_Insert(swigCPtr, index, MipCommandParamPair.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, MipCommandParameters values) { - msclPINVOKE.MipCommandParameters_InsertRange(swigCPtr, index, MipCommandParameters.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.MipCommandParameters_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.MipCommandParameters_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static MipCommandParameters Repeat(MipCommandParamPair value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.MipCommandParameters_Repeat(MipCommandParamPair.getCPtr(value), count); - MipCommandParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipCommandParameters(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.MipCommandParameters_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.MipCommandParameters_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, MipCommandParameters values) { - msclPINVOKE.MipCommandParameters_SetRange(swigCPtr, index, MipCommandParameters.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipCommandParameters : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipCommandParameters(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipCommandParameters obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipCommandParameters() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_MipCommandParameters(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public MipCommandParameters(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (MipCommandParamPair element in c) { + this.Add(element); + } + } + + public MipCommandParameters(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (MipCommandParamPair element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public MipCommandParamPair this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(MipCommandParamPair[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(MipCommandParamPair[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, MipCommandParamPair[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new MipCommandParametersEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new MipCommandParametersEnumerator(this); + } + + public MipCommandParametersEnumerator GetEnumerator() { + return new MipCommandParametersEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class MipCommandParametersEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private MipCommandParameters collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public MipCommandParametersEnumerator(MipCommandParameters collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public MipCommandParamPair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (MipCommandParamPair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.MipCommandParameters_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(MipCommandParamPair x) { + msclPINVOKE.MipCommandParameters_Add(swigCPtr, MipCommandParamPair.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.MipCommandParameters_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.MipCommandParameters_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.MipCommandParameters_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipCommandParameters() : this(msclPINVOKE.new_MipCommandParameters__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipCommandParameters(MipCommandParameters other) : this(msclPINVOKE.new_MipCommandParameters__SWIG_1(MipCommandParameters.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipCommandParameters(int capacity) : this(msclPINVOKE.new_MipCommandParameters__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private MipCommandParamPair getitemcopy(int index) { + MipCommandParamPair ret = new MipCommandParamPair(msclPINVOKE.MipCommandParameters_getitemcopy(swigCPtr, index), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private MipCommandParamPair getitem(int index) { + MipCommandParamPair ret = new MipCommandParamPair(msclPINVOKE.MipCommandParameters_getitem(swigCPtr, index), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, MipCommandParamPair val) { + msclPINVOKE.MipCommandParameters_setitem(swigCPtr, index, MipCommandParamPair.getCPtr(val)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(MipCommandParameters values) { + msclPINVOKE.MipCommandParameters_AddRange(swigCPtr, MipCommandParameters.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipCommandParameters GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.MipCommandParameters_GetRange(swigCPtr, index, count); + MipCommandParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipCommandParameters(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, MipCommandParamPair x) { + msclPINVOKE.MipCommandParameters_Insert(swigCPtr, index, MipCommandParamPair.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, MipCommandParameters values) { + msclPINVOKE.MipCommandParameters_InsertRange(swigCPtr, index, MipCommandParameters.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.MipCommandParameters_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.MipCommandParameters_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static MipCommandParameters Repeat(MipCommandParamPair value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.MipCommandParameters_Repeat(MipCommandParamPair.getCPtr(value), count); + MipCommandParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipCommandParameters(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.MipCommandParameters_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.MipCommandParameters_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, MipCommandParameters values) { + msclPINVOKE.MipCommandParameters_SetRange(swigCPtr, index, MipCommandParameters.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/MipFieldValues.cs b/MSCL_Managed/mscl/MipFieldValues.cs index 3acb5bb80..0ed1f0e89 100644 --- a/MSCL_Managed/mscl/MipFieldValues.cs +++ b/MSCL_Managed/mscl/MipFieldValues.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipFieldValues : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipFieldValues(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipFieldValues obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipFieldValues() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_MipFieldValues(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public MipFieldValues(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (Value element in c) { - this.Add(element); - } - } - - public MipFieldValues(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (Value element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public Value this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(Value[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(Value[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, Value[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new MipFieldValuesEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new MipFieldValuesEnumerator(this); - } - - public MipFieldValuesEnumerator GetEnumerator() { - return new MipFieldValuesEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class MipFieldValuesEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private MipFieldValues collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public MipFieldValuesEnumerator(MipFieldValues collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public Value Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (Value)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.MipFieldValues_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(Value x) { - msclPINVOKE.MipFieldValues_Add(swigCPtr, Value.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.MipFieldValues_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.MipFieldValues_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.MipFieldValues_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipFieldValues() : this(msclPINVOKE.new_MipFieldValues__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipFieldValues(MipFieldValues other) : this(msclPINVOKE.new_MipFieldValues__SWIG_1(MipFieldValues.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipFieldValues(int capacity) : this(msclPINVOKE.new_MipFieldValues__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private Value getitemcopy(int index) { - Value ret = new Value(msclPINVOKE.MipFieldValues_getitemcopy(swigCPtr, index), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Value getitem(int index) { - Value ret = new Value(msclPINVOKE.MipFieldValues_getitem(swigCPtr, index), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, Value val) { - msclPINVOKE.MipFieldValues_setitem(swigCPtr, index, Value.getCPtr(val)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(MipFieldValues values) { - msclPINVOKE.MipFieldValues_AddRange(swigCPtr, MipFieldValues.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipFieldValues GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.MipFieldValues_GetRange(swigCPtr, index, count); - MipFieldValues ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipFieldValues(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, Value x) { - msclPINVOKE.MipFieldValues_Insert(swigCPtr, index, Value.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, MipFieldValues values) { - msclPINVOKE.MipFieldValues_InsertRange(swigCPtr, index, MipFieldValues.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.MipFieldValues_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.MipFieldValues_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static MipFieldValues Repeat(Value value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.MipFieldValues_Repeat(Value.getCPtr(value), count); - MipFieldValues ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipFieldValues(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.MipFieldValues_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.MipFieldValues_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, MipFieldValues values) { - msclPINVOKE.MipFieldValues_SetRange(swigCPtr, index, MipFieldValues.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipFieldValues : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipFieldValues(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipFieldValues obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipFieldValues() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_MipFieldValues(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public MipFieldValues(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (Value element in c) { + this.Add(element); + } + } + + public MipFieldValues(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (Value element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public Value this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(Value[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(Value[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, Value[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new MipFieldValuesEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new MipFieldValuesEnumerator(this); + } + + public MipFieldValuesEnumerator GetEnumerator() { + return new MipFieldValuesEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class MipFieldValuesEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private MipFieldValues collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public MipFieldValuesEnumerator(MipFieldValues collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public Value Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (Value)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.MipFieldValues_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(Value x) { + msclPINVOKE.MipFieldValues_Add(swigCPtr, Value.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.MipFieldValues_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.MipFieldValues_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.MipFieldValues_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipFieldValues() : this(msclPINVOKE.new_MipFieldValues__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipFieldValues(MipFieldValues other) : this(msclPINVOKE.new_MipFieldValues__SWIG_1(MipFieldValues.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipFieldValues(int capacity) : this(msclPINVOKE.new_MipFieldValues__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private Value getitemcopy(int index) { + Value ret = new Value(msclPINVOKE.MipFieldValues_getitemcopy(swigCPtr, index), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Value getitem(int index) { + Value ret = new Value(msclPINVOKE.MipFieldValues_getitem(swigCPtr, index), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, Value val) { + msclPINVOKE.MipFieldValues_setitem(swigCPtr, index, Value.getCPtr(val)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(MipFieldValues values) { + msclPINVOKE.MipFieldValues_AddRange(swigCPtr, MipFieldValues.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipFieldValues GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.MipFieldValues_GetRange(swigCPtr, index, count); + MipFieldValues ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipFieldValues(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, Value x) { + msclPINVOKE.MipFieldValues_Insert(swigCPtr, index, Value.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, MipFieldValues values) { + msclPINVOKE.MipFieldValues_InsertRange(swigCPtr, index, MipFieldValues.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.MipFieldValues_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.MipFieldValues_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static MipFieldValues Repeat(Value value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.MipFieldValues_Repeat(Value.getCPtr(value), count); + MipFieldValues ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipFieldValues(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.MipFieldValues_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.MipFieldValues_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, MipFieldValues values) { + msclPINVOKE.MipFieldValues_SetRange(swigCPtr, index, MipFieldValues.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/MipModels.cs b/MSCL_Managed/mscl/MipModels.cs index d1e133555..f23d39643 100644 --- a/MSCL_Managed/mscl/MipModels.cs +++ b/MSCL_Managed/mscl/MipModels.cs @@ -1,89 +1,89 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipModels : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipModels(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipModels obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipModels() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_MipModels(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public MipModels() : this(msclPINVOKE.new_MipModels(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum NodeModel { - node_3dm = 6201, - node_fasA = 6207, - node_3dm_gx2 = 6215, - node_3dm_dh3 = 6219, - node_3dm_gx3_15 = 6227, - node_3dm_gx3_25 = 6223, - node_3dm_gx3_35 = 6225, - node_3dm_gx3_45 = 6228, - node_3dm_rq1_45_lt = 6232, - node_3dm_gx4_15 = 6233, - node_3dm_gx4_25 = 6234, - node_3dm_gx4_45 = 6236, - node_3dm_rq1_45_st = 6239, - node_mv5_ar = 6243, - node_3dm_gx5_10 = 6255, - node_3dm_gx5_15 = 6254, - node_3dm_gx5_25 = 6253, - node_3dm_gx5_35 = 6252, - node_3dm_gx5_45 = 6251, - node_3dm_cv5_10 = 6259, - node_3dm_cv5_15 = 6258, - node_3dm_cv5_25 = 6257, - node_3dm_cv5_45 = 6256, - node_3dm_gq4_45 = 6250, - node_3dm_cx5_45 = 6271, - node_3dm_cx5_35 = 6272, - node_3dm_cx5_25 = 6273, - node_3dm_cx5_15 = 6274, - node_3dm_cx5_10 = 6275, - node_3dm_cl5_15 = 6280, - node_3dm_cl5_25 = 6281, - node_3dm_gq7 = 6284, - node_3dm_rtk = 6285 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipModels : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipModels(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipModels obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipModels() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_MipModels(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public MipModels() : this(msclPINVOKE.new_MipModels(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum NodeModel { + node_3dm = 6201, + node_fasA = 6207, + node_3dm_gx2 = 6215, + node_3dm_dh3 = 6219, + node_3dm_gx3_15 = 6227, + node_3dm_gx3_25 = 6223, + node_3dm_gx3_35 = 6225, + node_3dm_gx3_45 = 6228, + node_3dm_rq1_45_lt = 6232, + node_3dm_gx4_15 = 6233, + node_3dm_gx4_25 = 6234, + node_3dm_gx4_45 = 6236, + node_3dm_rq1_45_st = 6239, + node_mv5_ar = 6243, + node_3dm_gx5_10 = 6255, + node_3dm_gx5_15 = 6254, + node_3dm_gx5_25 = 6253, + node_3dm_gx5_35 = 6252, + node_3dm_gx5_45 = 6251, + node_3dm_cv5_10 = 6259, + node_3dm_cv5_15 = 6258, + node_3dm_cv5_25 = 6257, + node_3dm_cv5_45 = 6256, + node_3dm_gq4_45 = 6250, + node_3dm_cx5_45 = 6271, + node_3dm_cx5_35 = 6272, + node_3dm_cx5_25 = 6273, + node_3dm_cx5_15 = 6274, + node_3dm_cx5_10 = 6275, + node_3dm_cl5_15 = 6280, + node_3dm_cl5_25 = 6281, + node_3dm_gq7 = 6284, + node_3dm_rtk = 6285 + } + +} + +} diff --git a/MSCL_Managed/mscl/MipNode.cs b/MSCL_Managed/mscl/MipNode.cs index b104a5d23..5e121f1cb 100644 --- a/MSCL_Managed/mscl/MipNode.cs +++ b/MSCL_Managed/mscl/MipNode.cs @@ -1,304 +1,304 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class MipNode : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal MipNode(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipNode obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~MipNode() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public virtual Bytes doCommand(byte descriptorSet, byte cmdDescriptor, Bytes fieldData, bool ackNackResponse, bool dataResponse, byte responseDataDescriptor) { - Bytes ret = new Bytes(msclPINVOKE.MipNode_doCommand__SWIG_0(swigCPtr, descriptorSet, cmdDescriptor, Bytes.getCPtr(fieldData), ackNackResponse, dataResponse, responseDataDescriptor), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual Bytes doCommand(byte descriptorSet, byte cmdDescriptor, Bytes fieldData, bool ackNackResponse, bool dataResponse) { - Bytes ret = new Bytes(msclPINVOKE.MipNode_doCommand__SWIG_1(swigCPtr, descriptorSet, cmdDescriptor, Bytes.getCPtr(fieldData), ackNackResponse, dataResponse), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public MipCommandSet getConfigCommandBytes() { - MipCommandSet ret = new MipCommandSet(msclPINVOKE.MipNode_getConfigCommandBytes(swigCPtr), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void sendCommandBytes(MipCommandSet cmds) { - msclPINVOKE.MipNode_sendCommandBytes__SWIG_0(swigCPtr, MipCommandSet.getCPtr(cmds)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void sendCommandBytes(MipCommandBytes cmd) { - msclPINVOKE.MipNode_sendCommandBytes__SWIG_1(swigCPtr, MipCommandBytes.getCPtr(cmd)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static string deviceName(string serial) { - string ret = msclPINVOKE.MipNode_deviceName(serial); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Connection connection() { - Connection ret = new Connection(msclPINVOKE.MipNode_connection(swigCPtr), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public MipNodeFeatures features() { - MipNodeFeatures ret = new MipNodeFeatures(msclPINVOKE.MipNode_features(swigCPtr), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void clearDeviceInfo() { - msclPINVOKE.MipNode_clearDeviceInfo(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public Timestamp lastCommunicationTime() { - Timestamp ret = new Timestamp(msclPINVOKE.MipNode_lastCommunicationTime(swigCPtr), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public DeviceState lastDeviceState() { - DeviceState ret = (DeviceState)msclPINVOKE.MipNode_lastDeviceState(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void setLastDeviceState(DeviceState state) { - msclPINVOKE.MipNode_setLastDeviceState(swigCPtr, (int)state); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public Version firmwareVersion() { - Version ret = new Version(msclPINVOKE.MipNode_firmwareVersion(swigCPtr), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public MipModels.NodeModel model() { - MipModels.NodeModel ret = (MipModels.NodeModel)msclPINVOKE.MipNode_model(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string modelName() { - string ret = msclPINVOKE.MipNode_modelName(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string modelNumber() { - string ret = msclPINVOKE.MipNode_modelNumber(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string serialNumber() { - string ret = msclPINVOKE.MipNode_serialNumber(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string lotNumber() { - string ret = msclPINVOKE.MipNode_lotNumber(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string deviceOptions() { - string ret = msclPINVOKE.MipNode_deviceOptions(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void timeout(ulong timeout) { - msclPINVOKE.MipNode_timeout__SWIG_0(swigCPtr, timeout); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public ulong timeout() { - ulong ret = msclPINVOKE.MipNode_timeout__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string name() { - string ret = msclPINVOKE.MipNode_name(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool ping() { - bool ret = msclPINVOKE.MipNode_ping(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void setToIdle() { - msclPINVOKE.MipNode_setToIdle(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool cyclePower() { - bool ret = msclPINVOKE.MipNode_cyclePower(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void resume() { - msclPINVOKE.MipNode_resume(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual byte getCommunicationMode() { - byte ret = msclPINVOKE.MipNode_getCommunicationMode(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void setCommunicationMode(byte communicationMode) { - msclPINVOKE.MipNode_setCommunicationMode(swigCPtr, communicationMode); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void saveSettingsAsStartup() { - msclPINVOKE.MipNode_saveSettingsAsStartup__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void saveSettingsAsStartup(MipCommands cmdIds) { - msclPINVOKE.MipNode_saveSettingsAsStartup__SWIG_1(swigCPtr, MipCommands.getCPtr(cmdIds)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void saveSettingsAsStartup(MipCommandParameters cmdParams) { - msclPINVOKE.MipNode_saveSettingsAsStartup__SWIG_2(swigCPtr, MipCommandParameters.getCPtr(cmdParams)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void loadStartupSettings() { - msclPINVOKE.MipNode_loadStartupSettings__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void loadStartupSettings(MipCommands cmdIds) { - msclPINVOKE.MipNode_loadStartupSettings__SWIG_1(swigCPtr, MipCommands.getCPtr(cmdIds)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void loadStartupSettings(MipCommandParameters cmdParams) { - msclPINVOKE.MipNode_loadStartupSettings__SWIG_2(swigCPtr, MipCommandParameters.getCPtr(cmdParams)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void loadFactoryDefaultSettings() { - msclPINVOKE.MipNode_loadFactoryDefaultSettings__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void loadFactoryDefaultSettings(MipCommands cmdIds) { - msclPINVOKE.MipNode_loadFactoryDefaultSettings__SWIG_1(swigCPtr, MipCommands.getCPtr(cmdIds)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void loadFactoryDefaultSettings(MipCommandParameters cmdParams) { - msclPINVOKE.MipNode_loadFactoryDefaultSettings__SWIG_2(swigCPtr, MipCommandParameters.getCPtr(cmdParams)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void setUARTBaudRate(uint baudRate, bool resetConnection) { - msclPINVOKE.MipNode_setUARTBaudRate__SWIG_0(swigCPtr, baudRate, resetConnection); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void setUARTBaudRate(uint baudRate) { - msclPINVOKE.MipNode_setUARTBaudRate__SWIG_1(swigCPtr, baudRate); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void setUARTBaudRate(uint baudRate, byte portId, bool resetConnection) { - msclPINVOKE.MipNode_setUARTBaudRate__SWIG_2(swigCPtr, baudRate, portId, resetConnection); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void setUARTBaudRate(uint baudRate, byte portId) { - msclPINVOKE.MipNode_setUARTBaudRate__SWIG_3(swigCPtr, baudRate, portId); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint getUARTBaudRate(byte portId) { - uint ret = msclPINVOKE.MipNode_getUARTBaudRate__SWIG_0(swigCPtr, portId); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint getUARTBaudRate() { - uint ret = msclPINVOKE.MipNode_getUARTBaudRate__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RawBytePackets getRawBytePackets(uint timeout, uint maxPackets) { - RawBytePackets ret = new RawBytePackets(msclPINVOKE.MipNode_getRawBytePackets__SWIG_0(swigCPtr, timeout, maxPackets), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RawBytePackets getRawBytePackets(uint timeout) { - RawBytePackets ret = new RawBytePackets(msclPINVOKE.MipNode_getRawBytePackets__SWIG_1(swigCPtr, timeout), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RawBytePackets getRawBytePackets() { - RawBytePackets ret = new RawBytePackets(msclPINVOKE.MipNode_getRawBytePackets__SWIG_2(swigCPtr), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class MipNode : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipNode(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MipNode obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipNode() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public virtual Bytes doCommand(byte descriptorSet, byte cmdDescriptor, Bytes fieldData, bool ackNackResponse, bool dataResponse, byte responseDataDescriptor) { + Bytes ret = new Bytes(msclPINVOKE.MipNode_doCommand__SWIG_0(swigCPtr, descriptorSet, cmdDescriptor, Bytes.getCPtr(fieldData), ackNackResponse, dataResponse, responseDataDescriptor), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual Bytes doCommand(byte descriptorSet, byte cmdDescriptor, Bytes fieldData, bool ackNackResponse, bool dataResponse) { + Bytes ret = new Bytes(msclPINVOKE.MipNode_doCommand__SWIG_1(swigCPtr, descriptorSet, cmdDescriptor, Bytes.getCPtr(fieldData), ackNackResponse, dataResponse), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public MipCommandSet getConfigCommandBytes() { + MipCommandSet ret = new MipCommandSet(msclPINVOKE.MipNode_getConfigCommandBytes(swigCPtr), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void sendCommandBytes(MipCommandSet cmds) { + msclPINVOKE.MipNode_sendCommandBytes__SWIG_0(swigCPtr, MipCommandSet.getCPtr(cmds)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void sendCommandBytes(MipCommandBytes cmd) { + msclPINVOKE.MipNode_sendCommandBytes__SWIG_1(swigCPtr, MipCommandBytes.getCPtr(cmd)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static string deviceName(string serial) { + string ret = msclPINVOKE.MipNode_deviceName(serial); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Connection connection() { + Connection ret = new Connection(msclPINVOKE.MipNode_connection(swigCPtr), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public MipNodeFeatures features() { + MipNodeFeatures ret = new MipNodeFeatures(msclPINVOKE.MipNode_features(swigCPtr), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void clearDeviceInfo() { + msclPINVOKE.MipNode_clearDeviceInfo(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public Timestamp lastCommunicationTime() { + Timestamp ret = new Timestamp(msclPINVOKE.MipNode_lastCommunicationTime(swigCPtr), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public DeviceState lastDeviceState() { + DeviceState ret = (DeviceState)msclPINVOKE.MipNode_lastDeviceState(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void setLastDeviceState(DeviceState state) { + msclPINVOKE.MipNode_setLastDeviceState(swigCPtr, (int)state); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public Version firmwareVersion() { + Version ret = new Version(msclPINVOKE.MipNode_firmwareVersion(swigCPtr), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public MipModels.NodeModel model() { + MipModels.NodeModel ret = (MipModels.NodeModel)msclPINVOKE.MipNode_model(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string modelName() { + string ret = msclPINVOKE.MipNode_modelName(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string modelNumber() { + string ret = msclPINVOKE.MipNode_modelNumber(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string serialNumber() { + string ret = msclPINVOKE.MipNode_serialNumber(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string lotNumber() { + string ret = msclPINVOKE.MipNode_lotNumber(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string deviceOptions() { + string ret = msclPINVOKE.MipNode_deviceOptions(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void timeout(ulong timeout) { + msclPINVOKE.MipNode_timeout__SWIG_0(swigCPtr, timeout); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public ulong timeout() { + ulong ret = msclPINVOKE.MipNode_timeout__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string name() { + string ret = msclPINVOKE.MipNode_name(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool ping() { + bool ret = msclPINVOKE.MipNode_ping(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void setToIdle() { + msclPINVOKE.MipNode_setToIdle(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool cyclePower() { + bool ret = msclPINVOKE.MipNode_cyclePower(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void resume() { + msclPINVOKE.MipNode_resume(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual byte getCommunicationMode() { + byte ret = msclPINVOKE.MipNode_getCommunicationMode(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void setCommunicationMode(byte communicationMode) { + msclPINVOKE.MipNode_setCommunicationMode(swigCPtr, communicationMode); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void saveSettingsAsStartup() { + msclPINVOKE.MipNode_saveSettingsAsStartup__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void saveSettingsAsStartup(MipCommands cmdIds) { + msclPINVOKE.MipNode_saveSettingsAsStartup__SWIG_1(swigCPtr, MipCommands.getCPtr(cmdIds)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void saveSettingsAsStartup(MipCommandParameters cmdParams) { + msclPINVOKE.MipNode_saveSettingsAsStartup__SWIG_2(swigCPtr, MipCommandParameters.getCPtr(cmdParams)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void loadStartupSettings() { + msclPINVOKE.MipNode_loadStartupSettings__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void loadStartupSettings(MipCommands cmdIds) { + msclPINVOKE.MipNode_loadStartupSettings__SWIG_1(swigCPtr, MipCommands.getCPtr(cmdIds)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void loadStartupSettings(MipCommandParameters cmdParams) { + msclPINVOKE.MipNode_loadStartupSettings__SWIG_2(swigCPtr, MipCommandParameters.getCPtr(cmdParams)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void loadFactoryDefaultSettings() { + msclPINVOKE.MipNode_loadFactoryDefaultSettings__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void loadFactoryDefaultSettings(MipCommands cmdIds) { + msclPINVOKE.MipNode_loadFactoryDefaultSettings__SWIG_1(swigCPtr, MipCommands.getCPtr(cmdIds)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void loadFactoryDefaultSettings(MipCommandParameters cmdParams) { + msclPINVOKE.MipNode_loadFactoryDefaultSettings__SWIG_2(swigCPtr, MipCommandParameters.getCPtr(cmdParams)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void setUARTBaudRate(uint baudRate, bool resetConnection) { + msclPINVOKE.MipNode_setUARTBaudRate__SWIG_0(swigCPtr, baudRate, resetConnection); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void setUARTBaudRate(uint baudRate) { + msclPINVOKE.MipNode_setUARTBaudRate__SWIG_1(swigCPtr, baudRate); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void setUARTBaudRate(uint baudRate, byte portId, bool resetConnection) { + msclPINVOKE.MipNode_setUARTBaudRate__SWIG_2(swigCPtr, baudRate, portId, resetConnection); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void setUARTBaudRate(uint baudRate, byte portId) { + msclPINVOKE.MipNode_setUARTBaudRate__SWIG_3(swigCPtr, baudRate, portId); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint getUARTBaudRate(byte portId) { + uint ret = msclPINVOKE.MipNode_getUARTBaudRate__SWIG_0(swigCPtr, portId); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint getUARTBaudRate() { + uint ret = msclPINVOKE.MipNode_getUARTBaudRate__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RawBytePackets getRawBytePackets(uint timeout, uint maxPackets) { + RawBytePackets ret = new RawBytePackets(msclPINVOKE.MipNode_getRawBytePackets__SWIG_0(swigCPtr, timeout, maxPackets), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RawBytePackets getRawBytePackets(uint timeout) { + RawBytePackets ret = new RawBytePackets(msclPINVOKE.MipNode_getRawBytePackets__SWIG_1(swigCPtr, timeout), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RawBytePackets getRawBytePackets() { + RawBytePackets ret = new RawBytePackets(msclPINVOKE.MipNode_getRawBytePackets__SWIG_2(swigCPtr), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + +} + +} diff --git a/MSCL_Managed/mscl/OdometerConfiguration.cs b/MSCL_Managed/mscl/OdometerConfiguration.cs index f66ee3bd8..8c9b90988 100644 --- a/MSCL_Managed/mscl/OdometerConfiguration.cs +++ b/MSCL_Managed/mscl/OdometerConfiguration.cs @@ -1,97 +1,97 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class OdometerConfiguration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal OdometerConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OdometerConfiguration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~OdometerConfiguration() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_OdometerConfiguration(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public OdometerConfiguration() : this(msclPINVOKE.new_OdometerConfiguration(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public OdometerConfiguration.Mode mode() { - OdometerConfiguration.Mode ret = (OdometerConfiguration.Mode)msclPINVOKE.OdometerConfiguration_mode__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void mode(OdometerConfiguration.Mode m) { - msclPINVOKE.OdometerConfiguration_mode__SWIG_1(swigCPtr, (int)m); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public float uncertainty() { - float ret = msclPINVOKE.OdometerConfiguration_uncertainty__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void uncertainty(float unc) { - msclPINVOKE.OdometerConfiguration_uncertainty__SWIG_1(swigCPtr, unc); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public float scaling() { - float ret = msclPINVOKE.OdometerConfiguration_scaling__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void scaling(float scale) { - msclPINVOKE.OdometerConfiguration_scaling__SWIG_1(swigCPtr, scale); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void scaling(float resolution, float radius) { - msclPINVOKE.OdometerConfiguration_scaling__SWIG_2(swigCPtr, resolution, radius); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum Mode { - DISABLED = 0x00, - SINGLE = 0x01, - QUADRATURE = 0x02 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class OdometerConfiguration : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal OdometerConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OdometerConfiguration obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~OdometerConfiguration() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_OdometerConfiguration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public OdometerConfiguration() : this(msclPINVOKE.new_OdometerConfiguration(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public OdometerConfiguration.Mode mode() { + OdometerConfiguration.Mode ret = (OdometerConfiguration.Mode)msclPINVOKE.OdometerConfiguration_mode__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void mode(OdometerConfiguration.Mode m) { + msclPINVOKE.OdometerConfiguration_mode__SWIG_1(swigCPtr, (int)m); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public float uncertainty() { + float ret = msclPINVOKE.OdometerConfiguration_uncertainty__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void uncertainty(float unc) { + msclPINVOKE.OdometerConfiguration_uncertainty__SWIG_1(swigCPtr, unc); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public float scaling() { + float ret = msclPINVOKE.OdometerConfiguration_scaling__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void scaling(float scale) { + msclPINVOKE.OdometerConfiguration_scaling__SWIG_1(swigCPtr, scale); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void scaling(float resolution, float radius) { + msclPINVOKE.OdometerConfiguration_scaling__SWIG_2(swigCPtr, resolution, radius); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Mode { + DISABLED = 0x00, + SINGLE = 0x01, + QUADRATURE = 0x02 + } + +} + +} diff --git a/MSCL_Managed/mscl/PositionReferenceConfiguration.cs b/MSCL_Managed/mscl/PositionReferenceConfiguration.cs index de0e3e5c2..c731a6277 100644 --- a/MSCL_Managed/mscl/PositionReferenceConfiguration.cs +++ b/MSCL_Managed/mscl/PositionReferenceConfiguration.cs @@ -1,78 +1,78 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class PositionReferenceConfiguration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal PositionReferenceConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PositionReferenceConfiguration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~PositionReferenceConfiguration() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_PositionReferenceConfiguration(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public bool autoConfig { - set { - msclPINVOKE.PositionReferenceConfiguration_autoConfig_set(swigCPtr, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - bool ret = msclPINVOKE.PositionReferenceConfiguration_autoConfig_get(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Position position { - set { - msclPINVOKE.PositionReferenceConfiguration_position_set(swigCPtr, Position.getCPtr(value)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = msclPINVOKE.PositionReferenceConfiguration_position_get(swigCPtr); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public PositionReferenceConfiguration() : this(msclPINVOKE.new_PositionReferenceConfiguration(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class PositionReferenceConfiguration : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal PositionReferenceConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PositionReferenceConfiguration obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~PositionReferenceConfiguration() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_PositionReferenceConfiguration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public bool autoConfig { + set { + msclPINVOKE.PositionReferenceConfiguration_autoConfig_set(swigCPtr, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + bool ret = msclPINVOKE.PositionReferenceConfiguration_autoConfig_get(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Position position { + set { + msclPINVOKE.PositionReferenceConfiguration_position_set(swigCPtr, Position.getCPtr(value)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = msclPINVOKE.PositionReferenceConfiguration_position_get(swigCPtr); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public PositionReferenceConfiguration() : this(msclPINVOKE.new_PositionReferenceConfiguration(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/PositionVelocityReferenceFrame.cs b/MSCL_Managed/mscl/PositionVelocityReferenceFrame.cs index f9a3a8884..e183336ad 100644 --- a/MSCL_Managed/mscl/PositionVelocityReferenceFrame.cs +++ b/MSCL_Managed/mscl/PositionVelocityReferenceFrame.cs @@ -1,18 +1,18 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public enum PositionVelocityReferenceFrame { - ECEF = 0x01, - LLH_NED = 0x02 -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public enum PositionVelocityReferenceFrame { + ECEF = 0x01, + LLH_NED = 0x02 +} + +} diff --git a/MSCL_Managed/mscl/PpsSourceOptions.cs b/MSCL_Managed/mscl/PpsSourceOptions.cs index 1dbab1a05..1b7532871 100644 --- a/MSCL_Managed/mscl/PpsSourceOptions.cs +++ b/MSCL_Managed/mscl/PpsSourceOptions.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class PpsSourceOptions : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal PpsSourceOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PpsSourceOptions obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~PpsSourceOptions() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_PpsSourceOptions(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public PpsSourceOptions(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (InertialTypes.PpsSource element in c) { - this.Add(element); - } - } - - public PpsSourceOptions(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (InertialTypes.PpsSource element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public InertialTypes.PpsSource this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(InertialTypes.PpsSource[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(InertialTypes.PpsSource[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, InertialTypes.PpsSource[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new PpsSourceOptionsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new PpsSourceOptionsEnumerator(this); - } - - public PpsSourceOptionsEnumerator GetEnumerator() { - return new PpsSourceOptionsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class PpsSourceOptionsEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private PpsSourceOptions collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public PpsSourceOptionsEnumerator(PpsSourceOptions collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public InertialTypes.PpsSource Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (InertialTypes.PpsSource)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.PpsSourceOptions_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(InertialTypes.PpsSource x) { - msclPINVOKE.PpsSourceOptions_Add(swigCPtr, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.PpsSourceOptions_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.PpsSourceOptions_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.PpsSourceOptions_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public PpsSourceOptions() : this(msclPINVOKE.new_PpsSourceOptions__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public PpsSourceOptions(PpsSourceOptions other) : this(msclPINVOKE.new_PpsSourceOptions__SWIG_1(PpsSourceOptions.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public PpsSourceOptions(int capacity) : this(msclPINVOKE.new_PpsSourceOptions__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private InertialTypes.PpsSource getitemcopy(int index) { - InertialTypes.PpsSource ret = (InertialTypes.PpsSource)msclPINVOKE.PpsSourceOptions_getitemcopy(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private InertialTypes.PpsSource getitem(int index) { - InertialTypes.PpsSource ret = (InertialTypes.PpsSource)msclPINVOKE.PpsSourceOptions_getitem(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, InertialTypes.PpsSource val) { - msclPINVOKE.PpsSourceOptions_setitem(swigCPtr, index, (int)val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(PpsSourceOptions values) { - msclPINVOKE.PpsSourceOptions_AddRange(swigCPtr, PpsSourceOptions.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public PpsSourceOptions GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.PpsSourceOptions_GetRange(swigCPtr, index, count); - PpsSourceOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new PpsSourceOptions(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, InertialTypes.PpsSource x) { - msclPINVOKE.PpsSourceOptions_Insert(swigCPtr, index, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, PpsSourceOptions values) { - msclPINVOKE.PpsSourceOptions_InsertRange(swigCPtr, index, PpsSourceOptions.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.PpsSourceOptions_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.PpsSourceOptions_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static PpsSourceOptions Repeat(InertialTypes.PpsSource value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.PpsSourceOptions_Repeat((int)value, count); - PpsSourceOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new PpsSourceOptions(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.PpsSourceOptions_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.PpsSourceOptions_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, PpsSourceOptions values) { - msclPINVOKE.PpsSourceOptions_SetRange(swigCPtr, index, PpsSourceOptions.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class PpsSourceOptions : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal PpsSourceOptions(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PpsSourceOptions obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~PpsSourceOptions() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_PpsSourceOptions(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public PpsSourceOptions(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (InertialTypes.PpsSource element in c) { + this.Add(element); + } + } + + public PpsSourceOptions(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (InertialTypes.PpsSource element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public InertialTypes.PpsSource this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(InertialTypes.PpsSource[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(InertialTypes.PpsSource[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, InertialTypes.PpsSource[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new PpsSourceOptionsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new PpsSourceOptionsEnumerator(this); + } + + public PpsSourceOptionsEnumerator GetEnumerator() { + return new PpsSourceOptionsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class PpsSourceOptionsEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private PpsSourceOptions collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public PpsSourceOptionsEnumerator(PpsSourceOptions collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public InertialTypes.PpsSource Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (InertialTypes.PpsSource)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.PpsSourceOptions_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(InertialTypes.PpsSource x) { + msclPINVOKE.PpsSourceOptions_Add(swigCPtr, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.PpsSourceOptions_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.PpsSourceOptions_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.PpsSourceOptions_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public PpsSourceOptions() : this(msclPINVOKE.new_PpsSourceOptions__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public PpsSourceOptions(PpsSourceOptions other) : this(msclPINVOKE.new_PpsSourceOptions__SWIG_1(PpsSourceOptions.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public PpsSourceOptions(int capacity) : this(msclPINVOKE.new_PpsSourceOptions__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private InertialTypes.PpsSource getitemcopy(int index) { + InertialTypes.PpsSource ret = (InertialTypes.PpsSource)msclPINVOKE.PpsSourceOptions_getitemcopy(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private InertialTypes.PpsSource getitem(int index) { + InertialTypes.PpsSource ret = (InertialTypes.PpsSource)msclPINVOKE.PpsSourceOptions_getitem(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, InertialTypes.PpsSource val) { + msclPINVOKE.PpsSourceOptions_setitem(swigCPtr, index, (int)val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(PpsSourceOptions values) { + msclPINVOKE.PpsSourceOptions_AddRange(swigCPtr, PpsSourceOptions.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public PpsSourceOptions GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.PpsSourceOptions_GetRange(swigCPtr, index, count); + PpsSourceOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new PpsSourceOptions(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, InertialTypes.PpsSource x) { + msclPINVOKE.PpsSourceOptions_Insert(swigCPtr, index, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, PpsSourceOptions values) { + msclPINVOKE.PpsSourceOptions_InsertRange(swigCPtr, index, PpsSourceOptions.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.PpsSourceOptions_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.PpsSourceOptions_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static PpsSourceOptions Repeat(InertialTypes.PpsSource value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.PpsSourceOptions_Repeat((int)value, count); + PpsSourceOptions ret = (cPtr == global::System.IntPtr.Zero) ? null : new PpsSourceOptions(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.PpsSourceOptions_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.PpsSourceOptions_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, PpsSourceOptions values) { + msclPINVOKE.PpsSourceOptions_SetRange(swigCPtr, index, PpsSourceOptions.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/Quaternion.cs b/MSCL_Managed/mscl/Quaternion.cs index 42593daa9..d111e1876 100644 --- a/MSCL_Managed/mscl/Quaternion.cs +++ b/MSCL_Managed/mscl/Quaternion.cs @@ -1,73 +1,73 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class Quaternion : Matrix { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Quaternion(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.Quaternion_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Quaternion obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_Quaternion(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - base.Dispose(disposing); - } - } - - public Quaternion() : this(msclPINVOKE.new_Quaternion__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public Quaternion(float q0, float q1, float q2, float q3) : this(msclPINVOKE.new_Quaternion__SWIG_1(q0, q1, q2, q3), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public Quaternion(MipFieldValues data) : this(msclPINVOKE.new_Quaternion__SWIG_2(MipFieldValues.getCPtr(data)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public float at(byte index) { - float ret = msclPINVOKE.Quaternion_at(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void set(byte index, float val) { - msclPINVOKE.Quaternion_set(swigCPtr, index, val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void normalize() { - msclPINVOKE.Quaternion_normalize(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public MipFieldValues asMipFieldValues() { - MipFieldValues ret = new MipFieldValues(msclPINVOKE.Quaternion_asMipFieldValues(swigCPtr), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class Quaternion : Matrix { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Quaternion(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.Quaternion_SWIGUpcast(cPtr), cMemoryOwn) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Quaternion obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_Quaternion(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + base.Dispose(disposing); + } + } + + public Quaternion() : this(msclPINVOKE.new_Quaternion__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public Quaternion(float q0, float q1, float q2, float q3) : this(msclPINVOKE.new_Quaternion__SWIG_1(q0, q1, q2, q3), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public Quaternion(MipFieldValues data) : this(msclPINVOKE.new_Quaternion__SWIG_2(MipFieldValues.getCPtr(data)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public float at(byte index) { + float ret = msclPINVOKE.Quaternion_at(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void set(byte index, float val) { + msclPINVOKE.Quaternion_set(swigCPtr, index, val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void normalize() { + msclPINVOKE.Quaternion_normalize(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipFieldValues asMipFieldValues() { + MipFieldValues ret = new MipFieldValues(msclPINVOKE.Quaternion_asMipFieldValues(swigCPtr), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + +} + +} diff --git a/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs b/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs index 8cbf49d09..b7482089a 100644 --- a/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs +++ b/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs @@ -1,164 +1,164 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class RTKDeviceStatusFlags : Bitfield { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal RTKDeviceStatusFlags(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.RTKDeviceStatusFlags_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RTKDeviceStatusFlags obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_RTKDeviceStatusFlags(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - base.Dispose(disposing); - } - } - - public RTKDeviceStatusFlags() : this(msclPINVOKE.new_RTKDeviceStatusFlags__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags(uint flags) : this(msclPINVOKE.new_RTKDeviceStatusFlags__SWIG_1(flags), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags.ControllerState controllerState() { - RTKDeviceStatusFlags.ControllerState ret = (RTKDeviceStatusFlags.ControllerState)msclPINVOKE.RTKDeviceStatusFlags_controllerState__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void controllerState(RTKDeviceStatusFlags.ControllerState state) { - msclPINVOKE.RTKDeviceStatusFlags_controllerState__SWIG_1(swigCPtr, (int)state); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags.PlatformState platformState() { - RTKDeviceStatusFlags.PlatformState ret = (RTKDeviceStatusFlags.PlatformState)msclPINVOKE.RTKDeviceStatusFlags_platformState__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void platformState(RTKDeviceStatusFlags.PlatformState state) { - msclPINVOKE.RTKDeviceStatusFlags_platformState__SWIG_1(swigCPtr, (int)state); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags.ControllerStatusCode controllerStatusCode() { - RTKDeviceStatusFlags.ControllerStatusCode ret = (RTKDeviceStatusFlags.ControllerStatusCode)msclPINVOKE.RTKDeviceStatusFlags_controllerStatusCode__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void controllerStatusCode(RTKDeviceStatusFlags.ControllerStatusCode status) { - msclPINVOKE.RTKDeviceStatusFlags_controllerStatusCode__SWIG_1(swigCPtr, (int)status); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags.PlatformStatusCode platformStatusCode() { - RTKDeviceStatusFlags.PlatformStatusCode ret = (RTKDeviceStatusFlags.PlatformStatusCode)msclPINVOKE.RTKDeviceStatusFlags_platformStatusCode__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void platformStatusCode(RTKDeviceStatusFlags.PlatformStatusCode status) { - msclPINVOKE.RTKDeviceStatusFlags_platformStatusCode__SWIG_1(swigCPtr, (int)status); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags.ResetReason resetReason() { - RTKDeviceStatusFlags.ResetReason ret = (RTKDeviceStatusFlags.ResetReason)msclPINVOKE.RTKDeviceStatusFlags_resetReason__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void resetReason(RTKDeviceStatusFlags.ResetReason reason) { - msclPINVOKE.RTKDeviceStatusFlags_resetReason__SWIG_1(swigCPtr, (int)reason); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public byte signalQuality() { - byte ret = msclPINVOKE.RTKDeviceStatusFlags_signalQuality__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void signalQuality(byte quality) { - msclPINVOKE.RTKDeviceStatusFlags_signalQuality__SWIG_1(swigCPtr, quality); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly uint CONTROLLER_STATE = msclPINVOKE.RTKDeviceStatusFlags_CONTROLLER_STATE_get(); - public static readonly uint PLATFORM_STATE = msclPINVOKE.RTKDeviceStatusFlags_PLATFORM_STATE_get(); - public static readonly uint CONTROLLER_STATUS_CODE = msclPINVOKE.RTKDeviceStatusFlags_CONTROLLER_STATUS_CODE_get(); - public static readonly uint PLATFORM_STATUS_CODE = msclPINVOKE.RTKDeviceStatusFlags_PLATFORM_STATUS_CODE_get(); - public static readonly uint RESET_REASON = msclPINVOKE.RTKDeviceStatusFlags_RESET_REASON_get(); - public static readonly uint SIGNAL_QUALITY = msclPINVOKE.RTKDeviceStatusFlags_SIGNAL_QUALITY_get(); - public enum ControllerState { - IDLE = 0x00, - ACTIVE = 0x04 - } - - public enum PlatformState { - MODEM_OFF = 0x00, - MODEM_POWERING_ON = 0x01, - MODEM_CONFIGURE = 0x02, - MODEM_POWERING_DOWN = 0x03, - MODEM_READY = 0x04, - MODEM_CONNECTING = 0x05, - MODEM_DISCONNECTING = 0x06, - MODEM_CONNECTED = 0x07, - SERVICE_CONNECTING = 0x08, - SERVICE_CONNECTION_FAILED = 0x09, - SERVICE_CONNECTION_CANCELED = 0x0A, - SERVICE_DISCONNECTING = 0x0B, - SERVICE_CONNECTED = 0x0C, - PLATFORM_ERROR = 0x0D, - RESET_MODEM = 0x0E - } - - public enum ControllerStatusCode { - CONTROLLER_OK = 0x00, - WAITING_NMEA = 0x01, - RTK_TIMEOUT = 0x02, - RTK_UNAVAILABLE = 0x03, - CONFIG_INVALID = 0x07 - } - - public enum PlatformStatusCode { - PLATFORM_OK = 0x00, - RTK_CONNECTION_DROPPED = 0x04, - CELL_CONNECTION_DROPPED = 0x06, - MODEM_ERROR = 0x07 - } - - public enum ResetReason { - POWER_ON = 0x00, - UNKNOWN = 0x01, - SOFT_RESET = 0x02, - HARDWARE_ERROR_RESET = 0x03 - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class RTKDeviceStatusFlags : Bitfield { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal RTKDeviceStatusFlags(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.RTKDeviceStatusFlags_SWIGUpcast(cPtr), cMemoryOwn) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RTKDeviceStatusFlags obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_RTKDeviceStatusFlags(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + base.Dispose(disposing); + } + } + + public RTKDeviceStatusFlags() : this(msclPINVOKE.new_RTKDeviceStatusFlags__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags(uint flags) : this(msclPINVOKE.new_RTKDeviceStatusFlags__SWIG_1(flags), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags.ControllerState controllerState() { + RTKDeviceStatusFlags.ControllerState ret = (RTKDeviceStatusFlags.ControllerState)msclPINVOKE.RTKDeviceStatusFlags_controllerState__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void controllerState(RTKDeviceStatusFlags.ControllerState state) { + msclPINVOKE.RTKDeviceStatusFlags_controllerState__SWIG_1(swigCPtr, (int)state); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags.PlatformState platformState() { + RTKDeviceStatusFlags.PlatformState ret = (RTKDeviceStatusFlags.PlatformState)msclPINVOKE.RTKDeviceStatusFlags_platformState__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void platformState(RTKDeviceStatusFlags.PlatformState state) { + msclPINVOKE.RTKDeviceStatusFlags_platformState__SWIG_1(swigCPtr, (int)state); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags.ControllerStatusCode controllerStatusCode() { + RTKDeviceStatusFlags.ControllerStatusCode ret = (RTKDeviceStatusFlags.ControllerStatusCode)msclPINVOKE.RTKDeviceStatusFlags_controllerStatusCode__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void controllerStatusCode(RTKDeviceStatusFlags.ControllerStatusCode status) { + msclPINVOKE.RTKDeviceStatusFlags_controllerStatusCode__SWIG_1(swigCPtr, (int)status); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags.PlatformStatusCode platformStatusCode() { + RTKDeviceStatusFlags.PlatformStatusCode ret = (RTKDeviceStatusFlags.PlatformStatusCode)msclPINVOKE.RTKDeviceStatusFlags_platformStatusCode__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void platformStatusCode(RTKDeviceStatusFlags.PlatformStatusCode status) { + msclPINVOKE.RTKDeviceStatusFlags_platformStatusCode__SWIG_1(swigCPtr, (int)status); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags.ResetReason resetReason() { + RTKDeviceStatusFlags.ResetReason ret = (RTKDeviceStatusFlags.ResetReason)msclPINVOKE.RTKDeviceStatusFlags_resetReason__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void resetReason(RTKDeviceStatusFlags.ResetReason reason) { + msclPINVOKE.RTKDeviceStatusFlags_resetReason__SWIG_1(swigCPtr, (int)reason); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte signalQuality() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_signalQuality__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void signalQuality(byte quality) { + msclPINVOKE.RTKDeviceStatusFlags_signalQuality__SWIG_1(swigCPtr, quality); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly uint CONTROLLER_STATE = msclPINVOKE.RTKDeviceStatusFlags_CONTROLLER_STATE_get(); + public static readonly uint PLATFORM_STATE = msclPINVOKE.RTKDeviceStatusFlags_PLATFORM_STATE_get(); + public static readonly uint CONTROLLER_STATUS_CODE = msclPINVOKE.RTKDeviceStatusFlags_CONTROLLER_STATUS_CODE_get(); + public static readonly uint PLATFORM_STATUS_CODE = msclPINVOKE.RTKDeviceStatusFlags_PLATFORM_STATUS_CODE_get(); + public static readonly uint RESET_REASON = msclPINVOKE.RTKDeviceStatusFlags_RESET_REASON_get(); + public static readonly uint SIGNAL_QUALITY = msclPINVOKE.RTKDeviceStatusFlags_SIGNAL_QUALITY_get(); + public enum ControllerState { + IDLE = 0x00, + ACTIVE = 0x04 + } + + public enum PlatformState { + MODEM_OFF = 0x00, + MODEM_POWERING_ON = 0x01, + MODEM_CONFIGURE = 0x02, + MODEM_POWERING_DOWN = 0x03, + MODEM_READY = 0x04, + MODEM_CONNECTING = 0x05, + MODEM_DISCONNECTING = 0x06, + MODEM_CONNECTED = 0x07, + SERVICE_CONNECTING = 0x08, + SERVICE_CONNECTION_FAILED = 0x09, + SERVICE_CONNECTION_CANCELED = 0x0A, + SERVICE_DISCONNECTING = 0x0B, + SERVICE_CONNECTED = 0x0C, + PLATFORM_ERROR = 0x0D, + RESET_MODEM = 0x0E + } + + public enum ControllerStatusCode { + CONTROLLER_OK = 0x00, + WAITING_NMEA = 0x01, + RTK_TIMEOUT = 0x02, + RTK_UNAVAILABLE = 0x03, + CONFIG_INVALID = 0x07 + } + + public enum PlatformStatusCode { + PLATFORM_OK = 0x00, + RTK_CONNECTION_DROPPED = 0x04, + CELL_CONNECTION_DROPPED = 0x06, + MODEM_ERROR = 0x07 + } + + public enum ResetReason { + POWER_ON = 0x00, + UNKNOWN = 0x01, + SOFT_RESET = 0x02, + HARDWARE_ERROR_RESET = 0x03 + } + +} + +} diff --git a/MSCL_Managed/mscl/RTKNode.cs b/MSCL_Managed/mscl/RTKNode.cs index abba10abd..6c13fc6c4 100644 --- a/MSCL_Managed/mscl/RTKNode.cs +++ b/MSCL_Managed/mscl/RTKNode.cs @@ -1,66 +1,66 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class RTKNode : MipNode { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal RTKNode(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.RTKNode_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RTKNode obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_RTKNode(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - base.Dispose(disposing); - } - } - - public RTKNode(Connection connection) : this(msclPINVOKE.new_RTKNode(Connection.getCPtr(connection)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public override byte getCommunicationMode() { - byte ret = msclPINVOKE.RTKNode_getCommunicationMode(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override void setCommunicationMode(byte communicationMode) { - msclPINVOKE.RTKNode_setCommunicationMode(swigCPtr, communicationMode); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RTKDeviceStatusFlags getDeviceStatusFlags() { - RTKDeviceStatusFlags ret = new RTKDeviceStatusFlags(msclPINVOKE.RTKNode_getDeviceStatusFlags(swigCPtr), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string getActivationCode() { - string ret = msclPINVOKE.RTKNode_getActivationCode(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class RTKNode : MipNode { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal RTKNode(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.RTKNode_SWIGUpcast(cPtr), cMemoryOwn) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RTKNode obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_RTKNode(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + base.Dispose(disposing); + } + } + + public RTKNode(Connection connection) : this(msclPINVOKE.new_RTKNode(Connection.getCPtr(connection)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public override byte getCommunicationMode() { + byte ret = msclPINVOKE.RTKNode_getCommunicationMode(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override void setCommunicationMode(byte communicationMode) { + msclPINVOKE.RTKNode_setCommunicationMode(swigCPtr, communicationMode); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags getDeviceStatusFlags() { + RTKDeviceStatusFlags ret = new RTKDeviceStatusFlags(msclPINVOKE.RTKNode_getDeviceStatusFlags(swigCPtr), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string getActivationCode() { + string ret = msclPINVOKE.RTKNode_getActivationCode(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + +} + +} diff --git a/MSCL_Managed/mscl/RawBytePacket.cs b/MSCL_Managed/mscl/RawBytePacket.cs index ec75f769d..3dc4269d2 100644 --- a/MSCL_Managed/mscl/RawBytePacket.cs +++ b/MSCL_Managed/mscl/RawBytePacket.cs @@ -1,98 +1,98 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class RawBytePacket : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal RawBytePacket(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RawBytePacket obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~RawBytePacket() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_RawBytePacket(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public RawBytePacket() : this(msclPINVOKE.new_RawBytePacket(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void payload(Bytes bytes) { - msclPINVOKE.RawBytePacket_payload__SWIG_0(swigCPtr, Bytes.getCPtr(bytes)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void type(RawBytePacket.PacketType type) { - msclPINVOKE.RawBytePacket_type__SWIG_0(swigCPtr, (int)type); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void source(RawBytePacket.PacketSource source) { - msclPINVOKE.RawBytePacket_source__SWIG_0(swigCPtr, (int)source); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RawBytePacket.PacketType type() { - RawBytePacket.PacketType ret = (RawBytePacket.PacketType)msclPINVOKE.RawBytePacket_type__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RawBytePacket.PacketSource source() { - RawBytePacket.PacketSource ret = (RawBytePacket.PacketSource)msclPINVOKE.RawBytePacket_source__SWIG_1(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Bytes payload() { - Bytes ret = new Bytes(msclPINVOKE.RawBytePacket_payload__SWIG_1(swigCPtr), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PacketType { - INVALID_PACKET, - DATA_PACKET, - COMMAND_PACKET, - NO_PACKET_FOUND - } - - public enum PacketSource { - FROM_READ, - FROM_SEND - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class RawBytePacket : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal RawBytePacket(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RawBytePacket obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~RawBytePacket() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_RawBytePacket(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public RawBytePacket() : this(msclPINVOKE.new_RawBytePacket(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void payload(Bytes bytes) { + msclPINVOKE.RawBytePacket_payload__SWIG_0(swigCPtr, Bytes.getCPtr(bytes)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void type(RawBytePacket.PacketType type) { + msclPINVOKE.RawBytePacket_type__SWIG_0(swigCPtr, (int)type); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void source(RawBytePacket.PacketSource source) { + msclPINVOKE.RawBytePacket_source__SWIG_0(swigCPtr, (int)source); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RawBytePacket.PacketType type() { + RawBytePacket.PacketType ret = (RawBytePacket.PacketType)msclPINVOKE.RawBytePacket_type__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RawBytePacket.PacketSource source() { + RawBytePacket.PacketSource ret = (RawBytePacket.PacketSource)msclPINVOKE.RawBytePacket_source__SWIG_1(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Bytes payload() { + Bytes ret = new Bytes(msclPINVOKE.RawBytePacket_payload__SWIG_1(swigCPtr), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PacketType { + INVALID_PACKET, + DATA_PACKET, + COMMAND_PACKET, + NO_PACKET_FOUND + } + + public enum PacketSource { + FROM_READ, + FROM_SEND + } + +} + +} diff --git a/MSCL_Managed/mscl/RawBytePackets.cs b/MSCL_Managed/mscl/RawBytePackets.cs index f6711debc..5f23af13d 100644 --- a/MSCL_Managed/mscl/RawBytePackets.cs +++ b/MSCL_Managed/mscl/RawBytePackets.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class RawBytePackets : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal RawBytePackets(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RawBytePackets obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~RawBytePackets() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_RawBytePackets(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public RawBytePackets(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (RawBytePacket element in c) { - this.Add(element); - } - } - - public RawBytePackets(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (RawBytePacket element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public RawBytePacket this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(RawBytePacket[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(RawBytePacket[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, RawBytePacket[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new RawBytePacketsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new RawBytePacketsEnumerator(this); - } - - public RawBytePacketsEnumerator GetEnumerator() { - return new RawBytePacketsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class RawBytePacketsEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private RawBytePackets collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public RawBytePacketsEnumerator(RawBytePackets collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public RawBytePacket Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (RawBytePacket)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.RawBytePackets_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(RawBytePacket x) { - msclPINVOKE.RawBytePackets_Add(swigCPtr, RawBytePacket.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.RawBytePackets_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.RawBytePackets_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.RawBytePackets_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RawBytePackets() : this(msclPINVOKE.new_RawBytePackets__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RawBytePackets(RawBytePackets other) : this(msclPINVOKE.new_RawBytePackets__SWIG_1(RawBytePackets.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RawBytePackets(int capacity) : this(msclPINVOKE.new_RawBytePackets__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private RawBytePacket getitemcopy(int index) { - RawBytePacket ret = new RawBytePacket(msclPINVOKE.RawBytePackets_getitemcopy(swigCPtr, index), true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private RawBytePacket getitem(int index) { - RawBytePacket ret = new RawBytePacket(msclPINVOKE.RawBytePackets_getitem(swigCPtr, index), false); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, RawBytePacket val) { - msclPINVOKE.RawBytePackets_setitem(swigCPtr, index, RawBytePacket.getCPtr(val)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(RawBytePackets values) { - msclPINVOKE.RawBytePackets_AddRange(swigCPtr, RawBytePackets.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public RawBytePackets GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.RawBytePackets_GetRange(swigCPtr, index, count); - RawBytePackets ret = (cPtr == global::System.IntPtr.Zero) ? null : new RawBytePackets(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, RawBytePacket x) { - msclPINVOKE.RawBytePackets_Insert(swigCPtr, index, RawBytePacket.getCPtr(x)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, RawBytePackets values) { - msclPINVOKE.RawBytePackets_InsertRange(swigCPtr, index, RawBytePackets.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.RawBytePackets_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.RawBytePackets_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static RawBytePackets Repeat(RawBytePacket value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.RawBytePackets_Repeat(RawBytePacket.getCPtr(value), count); - RawBytePackets ret = (cPtr == global::System.IntPtr.Zero) ? null : new RawBytePackets(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.RawBytePackets_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.RawBytePackets_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, RawBytePackets values) { - msclPINVOKE.RawBytePackets_SetRange(swigCPtr, index, RawBytePackets.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class RawBytePackets : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal RawBytePackets(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RawBytePackets obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~RawBytePackets() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_RawBytePackets(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public RawBytePackets(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (RawBytePacket element in c) { + this.Add(element); + } + } + + public RawBytePackets(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (RawBytePacket element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public RawBytePacket this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(RawBytePacket[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(RawBytePacket[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, RawBytePacket[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new RawBytePacketsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new RawBytePacketsEnumerator(this); + } + + public RawBytePacketsEnumerator GetEnumerator() { + return new RawBytePacketsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class RawBytePacketsEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private RawBytePackets collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public RawBytePacketsEnumerator(RawBytePackets collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public RawBytePacket Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (RawBytePacket)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.RawBytePackets_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(RawBytePacket x) { + msclPINVOKE.RawBytePackets_Add(swigCPtr, RawBytePacket.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.RawBytePackets_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.RawBytePackets_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.RawBytePackets_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RawBytePackets() : this(msclPINVOKE.new_RawBytePackets__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RawBytePackets(RawBytePackets other) : this(msclPINVOKE.new_RawBytePackets__SWIG_1(RawBytePackets.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RawBytePackets(int capacity) : this(msclPINVOKE.new_RawBytePackets__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private RawBytePacket getitemcopy(int index) { + RawBytePacket ret = new RawBytePacket(msclPINVOKE.RawBytePackets_getitemcopy(swigCPtr, index), true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private RawBytePacket getitem(int index) { + RawBytePacket ret = new RawBytePacket(msclPINVOKE.RawBytePackets_getitem(swigCPtr, index), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, RawBytePacket val) { + msclPINVOKE.RawBytePackets_setitem(swigCPtr, index, RawBytePacket.getCPtr(val)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(RawBytePackets values) { + msclPINVOKE.RawBytePackets_AddRange(swigCPtr, RawBytePackets.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RawBytePackets GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.RawBytePackets_GetRange(swigCPtr, index, count); + RawBytePackets ret = (cPtr == global::System.IntPtr.Zero) ? null : new RawBytePackets(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, RawBytePacket x) { + msclPINVOKE.RawBytePackets_Insert(swigCPtr, index, RawBytePacket.getCPtr(x)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, RawBytePackets values) { + msclPINVOKE.RawBytePackets_InsertRange(swigCPtr, index, RawBytePackets.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.RawBytePackets_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.RawBytePackets_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static RawBytePackets Repeat(RawBytePacket value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.RawBytePackets_Repeat(RawBytePacket.getCPtr(value), count); + RawBytePackets ret = (cPtr == global::System.IntPtr.Zero) ? null : new RawBytePackets(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.RawBytePackets_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.RawBytePackets_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, RawBytePackets values) { + msclPINVOKE.RawBytePackets_SetRange(swigCPtr, index, RawBytePackets.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/StatusSelectors.cs b/MSCL_Managed/mscl/StatusSelectors.cs index 1eb6e5491..dd19ab46c 100644 --- a/MSCL_Managed/mscl/StatusSelectors.cs +++ b/MSCL_Managed/mscl/StatusSelectors.cs @@ -1,332 +1,332 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class StatusSelectors : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal StatusSelectors(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StatusSelectors obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~StatusSelectors() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_StatusSelectors(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - public StatusSelectors(global::System.Collections.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (DeviceStatusData.StatusSelector element in c) { - this.Add(element); - } - } - - public StatusSelectors(global::System.Collections.Generic.IEnumerable c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (DeviceStatusData.StatusSelector element in c) { - this.Add(element); - } - } - - public bool IsFixedSize { - get { - return false; - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public DeviceStatusData.StatusSelector this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } - - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(DeviceStatusData.StatusSelector[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(DeviceStatusData.StatusSelector[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, DeviceStatusData.StatusSelector[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new StatusSelectorsEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new StatusSelectorsEnumerator(this); - } - - public StatusSelectorsEnumerator GetEnumerator() { - return new StatusSelectorsEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class StatusSelectorsEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private StatusSelectors collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public StatusSelectorsEnumerator(StatusSelectors collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public DeviceStatusData.StatusSelector Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (DeviceStatusData.StatusSelector)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - msclPINVOKE.StatusSelectors_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(DeviceStatusData.StatusSelector x) { - msclPINVOKE.StatusSelectors_Add(swigCPtr, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.StatusSelectors_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = msclPINVOKE.StatusSelectors_capacity(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - msclPINVOKE.StatusSelectors_reserve(swigCPtr, n); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public StatusSelectors() : this(msclPINVOKE.new_StatusSelectors__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public StatusSelectors(StatusSelectors other) : this(msclPINVOKE.new_StatusSelectors__SWIG_1(StatusSelectors.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public StatusSelectors(int capacity) : this(msclPINVOKE.new_StatusSelectors__SWIG_2(capacity), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private DeviceStatusData.StatusSelector getitemcopy(int index) { - DeviceStatusData.StatusSelector ret = (DeviceStatusData.StatusSelector)msclPINVOKE.StatusSelectors_getitemcopy(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private DeviceStatusData.StatusSelector getitem(int index) { - DeviceStatusData.StatusSelector ret = (DeviceStatusData.StatusSelector)msclPINVOKE.StatusSelectors_getitem(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, DeviceStatusData.StatusSelector val) { - msclPINVOKE.StatusSelectors_setitem(swigCPtr, index, (int)val); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(StatusSelectors values) { - msclPINVOKE.StatusSelectors_AddRange(swigCPtr, StatusSelectors.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public StatusSelectors GetRange(int index, int count) { - global::System.IntPtr cPtr = msclPINVOKE.StatusSelectors_GetRange(swigCPtr, index, count); - StatusSelectors ret = (cPtr == global::System.IntPtr.Zero) ? null : new StatusSelectors(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, DeviceStatusData.StatusSelector x) { - msclPINVOKE.StatusSelectors_Insert(swigCPtr, index, (int)x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, StatusSelectors values) { - msclPINVOKE.StatusSelectors_InsertRange(swigCPtr, index, StatusSelectors.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - msclPINVOKE.StatusSelectors_RemoveAt(swigCPtr, index); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - msclPINVOKE.StatusSelectors_RemoveRange(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public static StatusSelectors Repeat(DeviceStatusData.StatusSelector value, int count) { - global::System.IntPtr cPtr = msclPINVOKE.StatusSelectors_Repeat((int)value, count); - StatusSelectors ret = (cPtr == global::System.IntPtr.Zero) ? null : new StatusSelectors(cPtr, true); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - msclPINVOKE.StatusSelectors_Reverse__SWIG_0(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - msclPINVOKE.StatusSelectors_Reverse__SWIG_1(swigCPtr, index, count); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, StatusSelectors values) { - msclPINVOKE.StatusSelectors_SetRange(swigCPtr, index, StatusSelectors.getCPtr(values)); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class StatusSelectors : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal StatusSelectors(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StatusSelectors obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~StatusSelectors() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_StatusSelectors(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public StatusSelectors(global::System.Collections.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (DeviceStatusData.StatusSelector element in c) { + this.Add(element); + } + } + + public StatusSelectors(global::System.Collections.Generic.IEnumerable c) : this() { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (DeviceStatusData.StatusSelector element in c) { + this.Add(element); + } + } + + public bool IsFixedSize { + get { + return false; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public DeviceStatusData.StatusSelector this[int index] { + get { + return getitem(index); + } + set { + setitem(index, value); + } + } + + public int Capacity { + get { + return (int)capacity(); + } + set { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsSynchronized { + get { + return false; + } + } + + public void CopyTo(DeviceStatusData.StatusSelector[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(DeviceStatusData.StatusSelector[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, DeviceStatusData.StatusSelector[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index+count > this.Count || arrayIndex+count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { + return new StatusSelectorsEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new StatusSelectorsEnumerator(this); + } + + public StatusSelectorsEnumerator GetEnumerator() { + return new StatusSelectorsEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class StatusSelectorsEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private StatusSelectors collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public StatusSelectorsEnumerator(StatusSelectors collection) { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public DeviceStatusData.StatusSelector Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (DeviceStatusData.StatusSelector)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() { + msclPINVOKE.StatusSelectors_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(DeviceStatusData.StatusSelector x) { + msclPINVOKE.StatusSelectors_Add(swigCPtr, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.StatusSelectors_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() { + uint ret = msclPINVOKE.StatusSelectors_capacity(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) { + msclPINVOKE.StatusSelectors_reserve(swigCPtr, n); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public StatusSelectors() : this(msclPINVOKE.new_StatusSelectors__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public StatusSelectors(StatusSelectors other) : this(msclPINVOKE.new_StatusSelectors__SWIG_1(StatusSelectors.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public StatusSelectors(int capacity) : this(msclPINVOKE.new_StatusSelectors__SWIG_2(capacity), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private DeviceStatusData.StatusSelector getitemcopy(int index) { + DeviceStatusData.StatusSelector ret = (DeviceStatusData.StatusSelector)msclPINVOKE.StatusSelectors_getitemcopy(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private DeviceStatusData.StatusSelector getitem(int index) { + DeviceStatusData.StatusSelector ret = (DeviceStatusData.StatusSelector)msclPINVOKE.StatusSelectors_getitem(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, DeviceStatusData.StatusSelector val) { + msclPINVOKE.StatusSelectors_setitem(swigCPtr, index, (int)val); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(StatusSelectors values) { + msclPINVOKE.StatusSelectors_AddRange(swigCPtr, StatusSelectors.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public StatusSelectors GetRange(int index, int count) { + global::System.IntPtr cPtr = msclPINVOKE.StatusSelectors_GetRange(swigCPtr, index, count); + StatusSelectors ret = (cPtr == global::System.IntPtr.Zero) ? null : new StatusSelectors(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, DeviceStatusData.StatusSelector x) { + msclPINVOKE.StatusSelectors_Insert(swigCPtr, index, (int)x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, StatusSelectors values) { + msclPINVOKE.StatusSelectors_InsertRange(swigCPtr, index, StatusSelectors.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) { + msclPINVOKE.StatusSelectors_RemoveAt(swigCPtr, index); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) { + msclPINVOKE.StatusSelectors_RemoveRange(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static StatusSelectors Repeat(DeviceStatusData.StatusSelector value, int count) { + global::System.IntPtr cPtr = msclPINVOKE.StatusSelectors_Repeat((int)value, count); + StatusSelectors ret = (cPtr == global::System.IntPtr.Zero) ? null : new StatusSelectors(cPtr, true); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() { + msclPINVOKE.StatusSelectors_Reverse__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) { + msclPINVOKE.StatusSelectors_Reverse__SWIG_1(swigCPtr, index, count); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, StatusSelectors values) { + msclPINVOKE.StatusSelectors_SetRange(swigCPtr, index, StatusSelectors.getCPtr(values)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/WirelessModels.cs b/MSCL_Managed/mscl/WirelessModels.cs index 15cc88813..9337d0b40 100644 --- a/MSCL_Managed/mscl/WirelessModels.cs +++ b/MSCL_Managed/mscl/WirelessModels.cs @@ -141,6 +141,7 @@ public enum NodeModel { node_torqueLink = 63309999, node_torqueLink200_3ch = 63313000, node_torqueLink200 = 63319999, + node_torqueLink200_3ch_s = 63323350, node_sgLink_herm = 65010000, node_sgLink_herm_2600 = 65011110, node_sgLink_herm_2700 = 65011210, diff --git a/MSCL_Managed/mscl/WirelessPollData.cs b/MSCL_Managed/mscl/WirelessPollData.cs index 4084602a9..47c3b4913 100644 --- a/MSCL_Managed/mscl/WirelessPollData.cs +++ b/MSCL_Managed/mscl/WirelessPollData.cs @@ -1,301 +1,301 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 4.0.0 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace mscl { - -public class WirelessPollData : global::System.IDisposable - , global::System.Collections.Generic.IDictionary - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal WirelessPollData(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WirelessPollData obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~WirelessPollData() { - Dispose(false); - } - - public void Dispose() { - Dispose(true); - global::System.GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - msclPINVOKE.delete_WirelessPollData(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - } - } - - - public float this[WirelessChannel.ChannelId key] { - get { - return getitem(key); - } - - set { - setitem(key, value); - } - } - - public bool TryGetValue(WirelessChannel.ChannelId key, out float value) { - if (this.ContainsKey(key)) { - value = this[key]; - return true; - } - value = default(float); - return false; - } - - public int Count { - get { - return (int)size(); - } - } - - public bool IsReadOnly { - get { - return false; - } - } - - public global::System.Collections.Generic.ICollection Keys { - get { - global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); - int size = this.Count; - if (size > 0) { - global::System.IntPtr iter = create_iterator_begin(); - for (int i = 0; i < size; i++) { - keys.Add(get_next_key(iter)); - } - destroy_iterator(iter); - } - return keys; - } - } - - public global::System.Collections.Generic.ICollection Values { - get { - global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); - foreach (global::System.Collections.Generic.KeyValuePair pair in this) { - vals.Add(pair.Value); - } - return vals; - } - } - - public void Add(global::System.Collections.Generic.KeyValuePair item) { - Add(item.Key, item.Value); - } - - public bool Remove(global::System.Collections.Generic.KeyValuePair item) { - if (Contains(item)) { - return Remove(item.Key); - } else { - return false; - } - } - - public bool Contains(global::System.Collections.Generic.KeyValuePair item) { - if (this[item.Key] == item.Value) { - return true; - } else { - return false; - } - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { - CopyTo(array, 0); - } - - public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (arrayIndex+this.Count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - - global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); - for (int i = 0; i < keyList.Count; i++) { - WirelessChannel.ChannelId currentKey = keyList[i]; - array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); - } - } - - global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { - return new WirelessPollDataEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new WirelessPollDataEnumerator(this); - } - - public WirelessPollDataEnumerator GetEnumerator() { - return new WirelessPollDataEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class WirelessPollDataEnumerator : global::System.Collections.IEnumerator, - global::System.Collections.Generic.IEnumerator> - { - private WirelessPollData collectionRef; - private global::System.Collections.Generic.IList keyCollection; - private int currentIndex; - private object currentObject; - private int currentSize; - - public WirelessPollDataEnumerator(WirelessPollData collection) { - collectionRef = collection; - keyCollection = new global::System.Collections.Generic.List(collection.Keys); - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public global::System.Collections.Generic.KeyValuePair Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (global::System.Collections.Generic.KeyValuePair)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } - - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - WirelessChannel.ChannelId currentKey = keyCollection[currentIndex]; - currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); - } else { - currentObject = null; - } - return moveOkay; - } - - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - - public WirelessPollData() : this(msclPINVOKE.new_WirelessPollData__SWIG_0(), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public WirelessPollData(WirelessPollData other) : this(msclPINVOKE.new_WirelessPollData__SWIG_1(WirelessPollData.getCPtr(other)), true) { - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = msclPINVOKE.WirelessPollData_size(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool empty() { - bool ret = msclPINVOKE.WirelessPollData_empty(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Clear() { - msclPINVOKE.WirelessPollData_Clear(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - private float getitem(WirelessChannel.ChannelId key) { - float ret = msclPINVOKE.WirelessPollData_getitem(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(WirelessChannel.ChannelId key, float x) { - msclPINVOKE.WirelessPollData_setitem(swigCPtr, (int)key, x); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ContainsKey(WirelessChannel.ChannelId key) { - bool ret = msclPINVOKE.WirelessPollData_ContainsKey(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Add(WirelessChannel.ChannelId key, float value) { - msclPINVOKE.WirelessPollData_Add(swigCPtr, (int)key, value); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Remove(WirelessChannel.ChannelId key) { - bool ret = msclPINVOKE.WirelessPollData_Remove(swigCPtr, (int)key); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private global::System.IntPtr create_iterator_begin() { - global::System.IntPtr ret = msclPINVOKE.WirelessPollData_create_iterator_begin(swigCPtr); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private WirelessChannel.ChannelId get_next_key(global::System.IntPtr swigiterator) { - WirelessChannel.ChannelId ret = (WirelessChannel.ChannelId)msclPINVOKE.WirelessPollData_get_next_key(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void destroy_iterator(global::System.IntPtr swigiterator) { - msclPINVOKE.WirelessPollData_destroy_iterator(swigCPtr, swigiterator); - if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); - } - -} - -} +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 4.0.0 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace mscl { + +public class WirelessPollData : global::System.IDisposable + , global::System.Collections.Generic.IDictionary + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal WirelessPollData(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WirelessPollData obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~WirelessPollData() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + msclPINVOKE.delete_WirelessPollData(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + + public float this[WirelessChannel.ChannelId key] { + get { + return getitem(key); + } + + set { + setitem(key, value); + } + } + + public bool TryGetValue(WirelessChannel.ChannelId key, out float value) { + if (this.ContainsKey(key)) { + value = this[key]; + return true; + } + value = default(float); + return false; + } + + public int Count { + get { + return (int)size(); + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public global::System.Collections.Generic.ICollection Keys { + get { + global::System.Collections.Generic.ICollection keys = new global::System.Collections.Generic.List(); + int size = this.Count; + if (size > 0) { + global::System.IntPtr iter = create_iterator_begin(); + for (int i = 0; i < size; i++) { + keys.Add(get_next_key(iter)); + } + destroy_iterator(iter); + } + return keys; + } + } + + public global::System.Collections.Generic.ICollection Values { + get { + global::System.Collections.Generic.ICollection vals = new global::System.Collections.Generic.List(); + foreach (global::System.Collections.Generic.KeyValuePair pair in this) { + vals.Add(pair.Value); + } + return vals; + } + } + + public void Add(global::System.Collections.Generic.KeyValuePair item) { + Add(item.Key, item.Value); + } + + public bool Remove(global::System.Collections.Generic.KeyValuePair item) { + if (Contains(item)) { + return Remove(item.Key); + } else { + return false; + } + } + + public bool Contains(global::System.Collections.Generic.KeyValuePair item) { + if (this[item.Key] == item.Value) { + return true; + } else { + return false; + } + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array) { + CopyTo(array, 0); + } + + public void CopyTo(global::System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (arrayIndex+this.Count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + + global::System.Collections.Generic.IList keyList = new global::System.Collections.Generic.List(this.Keys); + for (int i = 0; i < keyList.Count; i++) { + WirelessChannel.ChannelId currentKey = keyList[i]; + array.SetValue(new global::System.Collections.Generic.KeyValuePair(currentKey, this[currentKey]), arrayIndex+i); + } + } + + global::System.Collections.Generic.IEnumerator> global::System.Collections.Generic.IEnumerable>.GetEnumerator() { + return new WirelessPollDataEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { + return new WirelessPollDataEnumerator(this); + } + + public WirelessPollDataEnumerator GetEnumerator() { + return new WirelessPollDataEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class WirelessPollDataEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator> + { + private WirelessPollData collectionRef; + private global::System.Collections.Generic.IList keyCollection; + private int currentIndex; + private object currentObject; + private int currentSize; + + public WirelessPollDataEnumerator(WirelessPollData collection) { + collectionRef = collection; + keyCollection = new global::System.Collections.Generic.List(collection.Keys); + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public global::System.Collections.Generic.KeyValuePair Current { + get { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (global::System.Collections.Generic.KeyValuePair)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current { + get { + return Current; + } + } + + public bool MoveNext() { + int size = collectionRef.Count; + bool moveOkay = (currentIndex+1 < size) && (size == currentSize); + if (moveOkay) { + currentIndex++; + WirelessChannel.ChannelId currentKey = keyCollection[currentIndex]; + currentObject = new global::System.Collections.Generic.KeyValuePair(currentKey, collectionRef[currentKey]); + } else { + currentObject = null; + } + return moveOkay; + } + + public void Reset() { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() { + currentIndex = -1; + currentObject = null; + } + } + + + public WirelessPollData() : this(msclPINVOKE.new_WirelessPollData__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public WirelessPollData(WirelessPollData other) : this(msclPINVOKE.new_WirelessPollData__SWIG_1(WirelessPollData.getCPtr(other)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() { + uint ret = msclPINVOKE.WirelessPollData_size(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool empty() { + bool ret = msclPINVOKE.WirelessPollData_empty(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Clear() { + msclPINVOKE.WirelessPollData_Clear(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + private float getitem(WirelessChannel.ChannelId key) { + float ret = msclPINVOKE.WirelessPollData_getitem(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(WirelessChannel.ChannelId key, float x) { + msclPINVOKE.WirelessPollData_setitem(swigCPtr, (int)key, x); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ContainsKey(WirelessChannel.ChannelId key) { + bool ret = msclPINVOKE.WirelessPollData_ContainsKey(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Add(WirelessChannel.ChannelId key, float value) { + msclPINVOKE.WirelessPollData_Add(swigCPtr, (int)key, value); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Remove(WirelessChannel.ChannelId key) { + bool ret = msclPINVOKE.WirelessPollData_Remove(swigCPtr, (int)key); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private global::System.IntPtr create_iterator_begin() { + global::System.IntPtr ret = msclPINVOKE.WirelessPollData_create_iterator_begin(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private WirelessChannel.ChannelId get_next_key(global::System.IntPtr swigiterator) { + WirelessChannel.ChannelId ret = (WirelessChannel.ChannelId)msclPINVOKE.WirelessPollData_get_next_key(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void destroy_iterator(global::System.IntPtr swigiterator) { + msclPINVOKE.WirelessPollData_destroy_iterator(swigCPtr, swigiterator); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + +} + +} diff --git a/MSCL_Managed/mscl/WirelessTypes.cs b/MSCL_Managed/mscl/WirelessTypes.cs index 43e7313f1..0d53736b5 100644 --- a/MSCL_Managed/mscl/WirelessTypes.cs +++ b/MSCL_Managed/mscl/WirelessTypes.cs @@ -427,7 +427,8 @@ public enum RegionCode { region_china = 5, region_australia_newzealand = 6, region_singapore = 7, - region_canada = 8 + region_canada = 8, + region_southAfrica = 9 } public enum ChannelGroupSetting { @@ -685,6 +686,8 @@ public enum InputRange { range_0to322_58ohm = 130, range_0to158_73ohm = 131, range_0to78_74ohm = 132, + range_39_0625mV = 133, + range_19_5313mV = 134, range_invalid = 65535 } diff --git a/README.md b/README.md index 1ff80a50d..89a9a3ca6 100644 --- a/README.md +++ b/README.md @@ -4,42 +4,42 @@ MSCL is developed by [LORD Sensing - Microstrain](http://microstrain.com) in Wil #### Downloads -[Offline Documentation](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/mscl_62.0.0_Documentation.zip) | -[Offline Example Code](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/mscl_62.0.0_Examples.zip) +[Offline Documentation](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/mscl_62.1.2_Documentation.zip) | +[Offline Example Code](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/mscl_62.1.2_Examples.zip) -##### Pre-built MSCL Binaries/Packages (v62.0.0) +##### Pre-built MSCL Binaries/Packages (v62.1.2) Windows: -[C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/mscl_62.0.0_Windows_C++.zip) | -[Python 2.7](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/mscl_62.0.0_Windows_Python2.7.zip) | -[Python 3.6](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/mscl_62.0.0_Windows_Python3.6.zip) | -[.NET](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/mscl_62.0.0_Windows_DotNet.zip) +[C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/mscl_62.1.2_Windows_C++.zip) | +[Python 2.7](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/mscl_62.1.2_Windows_Python2.7.zip) | +[Python 3.6](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/mscl_62.1.2_Windows_Python3.6.zip) | +[.NET](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/mscl_62.1.2_Windows_DotNet.zip) Debian: * x64: - [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/c++-mscl_62.0.0_amd64.deb) | - [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python2-mscl_62.0.0_amd64.deb) | - [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python3-mscl_62.0.0_amd64.deb) + [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/c++-mscl_62.1.2_amd64.deb) | + [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python2-mscl_62.1.2_amd64.deb) | + [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python3-mscl_62.1.2_amd64.deb) * arm64: - [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/c++-mscl_62.0.0_arm64.deb) | - [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python2-mscl_62.0.0_arm64.deb) | - [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python3-mscl_62.0.0_arm64.deb) + [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/c++-mscl_62.1.2_arm64.deb) | + [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python2-mscl_62.1.2_arm64.deb) | + [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python3-mscl_62.1.2_arm64.deb) * armhf (Raspbian): - [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/c++-mscl_62.0.0_armhf.deb) | - [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python2-mscl_62.0.0_armhf.deb) | - [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python3-mscl_62.0.0_armhf.deb) + [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/c++-mscl_62.1.2_armhf.deb) | + [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python2-mscl_62.1.2_armhf.deb) | + [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python3-mscl_62.1.2_armhf.deb) RPM: * x64: - [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/c++-mscl-62.0.0_x86_64.rpm) | - [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python2-mscl-62.0.0_x86_64.rpm) | - [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python3-mscl-62.0.0_x86_64.rpm) + [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/c++-mscl-62.1.2_x86_64.rpm) | + [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python2-mscl-62.1.2_x86_64.rpm) | + [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python3-mscl-62.1.2_x86_64.rpm) * arm64: - [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/c++-mscl-62.0.0_aarch64.rpm) | - [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python2-mscl-62.0.0_aarch64.rpm) | - [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python3-mscl-62.0.0_aarch64.rpm) + [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/c++-mscl-62.1.2_aarch64.rpm) | + [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python2-mscl-62.1.2_aarch64.rpm) | + [Python 3](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python3-mscl-62.1.2_aarch64.rpm) * CentOS: - [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/c++-mscl-62.0.0_x86_64_centos7.6.1810.rpm) | - [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.0.0/python2-mscl-62.0.0_x86_64_centos7.6.1810.rpm) + [C++](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/c++-mscl-62.1.2_x86_64_centos7.6.1810.rpm) | + [Python 2](https://github.com/LORD-MicroStrain/MSCL/releases/download/v62.1.2/python2-mscl-62.1.2_x86_64_centos7.6.1810.rpm) ---