Compare commits

..
Author SHA1 Message Date
michal b2276c086c Merge branch 'develop/SLM-PT50' into develop/Mexico 2026-03-16 13:33:21 +01:00
michal 4fa462661c Merge remote-tracking branch 'remotes/private-origin/develop/SLM-PT50' into develop/Goeteborg 2026-03-16 13:11:34 +01:00
michal 2b30d0cf34 packages add/clean up 2026-03-13 13:51:42 +01:00
michal df2c56e6c4 FIX NaN - devide by zero
Add simulation logic to `StandingStartStopTestOp` and handle zero `TestTime` edge cases in `FlyingStartMassCollectionSeq`
2026-03-12 16:25:26 +01:00
michal a997c3d7be iPerl ASIC - implementation 2026-03-12 14:50:47 +01:00
marekf 3c964f2aab BugFix - repair test RegisterReader deserialize - FSMC method as in SSMC 2026-03-09 14:37:51 +01:00
marekf c445b3e098 BugFix - after applying the transition valve 40% in procedure-purge begin, the RegValve was not regulating correctly after starting the test 2026-03-09 14:20:37 +01:00
marekf 2ea2a2592e Merge branch 'feature/task_6-add-new-admins' into develop/SLM-PT50 2026-03-04 19:14:22 +01:00
marekf 27072598cd Merge branch 'feature/task_5-new-app-icon' into develop/SLM-PT50 2026-03-04 19:14:02 +01:00
marekf 4a2d4772d7 Add new icon to forms of application 2026-03-04 18:48:46 +01:00
marekf 2bf00606d3 Merge branch 'feature/task_4-ListView-ListBox-navigation' into develop/SLM-PT50 2026-03-04 18:42:25 +01:00
marekf 3773e1d96c Merge branch 'feature/task_3-new-pump-grundfoss' into develop/SLM-PT50 2026-03-04 18:42:15 +01:00
marekf 19ddc753c7 Merge branch 'feature/task_2-dripping-on-the-scale-meassure-mass' into develop/SLM-PT50 2026-03-04 18:33:20 +01:00
marekf 0c41c750e8 Add parameter and management IsOffline for components: Modbus>TempMeter>Groch, Meret and Modbus>PressureMeter>Meret and Rig>Keithley>TempMeter and add indicator redColor itemValue for SchematicDrawing 2026-03-04 18:25:28 +01:00
marekf 4bfd5c8e11 Update output printer OnePerMeter - 1. printer configuration in PrintResultsSelectionDlg, 2. document preview, 3. edit document name, 4. enable more save destinations 2026-03-04 13:21:45 +01:00
marekf f0fb70e38b Add new type of pump - Grundfoss 2026-03-04 11:54:39 +01:00
marekf 6e5bcafec0 Update dripping on the scale and measuring the start mass 2026-03-04 10:37:35 +01:00
marekf d5cb18c910 Fixed incorrect loading of RegisterReader in the StandingStartMassCollection method, when the RR Units and RR Quantity variables in results were filled with only string.empty 2026-03-04 09:44:42 +01:00
marekf 3a2069b255 Refactor variable naming in results in response to mass meter pulse processing 2026-03-04 09:42:55 +01:00
marekf 80c651dbfd Add search and navigation as UI>shared for ListBox-es and ListView-s to components listview, components listbox, procedure listview 2026-02-25 13:22:56 +01:00
marekf 5a3b9b57c4 Add new admins marek and michal 2026-02-25 10:02:09 +01:00
marekf ead350eef3 Add initial MassMeter implementation 2026-02-19 19:22:02 +01:00
marekf b43657a4db Initial import from local copy 2026-02-19 12:02:07 +01:00
michal 8fffb9e366 Update clean.bat to remove build artifacts for AppDiagnostic, NfcC7_DLL, NfcC7_DLL.Tests, and TBFTests 2026-01-23 11:04:23 +01:00
michal 0fdd229141 Refactor IPerlImplHeadTestCtrl to use descriptive enums for operations, update command mappings, introduce IPerlASICCorrections, and improve test configuration checks and NFC handling. 2026-01-23 10:51:47 +01:00
michal 2f1ada3f5b Add DiagnosticLedState classes for States #4-#7, enums for PipeStatus and SpikeDetectionStatus, and implement TouchReadProtocol commands, frames, and builders. 2026-01-19 08:10:36 +01:00
michal 988a8c6642 Update NuGetToolVersion to 7.0.0 in SharedComponents project configuration 2025-12-07 11:27:17 +01:00
michal 42ee9eaee3 Poseidon - Flying - Opto communication
Enhance `FlyingStartMassCollectionSeq` with Poseidon reader support, detailed error handling, and improved test data processing.
2025-12-07 11:27:00 +01:00
michal 3f28051d79 Update .gitignore to exclude NfcC7_DLL.Tests build artifacts 2025-12-07 10:59:19 +01:00
michal 65f13cc868 Add UNIHeadTestCtrl interface and implement IperlHeadTestCtrl with command handling logic. 2025-12-06 12:51:51 +01:00
michal cd8ba3cda3 Add System.Threading 4.3.0 package with support for multiple frameworks and localized XML documentation. 2025-12-06 12:49:58 +01:00
michal a5936c8f19 Fix standing start Store Data
Refactor to use `ICommonRegReader` in `StandingStartSeq` and update parameter handling in `SmartCommunicationSeq`.
2025-12-06 12:48:42 +01:00
michal 2842425673 Add simulation logic for test operations and water metrology, enhance UI initialization, and implement optohead flow rate handling.
- Introduced simulation timers in `FlyingStartStopTestOp`.
- Added `Simulate` methods in `WaterMetrologyData`, `WaterMetrologyDataC7`, and `WaterMetrologyDataC2`.
- Enhanced `SmartCommunicationForm` with textbox resizing logic and initialization code.
- Implemented flow rate and volume calculation from optohead telemetry in `SmartReader`.
- Added unit tests for Poseidon correction parsing.
2025-12-06 12:46:12 +01:00
michal 06a401a1ff bugFix - Morrisville - SerialNr, WMBegginValue
Add support for `ICommonRegReader` interface, enhance `ISmartReader` functionality, and update water meter state handling logic across multiple classes.
2025-11-21 14:14:23 +01:00
michal 3a2fc50fec PurchaseOrderDialog logger Improvement - WRCSwindon
Add detailed logging for purchase order workflows in `CycleBeginningForm`

- Introduced `log_selected` for enhanced debugging of selected orders, items, and serial numbers.
- Added exception handling and logging for serial number loading.
- Improved visibility into runtime behavior with contextual debug and error logs.
2025-11-21 14:12:12 +01:00
michal 38a58ed8b7 Scale rainnig solution, see:
Inplementing mass collection update.
Update AssemblyVersion to 3.9.2149.4, refactor mass collection sequence in StandingStartMassCollection, extend PoseidonCmd with enhanced configuration and dialog options, and improve task handling and UI automation.
2025-11-19 16:44:21 +01:00
michal c7cba20de0 Add ReadStableMassOp unit test and enhance MettlerToledo Scale support
- Introduced `ReadStableMassOpTest` to validate mass reading operations.
- Refactored `Scale` to support `ISerialPort` for improved testability.
- Added `SerialPortDevice` and `SerialPortDeviceFake` implementations, with `GetComponent` overload in `Factory`.
- Enhanced `StateMachine` with `InitializeBoardEtc_Fake` for custom setups.
- Updated project files to include new classes.
2025-11-19 16:28:23 +01:00
michal 6311df49c3 Inplementing mass collection update.
Update AssemblyVersion to 3.9.2149.4, refactor mass collection sequence in StandingStartMassCollection, extend PoseidonCmd with enhanced configuration and dialog options, and improve task handling and UI automation.
2025-11-18 10:59:21 +01:00
michal f1d32a39ba ver 3.9.2149.2 ReadPulses added in Run()
Update AssemblyVersion to 3.9.2149.2 and enhance PoseidonReader with new timing and task-tracking functionality.
2025-11-13 15:58:09 +01:00
michal 224b53f774 Ver 3.9.2149.1 - Update AssemblyVersion and AssemblyFileVersion 2025-11-13 14:39:07 +01:00
michal 1e2777c5e7 Enable ShowDialog for PoseidonCmd, add UI improvements in TestStartEndForm, and introduce new methods for handling reader data and controls. 2025-11-13 14:21:23 +01:00
michal c3c21649fb new Test method Poseidon => StandingStartMassCollectionPoseidon
Add support for `StandingStartMassCollectionPoseidon` test methods.

