diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2a31cec53..1867118a3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,31 @@ RENAMED - A function/class has been renamed. REMOVED - A function/class has been removed. ====================================================================================================== +63.1.0 - 2022-01-13 +- Added RTK (v2) 6285-0100 bitfield status support and set as default +- Updated RTK (v1) 6285-0000 bitfield status to have _v1 suffix + +63.0.1 - 2022-01-06 +- Increase default readWriteRetries for BaseStation and WirelessNode objects from 0 + - BaseStation default: 2 + - WirelessNode default: 3 + +63.0.0 - 2022-01-05 +- Add enum MipModels::Modifier to represent the second half of a MIP model number for select models +- Add enum MipModels::ModelNumber as an integer representation of full MIP device model numbers +- Add functions to properly compare model numbers with placeholder modifier values +- Add MipModel class to represent a MIP model number that keeps track of full model number, node model (first part), and modifier (second part) + - Add MipModel object constants to represent known products +- MipNode::model() now returns a MipModel object instead of MipModels::NodeModel enum value +- Remove unsupported MipModels::NodeModel enum values: node_3dm, node_fasA, node_3dm_gx2 + +62.2.1 - 2022-01-05 +- Update Torque-Link-200-3ch (s) gain values + +62.2.0 - 2021-11-22 +- Update wireless sensor warmup delay min/max values +- Add wireless sensor warmup delay default values + 62.1.2 - 2021-10-18 - Fixes Windows python build, and updates windows python build scripts to work easier out of the box diff --git a/HowToUseMSCL.md b/HowToUseMSCL.md index 7fceeb976..564d1b241 100644 --- a/HowToUseMSCL.md +++ b/HowToUseMSCL.md @@ -61,6 +61,16 @@ sudo yum install ./.rpm #install MSCL and it's dependencies *Note:* to uninstall MSCL, run: `sudo yum remove .rpm` +### Udev + +Download the [udev](https://github.com/LORD-MicroStrain/microstrain_inertial/blob/ros/microstrain_inertial_driver/debian/udev) file from our ROS driver, and copy it to `/usr/lib/udev/rules.d/100-microstrain.rules` on Ubuntu or `/etc/udev/rules.d/100-microstrain.rules` on debian, CentOS, or Redhat + +Once the udev rule is installed, the devices will appear as follows in the file system, where {serial} is the serial number of the device: + +* `/dev/microstrain_main_{serial}` - All GX5 devices, and the main port of GQ7 devices +* `/dev/microstrain_aux_{serial}` - The aux port of GQ7 devices +* `/dev/microstrain_rtk_{serial}` - 3DM-RTK devices + ### Python After installing the package, a folder was created in `/usr/share/`. The name of the folder varies depending on which package you install (`/usr/share/python2-mscl` or `/usr/share/python3-mscl`) diff --git a/MSCL/source/mscl/LibVersion.h b/MSCL/source/mscl/LibVersion.h index 537518480..3078cce02 100644 --- a/MSCL/source/mscl/LibVersion.h +++ b/MSCL/source/mscl/LibVersion.h @@ -10,9 +10,9 @@ 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_MAJOR 63 #define MSCL_MINOR 1 -#define MSCL_PATCH 2 +#define MSCL_PATCH 0 #endif namespace mscl diff --git a/MSCL/source/mscl/MicroStrain/Inertial/Commands/DeviceStatus.h b/MSCL/source/mscl/MicroStrain/Inertial/Commands/DeviceStatus.h index d81cf3954..1853156e2 100644 --- a/MSCL/source/mscl/MicroStrain/Inertial/Commands/DeviceStatus.h +++ b/MSCL/source/mscl/MicroStrain/Inertial/Commands/DeviceStatus.h @@ -22,7 +22,7 @@ namespace mscl { public: //Function: commandName - // + // //Returns: // std::string - the string name for this class. virtual std::string commandName() const { return "DeviceStatus"; } @@ -41,7 +41,7 @@ namespace mscl // //Parameters: // model - model number of the current device - // + // //Returns: // DeviceStatus - object set up for getting a basic status. static DeviceStatus MakeGetBasicCommand(MipModels::NodeModel model); @@ -50,16 +50,16 @@ namespace mscl // //Parameters: // model - model number of the current device - // + // //Returns: // DeviceStatus - object set up for getting a diagnostic status. static DeviceStatus MakeGetDiagnosticCommand(MipModels::NodeModel model); //Function: getResponseData - // + // //Parameter: // response - The object from which to get formatted data. - // + // //Returns: // DeviceStatusData - An object with the data returned from the device. static DeviceStatusData getResponseData(const GenericMipCmdResponse& response); @@ -71,22 +71,22 @@ namespace mscl private: // Function: Constructor DeviceStatus // Private constructor creates a DeviceStatus object. Use Make___Command methods to create an object. - DeviceStatus(MipModels::NodeModel model, DeviceStatusData::StatusSelector status_selector); + DeviceStatus(MipModels::NodeModel model, DeviceStatusData::StatusSelector status_selector); //Function: commandType - // + // //Returns: // MipTypes::Command - the command ID. virtual MipTypes::Command commandType() const { return MipTypes::CMD_DEVICE_STATUS; } //Function: fieldDataByte - // + // //Returns: // uint8 - the byte ID for field data in the reply. virtual uint8 fieldDataByte() const { return 0x90; } //Function: responseExpected - // + // //Returns: // bool - True indicates that a response should return from the device. virtual bool responseExpected() const; @@ -100,7 +100,7 @@ namespace mscl DeviceStatusData::StatusSelector m_statusSelector; public: - // Destructor + // Destructor ~DeviceStatus() { } }; diff --git a/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.cpp b/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.cpp index 034c6b309..82cc0022a 100644 --- a/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.cpp +++ b/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.cpp @@ -689,62 +689,186 @@ namespace mscl return statusMap; } - RTKDeviceStatusFlags::ControllerState RTKDeviceStatusFlags::controllerState() const + RTKDeviceStatusFlags::RTKDeviceStatusFlags(const RTKDeviceStatusFlags_v1 rtk_v1) : + Bitfield(rtk_v1.value()) + {} + + RTKDeviceStatusFlags::operator RTKDeviceStatusFlags_v1() const + { + return RTKDeviceStatusFlags_v1(static_cast(value())); + } + + uint8 RTKDeviceStatusFlags::version() const + { + return static_cast(get(VERSION)); + } + + RTKDeviceStatusFlags::ModemState RTKDeviceStatusFlags::modemState() const + { + return static_cast(get(MODEM_STATE)); + } + + void RTKDeviceStatusFlags::modemState(const ModemState state) + { + set(MODEM_STATE, state); + } + + RTKDeviceStatusFlags::ConnectionType RTKDeviceStatusFlags::connectionType() const + { + return static_cast(get(CONNECTION_TYPE)); + } + + void RTKDeviceStatusFlags::connectionType(const ConnectionType state) + { + set(CONNECTION_TYPE, state); + } + + int8 RTKDeviceStatusFlags::rssi() const + { + return -1 * static_cast(get(RSSI)); + } + + void RTKDeviceStatusFlags::rssi(const uint8 value) + { + set(RSSI, value); + } + + uint8 RTKDeviceStatusFlags::signalQuality() const + { + return static_cast(get(SIGNAL_QUALITY)); + } + + void RTKDeviceStatusFlags::signalQuality(const uint8 quality) + { + set(SIGNAL_QUALITY, quality); + } + + uint8 RTKDeviceStatusFlags::towerChangeIndicator() const + { + return static_cast(get(TOWER_CHANGE_INDICATOR)); + } + + void RTKDeviceStatusFlags::towerChangeIndicator(const uint8 value) + { + set(TOWER_CHANGE_INDICATOR, value); + } + + uint8 RTKDeviceStatusFlags::nmeaTimeout() const + { + return static_cast(get(NMEA_TIMEOUT)); + } + + void RTKDeviceStatusFlags::nmeaTimeout(const uint8 timeout) + { + set(NMEA_TIMEOUT, timeout); + } + + uint8 RTKDeviceStatusFlags::serverTimeout() const + { + return static_cast(get(SERVER_TIMEOUT)); + } + + void RTKDeviceStatusFlags::serverTimeout(const uint8 timeout) + { + set(SERVER_TIMEOUT, timeout); + } + + uint8 RTKDeviceStatusFlags::rtcmTimeout() const + { + return static_cast(get(RTCM_TIMEOUT)); + } + + void RTKDeviceStatusFlags::rtcmTimeout(const uint8 timeout) + { + set(RTCM_TIMEOUT, timeout); + } + + uint8 RTKDeviceStatusFlags::deviceOutOfRange() const + { + return static_cast(get(DEVICE_OUT_OF_RANGE)); + } + + void RTKDeviceStatusFlags::deviceOutOfRange(const uint8 outOfRange) + { + set(DEVICE_OUT_OF_RANGE, outOfRange); + } + + uint8 RTKDeviceStatusFlags::correctionsUnavailable() const + { + return static_cast(get(CORRECTIONS_UNAVAILABLE)); + } + + void RTKDeviceStatusFlags::correctionsUnavailable(const uint8 unavailable) + { + set(CORRECTIONS_UNAVAILABLE, unavailable); + } + + RTKDeviceStatusFlags_v1::operator RTKDeviceStatusFlags() const + { + return RTKDeviceStatusFlags(static_cast(value())); + } + + uint8 RTKDeviceStatusFlags_v1::version() const + { + return static_cast(get(VERSION)); + } + + RTKDeviceStatusFlags_v1::ControllerState RTKDeviceStatusFlags_v1::controllerState() const { return static_cast(get(CONTROLLER_STATE)); } - - void RTKDeviceStatusFlags::controllerState(RTKDeviceStatusFlags::ControllerState state) + + void RTKDeviceStatusFlags_v1::controllerState(RTKDeviceStatusFlags_v1::ControllerState state) { set(CONTROLLER_STATE, state); } - RTKDeviceStatusFlags::PlatformState RTKDeviceStatusFlags::platformState() const + RTKDeviceStatusFlags_v1::PlatformState RTKDeviceStatusFlags_v1::platformState() const { return static_cast(get(PLATFORM_STATE)); } - void RTKDeviceStatusFlags::platformState(RTKDeviceStatusFlags::PlatformState state) + void RTKDeviceStatusFlags_v1::platformState(RTKDeviceStatusFlags_v1::PlatformState state) { set(PLATFORM_STATE, state); } - RTKDeviceStatusFlags::ControllerStatusCode RTKDeviceStatusFlags::controllerStatusCode() const + RTKDeviceStatusFlags_v1::ControllerStatusCode RTKDeviceStatusFlags_v1::controllerStatusCode() const { return static_cast(get(CONTROLLER_STATUS_CODE)); } - void RTKDeviceStatusFlags::controllerStatusCode(RTKDeviceStatusFlags::ControllerStatusCode status) + void RTKDeviceStatusFlags_v1::controllerStatusCode(RTKDeviceStatusFlags_v1::ControllerStatusCode status) { set(CONTROLLER_STATUS_CODE, status); } - RTKDeviceStatusFlags::PlatformStatusCode RTKDeviceStatusFlags::platformStatusCode() const + RTKDeviceStatusFlags_v1::PlatformStatusCode RTKDeviceStatusFlags_v1::platformStatusCode() const { return static_cast(get(PLATFORM_STATUS_CODE)); } - void RTKDeviceStatusFlags::platformStatusCode(RTKDeviceStatusFlags::PlatformStatusCode status) + void RTKDeviceStatusFlags_v1::platformStatusCode(RTKDeviceStatusFlags_v1::PlatformStatusCode status) { set(PLATFORM_STATUS_CODE, status); } - RTKDeviceStatusFlags::ResetReason RTKDeviceStatusFlags::resetReason() const + RTKDeviceStatusFlags_v1::ResetReason RTKDeviceStatusFlags_v1::resetReason() const { return static_cast(get(RESET_REASON)); } - void RTKDeviceStatusFlags::resetReason(RTKDeviceStatusFlags::ResetReason reason) + void RTKDeviceStatusFlags_v1::resetReason(RTKDeviceStatusFlags_v1::ResetReason reason) { set(RESET_REASON, static_cast(reason)); } - uint8 RTKDeviceStatusFlags::signalQuality() const + uint8 RTKDeviceStatusFlags_v1::signalQuality() const { return static_cast(get(SIGNAL_QUALITY)); } - void RTKDeviceStatusFlags::signalQuality(uint8 quality) + void RTKDeviceStatusFlags_v1::signalQuality(uint8 quality) { set(SIGNAL_QUALITY, quality); } diff --git a/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h b/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h index 411fe8cc5..ce4b0d44f 100644 --- a/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h +++ b/MSCL/source/mscl/MicroStrain/Inertial/ExposedInertialTypes.h @@ -2223,24 +2223,156 @@ namespace mscl void disableOption(uint16 options) { measurementOptions = measurementOptions & ~options; } }; + class RTKDeviceStatusFlags_v1; + //API Struct: RTKDeviceStatusFlags class RTKDeviceStatusFlags : public Bitfield { public: //API Constants: // Bitmasks indicating the bits that define each value - // CONTROLLER_STATE - 0x00000007 - Controller State (00000000000000000000000000000111) - // PLATFORM_STATE - 0x000000F8 - Platform State (00000000000000000000000011111000) - // CONTROLLER_STATUS_CODE - 0x00000700 - Controller Status Code (00000000000000000000011100000000) - // PLATFORM_STATUS_CODE - 0x00003800 - Platform Status Code (00000000000000000011100000000000) - // RESET_REASON - 0x0000C000 - Reset Reason (00000000000000001100000000000000) - // SIGNAL_QUALITY - 0x000F0000 - Signal Quality (00000000000011110000000000000000) - static const uint32 CONTROLLER_STATE = 0x00000007; // 00000000000000000000000000000111 - static const uint32 PLATFORM_STATE = 0x000000F8; // 00000000000000000000000011111000 - static const uint32 CONTROLLER_STATUS_CODE = 0x00000700; // 00000000000000000000011100000000 - static const uint32 PLATFORM_STATUS_CODE = 0x00003800; // 00000000000000000011100000000000 - static const uint32 RESET_REASON = 0x0000C000; // 00000000000000001100000000000000 - static const uint32 SIGNAL_QUALITY = 0x000F0000; // 00000000000011110000000000000000 + // MODEM_STATE - 0x0000000F - Modem State 0000 0000 0000 0000 0000 0000 0000 1111 + // CONNECTION_TYPE - 0x000000F0 - Connection Type 0000 0000 0000 0000 0000 0000 1111 0000 + // RSSI - 0x0000FF00 - RSSI 0000 0000 0000 0000 1111 1111 0000 0000 + // SIGNAL_QUALITY - 0x000F0000 - Signal Quality 0000 0000 0000 1111 0000 0000 0000 0000 + // TOWER_CHANGE_INDICATOR - 0x00F00000 - Tower Change Indicator 0000 0000 1111 0000 0000 0000 0000 0000 + // NMEA_TIMEOUT - 0x01000000 - NMEA Timeout 0000 0001 0000 0000 0000 0000 0000 0000 + // SERVER_TIMEOUT - 0x02000000 - Server Timeout 0000 0010 0000 0000 0000 0000 0000 0000 + // RTCM_TIMEOUT - 0x04000000 - RTCM Timeout 0000 0100 0000 0000 0000 0000 0000 0000 + // DEVICE_OUT_OF_RANGE - 0x08000000 - Device Out-of-Range 0000 1000 0000 0000 0000 0000 0000 0000 + // CORRECTIONS_UNAVAILABLE - 0x10000000 - Corrections Unavailable 0001 0000 0000 0000 0000 0000 0000 0000 + // VERSION - 0xC0000000 - Version 1100 0000 0000 0000 0000 0000 0000 0000 + static constexpr uint32 MODEM_STATE = 0x0000000F; // 0000 0000 0000 0000 0000 0000 0000 1111 + static constexpr uint32 CONNECTION_TYPE = 0x000000F0; // 0000 0000 0000 0000 0000 0000 1111 0000 + static constexpr uint32 RSSI = 0x0000FF00; // 0000 0000 0000 0000 1111 1111 0000 0000 + static constexpr uint32 SIGNAL_QUALITY = 0x000F0000; // 0000 0000 0000 1111 0000 0000 0000 0000 + static constexpr uint32 TOWER_CHANGE_INDICATOR = 0x00F00000; // 0000 0000 1111 0000 0000 0000 0000 0000 + static constexpr uint32 NMEA_TIMEOUT = 0x01000000; // 0000 0001 0000 0000 0000 0000 0000 0000 + static constexpr uint32 SERVER_TIMEOUT = 0x02000000; // 0000 0010 0000 0000 0000 0000 0000 0000 + static constexpr uint32 RTCM_TIMEOUT = 0x04000000; // 0000 0100 0000 0000 0000 0000 0000 0000 + static constexpr uint32 DEVICE_OUT_OF_RANGE = 0x08000000; // 0000 1000 0000 0000 0000 0000 0000 0000 + static constexpr uint32 CORRECTIONS_UNAVAILABLE = 0x10000000; // 0001 0000 0000 0000 0000 0000 0000 0000 + static constexpr uint32 VERSION = 0xC0000000; // 1100 0000 0000 0000 0000 0000 0000 0000 + + //API Enum: ModemState + // Modem state values + // OFF - 0x00 - Off + // NO_NETWORK - 0x01 - No Network + // NETWORK_CONNECTED - 0x02 - Network Connected + // CONFIGURING_DATA_CONTEXT - 0x03 - Configuring Data Context + // ACTIVATING_DATA_CONTEXT - 0x04 - Activating Data Context + // CONFIGURING_SOCKET - 0x05 - Configuring Socket + // WAITING_ON_SERVER_HANDSHAKE - 0x06 - Waiting on Server Handshake + // CONNECTED_AND_IDLE - 0x07 - Connected + Idle + // CONNECTED_AND_STREAMING - 0x08 - Connected + Streaming + enum ModemState + { + OFF = 0x00, // Off + NO_NETWORK = 0x01, // No Network + NETWORK_CONNECTED = 0x02, // Network Connected + CONFIGURING_DATA_CONTEXT = 0x03, // Configuring Data Context + ACTIVATING_DATA_CONTEXT = 0x04, // Activating Data Context + CONFIGURING_SOCKET = 0x05, // Configuring Socket + WAITING_ON_SERVER_HANDSHAKE = 0x06, // Waiting on Server Handshake + CONNECTED_AND_IDLE = 0x07, // Connected + Idle + CONNECTED_AND_STREAMING = 0x08, // Connected + Streaming + }; + + //API Enum: ConnectionType + // Connection types + // NO_CONNECTION - 0x00 - No Connection + // CONNECTION_2G - 0x02 - 2G + // CONNECTION_3G - 0x03 - 3G + // CONNECTION_4G - 0x04 - 4G + // CONNECTION_5G - 0x05 - 5G + enum ConnectionType + { + NO_CONNECTION = 0x00, + CONNECTION_2G = 0x02, + CONNECTION_3G = 0x03, + CONNECTION_4G = 0x04, + CONNECTION_5G = 0x05, + }; + + //Constructor: RTKDeviceStatusFlags + RTKDeviceStatusFlags() {} + + //Constructor: RTKDeviceStatusFlags + RTKDeviceStatusFlags(const uint32 flags) : + Bitfield(static_cast(flags)) + {} + + //Constructor: RTKDeviceStatusFlags + RTKDeviceStatusFlags(RTKDeviceStatusFlags_v1 rtk_v1); +#ifndef SWIG + // API Function: explicit conversion from RTKDeviceStatusFlags to RTKDeviceStatusFlags_v1 + // Only C++ compatible + explicit operator RTKDeviceStatusFlags_v1() const; +#endif + //API Function: version + uint8 version() const; + + //API Function: modemState + ModemState modemState() const; + void modemState(ModemState state); + + //API Function: connectionType + ConnectionType connectionType() const; + void connectionType(ConnectionType state); + + //API Function: rssi + int8 rssi() const; + void rssi(uint8 value); + + //API Function: signalQuality + uint8 signalQuality() const; + void signalQuality(uint8 quality); + + //API Function: towerChangeIndicator + uint8 towerChangeIndicator() const; + void towerChangeIndicator(uint8 value); + + //API Function: nmeaTimeout + uint8 nmeaTimeout() const; + void nmeaTimeout(uint8 timeout); + + //API Function: serverTimeout + uint8 serverTimeout() const; + void serverTimeout(uint8 timeout); + + //API Function: rtcmTimeout + uint8 rtcmTimeout() const; + void rtcmTimeout(uint8 timeout); + + //API Function: deviceOutOfRange + uint8 deviceOutOfRange() const; + void deviceOutOfRange(uint8 outOfRange); + + //API Function: correctionsUnavailable + uint8 correctionsUnavailable() const; + void correctionsUnavailable(uint8 unavailable); + }; + + //API Struct: RTKDeviceStatusFlags_v1 + class RTKDeviceStatusFlags_v1 : public Bitfield + { + public: + //API Constants: + // Bitmasks indicating the bits that define each value + // CONTROLLER_STATE - 0x00000007 - Controller State 0000 0000 0000 0000 0000 0000 0000 0111 + // PLATFORM_STATE - 0x000000F8 - Platform State 0000 0000 0000 0000 0000 0000 1111 1000 + // CONTROLLER_STATUS_CODE - 0x00000700 - Controller Status Code 0000 0000 0000 0000 0000 0111 0000 0000 + // PLATFORM_STATUS_CODE - 0x00003800 - Platform Status Code 0000 0000 0000 0000 0011 1000 0000 0000 + // RESET_REASON - 0x0000C000 - Reset Reason 0000 0000 0000 0000 1100 0000 0000 0000 + // SIGNAL_QUALITY - 0x000F0000 - Signal Quality 0000 0000 0000 1111 0000 0000 0000 0000 + // VERSION - 0xC0000000 - Version 1100 0000 0000 0000 0000 0000 0000 0000 + static constexpr uint32 CONTROLLER_STATE = 0x00000007; // 0000 0000 0000 0000 0000 0000 0000 0111 + static constexpr uint32 PLATFORM_STATE = 0x000000F8; // 0000 0000 0000 0000 0000 0000 1111 1000 + static constexpr uint32 CONTROLLER_STATUS_CODE = 0x00000700; // 0000 0000 0000 0000 0000 0111 0000 0000 + static constexpr uint32 PLATFORM_STATUS_CODE = 0x00003800; // 0000 0000 0000 0000 0011 1000 0000 0000 + static constexpr uint32 RESET_REASON = 0x0000C000; // 0000 0000 0000 0000 1100 0000 0000 0000 + static constexpr uint32 SIGNAL_QUALITY = 0x000F0000; // 0000 0000 0000 1111 0000 0000 0000 0000 + static constexpr uint32 VERSION = 0xC0000000; // 1100 0000 0000 0000 0000 0000 0000 0000 //API Enum: ControllerState // Controller state values @@ -2248,8 +2380,8 @@ namespace mscl // ACTIVE - 0x04 - Active enum ControllerState { - IDLE = 0x00, - ACTIVE = 0x04, + IDLE = 0x00, + ACTIVE = 0x04, }; //API Enum: PlatformState @@ -2271,21 +2403,21 @@ namespace mscl // RESET_MODEM - 0x0E - Reset Modem 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 + 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 }; //API Enum: ControllerStatusCode @@ -2297,11 +2429,11 @@ namespace mscl // CONFIG_INVALID - 0x07 - Invalid Configuration enum ControllerStatusCode { - CONTROLLER_OK = 0x00, - WAITING_NMEA = 0x01, - RTK_TIMEOUT = 0x02, + CONTROLLER_OK = 0x00, + WAITING_NMEA = 0x01, + RTK_TIMEOUT = 0x02, RTK_UNAVAILABLE = 0x03, - CONFIG_INVALID = 0x07 + CONFIG_INVALID = 0x07 }; //API Enum: PlatformStatusCode @@ -2312,12 +2444,12 @@ namespace mscl // MODEM_ERROR - 0x07 - Modem Error enum PlatformStatusCode { - PLATFORM_OK = 0x00, - RTK_CONNECTION_DROPPED = 0x04, + PLATFORM_OK = 0x00, + RTK_CONNECTION_DROPPED = 0x04, CELL_CONNECTION_DROPPED = 0x06, - MODEM_ERROR = 0x07 + MODEM_ERROR = 0x07 }; - + //API Enum: ResetReason // Possible RTK reset reason values // POWER_ON - 0x00 - Reset due to Power-on @@ -2326,22 +2458,32 @@ namespace mscl // HARDWARE_ERROR_RESET - 0x03 - Watchdog reset enum ResetReason { - POWER_ON = 0x00, - UNKNOWN = 0x01, - SOFT_RESET = 0x02, - HARDWARE_ERROR_RESET = 0x03 + POWER_ON = 0x00, + UNKNOWN = 0x01, + SOFT_RESET = 0x02, + HARDWARE_ERROR_RESET = 0x03 }; - public: - //Constructor: RTKDeviceStatusFlags - RTKDeviceStatusFlags() {}; + //Constructor: RTKDeviceStatusFlags_v1 + RTKDeviceStatusFlags_v1() {} - //Constructor: RTKDeviceStatusFlags - RTKDeviceStatusFlags(uint32 flags) : + //Constructor: RTKDeviceStatusFlags_v1 + RTKDeviceStatusFlags_v1(uint32 flags) : Bitfield(static_cast(flags)) - {}; + {} + + //Constructor: RTKDeviceStatusFlags_v1 + RTKDeviceStatusFlags_v1(RTKDeviceStatusFlags rtk) : + Bitfield(rtk.value()) + {} +#ifndef SWIG + // API Function: explicit conversion from RTKDeviceStatusFlags_v1 to RTKDeviceStatusFlags + // Only C++ compatible + explicit operator RTKDeviceStatusFlags() const; +#endif + //API Function: version + uint8 version() const; - public: //API Function: controllerState ControllerState controllerState() const; void controllerState(ControllerState state); diff --git a/MSCL/source/mscl/MicroStrain/MIP/MipModels.cpp b/MSCL/source/mscl/MicroStrain/MIP/MipModels.cpp index 8f04ec8d5..5288218fc 100644 --- a/MSCL/source/mscl/MicroStrain/MIP/MipModels.cpp +++ b/MSCL/source/mscl/MicroStrain/MIP/MipModels.cpp @@ -8,33 +8,231 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. #include "MipModels.h" #include "mscl/Utils.h" +#include + namespace mscl { - MipModels::NodeModel MipModels::nodeFromModelString(const std::string& modelNumberString) + bool MipModels::modelNumbersEqual(MipModels::ModelNumber model1, MipModels::ModelNumber model2) + { + uint32 m1 = static_cast(model1); + uint32 m2 = static_cast(model2); + + // if values exactly equal return true + if (m1 == m2) + { + return true; + } + + // if first part equal... + if (m1 / MODIFIER_MULTIPLIER == m2 / MODIFIER_MULTIPLIER) + { + // if either second part is placeholder (9999) return true + if (m1 % MODIFIER_MULTIPLIER == MipModels::Modifier::placeholder_matchAll) + { + return true; + } + + if (m2 % MODIFIER_MULTIPLIER == MipModels::Modifier::placeholder_matchAll) + { + return true; + } + } + + return false; + } + + MipModels::ModelNumber MipModels::modelNumberFromStr(const std::string& modelNumberString) { - std::string trimmedString = modelNumberString; + return modelNumberFromParts(nodeModelFromStr(modelNumberString), static_cast(modifierFromStr(modelNumberString))); + } - //trim off any whitespace on the left of the string - Utils::strTrimLeft(trimmedString); + MipModels::ModelNumber MipModels::modelNumberFromParts(MipModels::NodeModel nodeModel, MipModels::Modifier modifier) + { + return static_cast((nodeModel * MODIFIER_MULTIPLIER) + modifier); + } - //the length of an Inertial Model Number - static const std::size_t MODEL_NUM_LEN = 4; - - //trim off everything except for the first part of the model number - trimmedString = trimmedString.substr(0, MODEL_NUM_LEN); + MipModels::NodeModel MipModels::nodeModelFromStr(const std::string& modelNumberString) + { + //get model number string + std::string modelStr = modelNumberString; + Utils::strTrim(modelStr); + modelStr = modelStr.substr(0, MODEL_NUM_LEN); - int modelNum = 0; + uint32 model = 0; try { //convert the string to an integer - modelNum = std::stoi(trimmedString); + model = static_cast(std::stoi(modelStr)); + } + catch (...) + { + model = 0; } - catch(...) + + return static_cast(model); + } + + uint32 MipModels::modifierFromStr(const std::string& modelNumberString) + { + //get modifier string + std::string modifierStr = modelNumberString; + Utils::strTrim(modifierStr); + modifierStr = modifierStr.substr(MODIFIER_START); + + uint32 modifier = 0; + try + { + // convert string to integer + modifier = static_cast(std::stoi(modifierStr)); + } + catch (...) + { + modifier = 0; + } + + return modifier; + } + + MipModels::NodeModel MipModels::nodeModelFromModelNumber(MipModels::ModelNumber modelNumber) + { + return static_cast(modelNumber / MODIFIER_MULTIPLIER); + } + + uint32 MipModels::modifierFromModelNumber(MipModels::ModelNumber modelNumber) + { + return static_cast(modelNumber) % MODIFIER_MULTIPLIER; + } + + std::string MipModels::stringFromModelNumber(MipModels::ModelNumber modelNumber) + { + uint32 model = nodeModelFromModelNumber(modelNumber); + uint32 modifier = modifierFromModelNumber(modelNumber); + std::stringstream str; + str << std::setfill('0') << std::setw(4) << model + << "-" + << std::setfill('0') << std::setw(4) << modifier; + + return str.str(); + } + + bool operator==(MipModels::ModelNumber model1, const MipModel& model2) + { + return MipModels::modelNumbersEqual(model1, model2.modelNumber()); + } + + bool operator!=(MipModels::ModelNumber model1, const MipModel& model2) + { + return !MipModels::modelNumbersEqual(model1, model2.modelNumber()); + } + + const MipModel MipModel::mip_model_none("0000-0000"); //undefined placeholder + const MipModel MipModel::mip_model_3dm_dh3(MipModels::ModelNumber::model_3dm_dh3); //3DM-DH3 + const MipModel MipModel::mip_model_3dm_gx3_15(MipModels::ModelNumber::model_3dm_gx3_15); //3DM-GX3-15 + const MipModel MipModel::mip_model_3dm_gx3_25(MipModels::ModelNumber::model_3dm_gx3_25); //3DM-GX3-25 + const MipModel MipModel::mip_model_3dm_gx3_35(MipModels::ModelNumber::model_3dm_gx3_35); //3DM-GX3-35 + const MipModel MipModel::mip_model_3dm_gx3_45(MipModels::ModelNumber::model_3dm_gx3_45); //3DM-GX3-45 + const MipModel MipModel::mip_model_3dm_rq1_45_lt(MipModels::ModelNumber::model_3dm_rq1_45_lt); //3DM-RQ1-45-LT + const MipModel MipModel::mip_model_3dm_rq1_45_st(MipModels::ModelNumber::model_3dm_rq1_45_st); //3DM-RQ1-45-ST + const MipModel MipModel::mip_model_3dm_gx4_15(MipModels::ModelNumber::model_3dm_gx4_15); //3DM-GX4-15 + const MipModel MipModel::mip_model_3dm_gx4_25(MipModels::ModelNumber::model_3dm_gx4_25); //3DM-GX4-25 + const MipModel MipModel::mip_model_3dm_gx4_45(MipModels::ModelNumber::model_3dm_gx4_45); //3DM-GX4-45 + const MipModel MipModel::mip_model_mv5_ar(MipModels::ModelNumber::model_mv5_ar); //MV5-AR + const MipModel MipModel::mip_model_3dm_gx5_10(MipModels::ModelNumber::model_3dm_gx5_10); //3DM-GX5-10 + const MipModel MipModel::mip_model_3dm_gx5_15(MipModels::ModelNumber::model_3dm_gx5_15); //3DM-GX5-15 + const MipModel MipModel::mip_model_3dm_gx5_25(MipModels::ModelNumber::model_3dm_gx5_25); //3DM-GX5-25 + const MipModel MipModel::mip_model_3dm_gx5_35(MipModels::ModelNumber::model_3dm_gx5_35); //3DM-GX5-35 + const MipModel MipModel::mip_model_3dm_gx5_45(MipModels::ModelNumber::model_3dm_gx5_45); //3DM-GX5-45 + const MipModel MipModel::mip_model_3dm_cv5_10(MipModels::ModelNumber::model_3dm_cv5_10); //3DM-CV5-10 + const MipModel MipModel::mip_model_3dm_cv5_15(MipModels::ModelNumber::model_3dm_cv5_15); //3DM-CV5-15 + const MipModel MipModel::mip_model_3dm_cv5_25(MipModels::ModelNumber::model_3dm_cv5_25); //3DM-CV5-25 + const MipModel MipModel::mip_model_3dm_cv5_45(MipModels::ModelNumber::model_3dm_cv5_45); //3DM-CV5-45 + const MipModel MipModel::mip_model_3dm_gq4_45(MipModels::ModelNumber::model_3dm_gq4_45); //3DM-GQ4-45 + const MipModel MipModel::mip_model_3dm_cx5_45(MipModels::ModelNumber::model_3dm_cx5_45); //3DM-CX5-45 + const MipModel MipModel::mip_model_3dm_cx5_35(MipModels::ModelNumber::model_3dm_cx5_35); //3DM-CX5-35 + const MipModel MipModel::mip_model_3dm_cx5_25(MipModels::ModelNumber::model_3dm_cx5_25); //3DM-CX5-25 + const MipModel MipModel::mip_model_3dm_cx5_15(MipModels::ModelNumber::model_3dm_cx5_15); //3DM-CX5-15 + const MipModel MipModel::mip_model_3dm_cx5_10(MipModels::ModelNumber::model_3dm_cx5_10); //3DM-CX5-10 + const MipModel MipModel::mip_model_3dm_cl5_15(MipModels::ModelNumber::model_3dm_cl5_15); //3DM-CL5-15 + const MipModel MipModel::mip_model_3dm_cl5_25(MipModels::ModelNumber::model_3dm_cl5_25); //3DM-CL5-25 + const MipModel MipModel::mip_model_3dm_gq7(MipModels::ModelNumber::model_3dm_gq7); //3DM-GQ7 + const MipModel MipModel::mip_model_3dm_rtk_v1(MipModels::ModelNumber::model_3dm_rtk_v1); //3DM-RTK v1 + const MipModel MipModel::mip_model_3dm_rtk(MipModels::ModelNumber::model_3dm_rtk); //3DM-RTK + + MipModel::MipModel() : + m_modelStr(""), + m_first(0), + m_second(0) + {} + + MipModel::MipModel(const std::string& modelNumberStr) : + m_first(MipModels::nodeModelFromStr(modelNumberStr)), + m_second(MipModels::modifierFromStr(modelNumberStr)) + { + m_modelStr = modelNumberStr; + Utils::strTrim(m_modelStr); + } + + MipModel::MipModel(const MipModel& copy) : + m_modelStr(copy.str()), + m_first(copy.nodeModel()), + m_second(copy.modifier()) + {} + +#ifndef SWIG + MipModel::MipModel(MipModels::ModelNumber modelNumber) : + m_first(MipModels::nodeModelFromModelNumber(modelNumber)), + m_second(MipModels::modifierFromModelNumber(modelNumber)), + m_modelStr(MipModels::stringFromModelNumber(modelNumber)) + {} +#endif + + bool MipModel::operator==(const MipModel& compare) const + { + return equals(compare); + } + + bool MipModel::operator!=(const MipModel& compare) const + { + return !equals(compare); + } + + bool MipModel::operator==(const MipModels::ModelNumber& compare) const + { + return MipModels::modelNumbersEqual(modelNumber(), compare); + } + + bool MipModel::operator!=(const MipModels::ModelNumber& compare) const + { + return !MipModels::modelNumbersEqual(modelNumber(), compare); + } + + MipModel::operator std::string() const + { + return str(); + } + + bool MipModel::equals(const MipModel& compare) const + { + return MipModels::modelNumbersEqual(compare.modelNumber(), modelNumber()); + } + + MipModels::ModelNumber MipModel::modelNumber() const + { + return MipModels::modelNumberFromParts( + static_cast(m_first), + static_cast(m_second)); + } + + std::map MipModel::BASE_MODEL_MAP = {}; + + const MipModel& MipModel::baseModelLookup(const MipModel& model) + { + uint32 modelInt = static_cast(model.modelNumber()); + if (BASE_MODEL_MAP.find(modelInt) == BASE_MODEL_MAP.end()) { - modelNum = 0; + return model; } - //cast to a NodeModel and return - return static_cast(modelNum); + return BASE_MODEL_MAP.at(modelInt); } } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/MIP/MipModels.h b/MSCL/source/mscl/MicroStrain/MIP/MipModels.h index 026deca11..027cde6e4 100644 --- a/MSCL/source/mscl/MicroStrain/MIP/MipModels.h +++ b/MSCL/source/mscl/MicroStrain/MIP/MipModels.h @@ -10,18 +10,18 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. namespace mscl { + class MipModel; + //API Class: MipModels - // Contains the models of MIP devices. + // Contains the model number information of MIP devices. class MipModels { public: //========================================================================= //API Enum: NodeModel - // The model numbers for each of the MIP devices. + // The base model numbers for each of the MIP devices. + // Ex: 6284-4220 (3DM-GQ7) NodeModel is 6284 // - // node_3dm - 6201 - 3DM - // node_fasA - 6207 - FAS-A - // node_3dm_gx2 - 6215 - 3DM-GX2 // node_3dm_dh3 - 6219 - 3DM-DH3 // node_3dm_gx3_15 - 6227 - 3DM-GX3-15 // node_3dm_gx3_25 - 6223 - 3DM-GX3-25 @@ -55,52 +55,481 @@ namespace mscl //========================================================================= enum NodeModel { - node_3dm = 6201, //3DM - node_fasA = 6207, //FAS-A - node_3dm_gx2 = 6215, //3DM-GX2 - node_3dm_dh3 = 6219, //3DM-DH3 - node_3dm_gx3_15 = 6227, //3DM-GX3-15 - node_3dm_gx3_25 = 6223, //3DM-GX3-25 - node_3dm_gx3_35 = 6225, //3DM-GX3-35 - node_3dm_gx3_45 = 6228, //3DM-GX3-45 - node_3dm_rq1_45_lt = 6232, //3DM-RQ1-45-LT - node_3dm_gx4_15 = 6233, //3DM-GX4-15 - node_3dm_gx4_25 = 6234, //3DM-GX4-25 - node_3dm_gx4_45 = 6236, //3DM-GX4-45 - node_3dm_rq1_45_st = 6239, //3DM-RQ1-45-ST - node_mv5_ar = 6243, //MV5-AR - node_3dm_gx5_10 = 6255, //3DM-GX5-10 - node_3dm_gx5_15 = 6254, //3DM-GX5-15 - node_3dm_gx5_25 = 6253, //3DM-GX5-25 - node_3dm_gx5_35 = 6252, //3DM-GX5-35 - node_3dm_gx5_45 = 6251, //3DM-GX5-45 - node_3dm_cv5_10 = 6259, //3DM-CV5-10 - node_3dm_cv5_15 = 6258, //3DM-CV5-15 - node_3dm_cv5_25 = 6257, //3DM-CV5-25 - node_3dm_cv5_45 = 6256, //3DM-CV5-45 - node_3dm_gq4_45 = 6250, //3DM-GQ4-45 - node_3dm_cx5_45 = 6271, //3DM-CX5-45 - node_3dm_cx5_35 = 6272, //3DM-CX5-35 - node_3dm_cx5_25 = 6273, //3DM-CX5-25 - node_3dm_cx5_15 = 6274, //3DM-CX5-15 - node_3dm_cx5_10 = 6275, //3DM-CX5-10 - node_3dm_cl5_15 = 6280, //3DM-CL5-15 - node_3dm_cl5_25 = 6281, //3DM-CL5-25 - node_3dm_gq7 = 6284, //3DM-GQ7 - node_3dm_rtk = 6285 //3DM-RTK + node_3dm_dh3 = 6219, //3DM-DH3 + node_3dm_gx3_15 = 6227, //3DM-GX3-15 + node_3dm_gx3_25 = 6223, //3DM-GX3-25 + node_3dm_gx3_35 = 6225, //3DM-GX3-35 + node_3dm_gx3_45 = 6228, //3DM-GX3-45 + node_3dm_rq1_45_lt = 6232, //3DM-RQ1-45-LT + node_3dm_gx4_15 = 6233, //3DM-GX4-15 + node_3dm_gx4_25 = 6234, //3DM-GX4-25 + node_3dm_gx4_45 = 6236, //3DM-GX4-45 + node_3dm_rq1_45_st = 6239, //3DM-RQ1-45-ST + node_mv5_ar = 6243, //MV5-AR + node_3dm_gx5_10 = 6255, //3DM-GX5-10 + node_3dm_gx5_15 = 6254, //3DM-GX5-15 + node_3dm_gx5_25 = 6253, //3DM-GX5-25 + node_3dm_gx5_35 = 6252, //3DM-GX5-35 + node_3dm_gx5_45 = 6251, //3DM-GX5-45 + node_3dm_cv5_10 = 6259, //3DM-CV5-10 + node_3dm_cv5_15 = 6258, //3DM-CV5-15 + node_3dm_cv5_25 = 6257, //3DM-CV5-25 + node_3dm_cv5_45 = 6256, //3DM-CV5-45 + node_3dm_gq4_45 = 6250, //3DM-GQ4-45 + node_3dm_cx5_45 = 6271, //3DM-CX5-45 + node_3dm_cx5_35 = 6272, //3DM-CX5-35 + node_3dm_cx5_25 = 6273, //3DM-CX5-25 + node_3dm_cx5_15 = 6274, //3DM-CX5-15 + node_3dm_cx5_10 = 6275, //3DM-CX5-10 + node_3dm_cl5_15 = 6280, //3DM-CL5-15 + node_3dm_cl5_25 = 6281, //3DM-CL5-25 + node_3dm_gq7 = 6284, //3DM-GQ7 + node_3dm_rtk = 6285 //3DM-RTK + }; + + //========================================================================= + //API Enum: Modifier + // The modifier options for MIP devices. + // Ex: 6285-0100 (3DM-RTK) Modifier is 0100 + // This list does not define modifiers for all devices. The placeholder value (9999) will match to any value read from the device when comparing objects. + // + // placeholder_matchAll - 9999 - Placeholder value to use in full ModelNumber and const definitions + // rtk_v1 - 0000 - 3DM-RTK v1 + // rtk_v2 - 0100 - 3DM-RTK + //========================================================================= + enum Modifier + { + //placeholder + placeholder_matchAll = 9999, + + //rtk + rtk_v1 = 0000, + rtk_v2 = 0100 + }; + + //========================================================================= + //API Enum: ModelNumber + // The combined node model and modifier numbers for each of the MIP devices. + // Ex: Model = 6285, Modifiers = RTK v2 (0100) - NodeModel = 62580100 + // Most models have 9999 placeholder modifier values because there is no significant interface difference between the different versions of the same base model. + // This placeholder value will match to any modifier value read from the device when comparing objects. + // + // model_3dm_dh3 - 62199999 - 3DM-DH3 + // model_3dm_gx3_15 - 62279999 - 3DM-GX3-15 + // model_3dm_gx3_25 - 62239999 - 3DM-GX3-25 + // model_3dm_gx3_35 - 62259999 - 3DM-GX3-35 + // model_3dm_gx3_45 - 62289999 - 3DM-GX3-45 + // model_3dm_rq1_45_lt - 62329999 - 3DM-RQ1-45-LT + // model_3dm_gx4_15 - 62339999 - 3DM-GX4-15 + // model_3dm_gx4_25 - 62349999 - 3DM-GX4-25 + // model_3dm_gx4_45 - 62369999 - 3DM-GX4-45 + // model_3dm_rq1_45_st - 62399999 - 3DM-RQ1-45-ST + // model_mv5_ar - 62439999 - MV5-AR + // model_3dm_gx5_10 - 62559999 - 3DM-GX5-10 + // model_3dm_gx5_15 - 62549999 - 3DM-GX5-15 + // model_3dm_gx5_25 - 62539999 - 3DM-GX5-25 + // model_3dm_gx5_35 - 62529999 - 3DM-GX5-35 + // model_3dm_gx5_45 - 62519999 - 3DM-GX5-45 + // model_3dm_cv5_10 - 62599999 - 3DM-CV5-10 + // model_3dm_cv5_15 - 62589999 - 3DM-CV5-15 + // model_3dm_cv5_25 - 62579999 - 3DM-CV5-25 + // model_3dm_cv5_45 - 62569999 - 3DM-CV5-45 + // model_3dm_gq4_45 - 62509999 - 3DM-GQ4-45 + // model_3dm_cx5_45 - 62719999 - 3DM-CX5-45 + // model_3dm_cx5_35 - 62729999 - 3DM-CX5-35 + // model_3dm_cx5_25 - 62739999 - 3DM-CX5-25 + // model_3dm_cx5_15 - 62749999 - 3DM-CX5-15 + // model_3dm_cx5_10 - 62759999 - 3DM-CX5-10 + // model_3dm_cl5_15 - 62809999 - 3DM-CL5-15 + // model_3dm_cl5_25 - 62819999 - 3DM-CL5-25 + // model_3dm_gq7 - 62849999 - 3DM-GQ7 + // model_3dm_rtk_v1 - 62850000 - 3DM-RTK v1 + // model_3dm_rtk - 62850100 - 3DM-RTK + //========================================================================= + enum ModelNumber + { + model_3dm_dh3 = 62199999, // 3DM-DH3 + model_3dm_gx3_15 = 62279999, // 3DM-GX3-15 + model_3dm_gx3_25 = 62239999, // 3DM-GX3-25 + model_3dm_gx3_35 = 62259999, // 3DM-GX3-35 + model_3dm_gx3_45 = 62289999, // 3DM-GX3-45 + model_3dm_rq1_45_lt = 62329999, // 3DM-RQ1-45-LT + model_3dm_gx4_15 = 62339999, // 3DM-GX4-15 + model_3dm_gx4_25 = 62349999, // 3DM-GX4-25 + model_3dm_gx4_45 = 62369999, // 3DM-GX4-45 + model_3dm_rq1_45_st = 62399999, // 3DM-RQ1-45-ST + model_mv5_ar = 62439999, // MV5-AR + model_3dm_gx5_10 = 62559999, // 3DM-GX5-10 + model_3dm_gx5_15 = 62549999, // 3DM-GX5-15 + model_3dm_gx5_25 = 62539999, // 3DM-GX5-25 + model_3dm_gx5_35 = 62529999, // 3DM-GX5-35 + model_3dm_gx5_45 = 62519999, // 3DM-GX5-45 + model_3dm_cv5_10 = 62599999, // 3DM-CV5-10 + model_3dm_cv5_15 = 62589999, // 3DM-CV5-15 + model_3dm_cv5_25 = 62579999, // 3DM-CV5-25 + model_3dm_cv5_45 = 62569999, // 3DM-CV5-45 + model_3dm_gq4_45 = 62509999, // 3DM-GQ4-45 + model_3dm_cx5_45 = 62719999, // 3DM-CX5-45 + model_3dm_cx5_35 = 62729999, // 3DM-CX5-35 + model_3dm_cx5_25 = 62739999, // 3DM-CX5-25 + model_3dm_cx5_15 = 62749999, // 3DM-CX5-15 + model_3dm_cx5_10 = 62759999, // 3DM-CX5-10 + model_3dm_cl5_15 = 62809999, // 3DM-CL5-15 + model_3dm_cl5_25 = 62819999, // 3DM-CL5-25 + model_3dm_gq7 = 62849999, // 3DM-GQ7 + model_3dm_rtk_v1 = 62850000, // 3DM-RTK v1 + model_3dm_rtk = 62850100, // 3DM-RTK }; + //API Function: modelNumberEqual + // Compare two enum values (functionally the same as == operator overload for two MipModels::ModelNumber values). + // + // Parameters: + // model1 - the first MipModels::ModelNumber value to compare + // model2 - the second MipModels::ModelNumber value to compare + // + // Returns: + // bool - true if both the and sections of the full model number are equal or either is the placeholder value (9999) + static bool modelNumbersEqual(ModelNumber model1, ModelNumber model2); + + //API Function: modelNumberFromStr + // Returns a full ModelNumber integer value parsed from a model number string. + // + // Parameters: + // modelNumberString - model number string formatted as it is read from a MIP device (ex: "6284-4220") + // + // Returns: + // - integer form of model number cast as a ModelNumber enum value (ex: "6284-4220" -> 62844220) + static ModelNumber modelNumberFromStr(const std::string& modelNumberString); + + //API Function: modelNumberFromParts + // Constructs a full ModelNumber integer from node model and modifier sections. Ex: nodeModel: 6284, modifier: 4220 -> 62844220 + // + // Parameters: + // nodeModel - value, the first part of the full model number (ex: 6284 of "6284-4220") + // modifier - value, the second part of the full model number (ex: 4220 of "6284-4220") + // + // Returns: + // integer form of model number cast as a ModelNumber enum value + static ModelNumber modelNumberFromParts(NodeModel nodeModel, Modifier modifier); + + //API Function: nodeModelFromStr + // Returns the NodeModel section of a ModelNumber as an integer value parsed from a model number string. + // + // Parameters: + // modelNumberString - model number string formatted as it is read from a MIP device (ex: "6284-4220") + // + // Returns: + // - integer form of the first part of a model number cast as a NodeModel enum value (ex: "6284-4220" -> 6284) + static NodeModel nodeModelFromStr(const std::string& modelNumberString); + + //Function: modifierFromStr + // Returns the Modifier section of a ModelNumber as an integer value parsed from a model number string. + // + // Parameters: + // modelNumberString - model number string formatted as it is read from a MIP device (ex: "6284-4220") + // + // Returns: + // - integer form of the second part of a model number (ex: "6284-4220" -> 4220) + static uint32 modifierFromStr(const std::string& modelNumberString); + + //Function: nodeModelFromModelNumber + // Returns the NodeModel section of a full ModelNumber integer. + // + // Parameters: + // modelNumber - model number integer i.e. 62844220 ("6284-4220") + // + // Returns: + // - integer form of the first part of a model number cast as a NodeModel enum value (ex: 62844220 -> 6284) + static NodeModel nodeModelFromModelNumber(ModelNumber modelNumber); + + //Function: modifierFromModelNumber + // Returns the Modifier section of a full ModelNumber integer. + // + // Parameters: + // modelNumber - model number integer i.e. 62844220 ("6284-4220") + // + // Returns: + // - integer form of the second part of a model number (ex: 62844220 -> 4220) + static uint32 modifierFromModelNumber(ModelNumber modelNumber); + + //Function stringFromModelNumber + // Returns a model number string formatted as it's read from a MIP device from the full ModelNumber integer value. + // + // Parameters: + // modelNumber - full model number integer as a enum value (ex: 62844220) + // + // Returns: + // string - model number string formatted as it would be read from a MIP device (ex: 62844220 -> "6284-4220") + static std::string stringFromModelNumber(MipModels::ModelNumber modelNumber); + + private: + // the value to multiply the node model section of a model number before adding the modifier + static const int MODIFIER_MULTIPLIER = 10000; + + //the length the first part of a MIP model number + static const std::size_t MODEL_NUM_LEN = 4; + + //the starting index of the modifier section of a MIP model number str + static const std::size_t MODIFIER_START = MODEL_NUM_LEN + 1; + }; + + //API Class: MipModel + // Contains the model information of MIP devices. + class MipModel + { + public: + //========================================================================= + //API Const: MipModel Constants + // Constant object definitions for each known MIP device. + // Most models have 9999 placeholder modifier values because there is no significant interface difference between the different versions of the same base model. + // This placeholder value will match to any modifier value read from the device when comparing objects. + // + // mip_model_none - 00000000 - undefined placeholder + // mip_model_3dm_dh3 - 62199999 - 3DM-DH3 + // mip_model_3dm_gx3_15 - 62279999 - 3DM-GX3-15 + // mip_model_3dm_gx3_25 - 62239999 - 3DM-GX3-25 + // mip_model_3dm_gx3_35 - 62259999 - 3DM-GX3-35 + // mip_model_3dm_gx3_45 - 62289999 - 3DM-GX3-45 + // mip_model_3dm_rq1_45_lt - 62329999 - 3DM-RQ1-45-LT + // mip_model_3dm_gx4_15 - 62339999 - 3DM-GX4-15 + // mip_model_3dm_gx4_25 - 62349999 - 3DM-GX4-25 + // mip_model_3dm_gx4_45 - 62369999 - 3DM-GX4-45 + // mip_model_3dm_rq1_45_st - 62399999 - 3DM-RQ1-45-ST + // mip_model_mv5_ar - 62439999 - MV5-AR + // mip_model_3dm_gx5_10 - 62559999 - 3DM-GX5-10 + // mip_model_3dm_gx5_15 - 62549999 - 3DM-GX5-15 + // mip_model_3dm_gx5_25 - 62539999 - 3DM-GX5-25 + // mip_model_3dm_gx5_35 - 62529999 - 3DM-GX5-35 + // mip_model_3dm_gx5_45 - 62519999 - 3DM-GX5-45 + // mip_model_3dm_cv5_10 - 62599999 - 3DM-CV5-10 + // mip_model_3dm_cv5_15 - 62589999 - 3DM-CV5-15 + // mip_model_3dm_cv5_25 - 62579999 - 3DM-CV5-25 + // mip_model_3dm_cv5_45 - 62569999 - 3DM-CV5-45 + // mip_model_3dm_gq4_45 - 62509999 - 3DM-GQ4-45 + // mip_model_3dm_cx5_45 - 62719999 - 3DM-CX5-45 + // mip_model_3dm_cx5_35 - 62729999 - 3DM-CX5-35 + // mip_model_3dm_cx5_25 - 62739999 - 3DM-CX5-25 + // mip_model_3dm_cx5_15 - 62749999 - 3DM-CX5-15 + // mip_model_3dm_cx5_10 - 62759999 - 3DM-CX5-10 + // mip_model_3dm_cl5_15 - 62809999 - 3DM-CL5-15 + // mip_model_3dm_cl5_25 - 62819999 - 3DM-CL5-25 + // mip_model_3dm_gq7 - 62849999 - 3DM-GQ7 + // mip_model_3dm_rtk_v1 - 62850000 - 3DM-RTK v1 + // mip_model_3dm_rtk - 62850100 - 3DM-RTK + //========================================================================= + static const MipModel mip_model_none; //undefined + static const MipModel mip_model_3dm_dh3; //3DM-DH3 + static const MipModel mip_model_3dm_gx3_15; //3DM-GX3-15 + static const MipModel mip_model_3dm_gx3_25; //3DM-GX3-25 + static const MipModel mip_model_3dm_gx3_35; //3DM-GX3-35 + static const MipModel mip_model_3dm_gx3_45; //3DM-GX3-45 + static const MipModel mip_model_3dm_rq1_45_lt; //3DM-RQ1-45-LT + static const MipModel mip_model_3dm_rq1_45_st; //3DM-RQ1-45-ST + static const MipModel mip_model_3dm_gx4_15; //3DM-GX4-15 + static const MipModel mip_model_3dm_gx4_25; //3DM-GX4-25 + static const MipModel mip_model_3dm_gx4_45; //3DM-GX4-45 + static const MipModel mip_model_mv5_ar; //MV5-AR + static const MipModel mip_model_3dm_gx5_10; //3DM-GX5-10 + static const MipModel mip_model_3dm_gx5_15; //3DM-GX5-15 + static const MipModel mip_model_3dm_gx5_25; //3DM-GX5-25 + static const MipModel mip_model_3dm_gx5_35; //3DM-GX5-35 + static const MipModel mip_model_3dm_gx5_45; //3DM-GX5-45 + static const MipModel mip_model_3dm_cv5_10; //3DM-CV5-10 + static const MipModel mip_model_3dm_cv5_15; //3DM-CV5-15 + static const MipModel mip_model_3dm_cv5_25; //3DM-CV5-25 + static const MipModel mip_model_3dm_cv5_45; //3DM-CV5-45 + static const MipModel mip_model_3dm_gq4_45; //3DM-GQ4-45 + static const MipModel mip_model_3dm_cx5_45; //3DM-CX5-45 + static const MipModel mip_model_3dm_cx5_35; //3DM-CX5-35 + static const MipModel mip_model_3dm_cx5_25; //3DM-CX5-25 + static const MipModel mip_model_3dm_cx5_15; //3DM-CX5-15 + static const MipModel mip_model_3dm_cx5_10; //3DM-CX5-10 + static const MipModel mip_model_3dm_cl5_15; //3DM-CL5-15 + static const MipModel mip_model_3dm_cl5_25; //3DM-CL5-25 + static const MipModel mip_model_3dm_gq7; //3DM-GQ7 + static const MipModel mip_model_3dm_rtk_v1; //3DM-RTK v1 + static const MipModel mip_model_3dm_rtk; //3DM-RTK + + private: + MipModel(); // hide default constructor + + //Constructor: MipModel (not documented) + // Creates a MipModel object from a value. + // This is used for instantiating known MipModel constants + // + // Parameters: + // modelNumber - the that represents this object + MipModel(MipModels::ModelNumber modelNumber); + + public: + //API Constructor: MipModel + // Creates a MipModel object from the model string read from a MIP device (inertial, RTK) + // + // Parameters: + // modelNumberStr - the model number string as read from the device, example format: "6284-4220" + MipModel(const std::string& modelNumberStr); + + //API Constructor: MipModel + // Creates a MipModel object based on another MipModel object + // + // Parameters: + // copy - the MipModel object to copy values from + MipModel(const MipModel& copy); + #ifndef SWIG - - //Function: nodeFromModelString - // Converts the model number string received from an InertialNode to a enum. + //API Operator: == (MipModel, C++ only) + // Define == behavior when comparing two MipModel objects (functionally the same as MipModel::equals()). + // + // Parameters: + // compare - the MipModel object to compare this to + // + // Returns: + // bool - true if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool operator==(const MipModel& compare) const; + + //API Operator: != (MipModel, C++ only) + // Define != behavior when comparing two MipModel objects (functionally the same as MipModel::equals()). + // + // Parameters: + // compare - the MipModel object to compare this to // - //Parameters: - // modelNumberString - The model number string received in an InertialNode's Get Device Info packet. + // Returns: + // bool - false if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool operator!=(const MipModel& compare) const; + + //API Operator: == ( value to compare this to + // + // Returns: + // bool - true if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool operator==(const MipModels::ModelNumber& compare) const; + + //API Operator: != ( value to compare this to + // + // Returns: + // bool - false if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool operator!=(const MipModels::ModelNumber& compare) const; + + //API Operator: std::string (C++ only) + // Define behavior when casting a MipModel to std::string (funtionally the same as MipModel::str()). // - //Returns: - // A enum created from the string. - static NodeModel nodeFromModelString(const std::string& modelNumberString); + // Returns: + // string - model string formatted as it would be read from the device (ex: 6284-4220) + operator std::string() const; #endif + //API Function: equals + // Function to compare two MipModel objects for equality (functionally the same as overloaded == operator). + // + // Parameters: + // compare - the MipModel object to compare this to + // + // Returns: + // bool - true if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool equals(const MipModel& compare) const; + + private: + // m_modelStr + // the model string formatted as it would be read from the device + std::string m_modelStr; + + // m_first + // the NodeModel portion of the full model number (ex 6284 from 6284-4220) + uint32 m_first; + + // m_second + // the Modifier portion of the full model number (ex 4220 from 6284-4220) + uint32 m_second; + + public: + //API Function: str + // Get the model string formatted as it would be read from the device (ex: 6284-4220) (funtionally the same as std::string overloaded operator). + // + // Returns: + // string - model string formatted as it would be read from the device (ex: 6284-4220) + const std::string str() const { return m_modelStr; } + + //API Function: nodeModel + // Get the value for this model number. Ex: str: "6284-4220", nodeModel: 6284 + // + // Returns: + // - the first part of the model number + MipModels::NodeModel nodeModel() const { return static_cast(m_first); } + + //API Function: modifier + // Get the modifier value for this model number. Ex: str: "6284-4220", modifier: 4220 + // Note: most actual modifier values are not defined in the enum - actual value read from the device likely won't match. + // + // Returns: + // uint32 - the second part of the model number + uint32 modifier() const { return m_second; } + + //API Function: modelNumber + // Get the full value for this model number. Ex: str: "6284-4220", modelNumber: 62844220 + // Note: most values in the enum use the placeholder modifier - actual value read from the device likely won't match. + // + // Returns: + // - the full model number integer + MipModels::ModelNumber modelNumber() const; + + private: + // Empty map to hold info to match custom model numbers to base models for feature checking, etc. + static std::map BASE_MODEL_MAP; + + public: +#ifndef SWIG + //Function: setBaseModelMap (not documented, C++ only) + // Sets the BASE_MODEL_MAP to map custom model definitions to base models with known features. + // + // Parameters: + // baseModels - the [uint32, &] map where the uint32 key is an integer version of the custom model and the MipModel entry is the base + static void setBaseModelMap(std::map baseModels) { BASE_MODEL_MAP = baseModels; } + + //Function: baseModelLookup (not documented, C++ only) + // Finds the base model for the specified model as defined by the BASE_MODEL_MAP. The specified model is returned without changes if no base model is found. + // + // Parameters: + // model - the to find the base model of and default return if base model entry not found. + static const MipModel& baseModelLookup(const MipModel& model); +#endif + + //Function: baseModel (not documented) + // Get the base model for this device. + // This function is present with the intent it will be overloaded for custom model number functionality. + // + // Returns: + // - returns reference to itself if custom entry not defined in BASE_MODEL_MAP + virtual const MipModel& baseModel() const { return baseModelLookup(*this); } }; + +#ifndef SWIG + //API Operator: == (, object, C++ only) + // Define == behavior when comparing a enum value and object (functionally the same as comparing the MipModel::modelNumber() value with MipModels::modelNumbersEqual()). + // + // Parameters: + // model1 - the first MipModels::ModelNumber value to compare + // model2 - the second MipModel object to compare + // + // Returns: + // bool - true if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool operator==(MipModels::ModelNumber model1, const MipModel& model2); + + //API Operator: != (, object, C++ only) + // Define != behavior when comparing a enum value and object (functionally the same as comparing the MipModel::modelNumber() value with MipModels::modelNumbersEqual()). + // + // Parameters: + // model1 - the first MipModels::ModelNumber value to compare + // model2 - the second MipModel object to compare + // + // Returns: + // bool - false if both the and sections of the full model number are equal or either is the placeholder value (9999) + bool operator!=(MipModels::ModelNumber model1, const MipModel& model2); +#endif } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/MIP/MipNode.cpp b/MSCL/source/mscl/MicroStrain/MIP/MipNode.cpp index ba84bd5d3..7c9a23c54 100644 --- a/MSCL/source/mscl/MicroStrain/MIP/MipNode.cpp +++ b/MSCL/source/mscl/MicroStrain/MIP/MipNode.cpp @@ -90,9 +90,9 @@ namespace mscl return m_impl->firmwareVersion(); } - MipModels::NodeModel MipNode::model() const + MipModel MipNode::model() const { - return MipModels::nodeFromModelString(modelNumber()); + return MipModel(modelNumber()); } std::string MipNode::modelName() const diff --git a/MSCL/source/mscl/MicroStrain/MIP/MipNode.h b/MSCL/source/mscl/MicroStrain/MIP/MipNode.h index 2604f8e3a..5e50a2833 100644 --- a/MSCL/source/mscl/MicroStrain/MIP/MipNode.h +++ b/MSCL/source/mscl/MicroStrain/MIP/MipNode.h @@ -184,16 +184,16 @@ namespace mscl Version firmwareVersion() const; //API Function: model - // Gets the of the MipNode. + // Gets the of the MipNode. // //Returns: - // The of the MipNode. + // The of the MipNode. // //Exceptions: // - : There was no response to the command. The command timed out. // - : The command has failed. Check the error code for more details. // - : Information failed to be loaded for this Node. - MipModels::NodeModel model() const; + MipModel model() const; //API Function: modelName // Gets the model name of the MipNode (ie. "3DM-GX3-45"). diff --git a/MSCL/source/mscl/MicroStrain/MIP/MipNodeFeatures.cpp b/MSCL/source/mscl/MicroStrain/MIP/MipNodeFeatures.cpp index 6677369a7..95cf08b03 100644 --- a/MSCL/source/mscl/MicroStrain/MIP/MipNodeFeatures.cpp +++ b/MSCL/source/mscl/MicroStrain/MIP/MipNodeFeatures.cpp @@ -124,8 +124,8 @@ namespace mscl const CommPortInfo MipNodeFeatures::getCommPortInfo() const { - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gq7: return{ @@ -147,8 +147,8 @@ namespace mscl return VehicleModeTypes(0); } - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gx3_45: @@ -179,8 +179,8 @@ namespace mscl return{}; } - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gq4_45: case MipModels::node_3dm_rq1_45_lt: @@ -216,12 +216,9 @@ namespace mscl bool MipNodeFeatures::useLegacyIdsForEnableDataStream() const { - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { - case MipModels::node_3dm: - case MipModels::node_fasA: - case MipModels::node_3dm_gx2: case MipModels::node_3dm_dh3: case MipModels::node_3dm_gx3_15: case MipModels::node_3dm_gx3_25: @@ -264,8 +261,8 @@ namespace mscl return{ HeadingUpdateOptions(InertialTypes::HeadingUpdateEnableOption::ENABLE_NONE) }; } - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gx4_45: case MipModels::node_3dm_gx3_45: @@ -310,11 +307,8 @@ namespace mscl case MipModels::node_3dm_gx3_15: case MipModels::node_3dm_gx3_25: case MipModels::node_3dm_gx3_35: - case MipModels::node_3dm_gx2: case MipModels::node_3dm_cv5_45: case MipModels::node_3dm_cv5_10: - case MipModels::node_3dm: - case MipModels::node_fasA: case MipModels::node_3dm_dh3: default: return{ @@ -338,8 +332,8 @@ namespace mscl return{ EstimationControlOptions(0) }; } - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gx5_15: case MipModels::node_3dm_gx4_25: @@ -378,11 +372,8 @@ namespace mscl case MipModels::node_3dm_gx3_15: case MipModels::node_3dm_gx3_25: case MipModels::node_3dm_gx3_35: - case MipModels::node_3dm_gx2: case MipModels::node_3dm_cv5_45: case MipModels::node_3dm_cv5_10: - case MipModels::node_3dm: - case MipModels::node_fasA: case MipModels::node_3dm_dh3: default: return EstimationControlOptions( @@ -406,8 +397,8 @@ namespace mscl return{ AdaptiveMeasurementModes(0) }; } - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gx4_45: case MipModels::node_3dm_gx4_25: @@ -416,12 +407,9 @@ namespace mscl case MipModels::node_3dm_gx3_35: case MipModels::node_3dm_gx3_25: case MipModels::node_3dm_gx3_15: - case MipModels::node_3dm_gx2: case MipModels::node_3dm_rq1_45_lt: case MipModels::node_3dm_rq1_45_st: case MipModels::node_3dm_gq4_45: - case MipModels::node_3dm: - case MipModels::node_fasA: case MipModels::node_3dm_dh3: return { InertialTypes::AdaptiveMeasurementMode::ADAPTIVE_MEASUREMENT_DISABLE, @@ -455,8 +443,8 @@ namespace mscl return{ AdaptiveFilterLevels(0) }; } - MipModels::NodeModel model = MipModels::nodeFromModelString(m_nodeInfo.deviceInfo().modelNumber); - switch (model) + MipModel model(m_nodeInfo.deviceInfo().modelNumber); + switch (model.baseModel().nodeModel()) { case MipModels::node_3dm_gx5_45: case MipModels::node_3dm_cv5_45: diff --git a/MSCL/source/mscl/MicroStrain/MIP/MipNode_Impl.cpp b/MSCL/source/mscl/MicroStrain/MIP/MipNode_Impl.cpp index 92d63264f..025e14962 100644 --- a/MSCL/source/mscl/MicroStrain/MIP/MipNode_Impl.cpp +++ b/MSCL/source/mscl/MicroStrain/MIP/MipNode_Impl.cpp @@ -1862,14 +1862,14 @@ namespace mscl DeviceStatusData MipNode_Impl::getBasicDeviceStatus() { - DeviceStatus deviceStatus = DeviceStatus::MakeGetBasicCommand(MipModels::nodeFromModelString(modelNumber())); + DeviceStatus deviceStatus = DeviceStatus::MakeGetBasicCommand(MipModel(modelNumber()).baseModel().nodeModel()); GenericMipCmdResponse response = SendCommand(deviceStatus); return deviceStatus.getResponseData(response); } DeviceStatusData MipNode_Impl::getDiagnosticDeviceStatus() { - DeviceStatus deviceStatus = DeviceStatus::MakeGetDiagnosticCommand(MipModels::nodeFromModelString(modelNumber())); + DeviceStatus deviceStatus = DeviceStatus::MakeGetDiagnosticCommand(MipModel(modelNumber()).baseModel().nodeModel()); GenericMipCmdResponse response = SendCommand(deviceStatus); return deviceStatus.getResponseData(response); } diff --git a/MSCL/source/mscl/MicroStrain/RTK/RTKNode.cpp b/MSCL/source/mscl/MicroStrain/RTK/RTKNode.cpp index 1d560e2eb..6d66a3703 100644 --- a/MSCL/source/mscl/MicroStrain/RTK/RTKNode.cpp +++ b/MSCL/source/mscl/MicroStrain/RTK/RTKNode.cpp @@ -37,4 +37,9 @@ namespace mscl { return m_impl->getActivationCode(); } + + uint8 RTKNode::getStatusBitfieldVersion() const + { + return getDeviceStatusFlags().version(); + } } diff --git a/MSCL/source/mscl/MicroStrain/RTK/RTKNode.h b/MSCL/source/mscl/MicroStrain/RTK/RTKNode.h index 761fd765c..89582391c 100644 --- a/MSCL/source/mscl/MicroStrain/RTK/RTKNode.h +++ b/MSCL/source/mscl/MicroStrain/RTK/RTKNode.h @@ -66,7 +66,7 @@ namespace mscl // Gets the status flags for the RTK device. // //Returns: - // RTKDeviceStatusFlags - The struct containing modem and client connection status. + // RTKDeviceStatusFlags - The RTKDeviceStatusFlags containing modem and client connection status. // //Exceptions: // - : There was no response to the command. The command timed out. @@ -86,5 +86,19 @@ namespace mscl // - : The command has failed. Check the error code for more details. // - : A connection error has occurred with the RTKNode. std::string getActivationCode() const; + + //API Function: getStatusBitfieldVersion + // Extracts the bitfield version number from the RTK status flag. + // 0 - V1 + // 1 - V2 + // + //Returns: + // uint8 - The uint8 bitfield value containing the RTK version number. + // + //Exceptions: + // - : There was no response to the command. The command timed out. + // - : The command has failed. Check the error code for more details. + // - : A connection error has occurred with the RTKNode. + uint8 getStatusBitfieldVersion() const; }; } diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/BaseStationEeprom.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/BaseStationEeprom.cpp index 2ee942b12..001698534 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/BaseStationEeprom.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/BaseStationEeprom.cpp @@ -13,7 +13,7 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. namespace mscl { BaseStationEeprom::BaseStationEeprom(BaseStation_Impl* base): - Eeprom(true, 0), + Eeprom(true, 2), m_baseStation(base) { } diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp index 56f23e8f5..7a932edae 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/InputRange.cpp @@ -218,14 +218,14 @@ namespace mscl }; 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) } + { 0, InputRangeEntry(WirelessTypes::range_125mV, 20.0f) }, + { 1, InputRangeEntry(WirelessTypes::range_62_5mV, 40.0f) }, + { 2, InputRangeEntry(WirelessTypes::range_31_25mV, 80.0f) }, + { 3, InputRangeEntry(WirelessTypes::range_15_63mV, 160.0f) }, + { 4, InputRangeEntry(WirelessTypes::range_7_81mV, 320.0f) }, + { 5, InputRangeEntry(WirelessTypes::range_3_91mV, 640.0f) }, + { 6, InputRangeEntry(WirelessTypes::range_1_95mV, 1280.0f) }, + { 7, InputRangeEntry(WirelessTypes::range_0_976mV, 2560.0f) } }; const InputRangeHelper::InputRangeMap& InputRangeHelper::getRangeMap(WirelessModels::NodeModel nodeType, WirelessTypes::ChannelType channelType, WirelessTypes::Voltage excitationVoltage) diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEeprom.h b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEeprom.h index 9d28eff20..762039e9f 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEeprom.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEeprom.h @@ -34,7 +34,7 @@ namespace mscl NodeEepromSettings(): useGroupRead(true), - numRetries(0), + numRetries(3), useEepromCache(true) { } diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEepromHelper.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEepromHelper.cpp index 01a777be5..1f1f9d13c 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEepromHelper.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Configuration/NodeEepromHelper.cpp @@ -476,75 +476,78 @@ namespace mscl } else { - uint8 delayVersion = m_node->features().sensorDelayVersion(); + const TimeSpan delay{TimeSpan::MicroSeconds(microseconds)}; - TimeSpan delay{TimeSpan::MicroSeconds(microseconds)}; - - //Milliseconds only - if(delayVersion == 1) + switch (m_node->features().sensorDelayVersion()) { - valueToWrite = static_cast(delay.getMilliseconds()); - } - //Microseconds only - else if(delayVersion == 2) - { - valueToWrite = static_cast(delay.getMicroseconds()); - } - //Seconds or Milliseconds - else if(delayVersion == 3) - { - if(delay <= TimeSpan::MilliSeconds(500)) + //Milliseconds only + case WirelessTypes::delayVersion_v1: { - //the delay needs to be stored as milliseconds valueToWrite = static_cast(delay.getMilliseconds()); - - //set the most significant bit off to signify milliseconds - Utils::setBit(valueToWrite, 15, false); } - else - { - //the delay needs to be stored as seconds - valueToWrite = static_cast(delay.getSeconds()); - - //set the most significant bit on to signify seconds - Utils::setBit(valueToWrite, 15, true); - } - } - //Seconds, Milliseconds, or Microseconds - else if(delayVersion == 4) - { - //if we can represent the value in microseconds - if(microseconds <= 16383) + //Microseconds only + case WirelessTypes::delayVersion_v2: { valueToWrite = static_cast(delay.getMicroseconds()); - - //0b00 - Microseconds - Utils::setBit(valueToWrite, 15, false); - Utils::setBit(valueToWrite, 14, false); } - //if we can represent the value in milliseconds - else if(microseconds <= 16383000) + //Seconds or Milliseconds + case WirelessTypes::delayVersion_v3: { - valueToWrite = static_cast(delay.getMilliseconds()); + //if we can represent the value in milliseconds + if (delay <= TimeSpan::MilliSeconds(500)) + { + //the delay needs to be stored as milliseconds + valueToWrite = static_cast(delay.getMilliseconds()); - //0b01 - Milliseconds - Utils::setBit(valueToWrite, 15, false); - Utils::setBit(valueToWrite, 14, true); + //set the most significant bit off to signify milliseconds + Utils::setBit(valueToWrite, 15, false); + } + //round to seconds + else + { + //the delay needs to be stored as seconds + valueToWrite = static_cast(delay.getSeconds()); + + //set the most significant bit on to signify seconds + Utils::setBit(valueToWrite, 15, true); + } } - //if we can only represent the value in seconds - else + //Seconds, Milliseconds, or Microseconds + case WirelessTypes::delayVersion_v4: { - //the delay needs to be stored as seconds - valueToWrite = static_cast(delay.getSeconds()); + //if we can represent the value in microseconds + if (microseconds <= 16383) + { + valueToWrite = static_cast(delay.getMicroseconds()); - //0b10 - Seconds - Utils::setBit(valueToWrite, 15, true); - Utils::setBit(valueToWrite, 14, false); + //0b00 - Microseconds + Utils::setBit(valueToWrite, 15, false); + Utils::setBit(valueToWrite, 14, false); + } + //round to milliseconds + else if (microseconds <= 16383000) + { + valueToWrite = static_cast(delay.getMilliseconds()); + + //0b01 - Milliseconds + Utils::setBit(valueToWrite, 15, false); + Utils::setBit(valueToWrite, 14, true); + } + //round to seconds + else + { + //the delay needs to be stored as seconds + valueToWrite = static_cast(delay.getSeconds()); + + //0b10 - Seconds + Utils::setBit(valueToWrite, 15, true); + Utils::setBit(valueToWrite, 14, false); + } } } } - write(NodeEepromMap::SAMPLING_DELAY, Value::UINT16(static_cast(valueToWrite))); + write(NodeEepromMap::SAMPLING_DELAY, Value::UINT16(valueToWrite)); } uint32 NodeEepromHelper::read_sensorDelay() const @@ -570,87 +573,118 @@ namespace mscl } } } - - uint8 delayVersion = m_node->features().sensorDelayVersion(); - - //Milliseconds only - if(delayVersion == 1) - { - //if outside the max milliseconds range, defaults to 5ms - if(eeVal > 500) - { - eeVal = 5; - } - - return static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()); - } - //Microseconds only - else if(delayVersion == 2) - { - return static_cast(eeVal); - } - //Seconds or Milliseconds - else if(delayVersion == 3) + + switch (m_node->features().sensorDelayVersion()) { - //if the most significant bit is set, the value is in Seconds - if(Utils::bitIsSet(eeVal, 15)) + //Milliseconds only + case WirelessTypes::delayVersion_v1: { - //ignore the most significant bit - Utils::setBit(eeVal, 15, false); - - //if outside the max seconds (10 minutes), defaults to 5ms - if(eeVal > 600) + if (m_node->features().supportsSensorDelayConfig()) + { + //if outside the max delay, return the max delay + if (static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()) > m_node->features().maxSensorDelay()) + { + return m_node->features().maxSensorDelay(); + } + } + //legacy support + else { - return static_cast(TimeSpan::MilliSeconds(5).getMicroseconds()); + //if outside the max milliseconds range, defaults to max + if (TimeSpan::MilliSeconds(eeVal).getSeconds() > 60) // 1 minute + { + return static_cast(TimeSpan::Minutes(1).getMicroseconds()); + } } - return static_cast(TimeSpan::Seconds(eeVal).getMicroseconds()); + return static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()); } - else + //Microseconds only + case WirelessTypes::delayVersion_v2: { - //the value is in milliseconds - return static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()); + return static_cast(eeVal); } - } - //Seconds, Milliseconds, or Microseconds - else if(delayVersion == 4) - { - //0b10 - Seconds - if(Utils::bitIsSet(eeVal, 15)) + //Seconds or Milliseconds + case WirelessTypes::delayVersion_v3: { - //ignore the top 2 bits - Utils::setBit(eeVal, 15, false); - Utils::setBit(eeVal, 14, false); - - //max of 10 minutes - if(eeVal > 600) + //if the most significant bit is set, the value is in Seconds + if (Utils::bitIsSet(eeVal, 15)) { - //defaults back to the max - eeVal = 600; + //ignore the most significant bit + Utils::setBit(eeVal, 15, false); + + const TimeSpan seconds(TimeSpan::Seconds(eeVal)); + + if (m_node->features().supportsSensorDelayConfig()) + { + //if outside the max delay, return the max delay + if (static_cast(seconds.getMicroseconds()) > m_node->features().maxSensorDelay()) + { + return m_node->features().maxSensorDelay(); + } + } + //legacy support + else + { + //if outside the max seconds (5 minutes), defaults to 5ms + if (eeVal > 300) + { + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); + } + } + + return static_cast(seconds.getMicroseconds()); } - return static_cast(TimeSpan::Seconds(eeVal).getMicroseconds()); + //the value is in milliseconds + return static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()); } - else + //Seconds, Milliseconds, or Microseconds + case WirelessTypes::delayVersion_v4: { - //0b01 - Milliseconds - if(Utils::bitIsSet(eeVal, 14)) + //0b10 - Seconds + if (Utils::bitIsSet(eeVal, 15)) { - //ignore the top 2 bits + //ignore the top 2 bits Utils::setBit(eeVal, 15, false); Utils::setBit(eeVal, 14, false); - return static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()); + if (m_node->features().supportsSensorDelayConfig()) + { + //if outside the max delay, return the max delay + if (static_cast(TimeSpan::Seconds(eeVal).getMicroseconds()) > m_node->features().maxSensorDelay()) + { + return m_node->features().maxSensorDelay(); + } + } + //legacy support + else + { + if (eeVal > 300) + { + eeVal = 300; + } + } + + return static_cast(TimeSpan::Seconds(eeVal).getMicroseconds()); } - //0b00 - Microseconds - else + + //0b01 - Milliseconds + if (Utils::bitIsSet(eeVal, 14)) { - //ignore the top 2 bits + //ignore the top 2 bits Utils::setBit(eeVal, 15, false); Utils::setBit(eeVal, 14, false); - return static_cast(eeVal); + return static_cast(TimeSpan::MilliSeconds(eeVal).getMicroseconds()); } + + //0b00 - Microseconds + //ignore the top 2 bits + Utils::setBit(eeVal, 15, false); + Utils::setBit(eeVal, 14, false); + + return static_cast(eeVal); } } diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp index 14056dac1..48d6b70ff 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.cpp @@ -1132,7 +1132,7 @@ namespace mscl return SyncSamplingFormulas::minTimeBetweenBursts(rawBytesPerSweep, derivedBytesPerSweep, rawSampleRate, sweepsPerBurst, commProtocol); } - uint32 NodeFeatures::minSensorDelay() const + const uint32 NodeFeatures::minSensorDelay() const { if(!supportsSensorDelayConfig()) { @@ -1143,15 +1143,15 @@ namespace mscl //V2 - Microseconds //V3 - Seconds or Milliseconds //V4 - Seconds, Milliseconds, or Microseconds - switch(sensorDelayVersion()) + switch (sensorDelayVersion()) { - case 1: - case 3: - return 1000; //1 millisecond + case WirelessTypes::delayVersion_v1: + case WirelessTypes::delayVersion_v3: + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond - case 2: - case 4: - return 1; //1 microsecond + case WirelessTypes::delayVersion_v2: + case WirelessTypes::delayVersion_v4: + return 600; //600 microseconds default: assert(false); //need to add a case for a new sensor delay version @@ -1159,28 +1159,29 @@ namespace mscl } } - uint32 NodeFeatures::maxSensorDelay() const + const uint32 NodeFeatures::maxSensorDelay() const { if(!supportsSensorDelayConfig()) { throw Error_NotSupported("Sensor Delay is not supported by this Node."); } + // writing limit of 16 bits (65,535) //V1 - Milliseconds //V2 - Microseconds //V3 - Seconds or Milliseconds //V4 - Seconds, Milliseconds, or Microseconds - switch(sensorDelayVersion()) + switch (sensorDelayVersion()) { - case 1: - return 500000; //500 milliseconds + case WirelessTypes::delayVersion_v2: + return 65000; //65,000 microseconds, max writing limit rounded - case 2: - return 65535; //65535 microseconds + case WirelessTypes::delayVersion_v1: + return static_cast(TimeSpan::Minutes(1).getMicroseconds()); //1 minute, max writing limit rounded (60,000 ms) - case 3: - case 4: - return 600000000; //10 minutes + case WirelessTypes::delayVersion_v3: + case WirelessTypes::delayVersion_v4: + return static_cast(TimeSpan::Minutes(5).getMicroseconds()); //5 minutes default: assert(false); //need to add a case for a new sensor delay version @@ -1188,6 +1189,16 @@ namespace mscl } } + const uint32 NodeFeatures::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + } + uint32 NodeFeatures::maxEventTriggerTotalDuration(WirelessTypes::DataMode dataMode, WirelessTypes::DataFormat dataFormat, const ChannelMask& rawChannels, @@ -1283,19 +1294,19 @@ namespace mscl switch(sensorDelayVersion()) { //milliseconds only - case 1: + case WirelessTypes::delayVersion_v1: result = static_cast(std::ceil(static_cast(delay / 1000.0f))) * 1000; break; //microseconds only - case 2: + case WirelessTypes::delayVersion_v2: result = delay; break; //milliseconds or seconds - case 3: + case WirelessTypes::delayVersion_v3: { - //if <= 500 milliseconds + //if <= 500 milliseconds then keep as milliseconds if(delay <= 500000) { //set in milliseconds @@ -1303,30 +1314,30 @@ namespace mscl Utils::checkBounds_min(result, static_cast(1000)); //1 millisecond Utils::checkBounds_max(result, static_cast(500000)); //500 milliseconds } + //round up to seconds else { //set in seconds (PWUWU) result = static_cast(std::ceil(static_cast(delay / 1000000.0f))) * 1000000; Utils::checkBounds_min(result, static_cast(1000000)); //1 second - Utils::checkBounds_max(result, maxSensorDelay()); } break; } //microseconds, milliseconds, or seconds - case 4: + case WirelessTypes::delayVersion_v4: { - //if we can represent the value in microseconds + //keep the value in microseconds if(delay <= 16383) { result = delay; } - //if we can represent the value in milliseconds + //round up to milliseconds else if(delay <= 16383000) { result = static_cast(std::ceil(static_cast(delay / 1000.0f))) * 1000; } - //if we can only represent the value in seconds + //round up to seconds else { result = static_cast(std::ceil(static_cast(delay / 1000000.0f))) * 1000000; @@ -1739,13 +1750,11 @@ namespace mscl { return 1; } - else - { - return 2; - } + + return 2; } - uint8 NodeFeatures::sensorDelayVersion() const + WirelessTypes::DelayVersion NodeFeatures::sensorDelayVersion() const { //V1 - Milliseconds //V2 - Microseconds @@ -1754,42 +1763,40 @@ namespace mscl static const Version V4(10, 31758); - if(m_nodeInfo.firmwareVersion() >= V4) - { - return 4; - } - else - { - switch(m_nodeInfo.model()) - { - //certain models support Sensor Delay v3 (Seconds or Milliseconds) - case WirelessModels::node_vLink: - case WirelessModels::node_iepeLink: - return 3; - - //certain models support Sensor Delay v2 (Microseconds) - case WirelessModels::node_shmLink: - case WirelessModels::node_shmLink200: - case WirelessModels::node_shmLink201: - case WirelessModels::node_shmLink201_qbridge_1K: - case WirelessModels::node_shmLink201_qbridge_348: - case WirelessModels::node_shmLink201_hbridge_1K: - case WirelessModels::node_shmLink201_hbridge_348: - case WirelessModels::node_shmLink201_fullbridge: - case WirelessModels::node_shmLink2_cust1_oldNumber: - case WirelessModels::node_shmLink2_cust1: - case WirelessModels::node_sgLink_herm: - case WirelessModels::node_sgLink_herm_2600: - case WirelessModels::node_sgLink_herm_2700: - case WirelessModels::node_sgLink_herm_2800: - case WirelessModels::node_sgLink_herm_2900: - case WirelessModels::node_sgLink_rgd: - return 2; - - //everything else supports Sensor Delay v1 (Milliseconds) - default: - return 1; - } + if (m_nodeInfo.firmwareVersion() >= V4) + { + return WirelessTypes::delayVersion_v4; + } + + switch (m_nodeInfo.model()) + { + //certain models support Sensor Delay v3 (Seconds or Milliseconds) + case WirelessModels::node_vLink: + case WirelessModels::node_iepeLink: + return WirelessTypes::delayVersion_v3; + + //certain models support Sensor Delay v2 (Microseconds) + case WirelessModels::node_shmLink: + case WirelessModels::node_shmLink200: + case WirelessModels::node_shmLink201: + case WirelessModels::node_shmLink201_qbridge_1K: + case WirelessModels::node_shmLink201_qbridge_348: + case WirelessModels::node_shmLink201_hbridge_1K: + case WirelessModels::node_shmLink201_hbridge_348: + case WirelessModels::node_shmLink201_fullbridge: + case WirelessModels::node_shmLink2_cust1_oldNumber: + case WirelessModels::node_shmLink2_cust1: + case WirelessModels::node_sgLink_herm: + case WirelessModels::node_sgLink_herm_2600: + case WirelessModels::node_sgLink_herm_2700: + case WirelessModels::node_sgLink_herm_2800: + case WirelessModels::node_sgLink_herm_2900: + case WirelessModels::node_sgLink_rgd: + return WirelessTypes::delayVersion_v2; + + //everything else supports Sensor Delay v1 (Milliseconds) + default: + return WirelessTypes::delayVersion_v1; } } diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.h index b0edb3ac3..bb3ba9ab7 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures.h @@ -865,7 +865,7 @@ namespace mscl // //Exceptions: // - : The sensor delay feature is not supported by this Node. - virtual uint32 minSensorDelay() const; + virtual const uint32 minSensorDelay() const; //API Function: maxSensorDelay // Gets the maximum sensor delay value (in microseconds) that is supported. @@ -875,7 +875,17 @@ namespace mscl // //Exceptions: // - : The sensor delay feature is not supported by this Node. - virtual uint32 maxSensorDelay() const; + virtual const uint32 maxSensorDelay() const; + + //API Function: defaultSensorDelay + // Gets the default sensor delay value (in microseconds) that is supported. + // + //Returns: + // The default sensor delay value, in microseconds. + // + //Exceptions: + // - : The sensor delay feature is not supported by this Node. + virtual const uint32 defaultSensorDelay() const; //API Function: maxEventTriggerTotalDuration // Gets the max event trigger duration (in milliseconds) that can be applied for both the pre and post event durations (combined). @@ -1211,7 +1221,7 @@ namespace mscl //Function: sensorDelayVersion // Gets the version of sensor delay that the Node supports. - virtual uint8 sensorDelayVersion() const; + virtual WirelessTypes::DelayVersion sensorDelayVersion() const; //Function: usesLegacySensorDelayAlwaysOn // Checks if the Node uses the legacy value of 10,000 for always on (true) diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.cpp index 40d34e32d..e3a7f5b4a 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.cpp @@ -130,4 +130,24 @@ namespace mscl throw Error_NotSupported("The sampling mode is not supported by this Node"); } } -} \ No newline at end of file + + const uint32 NodeFeatures_ptlink200::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(5).getMicroseconds()); //5 milliseconds + } + + const uint32 NodeFeatures_ptlink200::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(10).getMicroseconds()); //10 milliseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.h index faea2e3e7..4a2501f6f 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_ptlink200.h @@ -36,6 +36,10 @@ namespace mscl virtual bool supportsPoll() const override; virtual const WirelessTypes::WirelessSampleRates sampleRates(WirelessTypes::SamplingMode samplingMode, WirelessTypes::DataCollectionMethod dataCollectionMethod, WirelessTypes::DataMode dataMode) const override; + + const uint32 minSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.cpp index 9359642cd..b4ceb83ef 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.cpp @@ -37,4 +37,34 @@ namespace mscl { return true; } -} \ No newline at end of file + + const uint32 NodeFeatures_sglink::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + } + + const uint32 NodeFeatures_sglink::maxSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::Seconds(1).getMicroseconds()); //1 second + } + + const uint32 NodeFeatures_sglink::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(5).getMicroseconds()); //5 milliseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.h index d97288d35..bc13ac312 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglink.h @@ -24,5 +24,11 @@ namespace mscl NodeFeatures_sglink(const NodeInfo& info); virtual bool supportsSensorDelayConfig() const override; + + const uint32 minSensorDelay() const override; + + const uint32 maxSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.cpp index 5ee052ea6..f79b9baba 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.cpp @@ -37,4 +37,34 @@ namespace mscl { return true; } -} \ No newline at end of file + + const uint32 NodeFeatures_sglinkoem::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + } + + const uint32 NodeFeatures_sglinkoem::maxSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::Seconds(1).getMicroseconds()); //1 second + } + + const uint32 NodeFeatures_sglinkoem::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(5).getMicroseconds()); //5 milliseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.h index 895594067..87bbe2aac 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_sglinkoem.h @@ -24,5 +24,11 @@ namespace mscl NodeFeatures_sglinkoem(const NodeInfo& info); virtual bool supportsSensorDelayConfig() const override; + + const uint32 minSensorDelay() const override; + + const uint32 maxSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.cpp index d5019ef21..2647eacce 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.cpp @@ -191,4 +191,24 @@ namespace mscl return modes; } -} \ No newline at end of file + + const uint32 NodeFeatures_shmlink2::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + } + + const uint32 NodeFeatures_shmlink2::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(5).getMicroseconds()); //5 milliseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.h index 7c005e3d1..00b87d71a 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink2.h @@ -65,5 +65,9 @@ namespace mscl virtual const WirelessTypes::WirelessSampleRates histogramTransmitRates() const final; virtual const WirelessTypes::FatigueModes fatigueModes() const final; + + const uint32 minSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.cpp index 1136decec..f287cea83 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.cpp @@ -214,4 +214,24 @@ namespace mscl return modes; } -} \ No newline at end of file + + const uint32 NodeFeatures_shmlink201::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return 350; //350 microseconds + } + + const uint32 NodeFeatures_shmlink201::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return 350; //350 microseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.h index dbbf28edb..ab9661002 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201.h @@ -67,5 +67,9 @@ namespace mscl virtual const WirelessTypes::WirelessSampleRates histogramTransmitRates() const final; virtual const WirelessTypes::FatigueModes fatigueModes() const final; + + const uint32 minSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.cpp index a0432000a..92955e07c 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.cpp @@ -172,4 +172,24 @@ namespace mscl { return true; } -} \ No newline at end of file + + const uint32 NodeFeatures_shmlink201FullBridge::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return 350; //350 microseconds + } + + const uint32 NodeFeatures_shmlink201FullBridge::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return 350; //350 microseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.h index 0229f55bd..f2fb61dac 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink201FullBridge.h @@ -52,5 +52,9 @@ namespace mscl virtual bool supportsGaugeResistance() const final; virtual bool supportsNumActiveGauges() const final; + + const uint32 minSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.cpp index 8e6b10f1c..b9d7e05cb 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.cpp @@ -218,4 +218,50 @@ namespace mscl return modes; } -} \ No newline at end of file + + const uint32 NodeFeatures_shmlink210::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + //V1 - Milliseconds + //V4 - Seconds, Milliseconds, or Microseconds + switch (sensorDelayVersion()) + { + case WirelessTypes::delayVersion_v1: + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + + case WirelessTypes::delayVersion_v4: + return 350; //350 microseconds + + default: + assert(false); //need to add a case for a new sensor delay version + throw Error_NotSupported("Unknown Sensor Delay Version"); + } + } + + const uint32 NodeFeatures_shmlink210::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + //V1 - Milliseconds + //V4 - Seconds, Milliseconds, or Microseconds + switch (sensorDelayVersion()) + { + case WirelessTypes::delayVersion_v1: + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + + case WirelessTypes::delayVersion_v4: + return 350; //350 microseconds + + default: + assert(false); //need to add a case for a new sensor delay version + throw Error_NotSupported("Unknown Sensor Delay Version"); + } + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.h index bcb2cfba6..c9b4a961e 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_shmlink210.h @@ -71,5 +71,9 @@ namespace mscl virtual const WirelessTypes::WirelessSampleRates histogramTransmitRates() const final; virtual const WirelessTypes::FatigueModes fatigueModes() const final; + + const uint32 minSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file 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 index 943e6bd92..051497a9b 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_torqueLink200_3ch_s.cpp @@ -41,12 +41,6 @@ namespace mscl { 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); @@ -85,4 +79,4 @@ namespace mscl { return {}; } -} \ No newline at end of file +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.cpp index 1f2b50dce..26642e702 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.cpp @@ -155,4 +155,34 @@ namespace mscl return NodeFeatures::maxSampleRate(samplingMode, channels, dataCollectionMethod, dataMode); } } -} \ No newline at end of file + + const uint32 NodeFeatures_vlink::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + } + + const uint32 NodeFeatures_vlink::maxSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::Seconds(1).getMicroseconds()); //1 second + } + + const uint32 NodeFeatures_vlink::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(10).getMicroseconds()); //10 milliseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.h index 1a0d2764b..427e0470e 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink.h @@ -29,5 +29,11 @@ namespace mscl virtual const WirelessTypes::WirelessSampleRates sampleRates(WirelessTypes::SamplingMode samplingMode, WirelessTypes::DataCollectionMethod dataCollectionMethod, WirelessTypes::DataMode dataMode) const override; virtual WirelessTypes::WirelessSampleRate maxSampleRate(WirelessTypes::SamplingMode samplingMode, const ChannelMask& channels, WirelessTypes::DataCollectionMethod dataCollectionMethod, WirelessTypes::DataMode dataMode) const override; + + const uint32 minSensorDelay() const override; + + const uint32 maxSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.cpp b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.cpp index a046b36a4..a3ba589ae 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.cpp +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.cpp @@ -159,4 +159,24 @@ namespace mscl }; return filters; } -} \ No newline at end of file + + const uint32 NodeFeatures_vlink200::minSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(1).getMicroseconds()); //1 millisecond + } + + const uint32 NodeFeatures_vlink200::defaultSensorDelay() const + { + if (!supportsSensorDelayConfig()) + { + throw Error_NotSupported("Sensor Delay is not supported by this Node."); + } + + return static_cast(TimeSpan::MilliSeconds(5).getMicroseconds()); //5 milliseconds + } +} diff --git a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.h b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.h index 88e2fa45d..c0b0a8530 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.h @@ -31,5 +31,9 @@ namespace mscl virtual const WirelessTypes::WirelessSampleRates sampleRates(WirelessTypes::SamplingMode samplingMode, WirelessTypes::DataCollectionMethod dataCollectionMethod, WirelessTypes::DataMode dataMode) const override; virtual const WirelessTypes::Filters antiAliasingFilters() const override; + + const uint32 minSensorDelay() const override; + + const uint32 defaultSensorDelay() const override; }; } \ No newline at end of file diff --git a/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h b/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h index df20dbcd2..ef9ebbdca 100644 --- a/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h +++ b/MSCL/source/mscl/MicroStrain/Wireless/WirelessTypes.h @@ -1418,6 +1418,8 @@ namespace mscl range_39_0625mV = 133, //+- 39.0625 milliVolts range_19_5313mV = 134, //+- 19.5313 milliVolts + range_125mV = 135, //+- 125 milliVolts + range_invalid = 65535 //invalid input range }; @@ -1551,6 +1553,21 @@ namespace mscl externalPower_connected = 1 }; + //API Enum: DelayVersion + // Types of delays that individual sensors can support. + // + // V1 - Milliseconds + // V2 - Microseconds + // V3 - Seconds or Milliseconds + // V4 - Seconds, Milliseconds, or Microseconds + enum DelayVersion + { + delayVersion_v1 = 0, // V1 - Milliseconds + delayVersion_v2 = 1, // V2 - Microseconds + delayVersion_v3 = 2, // V3 - Seconds or Milliseconds + delayVersion_v4 = 3 // V4 - Seconds, Milliseconds, or Microseconds + }; + public: //API Typedefs: diff --git a/MSCL/source/mscl/Utils.cpp b/MSCL/source/mscl/Utils.cpp index 8c8fc8fd4..c45bbb00a 100644 --- a/MSCL/source/mscl/Utils.cpp +++ b/MSCL/source/mscl/Utils.cpp @@ -463,6 +463,12 @@ namespace mscl } } + void strTrim(std::string& src) + { + strTrimLeft(src); + strTrimRight(src); + } + void filterSensorcloudName(std::string& str) { //replace all characters that don't match (a-z)(A-Z)(0-9)-_. with a '-' diff --git a/MSCL/source/mscl/Utils.h b/MSCL/source/mscl/Utils.h index dcbf0630e..1a966ba38 100644 --- a/MSCL/source/mscl/Utils.h +++ b/MSCL/source/mscl/Utils.h @@ -367,6 +367,13 @@ namespace mscl // src - The string to trim whitespace from. This will be changed to hold the result. void strTrimRight(std::string& src); + //Function: strTrim + // Trims all whitespace from the left and right of a string. + // + //Parameters: + // src - The string to trim whitespace from. This will be changed to hold the result. + void strTrim(std::string& src); + //Function: filterSensorcloudName // Replaces characters that are not supported by SensorCloud with a '-' character. // diff --git a/MSCL_Dev.sln b/MSCL_Dev.sln index 6534067e9..86ce84115 100644 --- a/MSCL_Dev.sln +++ b/MSCL_Dev.sln @@ -17,13 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSCL_Managed", "MSCL_Manage EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSCL_Unit_Tests", "MSCL_Unit_Tests\MSCL_Unit_Tests.vcxproj", "{50B79FA8-35FA-40A4-866C-559719455197}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_mscl_cpp", "sample_mscl_cpp\sample_mscl_cpp.vcxproj", "{E56B7B0F-50A0-4C14-995C-2D67B770BD05}" - ProjectSection(ProjectDependencies) = postProject - {6E258AAE-2FB3-45C8-AFF2-1350FBBA18BD} = {6E258AAE-2FB3-45C8-AFF2-1350FBBA18BD} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "samples_mscl_csharp", "samples_mscl_csharp\samples_mscl_csharp.csproj", "{40F258AD-6F12-477A-8F79-8C4BB9BE760C}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug (.NET)|Any CPU = Debug (.NET)|Any CPU @@ -173,80 +166,11 @@ Global {50B79FA8-35FA-40A4-866C-559719455197}.Release(Python)|Win32.ActiveCfg = Release (C++)|Win32 {50B79FA8-35FA-40A4-866C-559719455197}.Release(Python)|x64.ActiveCfg = Release (C++)|x64 {50B79FA8-35FA-40A4-866C-559719455197}.Release(Python)|x64.Build.0 = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (.NET)|Any CPU.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (.NET)|Mixed Platforms.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (.NET)|Mixed Platforms.Build.0 = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (.NET)|Win32.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (.NET)|x64.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|Any CPU.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|Any CPU.Build.0 = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|Mixed Platforms.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|Mixed Platforms.Build.0 = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|Win32.ActiveCfg = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|Win32.Build.0 = Debug (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|x64.ActiveCfg = Debug (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Debug (C++)|x64.Build.0 = Debug (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (.NET)|Any CPU.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (.NET)|Mixed Platforms.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (.NET)|Mixed Platforms.Build.0 = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (.NET)|Win32.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (.NET)|x64.ActiveCfg = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|Any CPU.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|Any CPU.Build.0 = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|Mixed Platforms.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|Mixed Platforms.Build.0 = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|Win32.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|Win32.Build.0 = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|x64.ActiveCfg = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (C++)|x64.Build.0 = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (Java)|Any CPU.ActiveCfg = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (Java)|Any CPU.Build.0 = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (Java)|Mixed Platforms.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (Java)|Mixed Platforms.Build.0 = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (Java)|Win32.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release (Java)|x64.ActiveCfg = Release (C++)|x64 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release(Python)|Any CPU.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release(Python)|Mixed Platforms.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release(Python)|Mixed Platforms.Build.0 = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release(Python)|Win32.ActiveCfg = Release (C++)|Win32 - {E56B7B0F-50A0-4C14-995C-2D67B770BD05}.Release(Python)|x64.ActiveCfg = Release (C++)|Win32 - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (.NET)|Any CPU.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (.NET)|Any CPU.Build.0 = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (.NET)|Mixed Platforms.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (.NET)|Mixed Platforms.Build.0 = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (.NET)|Win32.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (.NET)|x64.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (C++)|Any CPU.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (C++)|Any CPU.Build.0 = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (C++)|Mixed Platforms.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (C++)|Mixed Platforms.Build.0 = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (C++)|Win32.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Debug (C++)|x64.ActiveCfg = Debug|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (.NET)|Any CPU.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (.NET)|Any CPU.Build.0 = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (.NET)|Mixed Platforms.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (.NET)|Mixed Platforms.Build.0 = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (.NET)|Win32.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (.NET)|x64.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (C++)|Any CPU.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (C++)|Any CPU.Build.0 = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (C++)|Mixed Platforms.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (C++)|Mixed Platforms.Build.0 = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (C++)|Win32.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (C++)|x64.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (Java)|Any CPU.ActiveCfg = Release (Java)|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (Java)|Mixed Platforms.ActiveCfg = Release (Java)|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (Java)|Mixed Platforms.Build.0 = Release (Java)|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (Java)|Win32.ActiveCfg = Release (Java)|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release (Java)|x64.ActiveCfg = Release (Java)|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release(Python)|Any CPU.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release(Python)|Any CPU.Build.0 = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release(Python)|Mixed Platforms.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release(Python)|Mixed Platforms.Build.0 = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release(Python)|Win32.ActiveCfg = Release|Any CPU - {40F258AD-6F12-477A-8F79-8C4BB9BE760C}.Release(Python)|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3EDEBBF4-5CB2-459F-B962-B1FB43416624} + EndGlobalSection EndGlobal diff --git a/MSCL_Managed/MSCL_Managed.csproj b/MSCL_Managed/MSCL_Managed.csproj index 5464ed69f..2b6b7ad26 100644 --- a/MSCL_Managed/MSCL_Managed.csproj +++ b/MSCL_Managed/MSCL_Managed.csproj @@ -196,6 +196,7 @@ + @@ -224,6 +225,7 @@ + diff --git a/MSCL_Managed/Properties/AssemblyInfo.cs b/MSCL_Managed/Properties/AssemblyInfo.cs index 5231b85c2..6a03b4529 100644 --- a/MSCL_Managed/Properties/AssemblyInfo.cs +++ b/MSCL_Managed/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("LORD Sensing")] [assembly: AssemblyProduct("MSCL")] -[assembly: AssemblyCopyright("Copyright © 2020 Parker Hannifin Corp")] +[assembly: AssemblyCopyright("Copyright © 2021 Parker Hannifin Corp")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -33,5 +33,5 @@ // [assembly: AssemblyVersion("1.0.*")] // //update with each release -[assembly: AssemblyVersion("62.1.2.0")] -[assembly: AssemblyFileVersion("62.1.2.0")] +[assembly: AssemblyVersion("63.1.0.0")] +[assembly: AssemblyFileVersion("63.1.0.0")] diff --git a/MSCL_Managed/mscl/MipModel.cs b/MSCL_Managed/mscl/MipModel.cs new file mode 100644 index 000000000..53250eae5 --- /dev/null +++ b/MSCL_Managed/mscl/MipModel.cs @@ -0,0 +1,381 @@ +//------------------------------------------------------------------------------ +// +// +// 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 MipModel : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal MipModel(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(MipModel obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~MipModel() { + 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_MipModel(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public static MipModel mip_model_none { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_none_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_dh3 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_dh3_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx3_15 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx3_15_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx3_25 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx3_25_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx3_35 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx3_35_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx3_45 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx3_45_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_rq1_45_lt { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_rq1_45_lt_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_rq1_45_st { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_rq1_45_st_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx4_15 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx4_15_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx4_25 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx4_25_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx4_45 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx4_45_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_mv5_ar { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_mv5_ar_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx5_10 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx5_10_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx5_15 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx5_15_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx5_25 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx5_25_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx5_35 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx5_35_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gx5_45 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gx5_45_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cv5_10 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cv5_10_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cv5_15 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cv5_15_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cv5_25 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cv5_25_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cv5_45 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cv5_45_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gq4_45 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gq4_45_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cx5_45 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cx5_45_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cx5_35 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cx5_35_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cx5_25 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cx5_25_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cx5_15 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cx5_15_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cx5_10 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cx5_10_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cl5_15 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cl5_15_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_cl5_25 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_cl5_25_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_gq7 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_gq7_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_rtk_v1 { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_rtk_v1_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static MipModel mip_model_3dm_rtk { + get { + global::System.IntPtr cPtr = msclPINVOKE.MipModel_mip_model_3dm_rtk_get(); + MipModel ret = (cPtr == global::System.IntPtr.Zero) ? null : new MipModel(cPtr, false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public MipModel(string modelNumberStr) : this(msclPINVOKE.new_MipModel__SWIG_0(modelNumberStr), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public MipModel(MipModel copy) : this(msclPINVOKE.new_MipModel__SWIG_1(MipModel.getCPtr(copy)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool equals(MipModel compare) { + bool ret = msclPINVOKE.MipModel_equals(swigCPtr, MipModel.getCPtr(compare)); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override string ToString() { + string ret = msclPINVOKE.MipModel_ToString(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public MipModels.NodeModel nodeModel() { + MipModels.NodeModel ret = (MipModels.NodeModel)msclPINVOKE.MipModel_nodeModel(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint modifier() { + uint ret = msclPINVOKE.MipModel_modifier(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public MipModels.ModelNumber modelNumber() { + MipModels.ModelNumber ret = (MipModels.ModelNumber)msclPINVOKE.MipModel_modelNumber(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual MipModel baseModel() { + MipModel ret = new MipModel(msclPINVOKE.MipModel_baseModel(swigCPtr), false); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + +} + +} diff --git a/MSCL_Managed/mscl/MipModels.cs b/MSCL_Managed/mscl/MipModels.cs index f23d39643..19d123bbd 100644 --- a/MSCL_Managed/mscl/MipModels.cs +++ b/MSCL_Managed/mscl/MipModels.cs @@ -44,14 +44,59 @@ protected virtual void Dispose(bool disposing) { } } + public static bool modelNumbersEqual(MipModels.ModelNumber model1, MipModels.ModelNumber model2) { + bool ret = msclPINVOKE.MipModels_modelNumbersEqual((int)model1, (int)model2); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static MipModels.ModelNumber modelNumberFromStr(string modelNumberString) { + MipModels.ModelNumber ret = (MipModels.ModelNumber)msclPINVOKE.MipModels_modelNumberFromStr(modelNumberString); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static MipModels.ModelNumber modelNumberFromParts(MipModels.NodeModel nodeModel, MipModels.Modifier modifier) { + MipModels.ModelNumber ret = (MipModels.ModelNumber)msclPINVOKE.MipModels_modelNumberFromParts((int)nodeModel, (int)modifier); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static MipModels.NodeModel nodeModelFromStr(string modelNumberString) { + MipModels.NodeModel ret = (MipModels.NodeModel)msclPINVOKE.MipModels_nodeModelFromStr(modelNumberString); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static uint modifierFromStr(string modelNumberString) { + uint ret = msclPINVOKE.MipModels_modifierFromStr(modelNumberString); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static MipModels.NodeModel nodeModelFromModelNumber(MipModels.ModelNumber modelNumber) { + MipModels.NodeModel ret = (MipModels.NodeModel)msclPINVOKE.MipModels_nodeModelFromModelNumber((int)modelNumber); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static uint modifierFromModelNumber(MipModels.ModelNumber modelNumber) { + uint ret = msclPINVOKE.MipModels_modifierFromModelNumber((int)modelNumber); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static string stringFromModelNumber(MipModels.ModelNumber modelNumber) { + string ret = msclPINVOKE.MipModels_stringFromModelNumber((int)modelNumber); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + 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, @@ -84,6 +129,46 @@ public enum NodeModel { node_3dm_rtk = 6285 } + public enum Modifier { + placeholder_matchAll = 9999, + rtk_v1 = 0000, + rtk_v2 = 0100 + } + + public enum ModelNumber { + model_3dm_dh3 = 62199999, + model_3dm_gx3_15 = 62279999, + model_3dm_gx3_25 = 62239999, + model_3dm_gx3_35 = 62259999, + model_3dm_gx3_45 = 62289999, + model_3dm_rq1_45_lt = 62329999, + model_3dm_gx4_15 = 62339999, + model_3dm_gx4_25 = 62349999, + model_3dm_gx4_45 = 62369999, + model_3dm_rq1_45_st = 62399999, + model_mv5_ar = 62439999, + model_3dm_gx5_10 = 62559999, + model_3dm_gx5_15 = 62549999, + model_3dm_gx5_25 = 62539999, + model_3dm_gx5_35 = 62529999, + model_3dm_gx5_45 = 62519999, + model_3dm_cv5_10 = 62599999, + model_3dm_cv5_15 = 62589999, + model_3dm_cv5_25 = 62579999, + model_3dm_cv5_45 = 62569999, + model_3dm_gq4_45 = 62509999, + model_3dm_cx5_45 = 62719999, + model_3dm_cx5_35 = 62729999, + model_3dm_cx5_25 = 62739999, + model_3dm_cx5_15 = 62749999, + model_3dm_cx5_10 = 62759999, + model_3dm_cl5_15 = 62809999, + model_3dm_cl5_25 = 62819999, + model_3dm_gq7 = 62849999, + model_3dm_rtk_v1 = 62850000, + model_3dm_rtk = 62850100 + } + } } diff --git a/MSCL_Managed/mscl/MipNode.cs b/MSCL_Managed/mscl/MipNode.cs index 5e121f1cb..0e2a0fb97 100644 --- a/MSCL_Managed/mscl/MipNode.cs +++ b/MSCL_Managed/mscl/MipNode.cs @@ -118,8 +118,8 @@ public Version firmwareVersion() { return ret; } - public MipModels.NodeModel model() { - MipModels.NodeModel ret = (MipModels.NodeModel)msclPINVOKE.MipNode_model(swigCPtr); + public MipModel model() { + MipModel ret = new MipModel(msclPINVOKE.MipNode_model(swigCPtr), true); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } diff --git a/MSCL_Managed/mscl/NodeFeatures.cs b/MSCL_Managed/mscl/NodeFeatures.cs index eb0da0ccf..53b2e0d5e 100644 --- a/MSCL_Managed/mscl/NodeFeatures.cs +++ b/MSCL_Managed/mscl/NodeFeatures.cs @@ -536,6 +536,12 @@ public virtual uint maxSensorDelay() { return ret; } + public virtual uint defaultSensorDelay() { + uint ret = msclPINVOKE.NodeFeatures_defaultSensorDelay(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public virtual uint maxEventTriggerTotalDuration(WirelessTypes.DataMode dataMode, WirelessTypes.DataFormat dataFormat, ChannelMask rawChannels, DerivedChannelMasks derivedChannelMasks, SampleRate rawSampleRate, SampleRate derivedDataRate) { uint ret = msclPINVOKE.NodeFeatures_maxEventTriggerTotalDuration(swigCPtr, (int)dataMode, (int)dataFormat, ChannelMask.getCPtr(rawChannels), DerivedChannelMasks.getCPtr(derivedChannelMasks), SampleRate.getCPtr(rawSampleRate), SampleRate.getCPtr(derivedDataRate)); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); diff --git a/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs b/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs index b7482089a..9b2ddd6c9 100644 --- a/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs +++ b/MSCL_Managed/mscl/RTKDeviceStatusFlags.cs @@ -42,121 +42,155 @@ public RTKDeviceStatusFlags(uint flags) : this(msclPINVOKE.new_RTKDeviceStatusFl if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } - public RTKDeviceStatusFlags.ControllerState controllerState() { - RTKDeviceStatusFlags.ControllerState ret = (RTKDeviceStatusFlags.ControllerState)msclPINVOKE.RTKDeviceStatusFlags_controllerState__SWIG_0(swigCPtr); + public RTKDeviceStatusFlags(RTKDeviceStatusFlags_v1 rtk_v1) : this(msclPINVOKE.new_RTKDeviceStatusFlags__SWIG_2(RTKDeviceStatusFlags_v1.getCPtr(rtk_v1)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte version() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_version(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RTKDeviceStatusFlags.ModemState modemState() { + RTKDeviceStatusFlags.ModemState ret = (RTKDeviceStatusFlags.ModemState)msclPINVOKE.RTKDeviceStatusFlags_modemState__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void modemState(RTKDeviceStatusFlags.ModemState state) { + msclPINVOKE.RTKDeviceStatusFlags_modemState__SWIG_1(swigCPtr, (int)state); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags.ConnectionType connectionType() { + RTKDeviceStatusFlags.ConnectionType ret = (RTKDeviceStatusFlags.ConnectionType)msclPINVOKE.RTKDeviceStatusFlags_connectionType__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); + public void connectionType(RTKDeviceStatusFlags.ConnectionType state) { + msclPINVOKE.RTKDeviceStatusFlags_connectionType__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); + public sbyte rssi() { + sbyte ret = msclPINVOKE.RTKDeviceStatusFlags_rssi__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); + public void rssi(byte value) { + msclPINVOKE.RTKDeviceStatusFlags_rssi__SWIG_1(swigCPtr, value); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } - public RTKDeviceStatusFlags.ControllerStatusCode controllerStatusCode() { - RTKDeviceStatusFlags.ControllerStatusCode ret = (RTKDeviceStatusFlags.ControllerStatusCode)msclPINVOKE.RTKDeviceStatusFlags_controllerStatusCode__SWIG_0(swigCPtr); + public byte signalQuality() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_signalQuality__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); + public void signalQuality(byte quality) { + msclPINVOKE.RTKDeviceStatusFlags_signalQuality__SWIG_1(swigCPtr, quality); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } - public RTKDeviceStatusFlags.PlatformStatusCode platformStatusCode() { - RTKDeviceStatusFlags.PlatformStatusCode ret = (RTKDeviceStatusFlags.PlatformStatusCode)msclPINVOKE.RTKDeviceStatusFlags_platformStatusCode__SWIG_0(swigCPtr); + public byte towerChangeIndicator() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_towerChangeIndicator__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); + public void towerChangeIndicator(byte value) { + msclPINVOKE.RTKDeviceStatusFlags_towerChangeIndicator__SWIG_1(swigCPtr, value); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } - public RTKDeviceStatusFlags.ResetReason resetReason() { - RTKDeviceStatusFlags.ResetReason ret = (RTKDeviceStatusFlags.ResetReason)msclPINVOKE.RTKDeviceStatusFlags_resetReason__SWIG_0(swigCPtr); + public byte nmeaTimeout() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_nmeaTimeout__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); + public void nmeaTimeout(byte timeout) { + msclPINVOKE.RTKDeviceStatusFlags_nmeaTimeout__SWIG_1(swigCPtr, timeout); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } - public byte signalQuality() { - byte ret = msclPINVOKE.RTKDeviceStatusFlags_signalQuality__SWIG_0(swigCPtr); + public byte serverTimeout() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_serverTimeout__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); + public void serverTimeout(byte timeout) { + msclPINVOKE.RTKDeviceStatusFlags_serverTimeout__SWIG_1(swigCPtr, timeout); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte rtcmTimeout() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_rtcmTimeout__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void rtcmTimeout(byte timeout) { + msclPINVOKE.RTKDeviceStatusFlags_rtcmTimeout__SWIG_1(swigCPtr, timeout); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte deviceOutOfRange() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_deviceOutOfRange__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void deviceOutOfRange(byte outOfRange) { + msclPINVOKE.RTKDeviceStatusFlags_deviceOutOfRange__SWIG_1(swigCPtr, outOfRange); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte correctionsUnavailable() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_correctionsUnavailable__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void correctionsUnavailable(byte unavailable) { + msclPINVOKE.RTKDeviceStatusFlags_correctionsUnavailable__SWIG_1(swigCPtr, unavailable); 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 MODEM_STATE = msclPINVOKE.RTKDeviceStatusFlags_MODEM_STATE_get(); + public static readonly uint CONNECTION_TYPE = msclPINVOKE.RTKDeviceStatusFlags_CONNECTION_TYPE_get(); + public static readonly uint RSSI = msclPINVOKE.RTKDeviceStatusFlags_RSSI_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 + public static readonly uint TOWER_CHANGE_INDICATOR = msclPINVOKE.RTKDeviceStatusFlags_TOWER_CHANGE_INDICATOR_get(); + public static readonly uint NMEA_TIMEOUT = msclPINVOKE.RTKDeviceStatusFlags_NMEA_TIMEOUT_get(); + public static readonly uint SERVER_TIMEOUT = msclPINVOKE.RTKDeviceStatusFlags_SERVER_TIMEOUT_get(); + public static readonly uint RTCM_TIMEOUT = msclPINVOKE.RTKDeviceStatusFlags_RTCM_TIMEOUT_get(); + public static readonly uint DEVICE_OUT_OF_RANGE = msclPINVOKE.RTKDeviceStatusFlags_DEVICE_OUT_OF_RANGE_get(); + public static readonly uint CORRECTIONS_UNAVAILABLE = msclPINVOKE.RTKDeviceStatusFlags_CORRECTIONS_UNAVAILABLE_get(); + public static readonly uint VERSION = msclPINVOKE.RTKDeviceStatusFlags_VERSION_get(); + public enum ModemState { + OFF = 0x00, + NO_NETWORK = 0x01, + NETWORK_CONNECTED = 0x02, + CONFIGURING_DATA_CONTEXT = 0x03, + ACTIVATING_DATA_CONTEXT = 0x04, + CONFIGURING_SOCKET = 0x05, + WAITING_ON_SERVER_HANDSHAKE = 0x06, + CONNECTED_AND_IDLE = 0x07, + CONNECTED_AND_STREAMING = 0x08 + } + + public enum ConnectionType { + NO_CONNECTION = 0x00, + CONNECTION_2G = 0x02, + CONNECTION_3G = 0x03, + CONNECTION_4G = 0x04, + CONNECTION_5G = 0x05 } } diff --git a/MSCL_Managed/mscl/RTKDeviceStatusFlags_v1.cs b/MSCL_Managed/mscl/RTKDeviceStatusFlags_v1.cs new file mode 100644 index 000000000..8989c2c7c --- /dev/null +++ b/MSCL_Managed/mscl/RTKDeviceStatusFlags_v1.cs @@ -0,0 +1,175 @@ +//------------------------------------------------------------------------------ +// +// +// 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_v1 : Bitfield { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal RTKDeviceStatusFlags_v1(global::System.IntPtr cPtr, bool cMemoryOwn) : base(msclPINVOKE.RTKDeviceStatusFlags_v1_SWIGUpcast(cPtr), cMemoryOwn) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RTKDeviceStatusFlags_v1 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_v1(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + base.Dispose(disposing); + } + } + + public RTKDeviceStatusFlags_v1() : this(msclPINVOKE.new_RTKDeviceStatusFlags_v1__SWIG_0(), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags_v1(uint flags) : this(msclPINVOKE.new_RTKDeviceStatusFlags_v1__SWIG_1(flags), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags_v1(RTKDeviceStatusFlags rtk) : this(msclPINVOKE.new_RTKDeviceStatusFlags_v1__SWIG_2(RTKDeviceStatusFlags.getCPtr(rtk)), true) { + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte version() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_v1_version(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RTKDeviceStatusFlags_v1.ControllerState controllerState() { + RTKDeviceStatusFlags_v1.ControllerState ret = (RTKDeviceStatusFlags_v1.ControllerState)msclPINVOKE.RTKDeviceStatusFlags_v1_controllerState__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void controllerState(RTKDeviceStatusFlags_v1.ControllerState state) { + msclPINVOKE.RTKDeviceStatusFlags_v1_controllerState__SWIG_1(swigCPtr, (int)state); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags_v1.PlatformState platformState() { + RTKDeviceStatusFlags_v1.PlatformState ret = (RTKDeviceStatusFlags_v1.PlatformState)msclPINVOKE.RTKDeviceStatusFlags_v1_platformState__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void platformState(RTKDeviceStatusFlags_v1.PlatformState state) { + msclPINVOKE.RTKDeviceStatusFlags_v1_platformState__SWIG_1(swigCPtr, (int)state); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags_v1.ControllerStatusCode controllerStatusCode() { + RTKDeviceStatusFlags_v1.ControllerStatusCode ret = (RTKDeviceStatusFlags_v1.ControllerStatusCode)msclPINVOKE.RTKDeviceStatusFlags_v1_controllerStatusCode__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void controllerStatusCode(RTKDeviceStatusFlags_v1.ControllerStatusCode status) { + msclPINVOKE.RTKDeviceStatusFlags_v1_controllerStatusCode__SWIG_1(swigCPtr, (int)status); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags_v1.PlatformStatusCode platformStatusCode() { + RTKDeviceStatusFlags_v1.PlatformStatusCode ret = (RTKDeviceStatusFlags_v1.PlatformStatusCode)msclPINVOKE.RTKDeviceStatusFlags_v1_platformStatusCode__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void platformStatusCode(RTKDeviceStatusFlags_v1.PlatformStatusCode status) { + msclPINVOKE.RTKDeviceStatusFlags_v1_platformStatusCode__SWIG_1(swigCPtr, (int)status); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public RTKDeviceStatusFlags_v1.ResetReason resetReason() { + RTKDeviceStatusFlags_v1.ResetReason ret = (RTKDeviceStatusFlags_v1.ResetReason)msclPINVOKE.RTKDeviceStatusFlags_v1_resetReason__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void resetReason(RTKDeviceStatusFlags_v1.ResetReason reason) { + msclPINVOKE.RTKDeviceStatusFlags_v1_resetReason__SWIG_1(swigCPtr, (int)reason); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public byte signalQuality() { + byte ret = msclPINVOKE.RTKDeviceStatusFlags_v1_signalQuality__SWIG_0(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void signalQuality(byte quality) { + msclPINVOKE.RTKDeviceStatusFlags_v1_signalQuality__SWIG_1(swigCPtr, quality); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly uint CONTROLLER_STATE = msclPINVOKE.RTKDeviceStatusFlags_v1_CONTROLLER_STATE_get(); + public static readonly uint PLATFORM_STATE = msclPINVOKE.RTKDeviceStatusFlags_v1_PLATFORM_STATE_get(); + public static readonly uint CONTROLLER_STATUS_CODE = msclPINVOKE.RTKDeviceStatusFlags_v1_CONTROLLER_STATUS_CODE_get(); + public static readonly uint PLATFORM_STATUS_CODE = msclPINVOKE.RTKDeviceStatusFlags_v1_PLATFORM_STATUS_CODE_get(); + public static readonly uint RESET_REASON = msclPINVOKE.RTKDeviceStatusFlags_v1_RESET_REASON_get(); + public static readonly uint SIGNAL_QUALITY = msclPINVOKE.RTKDeviceStatusFlags_v1_SIGNAL_QUALITY_get(); + public static readonly uint VERSION = msclPINVOKE.RTKDeviceStatusFlags_v1_VERSION_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 6c13fc6c4..0fc60599b 100644 --- a/MSCL_Managed/mscl/RTKNode.cs +++ b/MSCL_Managed/mscl/RTKNode.cs @@ -61,6 +61,12 @@ public string getActivationCode() { return ret; } + public byte getStatusBitfieldVersion() { + byte ret = msclPINVOKE.RTKNode_getStatusBitfieldVersion(swigCPtr); + if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } } diff --git a/MSCL_Managed/mscl/WirelessTypes.cs b/MSCL_Managed/mscl/WirelessTypes.cs index 0d53736b5..ff291ad36 100644 --- a/MSCL_Managed/mscl/WirelessTypes.cs +++ b/MSCL_Managed/mscl/WirelessTypes.cs @@ -688,6 +688,7 @@ public enum InputRange { range_0to78_74ohm = 132, range_39_0625mV = 133, range_19_5313mV = 134, + range_125mV = 135, range_invalid = 65535 } @@ -753,6 +754,13 @@ public enum ExternalPowerIndicator { externalPower_connected = 1 } + public enum DelayVersion { + delayVersion_v1 = 0, + delayVersion_v2 = 1, + delayVersion_v3 = 2, + delayVersion_v4 = 3 + } + public static readonly short UNKNOWN_RSSI = msclPINVOKE.WirelessTypes_UNKNOWN_RSSI_get(); } diff --git a/MSCL_Managed/mscl/msclPINVOKE.cs b/MSCL_Managed/mscl/msclPINVOKE.cs index d34bd8228..56224f110 100644 --- a/MSCL_Managed/mscl/msclPINVOKE.cs +++ b/MSCL_Managed/mscl/msclPINVOKE.cs @@ -3273,6 +3273,9 @@ static Exception_Helper__MSCL_InvalidNodeConfig() [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_NodeFeatures_maxSensorDelay")] public static extern uint NodeFeatures_maxSensorDelay(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_NodeFeatures_defaultSensorDelay")] + public static extern uint NodeFeatures_defaultSensorDelay(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_NodeFeatures_maxEventTriggerTotalDuration")] public static extern uint NodeFeatures_maxEventTriggerTotalDuration(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, global::System.Runtime.InteropServices.HandleRef jarg5, global::System.Runtime.InteropServices.HandleRef jarg6, global::System.Runtime.InteropServices.HandleRef jarg7); @@ -3459,12 +3462,159 @@ static Exception_Helper__MSCL_InvalidNodeConfig() [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_delete_PositionOffset")] public static extern void delete_PositionOffset(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_modelNumbersEqual")] + public static extern bool MipModels_modelNumbersEqual(int jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_modelNumberFromStr")] + public static extern int MipModels_modelNumberFromStr(string jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_modelNumberFromParts")] + public static extern int MipModels_modelNumberFromParts(int jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_nodeModelFromStr")] + public static extern int MipModels_nodeModelFromStr(string jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_modifierFromStr")] + public static extern uint MipModels_modifierFromStr(string jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_nodeModelFromModelNumber")] + public static extern int MipModels_nodeModelFromModelNumber(int jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_modifierFromModelNumber")] + public static extern uint MipModels_modifierFromModelNumber(int jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModels_stringFromModelNumber")] + public static extern string MipModels_stringFromModelNumber(int jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_MipModels")] public static extern global::System.IntPtr new_MipModels(); [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_delete_MipModels")] public static extern void delete_MipModels(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_none_get")] + public static extern global::System.IntPtr MipModel_mip_model_none_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_dh3_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_dh3_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx3_15_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx3_15_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx3_25_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx3_25_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx3_35_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx3_35_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx3_45_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx3_45_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_rq1_45_lt_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_rq1_45_lt_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_rq1_45_st_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_rq1_45_st_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx4_15_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx4_15_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx4_25_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx4_25_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx4_45_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx4_45_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_mv5_ar_get")] + public static extern global::System.IntPtr MipModel_mip_model_mv5_ar_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx5_10_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx5_10_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx5_15_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx5_15_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx5_25_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx5_25_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx5_35_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx5_35_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gx5_45_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gx5_45_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cv5_10_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cv5_10_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cv5_15_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cv5_15_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cv5_25_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cv5_25_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cv5_45_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cv5_45_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gq4_45_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gq4_45_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cx5_45_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cx5_45_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cx5_35_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cx5_35_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cx5_25_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cx5_25_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cx5_15_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cx5_15_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cx5_10_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cx5_10_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cl5_15_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cl5_15_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_cl5_25_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_cl5_25_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_gq7_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_gq7_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_rtk_v1_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_rtk_v1_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_mip_model_3dm_rtk_get")] + public static extern global::System.IntPtr MipModel_mip_model_3dm_rtk_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_MipModel__SWIG_0")] + public static extern global::System.IntPtr new_MipModel__SWIG_0(string jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_MipModel__SWIG_1")] + public static extern global::System.IntPtr new_MipModel__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_equals")] + public static extern bool MipModel_equals(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_ToString")] + public static extern string MipModel_ToString(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_nodeModel")] + public static extern int MipModel_nodeModel(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_modifier")] + public static extern uint MipModel_modifier(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_modelNumber")] + public static extern int MipModel_modelNumber(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipModel_baseModel")] + public static extern global::System.IntPtr MipModel_baseModel(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_delete_MipModel")] + public static extern void delete_MipModel(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_DisplacementModels")] public static extern global::System.IntPtr new_DisplacementModels(); @@ -4770,59 +4920,68 @@ static Exception_Helper__MSCL_InvalidNodeConfig() [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_delete_EnableDisableMeasurements")] public static extern void delete_EnableDisableMeasurements(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_CONTROLLER_STATE_get")] - public static extern uint RTKDeviceStatusFlags_CONTROLLER_STATE_get(); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_MODEM_STATE_get")] + public static extern uint RTKDeviceStatusFlags_MODEM_STATE_get(); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_PLATFORM_STATE_get")] - public static extern uint RTKDeviceStatusFlags_PLATFORM_STATE_get(); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_CONNECTION_TYPE_get")] + public static extern uint RTKDeviceStatusFlags_CONNECTION_TYPE_get(); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_CONTROLLER_STATUS_CODE_get")] - public static extern uint RTKDeviceStatusFlags_CONTROLLER_STATUS_CODE_get(); - - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_PLATFORM_STATUS_CODE_get")] - public static extern uint RTKDeviceStatusFlags_PLATFORM_STATUS_CODE_get(); - - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_RESET_REASON_get")] - public static extern uint RTKDeviceStatusFlags_RESET_REASON_get(); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_RSSI_get")] + public static extern uint RTKDeviceStatusFlags_RSSI_get(); [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_SIGNAL_QUALITY_get")] public static extern uint RTKDeviceStatusFlags_SIGNAL_QUALITY_get(); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_TOWER_CHANGE_INDICATOR_get")] + public static extern uint RTKDeviceStatusFlags_TOWER_CHANGE_INDICATOR_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_NMEA_TIMEOUT_get")] + public static extern uint RTKDeviceStatusFlags_NMEA_TIMEOUT_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_SERVER_TIMEOUT_get")] + public static extern uint RTKDeviceStatusFlags_SERVER_TIMEOUT_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_RTCM_TIMEOUT_get")] + public static extern uint RTKDeviceStatusFlags_RTCM_TIMEOUT_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_DEVICE_OUT_OF_RANGE_get")] + public static extern uint RTKDeviceStatusFlags_DEVICE_OUT_OF_RANGE_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_CORRECTIONS_UNAVAILABLE_get")] + public static extern uint RTKDeviceStatusFlags_CORRECTIONS_UNAVAILABLE_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_VERSION_get")] + public static extern uint RTKDeviceStatusFlags_VERSION_get(); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_RTKDeviceStatusFlags__SWIG_0")] public static extern global::System.IntPtr new_RTKDeviceStatusFlags__SWIG_0(); [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_RTKDeviceStatusFlags__SWIG_1")] public static extern global::System.IntPtr new_RTKDeviceStatusFlags__SWIG_1(uint jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_controllerState__SWIG_0")] - public static extern int RTKDeviceStatusFlags_controllerState__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_controllerState__SWIG_1")] - public static extern void RTKDeviceStatusFlags_controllerState__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_RTKDeviceStatusFlags__SWIG_2")] + public static extern global::System.IntPtr new_RTKDeviceStatusFlags__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_platformState__SWIG_0")] - public static extern int RTKDeviceStatusFlags_platformState__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_version")] + public static extern byte RTKDeviceStatusFlags_version(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_platformState__SWIG_1")] - public static extern void RTKDeviceStatusFlags_platformState__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_modemState__SWIG_0")] + public static extern int RTKDeviceStatusFlags_modemState__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_controllerStatusCode__SWIG_0")] - public static extern int RTKDeviceStatusFlags_controllerStatusCode__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_modemState__SWIG_1")] + public static extern void RTKDeviceStatusFlags_modemState__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_controllerStatusCode__SWIG_1")] - public static extern void RTKDeviceStatusFlags_controllerStatusCode__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_connectionType__SWIG_0")] + public static extern int RTKDeviceStatusFlags_connectionType__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_platformStatusCode__SWIG_0")] - public static extern int RTKDeviceStatusFlags_platformStatusCode__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_connectionType__SWIG_1")] + public static extern void RTKDeviceStatusFlags_connectionType__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_platformStatusCode__SWIG_1")] - public static extern void RTKDeviceStatusFlags_platformStatusCode__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_rssi__SWIG_0")] + public static extern sbyte RTKDeviceStatusFlags_rssi__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_resetReason__SWIG_0")] - public static extern int RTKDeviceStatusFlags_resetReason__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_resetReason__SWIG_1")] - public static extern void RTKDeviceStatusFlags_resetReason__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_rssi__SWIG_1")] + public static extern void RTKDeviceStatusFlags_rssi__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_signalQuality__SWIG_0")] public static extern byte RTKDeviceStatusFlags_signalQuality__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -4830,9 +4989,117 @@ static Exception_Helper__MSCL_InvalidNodeConfig() [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_signalQuality__SWIG_1")] public static extern void RTKDeviceStatusFlags_signalQuality__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_towerChangeIndicator__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_towerChangeIndicator__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_towerChangeIndicator__SWIG_1")] + public static extern void RTKDeviceStatusFlags_towerChangeIndicator__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_nmeaTimeout__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_nmeaTimeout__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_nmeaTimeout__SWIG_1")] + public static extern void RTKDeviceStatusFlags_nmeaTimeout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_serverTimeout__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_serverTimeout__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_serverTimeout__SWIG_1")] + public static extern void RTKDeviceStatusFlags_serverTimeout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_rtcmTimeout__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_rtcmTimeout__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_rtcmTimeout__SWIG_1")] + public static extern void RTKDeviceStatusFlags_rtcmTimeout__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_deviceOutOfRange__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_deviceOutOfRange__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_deviceOutOfRange__SWIG_1")] + public static extern void RTKDeviceStatusFlags_deviceOutOfRange__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_correctionsUnavailable__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_correctionsUnavailable__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_correctionsUnavailable__SWIG_1")] + public static extern void RTKDeviceStatusFlags_correctionsUnavailable__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_delete_RTKDeviceStatusFlags")] public static extern void delete_RTKDeviceStatusFlags(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_CONTROLLER_STATE_get")] + public static extern uint RTKDeviceStatusFlags_v1_CONTROLLER_STATE_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_PLATFORM_STATE_get")] + public static extern uint RTKDeviceStatusFlags_v1_PLATFORM_STATE_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_CONTROLLER_STATUS_CODE_get")] + public static extern uint RTKDeviceStatusFlags_v1_CONTROLLER_STATUS_CODE_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_PLATFORM_STATUS_CODE_get")] + public static extern uint RTKDeviceStatusFlags_v1_PLATFORM_STATUS_CODE_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_RESET_REASON_get")] + public static extern uint RTKDeviceStatusFlags_v1_RESET_REASON_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_SIGNAL_QUALITY_get")] + public static extern uint RTKDeviceStatusFlags_v1_SIGNAL_QUALITY_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_VERSION_get")] + public static extern uint RTKDeviceStatusFlags_v1_VERSION_get(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_RTKDeviceStatusFlags_v1__SWIG_0")] + public static extern global::System.IntPtr new_RTKDeviceStatusFlags_v1__SWIG_0(); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_RTKDeviceStatusFlags_v1__SWIG_1")] + public static extern global::System.IntPtr new_RTKDeviceStatusFlags_v1__SWIG_1(uint jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_RTKDeviceStatusFlags_v1__SWIG_2")] + public static extern global::System.IntPtr new_RTKDeviceStatusFlags_v1__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_version")] + public static extern byte RTKDeviceStatusFlags_v1_version(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_controllerState__SWIG_0")] + public static extern int RTKDeviceStatusFlags_v1_controllerState__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_controllerState__SWIG_1")] + public static extern void RTKDeviceStatusFlags_v1_controllerState__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_platformState__SWIG_0")] + public static extern int RTKDeviceStatusFlags_v1_platformState__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_platformState__SWIG_1")] + public static extern void RTKDeviceStatusFlags_v1_platformState__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_controllerStatusCode__SWIG_0")] + public static extern int RTKDeviceStatusFlags_v1_controllerStatusCode__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_controllerStatusCode__SWIG_1")] + public static extern void RTKDeviceStatusFlags_v1_controllerStatusCode__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_platformStatusCode__SWIG_0")] + public static extern int RTKDeviceStatusFlags_v1_platformStatusCode__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_platformStatusCode__SWIG_1")] + public static extern void RTKDeviceStatusFlags_v1_platformStatusCode__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_resetReason__SWIG_0")] + public static extern int RTKDeviceStatusFlags_v1_resetReason__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_resetReason__SWIG_1")] + public static extern void RTKDeviceStatusFlags_v1_resetReason__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_signalQuality__SWIG_0")] + public static extern byte RTKDeviceStatusFlags_v1_signalQuality__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_signalQuality__SWIG_1")] + public static extern void RTKDeviceStatusFlags_v1_signalQuality__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2); + + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_delete_RTKDeviceStatusFlags_v1")] + public static extern void delete_RTKDeviceStatusFlags_v1(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_new_GnssSignalConfiguration")] public static extern global::System.IntPtr new_GnssSignalConfiguration(); @@ -5215,7 +5482,7 @@ static Exception_Helper__MSCL_InvalidNodeConfig() public static extern global::System.IntPtr MipNode_firmwareVersion(global::System.Runtime.InteropServices.HandleRef jarg1); [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipNode_model")] - public static extern int MipNode_model(global::System.Runtime.InteropServices.HandleRef jarg1); + public static extern global::System.IntPtr MipNode_model(global::System.Runtime.InteropServices.HandleRef jarg1); [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipNode_modelName")] public static extern string MipNode_modelName(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -5922,6 +6189,9 @@ static Exception_Helper__MSCL_InvalidNodeConfig() [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKNode_getActivationCode")] public static extern string RTKNode_getActivationCode(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKNode_getStatusBitfieldVersion")] + public static extern byte RTKNode_getStatusBitfieldVersion(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_ChannelData_Clear")] public static extern void ChannelData_Clear(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -10188,6 +10458,9 @@ static Exception_Helper__MSCL_InvalidNodeConfig() [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_SWIGUpcast")] public static extern global::System.IntPtr RTKDeviceStatusFlags_SWIGUpcast(global::System.IntPtr jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_RTKDeviceStatusFlags_v1_SWIGUpcast")] + public static extern global::System.IntPtr RTKDeviceStatusFlags_v1_SWIGUpcast(global::System.IntPtr jarg1); + [global::System.Runtime.InteropServices.DllImport("mscl", EntryPoint="CSharp_mscl_MipDataPoint_SWIGUpcast")] public static extern global::System.IntPtr MipDataPoint_SWIGUpcast(global::System.IntPtr jarg1); diff --git a/MSCL_Unit_Tests/Test_InertialNode.cpp b/MSCL_Unit_Tests/Test_InertialNode.cpp index 7cb3af8bc..ae5960b90 100644 --- a/MSCL_Unit_Tests/Test_InertialNode.cpp +++ b/MSCL_Unit_Tests/Test_InertialNode.cpp @@ -20,7 +20,7 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License. using namespace mscl; -void expectNodeInfo_InertialNode(std::shared_ptr node, const std::string& modelNumber="6251-12345") +void expectNodeInfo_InertialNode(std::shared_ptr node, const std::string& modelNumber="6251-4220") { //======================================================================================== //BUILD THE RESPONSE TO THE getDeviceInfo COMMAND @@ -157,14 +157,14 @@ BOOST_AUTO_TEST_CASE(InertialNode_info) std::shared_ptr impl(new mock_InertialNodeImpl()); InertialNode node(impl); - //setup the node info mock expections + //setup the node info mock expectations expectNodeInfo_InertialNode(impl); //verify the result is good BOOST_CHECK_EQUAL(node.firmwareVersion().str(), "1.1.17"); BOOST_CHECK_EQUAL(node.modelName(), "ABCDABCDABCDABCD"); - BOOST_CHECK_EQUAL(node.modelNumber(), "6251-12345"); - BOOST_CHECK_EQUAL(node.model(), MipModels::node_3dm_gx5_45); + BOOST_CHECK_EQUAL(node.modelNumber(), "6251-4220"); + BOOST_CHECK_EQUAL(node.model().nodeModel(), MipModels::node_3dm_gx5_45); BOOST_CHECK_EQUAL(node.serialNumber(), "ABCDABCDABCDABCD"); BOOST_CHECK_EQUAL(node.lotNumber(), "ABCDABCDABCDABCD"); BOOST_CHECK_EQUAL(node.deviceOptions(), "ABCDABCDABCDABCD"); diff --git a/MSCL_Unit_Tests/Test_InertialNodeInfo.cpp b/MSCL_Unit_Tests/Test_InertialNodeInfo.cpp index b8789928e..0e1614afa 100644 --- a/MSCL_Unit_Tests/Test_InertialNodeInfo.cpp +++ b/MSCL_Unit_Tests/Test_InertialNodeInfo.cpp @@ -21,7 +21,7 @@ BOOST_AUTO_TEST_CASE(InertialNodeInfo_loadNodeInfo) MipDeviceInfo info; info.fwVersion = Version(1, 1, 17); info.modelName = "ABCDABCDABCDABCD"; - info.modelNumber = "6219-12345"; + info.modelNumber = "6219-0000"; info.serialNumber = "ABCDABCDABCDABCD"; info.lotNumber = "ABCDABCDABCDABCD"; info.deviceOptions = "ABCDABCDABCDABCD"; @@ -45,9 +45,9 @@ BOOST_AUTO_TEST_CASE(InertialNodeInfo_loadNodeInfo) //verify the result is good BOOST_CHECK_EQUAL(node.firmwareVersion().str(), "1.1.17"); - BOOST_CHECK_EQUAL(node.model(), MipModels::node_3dm_dh3); + BOOST_CHECK_EQUAL(node.model().nodeModel(), MipModels::node_3dm_dh3); BOOST_CHECK_EQUAL(node.modelName(), "ABCDABCDABCDABCD"); - BOOST_CHECK_EQUAL(node.modelNumber(), "6219-12345"); + BOOST_CHECK_EQUAL(node.modelNumber(), "6219-0000"); BOOST_CHECK_EQUAL(node.serialNumber(), "ABCDABCDABCDABCD"); BOOST_CHECK_EQUAL(node.lotNumber(), "ABCDABCDABCDABCD"); BOOST_CHECK_EQUAL(node.deviceOptions(), "ABCDABCDABCDABCD"); diff --git a/MSCL_Unit_Tests/Test_NodeFeatures.cpp b/MSCL_Unit_Tests/Test_NodeFeatures.cpp index 18b386308..0ee8d3cd4 100644 --- a/MSCL_Unit_Tests/Test_NodeFeatures.cpp +++ b/MSCL_Unit_Tests/Test_NodeFeatures.cpp @@ -562,12 +562,12 @@ BOOST_AUTO_TEST_CASE(NodeFeatures_normalizeSensorDelay_v1) std::unique_ptr features = NodeFeatures::create(info); BOOST_CHECK_EQUAL(features->minSensorDelay(), 1 * 1000); - BOOST_CHECK_EQUAL(features->maxSensorDelay(), 500 * 1000); + BOOST_CHECK_EQUAL(features->maxSensorDelay(), 1000 * 1000); BOOST_CHECK_EQUAL(features->normalizeSensorDelay(0), 0); BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1 * 1000), 1 * 1000); //minimum (besides off) BOOST_CHECK_EQUAL(features->normalizeSensorDelay(500 * 1000), 500 * 1000); //maximum BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1), 1 * 1000); //out of range min - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1000 * 1000), 500 * 1000); //out of range max + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(2000 * 1000), 1000 * 1000); //out of range max BOOST_CHECK_EQUAL(features->normalizeSensorDelay(481541), 482 * 1000); } @@ -577,12 +577,12 @@ BOOST_AUTO_TEST_CASE(NodeFeatures_normalizeSensorDelay_v2) NodeInfo info(Version(1, 0), WirelessModels::node_shmLink, WirelessTypes::region_usa); std::unique_ptr features = NodeFeatures::create(info); - BOOST_CHECK_EQUAL(features->minSensorDelay(), 1); - BOOST_CHECK_EQUAL(features->maxSensorDelay(), 65535); + BOOST_CHECK_EQUAL(features->minSensorDelay(), 600); + BOOST_CHECK_EQUAL(features->maxSensorDelay(), 65000); BOOST_CHECK_EQUAL(features->normalizeSensorDelay(0), 0); - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1), 1); //minimum (besides off) - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(65535), 65535); //maximum - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(481), 481); + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(600), 600); //minimum (besides off) + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(65000), 65000); //maximum + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(981), 981); } BOOST_AUTO_TEST_CASE(NodeFeatures_normalizeSensorDelay_v3) @@ -592,19 +592,19 @@ BOOST_AUTO_TEST_CASE(NodeFeatures_normalizeSensorDelay_v3) std::unique_ptr features = NodeFeatures::create(info); BOOST_CHECK_EQUAL(features->minSensorDelay(), 1 * 1000); - BOOST_CHECK_EQUAL(features->maxSensorDelay(), 600000000); + BOOST_CHECK_EQUAL(features->maxSensorDelay(), 1000000); BOOST_CHECK_EQUAL(features->normalizeSensorDelay(0), 0); BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1 * 1000), 1 * 1000); //minimum (besides off) - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(600000000), 600000000); //maximum + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1000000), 1000000); //maximum BOOST_CHECK_EQUAL(features->normalizeSensorDelay(3), 1 * 1000); //out of range min - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(750004103), 600000000); //out of range max + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(750004103), 1000000); //out of range max BOOST_CHECK_EQUAL(features->normalizeSensorDelay(500 * 1000), 500 * 1000); //can go up to 500ms before switching to seconds BOOST_CHECK_EQUAL(features->normalizeSensorDelay(501 * 1000), 1000000); //can go up to 500ms before switching to seconds BOOST_CHECK_EQUAL(features->normalizeSensorDelay(439748), 440 * 1000); - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(5000001), 6000000); //seconds (PWUWU) - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(700000000), 600000000); //max of 10 minutes + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(900001), 1000000); //seconds (PWUWU) + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(2000000), 1000000); //max of 1 second } BOOST_AUTO_TEST_CASE(NodeFeatures_normalizeSensorDelay_v4) @@ -613,12 +613,12 @@ BOOST_AUTO_TEST_CASE(NodeFeatures_normalizeSensorDelay_v4) NodeInfo info(Version(11, 0), WirelessModels::node_vLink200, WirelessTypes::region_usa); std::unique_ptr features = NodeFeatures::create(info); - BOOST_CHECK_EQUAL(features->minSensorDelay(), 1); - BOOST_CHECK_EQUAL(features->maxSensorDelay(), 600000000); + BOOST_CHECK_EQUAL(features->minSensorDelay(), 1000); + BOOST_CHECK_EQUAL(features->maxSensorDelay(), 300000000); BOOST_CHECK_EQUAL(features->normalizeSensorDelay(0), 0); - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1), 1); //minimum (besides off) - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(600000000), 600000000); //maximum - BOOST_CHECK_EQUAL(features->normalizeSensorDelay(750004103), 600000000); //out of range max + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(1000), 1000); //minimum (besides off) + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(300000000), 300000000); //maximum + BOOST_CHECK_EQUAL(features->normalizeSensorDelay(750004103), 300000000); //out of range max BOOST_CHECK_EQUAL(features->normalizeSensorDelay(16383), 16383); //can go up to 16383 microseconds before switching to milliseconds diff --git a/MSCL_Unit_Tests/Test_WirelessNode.cpp b/MSCL_Unit_Tests/Test_WirelessNode.cpp index 5f9fa76a6..8f000dba2 100644 --- a/MSCL_Unit_Tests/Test_WirelessNode.cpp +++ b/MSCL_Unit_Tests/Test_WirelessNode.cpp @@ -320,7 +320,7 @@ BOOST_AUTO_TEST_CASE(WirelessNode_frequency) BOOST_CHECK_EQUAL(node.frequency(), WirelessTypes::freq_18); //try to change again, but fail - MOCK_EXPECT(impl->node_writeEeprom).once().with(mock::any, 123, 90, mock::any).returns(false); //change frequency write + MOCK_EXPECT(impl->node_writeEeprom).exactly(4).with(mock::any, 123, 90, mock::any).returns(false); //change frequency write BOOST_CHECK_THROW(node.changeFrequency(WirelessTypes::freq_12), Error_NodeCommunication); }