- Introduced `Compound`, `HeatMeters`, and `Single` components for `StandingStartMassCollectionPoseidon`.
- Included factories, configuration classes, and test parameters for new test methods.
- Updated `TBF.csproj` to include new files and resources.
2025-11-12 13:42:19 +01:00
michal 99ccabc142 Smart meters support MainWnd dialog (must be finished - mouse right click), test supports Poseidon RegisterReader
Refactor `ISmartReader` and related classes to support `SmartHeadsUni`. Remove redundant `IperlHeadsUni` references and introduce `SmartMeterFlyingStartMassCollection` functionality. Enhance regex-based head position extraction.
2025-11-12 12:34:29 +01:00
michal f1e6e94450 work backup
- Register Reader Poseidon works
- Smart Form - wrong functionality
- refactoring
2025-11-06 14:11:13 +01:00
michal 320cddb177 compatible version to TBF
Refactor `NfcHanler` namespace to `NfcHandler` and enhance code consistency.
2025-10-29 16:05:21 +01:00
michal 42002e3fa4 iPerl Fixes 2025-10-27 11:49:42 +01:00
michal 77cabfd712 bugfix Parallel CLI Runner 2025-10-27 11:48:22 +01:00
michal c933e2d759 test disabled 2025-10-27 11:47:38 +01:00
michal f3f0a46627 improvemnet, Sensus Developer super user added 2025-10-27 11:46:56 +01:00
michal b5fb4c2947 improvemnet, Sensus Developer super user added 2025-10-27 11:46:34 +01:00
michal f6cce9df3c bugfix Parallel CLI Runner
Additional needed classes
2025-10-27 11:42:12 +01:00
michal c0385c0782 bugfix Parallel CLI Runner
Add parallel execution tests and improve cancellation handling in `CliRunner`

- Introduced new tests (`RunMultipleTimesTestProgram_CheckParalelWork` and `RunMultipleTimesTestProgram_CheckParalelWorkCumulative`) to verify parallel execution behavior.
- Enhanced `SendAsync` and `RunAndCaptureJsonAsync` methods in `CliRunner` with `CancellationToken` support for better task cancellation.
- Refactored process output handling for improved clarity and robustness.
- Added error handling during CLI logger initialization.
2025-10-27 11:38:43 +01:00
michal db43bdb652 FlowMeter improvement
Add `FromDescription` check in `ParseFlowUnit` for better unit parsing
2025-10-27 11:29:58 +01:00
michal 6bdc10f4a7 Merge branch 'master-3' into feature/SmartMeters 2025-10-22 14:37:04 +02:00
michal 9692dc7f4f HeatMeter - columns exchange
Update `ProcedureDlg` to fix `MetersPath` ordering and version bump to 3.9.2149.0
2025-10-22 12:18:01 +02:00
michal 6795793858 Update iPerlReaderUNI configuration handling and validation
- Replace `PoseidonReader.IPerlCfgCtrl` with `RegisterReaders.iPerlReaderUNI.IPerlUniCfgCtrl` for proper configuration control.
- Add null-check and error handling in `ComponentsManagerDlg` to ensure valid default configurations.
- Mark `ITestParams` as `[XmlIgnore]` in `IPerl` configurations to avoid serialization issues.
- Minor import adjustments and functionality improvements for TestMethod classes.
2025-10-21 10:06:29 +02:00
michal a2c564d789 polishing - work now 2025-10-18 09:59:07 +02:00
michal 3bc9e731e8 Move iPerlReaderUNI.communication components to CommonRR.IPerl.communication and rename associated classes for clarity and consistency. 2025-10-14 14:20:26 +02:00
michal 95c5f09238 Working NfcC7_DLL, tests, clean up
"Remove unused NfcHanler classes and utilities"

This commit deletes several obsolete and unused files from the NfcHanler directory, including utility classes, enums, and a large command handling class. This cleanup improves code maintainability by eliminating unnecessary dependencies and clutter.
2025-10-14 13:15:31 +02:00
michal 0a45d66c0b Add SerialFirmwareDownloadTask to NfcC7_DLL for firmware upgrade handling 2025-10-09 11:01:08 +02:00
michal 96408eaef3 Merge branch 'master-3' into feature/SmartMeters
# Conflicts:
#	NfcC7_DLL/Properties/AssemblyInfo.cs
2025-10-06 11:16:36 +02:00
michal cae3ca7cdf HEAT_METERS enabled 2025-10-03 09:59:44 +02:00
michal c8adc093e0 NfcC7_DLL bug fix 2025-10-02 13:34:29 +02:00
michal 4395516216 test project 2025-10-02 13:30:59 +02:00
michal 9281b52464 Poseidon DLL - Comunication Implementation - not finall 2025-10-02 13:28:37 +02:00
michal 6571de7c32 Add NfcC7_DLL project with initial implementation and solution integration 2025-09-29 09:58:09 +02:00
michal a75d66e028 Merge branch 'refs/heads/master-3' into feature/SmartMeters
# Conflicts:
#	TBF.sln.DotSettings.user
2025-09-27 10:27:40 +02:00
michal e839148a6f Ignore .DotSettings.user file 2025-09-27 10:05:09 +02:00
michal 65b502a9b1 Remove TBF.sln.DotSettings.user file 2025-09-27 09:54:47 +02:00
michal 9cde62b2e2 packages added to git
Add `System.Net.Sockets.xml` documentation for zh-Hant locale in `netstandard1.3` API reference.
2025-09-27 09:53:21 +02:00
michal cc86c38246 Update user credentials in Utils.cs 2025-09-26 16:22:00 +02:00
michal 357df87f49 feature/Enhanced_Writer_NoSeparator_AndName 2025-09-26 15:10:34 +02:00
michal 4b33da565c Untrack TBF.sln.DotSettings.user 2025-09-26 15:02:15 +02:00
michal d11f855325 Update .DotSettings.user file with new ResxEditorPersonal configurations 2025-09-26 14:54:22 +02:00
michal eef1f31a21 Update .DotSettings.user file with adjusted ResxEditorPersonal settings 2025-09-26 14:50:49 +02:00
michal b878ee96a5 Merge branch 'refs/heads/master-3' into feature/camera_jms
# Conflicts:
#	TBF.sln.DotSettings.user
#	TBF/Properties/AssemblyInfo.cs
#	TBF/TBF.csproj
#	TBFTests/obj/Debug/TBFTests.csproj.CoreCompileInputs.cache
#	TBFTests/obj/Release/TBFTests.csproj.CoreCompileInputs.cache
2025-09-26 14:27:01 +02:00
michal 97eed27458 Update .DotSettings.user to include Nullable<T>.cs in force-included files. 2025-09-26 14:18:19 +02:00
michal fe08550dc3 iPerlReaderUNI.Factory => TBF components 2025-09-25 16:24:10 +02:00
michal 8a0ae8080f refactor - completisation Smart Meter <= iPerl 2025-09-24 11:57:47 +02:00
michal ab4025e55f Add ISmartTestMethod interface and initial designer file for iPerlCommunicationForm in SharedDialogs 2025-09-23 11:14:04 +02:00
michal 22fffe602c iPerl Reader - NOT FINISHED
Add initial implementation for `iPerlReaderUNI` with `Factory`, `ProcParams`, and `IPerlReader` classes.
2025-09-23 11:10:55 +02:00
michal e4c0219783 packages update
Add Antlr3.Runtime.xml documentation file for API references.
2025-09-22 13:51:32 +02:00
michal 3362fdfaff Remove bin/, obj/, and other build artifacts from Git tracking 2025-09-22 13:46:49 +02:00
michal 6093db4502 Remove bin/, obj/, and other build artifacts from Git tracking 2025-09-22 13:45:20 +02:00
michal 5e7598667b Remove bin/, obj/, and other build artifacts from Git tracking 2025-09-22 13:36:42 +02:00
michal 4fe8729b85 Remove bin/, obj/, and other build artifacts from Git tracking 2025-09-22 13:34:07 +02:00
michal b1dd6666f1 Version increment to 3.9.2147.1 2025-09-22 12:26:02 +02:00
michal a3613889e1 HEAT_METERS disabled
update `.gitignore` with additional folders and files for better coverage.
2025-09-22 12:25:32 +02:00
michal 7b87d63531 PoseidonReader - fix support Cli version 1.4 - Extend TryGetDeviceId to support JSON format and add corresponding tests 2025-09-22 09:35:22 +02:00
michal d838c78a8a CliRunner - Added test and refactor 2025-09-19 12:02:16 +02:00
michal 7a8bef501a HEAT_METERS enabled 2025-09-19 12:00:59 +02:00
michal 9863b54bc8 Enhance ScopedLoggerFactory to support log file compression with rolling, include LogZipService for managing zipped archives, and update CliRunner configuration accordingly. 2025-09-17 13:00:17 +02:00
michal e57c6a6a02 Add ShowDialog and SaveCommunication fields to EntryFormCfg, implement related functionalities in PoseidonReader and EntryForm, and improve logging with ScopedLoggerFactory integration. 2025-09-17 10:45:40 +02:00
michal afa215534c Version increment to 3.9.2146.4 2025-09-09 20:48:19 +02:00
michal 780d44166e Refactor PoseidonReader to use lazy initialization for CliRunner, introduce SafetyTimeOut, enhance JSON deserialization with fallback logic, and improve error logging using log4net. 2025-09-09 20:47:53 +02:00
michal 35e4078dda Merge branch 'master-3' into PoseidonCmd 2025-09-09 15:13:29 +02:00
michal 47e09584f2 Frequency pulse meter 2025-09-09 12:51:26 +02:00
michal fc8e82c0e8 Merge branch 'master-3' into feature/processLogging
# Conflicts:
#	TBF/Rig/Sequences/ProcessData.cs
#	TBF/Rig/TestMethods/PMaxTest/PMaxTestSeq.cs
2025-09-09 12:24:20 +02:00
michal b729b08da2 Version increment to 3.9.2146.3 2025-09-08 14:34:04 +02:00
michal 3209ff303c Add support for optional IRegReader parameter in ShowCycleBeginFormOp across multiple DataEntry modules and enhance PoseidonReader with SerialNr handling and simulation mode adjustments 2025-09-08 14:32:49 +02:00
michal 41693d9c83 Update configuration for IPERL support and logging enhancements
This commit integrates the `IPERL` mode across multiple projects by updating the `DefineConstants` in project configurations. It also improves logging by adding a `LogCache` appender and modifying root logger settings in the `log4netConfig.xml` file.
2025-09-08 10:09:47 +02:00
michal 8f02f4ff31 Merge branch 'master-3' into PoseidonCmd
# Conflicts:
#	TBF/Properties/AssemblyInfo.cs
2025-09-07 22:36:46 +02:00
michal 1525bb7c1a Patch applied - Add initial implementation for IperlHeadTestCtrl and NfcServices
This commit introduces the `IperlHeadTestCtrl` component and `NfcServices` class, including core functionality for communication with iPerl heads via NFC/RFID. It integrates configuration options, multithreaded commands processing, and logging through `log4net`.
2025-09-07 22:34:06 +02:00
michal 2aeaf42325 Patch applied - Add initial implementation for RegValveLowRegulTimeSaturation module
This commit introduces the `RegValveLowRegulTimeSaturation` module, including core components such as `RegValve`, `ChangeRegValvePositionOp`, `Factory`, `Handlers`, and configuration classes (`RegValveCfg`, `RegValveCfgCtrl`). It integrates `log4net` for logging and adheres to the established modular design architecture.
2025-09-07 22:18:35 +02:00
michal bf4fb469da Add initial implementation for AppDiagnostic project
This commit introduces the AppDiagnostic project structure, including core components like `MainForm`, logging utilities (`LogAdapter`, `LogFilter`), and configuration files. It integrates with `log4net` for logging and uses `SharedComponents` for shared utilities.
2025-09-07 22:13:58 +02:00
michal efd0515295 Patch applied - Added new calibration-related properties for IPERL mode, integrated AppDiagnostic functionality into UI, and updated project configuration. 2025-09-07 17:42:26 +02:00
michal be8ac28bc7 Version increment to 3.9.2146.1 and update PoseidonReader to use VolumeLi instead of VolumeM3 2025-09-07 17:35:20 +02:00
michal 56dc89ac82 Version increment to 3.9.2146.0 2025-09-05 12:29:40 +02:00
michal 62ffc94c49 Add PoseidonCmd DataEntry module integration: EntryForm, EntryFormCfg, Factory, and TestStartEndForm 2025-09-05 12:23:06 +02:00
michal 50a38bc557 "Refactor CJMS11 image grab functionality with timeout handling and error resilience
- Introduced a new `GrabImageListener` method with asynchronous timeout support for improved response handling.
- Enhanced error logging and implemented retry logic for capturing images to address NACK scenarios.
- Added overlay rendering and event-based image delivery for better UI integration.
- Refined `SendImageListener` logic to include command handling improvements and listener termination checks.
- Minor parameter adjustments in `OnImageReceived` for default values support."
2025-07-30 10:34:56 +02:00
michal 3e643854bc Add support for multiple image capture and time gap configuration in CJMS11
- Implemented functionality to handle multiple image captures with adjustable time gaps using the new `MultipleImageOpacity` class.
- Enhanced `RoiCfgCtrl` and `RoiCfg` to integrate multi-image configuration.
- Updated CJMS11 camera to support sequential image handling and delegate events for multiple images.
- Introduced UI elements for specifying image count and time gap in the configuration panel.
- Extended `GrabImagesOp` and event arguments to handle and store multiple grabbed images.
- Refactored project to include `MultipleImageOpacity` utility in TBF solution.
2025-07-28 10:16:07 +02:00
michal 0daefb93bb Add CJMS11 enhancements, logging, and resolution support
- Extended CJMS11 camera handling with new functionalities, including image grabbing, resolution configuration, and improved ROI support.
- Added new `ToString` method implementations for enhanced debugging and logging in key classes like `JmsMessage`, `JmsPacket`, and `RoiCfg`.
- Introduced additional commands (`start_stream_images`, `stop_stream_images`) in `CommandM` and its enum.
- Implemented new resolution handling in `RoiCfg` with support for configurable image frames.
- Refactored resolution-related UI elements in `RoiCfgCtrl` to add a dropdown for selecting resolution.
- Made minor UX improvements by replacing inconsistent string formats with verbatim strings in console messages.
- Updated project dependencies with new resolution-related utilities (`Frame` and `ResolutionFrames`).
- Resolved camera-specific symbolic issues by transitioning to `CJMS11.Camera` over prior naming inconsistencies.
2025-07-18 08:50:22 +02:00
michal f5731c67a0 Improve CJMS11 camera connection handling with timeout support
- Replaced synchronous connection retry logic with asynchronous timeout-based handling.
- Added exception handling for connection attempts exceeding 1 second.
- Introduced `EstablishCameraConnectionRepeticaly` with updated timeout intervals for retries.
2025-06-02 09:58:01 +02:00
michal d2ae5f3e83 It works !!! ??
Add support for `System.Net.Sockets`, enhance JMS camera detection, and refactor adapter connection handling

- Added `System.Net.Sockets` as a project dependency and updated the configuration file accordingly.
- Enhanced timeout logic for JMS camera detection, improving reliability in identifying cameras.
- Refactored `NetAdapter` to support async connection handling with better initialization in simulate mode.
- Fixed IP setup for debugging and added new task management for asynchronous operations.
2025-05-30 15:34:21 +02:00
michal c4d332b68b Add JMS network adapter support and multi-camera handling improvements
- Introduced `AdapterJMS` component and configurations, including its factory, control, and designer files.
- Enhanced CJMS11 camera initialization with improved connection handling via multiple retries.
- Updated TbfComponents to include the new JMS adapter factory.
- Refactored camera test methods and connection logic for better reliability and performance.
- Adjusted resource definitions in the project file to include new JMS adapter resources.
2025-05-30 13:44:40 +02:00
michal 1daa0212ef test of connection - multiple connections 2025-05-29 12:59:21 +02:00
michal 1748a83ec8 Add multi-camera initialization and update dependencies
Enhanced camera initialization with parallel and async tests for two cameras. Removed unused Telnet references, adjusted camera indexing logic, and added `System.Drawing.Common` dependency.
2025-05-28 22:50:47 +02:00
michal b3d6b5a59f Refactor camera handling; add UI and image management support.
Replaced legacy UDP and RTP mechanisms with new live stream, grab, and save image functionality using TCP. Introduced event-based UI command handling and image overlay. Updated resource management for improved reliability and added support for saving captured images to disk.
2025-05-26 08:58:46 +02:00
michal 891795b101 Add support for CJMS11 camera integration
Introduced the CJMS11 camera component and its factory in TbfComponents. Added implementation for the CJMS11 camera class, along with unit tests to validate its functionality and integration. This enhances existing camera support in the system.
2025-05-21 11:31:19 +02:00
michal a20b0761fd Fix nested string formatting in DoubleBox's return statement
Revised the return statement to correctly handle nested string formatting by ensuring the format string is constructed properly. This resolves potential formatting issues with dynamic values.
2025-03-26 10:22:50 +01:00
michal 3b9e8d754d fix valve Debug Simulate mode 2025-01-10 08:48:52 +01:00
michal fed3281525 log for processData in LeakTestSeq.cs set 2025-01-08 07:43:58 +01:00
michal c1d966d86a final add process data to PMaxTestSeq.cs 2025-01-07 16:23:01 +01:00
michal b2d2f8c13b Solved problem with Null Exeprion in ProcessData.cs 2025-01-07 16:22:18 +01:00
michal 4e5e3d63e1 Fixed problem with F2 formating of decimal num 2025-01-07 16:21:28 +01:00
michal 25602fb914 Bug fix - Refactor flow meter handling and add validation checks.
Simplified flow meter logic by introducing a reusable variable for `LtrPerPulse` and handling potential null values. Added batch components correlation validation to ensure water meter counts align with configuration, preventing mismatches. Additionally, improved code formatting for consistency and readability.
2024-12-19 14:16:25 +01:00
michal 602d0d5308 Add logging for process start and measurement steps
Updated `PMaxTestSeq` to include logging of process data at key steps: process start and measurement. Added TODO comments to review logging positions for alignment with expected workflow.
2024-12-17 09:59:31 +01:00
michal f95198e40e revision update 2024-11-13 13:36:54 +01:00
michal d2b2bbb94b Merge branch 'refs/heads/feature/fix_Swindon' into master-3
# Conflicts:
#	TBF/Properties/AssemblyInfo.cs
2024-11-12 09:56:24 +01:00
michal a4246c7ea4 user groups based PL_LANG enabled, DB update needed 2024-11-12 09:52:41 +01:00
michal 498fc21412 DIVERTER close valve end time - Mark Chenges 2024-11-11 14:18:39 +01:00
michal 3f07a506ad Added new Nummer Result - Failed_meters_countE15 2024-11-06 14:58:39 +01:00
michal fb74e2d785 fix, NullPointerExeption If Order have no name 2024-11-04 15:41:09 +01:00
michal 3a2290570d Table merged columns with +,- in mixing mode returning -, old behaviour was last test evaluation 2024-10-30 15:17:24 +01:00
michal 3b68e3f9fd Version increment 2024-10-30 15:15:34 +01:00
michal 3184b1da8e LANG_PL enabled 2024-10-30 15:14:36 +01:00
michal b70a10e697 Merge branch 'master-3' into feature/outputPrinterFix 2024-10-30 06:55:55 +01:00
michal 3433bbbebe removed unnecessary, update of behaviour - textChanged 2024-10-29 09:26:04 +01:00
michal 4c0a797e98 improvement + changed behaviour 2024-10-28 22:45:50 +01:00
michal 203c2498ac temp commit - hepl method 2024-10-25 09:27:33 +02:00
michal 2023ea5221 simulate mode fix problem with Broadcast camera connection 2024-10-21 13:28:21 +02:00
michal cbb3d4f735 Merge branch 'master-3' into feature/KameraKeyenceAdvance 2024-10-11 10:46:32 +02:00
michal 8acf219ba2 packages - added what neccesary, also for JetBains IDE 2024-10-11 10:44:16 +02:00
michal 68884cd7df Merge branch 'master-3' into feature/FixProcessDataFile 2024-10-11 10:23:55 +02:00
michal 1629d82d65 save before update 2024/10/11 2024-10-11 10:00:36 +02:00
michal 17ab11bdf1 version increment 2024-10-11 09:59:43 +02:00
michal d2ef959f15 fix for Stop measurement and save/Collect after End Session 2024-10-09 16:07:11 +02:00
Jan Augustin 21b00e9b83 Oracle data access is only managed. No need to install the Oracle client on test bench anymore. 2024-10-09 10:40:11 +02:00
michal 3d7aaaaa3d Remove TBF.csproj.DotSettings file
This file was deleted because it is no longer needed in the project. It contained resource dictionary entries and paths that are now obsolete.
2024-10-07 10:54:44 +02:00
michal 705f7760af update by Michal requirements, manual setting dialog events changed, camera dialog both behaviour prepared, reload previous results copy image solved,rest API, rest API additional values added, added ShowTestCollectFormOp, added lang string 2024-10-07 10:54:04 +02:00
Jan Augustin 3b385d592d Updated .gitignore 2024-09-26 09:55:15 +02:00
michal cf6a16656b Remove outdated TODO comments 2024-09-04 14:06:06 +02:00
michal f50f9bfa5b Add KeyPress handlers to comboBoxes and buttons
This change introduces KeyPress event handlers to various UI elements such as comboBoxes and buttons to improve key input handling. The corresponding event handlers were implemented and the UI components were updated accordingly.
2024-09-04 14:02:21 +02:00
michal 77d8c95930 Purchase Order - Collector complete, bug fix in entities version 3.9.2149.11 2024-09-02 14:21:40 +02:00
michal 57c2019405 DB purchaseOrder -> Remove Config Entities - moved into Results 2024-09-02 08:30:34 +02:00
michal 46432bc61b Dialog events added 2024-08-30 12:42:29 +02:00
michal a4360f6993 All changes - collect cammera, fixed pictures preview, collecting pictures - 48 meters to grab data 2024-08-30 10:22:57 +02:00
michal 97e0a764b8 Enable -Simulate- for this method !!! 2024-08-14 12:06:45 +02:00
michal 7409af70ac Advance components - StandingStartMassCollectionAdvance 2024-08-14 11:59:26 +02:00
michal 783d51e71a Fix Diverter switching - in sequence, logs 2024-03-15 21:02:39 +01:00
michal a710ab7457 PL lang fix, camera test 2024-03-10 22:25:55 +01:00
michal 6a428e3c76 Keyence Camera 2024-03-10 22:24:03 +01:00
michal 2e56b8e5cf packages log4net.2.0.15 dependency 2024-02-17 20:28:17 +01:00
michal 1a4c18fa35 TBFTest - removed Compile Include test AdjustableMeterTest 2024-02-17 20:26:16 +01:00
michal 153d031125 log4net packages.config 2024-02-12 21:49:30 +01:00
michal 5d4c7dfe68 log4net ver 2.0.15 2024-02-12 21:44:42 +01:00
michal 021beeb47f GroupPrinter - print in separate files/printers 2024-02-12 21:41:25 +01:00
michal 1140d67c75 GroupPrinter 2024-02-04 10:07:50 +01:00
michal f0d26a36be reformating 2024-02-04 10:06:41 +01:00
michal 6afb10351e limit less linear correction 2024-02-04 10:00:22 +01:00
michal 2f3259d063 fix bug paths 2024-02-04 08:38:40 +01:00
michal 30a9396e4a verzia 3.9.2140 2024-01-24 17:51:37 +01:00
michal 2a94347f3e final modification for AdjustableMeter.cs, Added units A,V ElectricUnits, calculation based on [A] 2024-01-24 17:35:56 +01:00
michal 30f5e6c935 mesure Ampers in kPa = 0.01 koef, tranform into pressure linear interpolation 2024-01-07 22:54:47 +01:00
michal 0ad8bc6d75 new Adjustable Meter with value correction - two params 2023-12-28 23:47:56 +01:00
Milan Hanajik c076d6b343 Reconfigured for Katowice (CAMERA; LANG_PL) 2023-12-21 23:04:36 +01:00
Milan Hanajik 64e32751c0 ver. 3.9.2139 2023-12-21 23:04:10 +01:00
Milan Hanajik 279c8eefb4 DataEntry.Uni.CycleBgEnForm : autoSNButton --> multiPurposeButton, ver. 3.9.2137 2023-12-12 18:47:43 +01:00
Milan Hanajik b931ed62ff CombinedWithDetection : Extra test parameters 'UseAinsteadOfB' and 'DetectedFlowShift', ver. 3.9.2136 2023-12-08 21:21:42 +01:00
Milan Hanajik 05665288ab 1. LabelPrinting project created (based on Prod..Mon..SNPrinting), 2. Minor changes in Label.Printer 2023-12-07 17:41:10 +01:00
Milan Hanajik 8af89136e7 1. DataEntry.Uni.EntryFormCfg initialization : Order history, 2. Printers.Label clean-up, ver. 3.9.2135 2023-12-07 17:40:56 +01:00
Milan Hanajik 5b6461fa0a Czech language. 2023-12-02 22:09:02 +01:00
Milan Hanajik 1f51924bc8 1. Printer status, 2. Simulated printers, 3. Label.Printer uses wm.PrintLabel , etc. 2023-12-02 22:08:52 +01:00
Milan Hanajik b1f3b72a96 1. bool WaterMeter.PrintLabel, DataEntry.Uni: 2. "Auto s/n" function, 3. common check box, 4. Ct.PrintLabel (yes/no) 2023-12-02 21:59:34 +01:00
Milan Hanajik dfc0661300 ProcedureDlg supports 3 printers, ver. 3.9.2133 2023-12-02 21:51:02 +01:00
Milan Hanajik f747755301 Common.Forms.ModelessForm modifications. 2023-11-28 08:47:15 +01:00
Milan Hanajik ad2c1d615f ver. 3.9.2131 2023-11-28 08:45:10 +01:00
Milan Hanajik 11ad6d39ee Bug fix in Printers.Enhanced.PrinterCfgCtrl, ver. 3.9.2130 2023-11-28 08:44:12 +01:00
Milan Hanajik 0f394f622b Add(new WMeterRsltItemSpec(ItemID.Passed ... modification reverted, supports test results 2023-11-27 17:18:44 +01:00
Milan Hanajik 09c542e1e6 UpgradeSelectionDlg fixed : Rounding flows after converting them to double must be done at the very end, after all other upgrades. 2023-11-24 12:02:02 +01:00
Milan Hanajik d772a3d531 ver. 3.9.2129 2023-11-21 18:49:48 +01:00
Milan Hanajik 87206ebe79 page 1/1 not printed in OnePerBatch, OnePerMeter and Zapiska protocols, ver. 3.9.2128 2023-11-21 18:42:11 +01:00
Milan Hanajik f4c77feeef Diverter switch time is displayed in results for 'CombinedWithDetection' test method. 2023-11-21 18:17:18 +01:00
Milan Hanajik ae6d77efc1 PL language (Uzytkownici) 2023-11-09 17:44:11 +01:00
Milan Hanajik 8318ed33e1 OnePerMeter : Alignment 2023-11-09 17:44:00 +01:00
Milan Hanajik c4c86b36d2 TestData.IsFromToInPct and TestRslt.Qdetected added, TestRslt.Qfrom() / Qto() rewritten, CombinedWithDetectionSeq bug fix. 2023-11-09 11:59:24 +01:00
Milan Hanajik 990b695db6 Bridge.OnFlowDetected(...), Config.Entities.Component.Parameters mapped to VARCHAR(12000), ver. 3.9.2125 2023-11-09 11:59:11 +01:00
Milan Hanajik 33f050ef71 ProcedureDlg: bug fix when Qtg = detected, wider ComboBox-es, CombinedWithDetectionSeq bug fix, printer=profile name when creating, ver. 3.9.2123 2023-11-08 17:20:09 +01:00
Milan Hanajik 026a95e3ac Languages clean-up, MainWnd.pl.resx is not used anymore. 2023-11-07 17:31:43 +01:00
Milan Hanajik 4fd9030812 PTest.FlowId, ProfileType.CompoundQ3RQnClass... added, clean-up, DB 3.8 => 3.9, ver. 3.9.2118 2023-11-07 08:49:48 +01:00
Milan Hanajik 45d138ece3 Bug fixes in Results.Output.Table 2023-11-07 08:49:47 +01:00
Milan Hanajik 4a884a09a1 TestWizard improvements, ver. 3.8.2114 2023-10-30 15:36:41 +01:00
Milan Hanajik a524915f28 Metrology contains links to certificates saved as PDF files, CalibCertificateCtrl. 2023-10-17 17:31:35 +02:00
Milan Hanajik 7982526790 Bug fix in ValveBase, prevents PumpTandem in paths and transition sequences, ver. 3.8.2109 2023-10-12 21:22:55 +02:00
Milan Hanajik b866c45e9b CombinedWithDetection : DetectionKernelSize / DetectionBufferSize increased. 2023-10-12 15:23:26 +02:00
Milan Hanajik 0073ac8b9e Table rewritten, Cell, TopBorder, LeftBorder, BottomMerge, RightMerge added, merging OK, clean-up, ver. 3.8.2108 2023-10-12 15:23:06 +02:00
Milan Hanajik 36d661c75e 1. Results.ItemID.Passed gives always the meter result, 2. Results.WMeterRsltItemSpec.Merge added + UI changes 2023-10-12 15:23:05 +02:00
Milan Hanajik e3f1f2711b Start/stop valve switch time measurement implemented in StandingStart... test methods, ver. 3.8.2100 2023-09-22 13:52:50 +02:00
Milan Hanajik f9ae8c54e1 TestProfileDlg : compoundTabPage removed. 2023-09-22 10:05:25 +02:00
Milan Hanajik ad7abe5471 1. Profiles for Compound meters, 2. TestMethods.CombinedWithDetection modifications. 2023-09-22 10:01:01 +02:00
Milan Hanajik a027f3f544 test.Qform/Qto -> test.QfromM3ph()/QtoM3ph() in test methods, sequences, etc. 2023-09-22 10:01:01 +02:00
Milan Hanajik 0930df5e64 DB 3.7 --> 3.8, IsFromToInPct (unit for Qfrom/Qto) added to Entities.Test, IBenchInfo, ProcessData..., ver. 3.8.2097 2023-09-22 10:01:00 +02:00
Milan Hanajik 1c5bf76bb3 Changes for nanjing : iPerl.CycleBeginningForm and S640CommForm bug fixes. 2023-09-20 12:27:57 +02:00
Milan Hanajik d2d697ae80 ver. 3.7.2095 2023-08-25 09:52:41 +02:00
Milan Hanajik 60f30e4c41 Results, FlyingStartMassCollection and CombinedWithDetection : Main and Aux meter pulses, Div. switch time, ver. 3.7.2094 2023-08-24 13:12:30 +02:00
Milan Hanajik ecccfab7a6 FlyingStartMassCollection : Delayed start param., Action.IsDelayedStart added. 2023-08-23 14:59:42 +02:00
Milan Hanajik 1691c634c6 Diverter.Resolution 1, 2, 4, and 8 ms implemented, ver. 3.7.2092 2023-08-23 14:33:07 +02:00
Milan Hanajik 900a2d660c DataEntry.Uni : Compound meters support. 2023-08-18 12:21:02 +02:00
Milan Hanajik eaf60f3292 DB 3.6 -> 3.7, PulsesPerLtrAux added to WaterMeterData and to Results items, MainSeqUtils and ProcedureDlg changes, ver. 3.7.2088 2023-08-17 19:57:58 +02:00
Milan Hanajik bc0de96ad9 Compound profiles support in progress 2023-08-15 15:31:17 +02:00
Milan Hanajik a770f5a9b8 ver. 3.6.2087 2023-08-14 10:20:01 +02:00
2230 changed files with 1016293 additions and 188717 deletions
+28 -4
View File
@@ -1,3 +1,5 @@
AppDiagnostic/bin/
AppDiagnostic/obj/
Common/bin/
Common/obj/
Config/bin/
@@ -26,8 +28,14 @@ GenericTest/bin/
GenericTest/obj/
GraphLib/bin/
GraphLib/obj/
LabelPrinting/bin/
LabelPrinting/obj/
MergeResultsDBs/bin/
MergeResultsDBs/obj/
NfcC7_Dll/bin/
NfcC7_Dll/obj/
NfcC7_DLL.Tests/bin/
NfcC7_DLL.Tests/obj/
OrderManagement/bin/
OrderManagement/obj/
ProductionTracing/bin/
@@ -46,14 +54,18 @@ ResultsParser/bin/
ResultsParser/obj/
S640TestApp/bin/
S640TestApp/obj/
SharedDatabase/bin
SharedDatabase/obj
SchematicDrawing/bin
SchematicDrawing/obj
SharedComponents/bin/
SharedComponents/obj/
SharedDatabase/bin/
SharedDatabase/obj/
SchematicDrawing/bin/
SchematicDrawing/obj/
Statistics/bin/
Statistics/obj/
TBF/bin/
TBF/obj/
TBFTests/bin/
TBFTests/obj/
ToFirstMonitor/bin/
ToFirstMonitor/obj/
ToSecondMonitor/bin/
@@ -64,6 +76,18 @@ WorkflowConfigurator/bin/
WorkflowConfigurator/obj/
Workplace/bin/
Workplace/obj/
DataStreamInterfaceTest/bin/
DataStreamInterfaceTest/obj/
DataStreamMeter/bin/
DataStreamMeter/obj/
Events/bin/
Events/obj/
TracingDB/bin/
TracingDB/obj/
Users/bin/
Users/obj/
.vs/
.idea/
*.suo
*.bak
TBF.sln.DotSettings.user
-1
View File
@@ -1 +0,0 @@
TBF
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal" created-in="RD-241.19072.26">
<data-source name="@localhost" uuid="2f1012d5-a96b-44db-ad21-032f973c657f">
<database-info product="MySQL" version="5.5.39" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-j-8.2.0 (Revision: 06a1f724497fd81c6a659131fda822c9e5085b6c)" dbms="MYSQL" exact-version="5.5.39" exact-driver-version="8.2">
<extra-name-characters>#@</extra-name-characters>
<identifier-quote-string>`</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" />
<user-name>root</user-name>
<schema-mapping>
<introspection-scope>
<node kind="schema">
<name qname="@" />
<name qname="jor" />
<name qname="jor-r" />
</node>
</introspection-scope>
</schema-mapping>
</data-source>
</component>
</project>
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="@localhost" uuid="2f1012d5-a96b-44db-ad21-032f973c657f">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<configured-by-url>true</configured-by-url>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
@@ -1,2 +0,0 @@
#n:information_schema
!<md> [null, 0, null, null, -2147483648, -2147483648]
@@ -1,2 +0,0 @@
#n:jor-r
!<md> [0, 0, null, null, -2147483648, -2147483648]
@@ -1,2 +0,0 @@
#n:jor
!<md> [0, 0, null, null, -2147483648, -2147483648]
@@ -1,2 +0,0 @@
#n:mysql
!<md> [null, 0, null, null, -2147483648, -2147483648]
@@ -1,2 +0,0 @@
#n:performance_schema
!<md> [null, 0, null, null, -2147483648, -2147483648]
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>
@@ -1,4 +0,0 @@
<changelist name="Add_combo_box_for_box_input" date="1723454080052" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/Add_combo_box_for_box_input/shelved.patch" />
<option name="DESCRIPTION" value="Add combo box for box input" />
</changelist>
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
<changelist name="AdjustableMeterTest_cs_unit_Test" date="1708186855829" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/AdjustableMeterTest_cs_unit_Test/shelved.patch" />
<option name="DESCRIPTION" value="AdjustableMeterTest.cs unit Test" />
</changelist>
@@ -1,97 +0,0 @@
Index: TBFTests/Rig/Modbus/Meret/AdjustableScale/AdjustableMeterTest.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBFTests/Rig/Modbus/Meret/AdjustableScale/AdjustableMeterTest.cs b/TBFTests/Rig/Modbus/Meret/AdjustableScale/AdjustableMeterTest.cs
new file mode 100644
--- /dev/null (date 1706131720128)
+++ b/TBFTests/Rig/Modbus/Meret/AdjustableScale/AdjustableMeterTest.cs (date 1706131720128)
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using Config.Entities;
+using JetBrains.Annotations;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using TBF.Rig.Modbus.Meret.AdjustableScale;
+
+namespace TBFTests.Rig.Modbus.Meret.AdjustableScale
+{
+ [TestClass]
+ [TestSubject(typeof(AdjustableMeter))]
+ public class AdjustableMeterTest
+ {
+
+ /**
+ * new typ of linear correction - limit less from Hi
+ */
+ [TestMethod]
+ public void GetCorrection()
+ {
+
+ double rawValue, expectedVal;
+ IList<MeasurementCorrection> corrections;
+
+ corrections = new List<MeasurementCorrection>(2);
+ MeasurementCorrection Lo, Hi;
+ Lo = new MeasurementCorrection(1);
+ Lo.Measurement = 0.00; //CorrectionValLo;
+ Lo.Correction = 0.0F; //MsrdValLimLo;
+ corrections.Add(Lo);
+ Hi = new MeasurementCorrection(2);
+ Hi.Measurement = 0.22F;//CorrectionValHi;
+ Hi.Correction = 2.0F;//MsrdValLimHi;
+ corrections.Add(Hi);
+
+
+ expectedVal = Lo.Correction;
+ rawValue = Lo.Measurement; //Ampers
+
+ double CorrectionVal = AdjustableMeter.GetCorrectionLimitLessHi(rawValue, corrections);
+ Console.WriteLine("{0} Correction - rawValue: {1} CorrectionVal: {2}", "TEST " + rawValue, rawValue, CorrectionVal);
+ Assert.IsTrue(expectedVal == CorrectionVal);
+
+ expectedVal = Hi.Correction;
+ rawValue = Hi.Measurement; //Ampers
+
+ CorrectionVal = AdjustableMeter.GetCorrectionLimitLessHi(rawValue, corrections);
+ Console.WriteLine("{0} Correction - rawValue: {1} CorrectionVal: {2}", "TEST " + rawValue, rawValue, CorrectionVal);
+ Assert.IsTrue(expectedVal == CorrectionVal);
+
+ double toler = 0.01;
+ expectedVal = Hi.Correction * 2.0;
+ rawValue = Hi.Measurement * 2.0; //Ampers
+
+ CorrectionVal = AdjustableMeter.GetCorrectionLimitLessHi(rawValue, corrections);
+ Console.WriteLine("{0} Correction - rawValue: {1} CorrectionVal: {2}", "TEST " + rawValue, rawValue, CorrectionVal);
+ Assert.IsTrue((expectedVal + toler) >= CorrectionVal && (expectedVal - toler) <= CorrectionVal);
+
+ corrections = new List<MeasurementCorrection>(2);
+ Lo = new MeasurementCorrection(1);
+ Lo.Measurement = 0.04; //CorrectionValLo;
+ Lo.Correction = 0.0F; //MsrdValLimLo;
+ corrections.Add(Lo);
+ Hi = new MeasurementCorrection(2);
+ Hi.Measurement = 0.22F;//CorrectionValHi;
+ Hi.Correction = 2.0F;//MsrdValLimHi;
+ corrections.Add(Hi);
+
+ toler = 0.3;
+ expectedVal = 1.24; //bar
+ rawValue = 0.152; //Ampers
+
+ CorrectionVal = AdjustableMeter.GetCorrectionLimitLessHi(rawValue, corrections);
+ Console.WriteLine("{0} Correction - rawValue: {1} CorrectionVal: {2}", "TEST " + rawValue, rawValue, CorrectionVal);
+ Assert.IsTrue((expectedVal + toler) >= CorrectionVal && (expectedVal - toler) <= CorrectionVal);
+
+ toler = 0.0001;
+ expectedVal = 1.0;
+ rawValue = Lo.Measurement + ((Hi.Measurement - Lo.Measurement) / 2.0); //Ampers 0.129999999403954
+
+ CorrectionVal = AdjustableMeter.GetCorrectionLimitLessHi(rawValue, corrections);
+ Console.WriteLine("{0} Correction - rawValue: {1} CorrectionVal: {2}", "TEST " + rawValue, rawValue, CorrectionVal);
+ Assert.IsTrue((expectedVal + toler) >= CorrectionVal && (expectedVal - toler) <= CorrectionVal);
+ }
+ }
+}
\ No newline at end of file
@@ -1,4 +0,0 @@
<changelist name="DB_test_-_purchase_order" date="1725258409183" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/DB_test_-_purchase_order/shelved.patch" />
<option name="DESCRIPTION" value="DB test - purchase order" />
</changelist>
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
<changelist name="Frequency_Meter_From_UniCB" date="1708416562473" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/Frequency_Meter_From_UniCB/shelved.patch" />
<option name="DESCRIPTION" value="Frequency Meter From UniCB" />
</changelist>
@@ -1,687 +0,0 @@
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfg.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfg.cs b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfg.cs
new file mode 100644
--- /dev/null (date 1708352606823)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfg.cs (date 1708352606823)
@@ -0,0 +1,51 @@
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using Common;
+using Config.Entities;
+using TBF.Rig.Generic;
+
+namespace TBF.Rig.RegisterReaders.FrequencyMeterFromUniCB
+{
+ public class RRCfg : ComponentCfgBase, Generic.IChildComponentCfg
+ {
+
+ public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(RRCfg) })[0];
+ public override XmlSerializer GetSerializer() { return Serializer; }
+
+ IComponentCfgCtrl IComponentCfg.GetControl(IList<Component> cmpntEntities) { return new RRCfgCtrl(); }
+
+ ///
+ /// Serialized parameters
+ ///
+ public int Position; /// 1..nrWaterMeters
+
+ /// <summary> Procedure parameters </summary>
+ [XmlIgnore]
+ public RRProcParams ProcParams;
+ public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
+ public override IParamsProvider CreateProcParamsProvider() { return new RRProcParams(true); }
+
+ /// Private parameterless constructor invoked by all other (public) constructors
+ RRCfg()
+ {
+ ProcParams = new RRProcParams(true);
+ }
+
+ public RRCfg(string name, IComponentFactory factory)
+ : this()
+ {
+ Name = name;
+ Factory = factory;
+ ParentName = "UniCB";
+ Position = 1;
+ }
+
+ string IComponentCfg.ToString(int i)
+ {
+ return string.Format("Name={0}, Parent={1}, Position={2}",
+ Name,
+ (string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
+ Position);
+ }
+ }
+}
\ No newline at end of file
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.cs b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.cs
new file mode 100644
--- /dev/null (date 1708352608817)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.cs (date 1708352608817)
@@ -0,0 +1,106 @@
+///
+/// Copyright (c) 2021 Sensus Slovensko a.s.
+///
+using System;
+using System.Windows.Forms;
+using Common;
+using TBF.Rig.Generic;
+using TBF.UI.Bench.Components;
+
+namespace TBF.Rig.RegisterReaders.FrequencyMeterFromUniCB
+{
+ public partial class RRCfgCtrl : UserControl, IComponentCfgCtrl
+ {
+ ComponentParametersDlg parent;
+
+ bool IComponentCfgCtrl.ShowMore { get { return false; } }
+
+ RRCfg config;
+
+ IComponentCfg IComponentCfgCtrl.Config
+ {
+ get { return config as IComponentCfg; }
+ set
+ {
+ config = value as RRCfg;
+ Redraw();
+ }
+ }
+
+ public RRCfgCtrl()
+ {
+ InitializeComponent();
+ }
+
+ private void RegisterReaderCfgCtrl_Load(object sender, EventArgs e)
+ {
+ parent = ParentForm as ComponentParametersDlg;
+ if (parent == null) return;
+
+ if (parent.CmpntEntities != null)
+ {
+ foreach (var cmpnt in parent.CmpntEntities)
+ {
+ if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is ControlBoard.Uni.Factory)
+ {
+ parentNameComboBox.Items.Add(cmpnt.Name);
+ }
+ }
+ }
+
+ Redraw();
+ }
+
+ void IComponentCfgCtrl.Closing()
+ {
+ }
+
+ void Redraw()
+ {
+ if (config == null) return; /// Control was not loaded, settings were not changed
+
+ componentNameLabel.Text = config.Factory.ClassName;
+ nameTextBox.Text = config.Name;
+ parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
+ positionTextBox.Text = config.Position.ToString();
+ }
+
+ void IComponentCfgCtrl.Unlock()
+ {
+ nameTextBox.Enabled = true;
+ parentNameComboBox.Enabled = true;
+ positionTextBox.Enabled = true;
+ }
+
+ CfgUpdateFlags IComponentCfgCtrl.VerifyCfg(ref string message)
+ {
+ CfgUpdateFlags flags = CfgUpdateFlags.None;
+
+ int dummy;
+ if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
+ {
+ flags |= CfgUpdateFlags.Error;
+ message += Environment.NewLine + "Invalid 'Parent Name'";
+ }
+ if (!int.TryParse(positionTextBox.Text, out dummy) || (dummy < 1))
+ {
+ flags |= CfgUpdateFlags.Error;
+ message += Environment.NewLine + "'Position' should be >= 1";
+ }
+ return flags;
+ }
+
+ CfgUpdateFlags IComponentCfgCtrl.UpdateCfg()
+ {
+ CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
+
+ if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
+
+ config.Name = nameTextBox.Text;
+ config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
+ config.Position = int.Parse(positionTextBox.Text);
+
+ return flags;
+ }
+ }
+}
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.designer.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.designer.cs b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.designer.cs
new file mode 100644
--- /dev/null (date 1708348624609)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.designer.cs (date 1708348624609)
@@ -0,0 +1,133 @@
+///
+/// Copyright (c) 2021 Sensus Slovensko a.s.
+///
+namespace TBF.Rig.RegisterReaders.FrequencyMeterFromUniCB
+{
+ partial class RRCfgCtrl
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.positionTextBox = new System.Windows.Forms.TextBox();
+ this.positionLabel = new System.Windows.Forms.Label();
+ this.parentNameLabel = new System.Windows.Forms.Label();
+ this.nameTextBox = new System.Windows.Forms.TextBox();
+ this.nameLabel = new System.Windows.Forms.Label();
+ this.componentNameLabel = new System.Windows.Forms.Label();
+ this.parentNameComboBox = new System.Windows.Forms.ComboBox();
+ this.SuspendLayout();
+ //
+ // positionTextBox
+ //
+ this.positionTextBox.Enabled = false;
+ this.positionTextBox.Location = new System.Drawing.Point(136, 119);
+ this.positionTextBox.Name = "positionTextBox";
+ this.positionTextBox.Size = new System.Drawing.Size(46, 20);
+ this.positionTextBox.TabIndex = 6;
+ //
+ // positionLabel
+ //
+ this.positionLabel.AutoSize = true;
+ this.positionLabel.Location = new System.Drawing.Point(26, 122);
+ this.positionLabel.Name = "positionLabel";
+ this.positionLabel.Size = new System.Drawing.Size(44, 13);
+ this.positionLabel.TabIndex = 5;
+ this.positionLabel.Text = "Position";
+ //
+ // parentNameLabel
+ //
+ this.parentNameLabel.AutoSize = true;
+ this.parentNameLabel.Location = new System.Drawing.Point(26, 96);
+ this.parentNameLabel.Name = "parentNameLabel";
+ this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
+ this.parentNameLabel.TabIndex = 3;
+ this.parentNameLabel.Text = "Parent Name";
+ //
+ // nameTextBox
+ //
+ this.nameTextBox.Enabled = false;
+ this.nameTextBox.Location = new System.Drawing.Point(136, 67);
+ this.nameTextBox.Name = "nameTextBox";
+ this.nameTextBox.Size = new System.Drawing.Size(130, 20);
+ this.nameTextBox.TabIndex = 2;
+ //
+ // nameLabel
+ //
+ this.nameLabel.AutoSize = true;
+ this.nameLabel.Location = new System.Drawing.Point(26, 70);
+ this.nameLabel.Name = "nameLabel";
+ this.nameLabel.Size = new System.Drawing.Size(35, 13);
+ this.nameLabel.TabIndex = 1;
+ this.nameLabel.Text = "Name";
+ //
+ // componentNameLabel
+ //
+ this.componentNameLabel.AutoSize = true;
+ this.componentNameLabel.Location = new System.Drawing.Point(133, 43);
+ this.componentNameLabel.Name = "componentNameLabel";
+ this.componentNameLabel.Size = new System.Drawing.Size(83, 13);
+ this.componentNameLabel.TabIndex = 0;
+ this.componentNameLabel.Text = "ComonentName";
+ //
+ // parentNameComboBox
+ //
+ this.parentNameComboBox.Enabled = false;
+ this.parentNameComboBox.FormattingEnabled = true;
+ this.parentNameComboBox.Location = new System.Drawing.Point(136, 93);
+ this.parentNameComboBox.Name = "parentNameComboBox";
+ this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
+ this.parentNameComboBox.TabIndex = 4;
+ //
+ // RegisterReaderCfgCtrl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.parentNameComboBox);
+ this.Controls.Add(this.positionTextBox);
+ this.Controls.Add(this.positionLabel);
+ this.Controls.Add(this.parentNameLabel);
+ this.Controls.Add(this.nameTextBox);
+ this.Controls.Add(this.nameLabel);
+ this.Controls.Add(this.componentNameLabel);
+ this.Name = "RegisterReaderCfgCtrl";
+ this.Size = new System.Drawing.Size(300, 200);
+ this.Load += new System.EventHandler(this.RegisterReaderCfgCtrl_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox positionTextBox;
+ private System.Windows.Forms.Label positionLabel;
+ private System.Windows.Forms.Label parentNameLabel;
+ private System.Windows.Forms.TextBox nameTextBox;
+ private System.Windows.Forms.Label nameLabel;
+ private System.Windows.Forms.Label componentNameLabel;
+ private System.Windows.Forms.ComboBox parentNameComboBox;
+ }
+}
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.resx
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.resx b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.resx
new file mode 100644
--- /dev/null (date 1703243321441)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRCfgCtrl.resx (date 1703243321441)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRProcParams.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRProcParams.cs b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRProcParams.cs
new file mode 100644
--- /dev/null (date 1708352610233)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/RRProcParams.cs (date 1708352610233)
@@ -0,0 +1,132 @@
+///
+/// Copyright (c) 2021 Sensus Slovensko a.s.
+///
+using System;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+using Common;
+using Config.Entities;
+using TBF.Rig.Generic;
+using TBF.Resources;
+
+namespace TBF.Rig.RegisterReaders.FrequencyMeterFromUniCB
+{
+ public class RRProcParams : ProcedureParamsBase, IParamsProvider, IProcedureParams
+ {
+ public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(RRProcParams) })[0];
+ public override XmlSerializer GetSerializer() { return Serializer; }
+
+ public double PulsesPerLtr; /// [l^-1]
+ public int Filter;
+
+ public override void InitializeAll()
+ {
+ PulsesPerLtr = 1.0;
+ Filter = 0;
+ }
+
+ string[] paramNames = new string[]
+ {
+ Strings.PulsesPerLtr,
+ Strings.Filter,
+ };
+ public override string ParamName(int i) { return paramNames[i]; }
+ public override int ParamsCount() { return paramNames.Length; }
+
+ public override string ToString(int i)
+ {
+ switch (i)
+ {
+ case 0: return PulsesPerLtr.ToString();
+ case 1: return Filter.ToString();
+ default: return string.Empty;
+ }
+ }
+
+ /// Retrieves parameters from UI controls
+ CfgUpdateFlags IParamsProvider.UpdateParam(int i, string strValue)
+ {
+ switch (i)
+ {
+ case 0: PulsesPerLtr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.None;
+ case 1: Filter = int.Parse(strValue); return CfgUpdateFlags.None;
+ default: return CfgUpdateFlags.None;
+ }
+ }
+
+ /// Verifies whether strings in UI controls represent valid parameters
+ bool IParamsProvider.ValidateParam(int i, string strValue, out string message)
+ {
+ message = string.Empty;
+
+ double dummy;
+ int idummy;
+ switch (i)
+ {
+ case 0:
+ if (Utils.TryParseUDouble(strValue, out dummy)) return true;
+ break;
+
+ case 1:
+ if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
+ break;
+
+ default:
+ message = "Invalid index";
+ return false;
+ }
+
+ message = ParamName(i) + " is invalid";
+ return false;
+ }
+
+ void CopyContentTo(RRProcParams prms)
+ {
+ prms.PulsesPerLtr = this.PulsesPerLtr;
+ prms.Filter = this.Filter;
+ }
+
+ IParamsProvider IParamsProvider.Clone()
+ {
+ RRProcParams pars = new RRProcParams();
+ CopyContentTo(pars);
+ return pars;
+ }
+
+ public override void UpdateFromDbEntity(ComponentProcedure dbEntity)
+ {
+ if (dbEntity == null) return;
+ try
+ {
+ RRProcParams tmp = Serializer.Deserialize(new StringReader(dbEntity.Parameters)) as RRProcParams;
+
+ procedureParamsEntity = dbEntity;
+ componentName = dbEntity.CmpntName;
+ procedure = dbEntity.Procedure;
+
+ if (tmp != null) tmp.CopyContentTo(this);
+ }
+ catch
+ {
+ }
+ }
+
+
+ public RRProcParams()
+ {
+ }
+
+ public RRProcParams(bool initialize)
+ {
+ if (initialize) InitializeAll();
+ }
+
+ public RRProcParams(ComponentProcedure procedureParamsEntity, string componentName, Procedure procedure)
+ {
+ this.procedureParamsEntity = procedureParamsEntity;
+ this.componentName = componentName;
+ this.procedure = procedure;
+ }
+ }
+}
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/Factory.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/Factory.cs b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/Factory.cs
new file mode 100644
--- /dev/null (date 1708352610236)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/Factory.cs (date 1708352610236)
@@ -0,0 +1,24 @@
+using System.Collections.Generic;
+using Config.Entities;
+using TBF.Rig.Generic;
+
+namespace TBF.Rig.RegisterReaders.FrequencyMeterFromUniCB
+{
+ public class Factory : IComponentFactory
+ {
+ string IComponentFactory.ClassName { get { return GetType().Namespace.Substring(8); } }
+
+ public override string ToString() { return ClassName; }
+
+ IComponent IComponentFactory.DummyComponent() { return new FrequencyRegisterReader(); }
+
+ IComponent IComponentFactory.GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new FrequencyRegisterReader(cfg, components); }
+
+ IComponentCfg IComponentFactory.DefaultConfig() { return new RRCfg("Puls", this); }
+
+ IComponentCfg IComponentFactory.CmpntCfgFromCmpntEntity(Component component)
+ {
+ throw new System.NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
Index: TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/FrequencyRegisterReader.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/FrequencyRegisterReader.cs b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/FrequencyRegisterReader.cs
new file mode 100644
--- /dev/null (date 1708352608953)
+++ b/TBF/Rig/RegisterReaders/FrequencyMeterFromUniCB/FrequencyRegisterReader.cs (date 1708352608953)
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using Common;
+using log4net;
+using TBF.Rig.GenericDevices;
+
+namespace TBF.Rig.RegisterReaders.FrequencyMeterFromUniCB
+{
+ public class FrequencyRegisterReader : ComponentBase, GenericDevices.IRegReader
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(FrequencyRegisterReader));
+
+ public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
+
+ readonly RRCfg rrCfg;
+ readonly TBF.Rig.ControlBoard.IControlBoard cb;
+
+ int IRegReader.Position { get{ return rrCfg.Position; } }
+ Common.RegisterReaderType IRegReader.RegisterReaderType { get { return Common.RegisterReaderType.Pulses; } }
+ double IRegReader.PulsesPerLtr { get { return rrCfg.ProcParams.PulsesPerLtr; } }
+ double IRegReader.LtrsPerPulse { get { return (PulsesPerLtr <= float.Epsilon) ? 1.0 : (1 / PulsesPerLtr); ; } }
+ public int Filter { get { return rrCfg.ProcParams.Filter; } }
+
+ int IRegReader.WMPulses { get { return cb.PulsesWM(Position); } }
+ int IRegReader.WMRefPulses { get { return cb.RefPulsesWM(Position); } }
+ double IRegReader.WMVolume { get { return LtrsPerPulse * Convert.ToDouble(WMPulses); } }
+
+ double IRegReader.BeginWMState { get { return 0; } } /// Always 0
+ double IRegReader.EndWMState { get { return WMVolume; } } /// Derived from WMVolume
+
+
+ public FrequencyRegisterReader() { }
+
+ public FrequencyRegisterReader(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
+ : base(cfg)
+ {
+ rrCfg = cfg as RRCfg;
+
+ cb = TbfComponents.FindComponent(cfg.ParentName, components) as TBF.Rig.ControlBoard.IControlBoard;
+ if (cb == null) throw new Exception("Cannot find " + Name + " parent");
+
+ log.Warn(this.ToString());
+ }
+
+ public override void Initialize() { }
+ }
+}
\ No newline at end of file
-4
View File
@@ -1,4 +0,0 @@
<changelist name="NEXT_5_24_2024" date="1716547261313" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/NEXT_5_24_2024/shelved.patch" />
<option name="DESCRIPTION" value="NEXT_5/24/2024" />
</changelist>
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Pressure_meter_test" date="1704310942302" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/Pressure_meter_test/shelved.patch" />
<option name="DESCRIPTION" value="Pressure meter test" />
</changelist>
@@ -1,156 +0,0 @@
Index: TBFTests/Rig/Modbus/PressureMeter/AdjustableScale/PressureMeterTests.cs
===================================================================
diff --git a/TBFTests/Rig/Modbus/PressureMeter/AdjustableScale/PressureMeterTests.cs b/TBFTests/Rig/Modbus/PressureMeter/AdjustableScale/PressureMeterTests.cs
deleted file mode 100644
--- a/TBFTests/Rig/Modbus/PressureMeter/AdjustableScale/PressureMeterTests.cs (revision 0ad8bc6d759d868e021fc7087d3db5ba55f6a354)
+++ /dev/null (revision 0ad8bc6d759d868e021fc7087d3db5ba55f6a354)
@@ -1,148 +0,0 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using TBF.Rig.Modbus.PressureMeter.AdjustableScale;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using TBF.Rig.Generic;
-using Moq;
-
-
-
-
-namespace TBF.Rig.Modbus.PressureMeter.AdjustableScale.Tests
-{
- [TestClass()]
- public class PressureMeterTests
- {
-
-
-
- [TestMethod()]
- public void ToStringTest()
- {
- Factory factory = new Factory();
- IList<Generic.IComponent> list = new List<Generic.IComponent>();
- list.Add(factory.DummyComponent());
- PressureMeter meter = new PressureMeter(factory.DefaultConfig(), list);
-
- string str = meter.ToString();
- Assert.IsTrue(str == "Modbus.PressureMeter.AdjustableScale(Pr(Modbus) address=49)");
-
- }
-
- /* [TestMethod()]
- public void PressureMeterTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void PressureMeterTest1()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void InitializeTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void RunDeviceBeforeTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void RunDeviceAfterTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void StopDeviceTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void StopDevice2Test()
- {
- Assert.Fail();
- }*/
-
- class PressureMeterSpy : PressureMeter
- {
- public PressureMeterSpy(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
- :base(cfg, components)
- {
-
- }
-
- public new void InitModbus()
- {
- Console.Write("I am here!");
- }
-
- }
-
- [TestMethod()]
- public void ReadPressureTest()
- {
- Factory factory = new Factory();
- IList<Generic.IComponent> list = new List<Generic.IComponent>();
- list.Add(factory.DummyComponent());
-
-
-
- IComponentCfg componentCfg = factory.DefaultConfig();
- PressureMeterCfg pressureMeterCfg = (PressureMeterCfg) componentCfg;
-
- pressureMeterCfg.CorrectionValLo = 0.4;
- pressureMeterCfg.CorrectionValHi = 2.4;
- pressureMeterCfg.MsrdValLimHi = 2.0;
- pressureMeterCfg.MsrdValLimLo = 0.0;
-
- PressureMeterSpy meter = new PressureMeterSpy(componentCfg, list);
-
-
-
- meter.Initialize();
-
- double MeasuredVal = meter.MeasuredVal;
-
-
- double value = meter.ReadPressure();
- Assert.IsTrue(value == 0.0);
-
- }
-
- /*
- [TestMethod()]
- public void ReadPressureOpTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void ReadPressureOpTest1()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void ConditionNameTest()
- {
- Assert.Fail();
- }
-
- [TestMethod()]
- public void ConditionOpTest()
- {
- Assert.Fail();
- }*/
- }
-}
\ No newline at end of file
@@ -1,4 +0,0 @@
<changelist name="TBF_project_configuration_backup" date="1708187009519" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/TBF_project_configuration_backup/shelved.patch" />
<option name="DESCRIPTION" value="TBF project configuration backup" />
</changelist>
@@ -1,55 +0,0 @@
Index: TBF/app.config
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+><?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n <configSections>\r\n <section name=\"oracle.manageddataaccess.client\"\r\n type=\"OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342\"/>\r\n </configSections>\r\n <startup>\r\n <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.7.2\"/>\r\n </startup>\r\n <system.data>\r\n <DbProviderFactories>\r\n <remove invariant=\"Oracle.ManagedDataAccess.Client\"/>\r\n <add name=\"ODP.NET, Managed Driver\" invariant=\"Oracle.ManagedDataAccess.Client\" description=\"Oracle Data Provider for .NET, Managed Driver\"\r\n type=\"Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342\"/>\r\n </DbProviderFactories>\r\n </system.data>\r\n <runtime>\r\n <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n <dependentAssembly>\r\n <publisherPolicy apply=\"no\"/>\r\n <assemblyIdentity name=\"Oracle.ManagedDataAccess\" publicKeyToken=\"89b483f429c47342\" culture=\"neutral\"/>\r\n <bindingRedirect oldVersion=\"4.121.0.0 - 4.65535.65535.65535\" newVersion=\"4.122.19.1\"/>\r\n </dependentAssembly>\r\n </assemblyBinding>\r\n </runtime>\r\n <oracle.manageddataaccess.client>\r\n <version number=\"*\">\r\n <dataSources>\r\n <dataSource alias=\"SampleDataSource\" descriptor=\"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) \"/>\r\n </dataSources>\r\n </version>\r\n </oracle.manageddataaccess.client>\r\n</configuration>\r\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/TBF/app.config b/TBF/app.config
--- a/TBF/app.config (revision 153d031125d1637c9f23cea9e25ecff9c68bae9b)
+++ b/TBF/app.config (date 1707773182036)
@@ -1,32 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
- <section name="oracle.manageddataaccess.client"
- type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
+ <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections>
<startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<system.data>
<DbProviderFactories>
- <remove invariant="Oracle.ManagedDataAccess.Client"/>
- <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver"
- type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
+ <remove invariant="Oracle.ManagedDataAccess.Client" />
+ <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
- <publisherPolicy apply="no"/>
- <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral"/>
- <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1"/>
+ <publisherPolicy apply="no" />
+ <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
+ <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
- <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/>
+ <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
</dataSources>
</version>
</oracle.manageddataaccess.client>
@@ -1,4 +0,0 @@
<changelist name="TBF_project_configuration_backup1" date="1708187045753" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/TBF_project_configuration_backup1/shelved.patch" />
<option name="DESCRIPTION" value="TBF project configuration backup" />
</changelist>
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
<changelist name="TestPDFSharpToUseGraphics" date="1708186637637" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/TestPDFSharpToUseGraphics/shelved.patch" />
<option name="DESCRIPTION" value="TestPDFSharpToUseGraphics" />
</changelist>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
<changelist name="Test_set_all_open,_closed_valves" date="1710251068900" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/Test_set_all_open,_closed_valves/shelved.patch" />
<option name="DESCRIPTION" value="Test set all open, closed valves" />
</changelist>
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
<changelist name="Uncommitted_changes_before_Checkout_at_10_11_2024_10_19_AM_[Changes]" date="1728634772275" recycled="false" toDelete="true">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/Uncommitted_changes_before_Checkout_at_10_11_2024_10_19_AM_[Changes]/shelved.patch" />
<option name="DESCRIPTION" value="Uncommitted changes before Checkout at 10/11/2024 10:19 AM [Changes]" />
</changelist>
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
<changelist name="Uncommitted_changes_before_Checkout_at_10_11_2024_10_36_AM_[Changes]" date="1728635764918" recycled="false" toDelete="true">
<option name="PATH" value="$PROJECT_DIR$/.idea/.idea.TBF/.idea/shelf/Uncommitted_changes_before_Checkout_at_10_11_2024_10_36_AM_[Changes]/shelved.patch" />
<option name="DESCRIPTION" value="Uncommitted changes before Checkout at 10/11/2024 10:36 AM [Changes]" />
</changelist>

Some files were not shown because too many files have changed in this diff Show More