diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-13 15:27:16 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-13 15:27:16 +0200 |
| commit | 37b740c1d128d694b9dcbc3669808435b5d88fec (patch) | |
| tree | e94cc6ddc9712dfdad00b7d6041606a0e024e65a /Software | |
| parent | e75cf513acb73558e948d6012b45f221c718dcf7 (diff) | |
| download | Tango-37b740c1d128d694b9dcbc3669808435b5d88fec.tar.gz Tango-37b740c1d128d694b9dcbc3669808435b5d88fec.zip | |
Implemented Gauge Control & Technician module controller item !
Auto generated diagnostics monitors & controllers PMR.
Diffstat (limited to 'Software')
85 files changed, 5457 insertions, 769 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf Binary files differindex a1dced350..632ab86ed 100644 --- a/Software/DB/Tango.mdf +++ b/Software/DB/Tango.mdf diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf Binary files differindex 2b587c81f..1265c49c9 100644 --- a/Software/DB/Tango_log.ldf +++ b/Software/DB/Tango_log.ldf diff --git a/Software/Graphics/controller.png b/Software/Graphics/controller.png Binary files differnew file mode 100644 index 000000000..5794f6cd8 --- /dev/null +++ b/Software/Graphics/controller.png diff --git a/Software/PMR/Messages/ColorLab/ColorSpace.proto b/Software/PMR/Messages/ColorLab/ColorSpace.proto index e25e935f4..f7f162d10 100644 --- a/Software/PMR/Messages/ColorLab/ColorSpace.proto +++ b/Software/PMR/Messages/ColorLab/ColorSpace.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.ColorLab; option java_package = "com.twine.tango.pmr.colorlab"; diff --git a/Software/PMR/Messages/ColorLab/LiquidType.proto b/Software/PMR/Messages/ColorLab/LiquidType.proto index 88ea24c82..255d9607b 100644 --- a/Software/PMR/Messages/ColorLab/LiquidType.proto +++ b/Software/PMR/Messages/ColorLab/LiquidType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.ColorLab; option java_package = "com.twine.tango.pmr.colorlab"; diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index 8ba5158ff..6f7848c9e 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -107,6 +107,8 @@ enum MessageType ThreadJoggingResponse = 2021; ThreadAbortJoggingRequest = 2022; ThreadAbortJoggingResponse = 2023; + SetComponentValueRequest = 2024; + SetComponentValueResponse = 2025; //Printing diff --git a/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto b/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto new file mode 100644 index 000000000..6bba594d5 --- /dev/null +++ b/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto @@ -0,0 +1,129 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +syntax = "proto3"; + +import "DoubleArray.proto"; + +package Tango.PMR.Diagnostics; +option java_package = "com.twine.tango.pmr.diagnostics"; + +message DiagnosticsMonitors +{ + + //Dancer 1 (Min = 0, Max = 255, PPF = 10) + repeated double Dancer1Angle = 1; + + //Dancer 2 (Min = 0, Max = 1200, PPF = 1) + repeated double Dancer2Angle = 2; + + //Dancer 3 (Min = 0, Max = 1200, PPF = 1) + repeated double Dancer3Angle = 3; + + //Feeder Motor (Min = 0, Max = 100, PPF = 1) + repeated double FeederMotorFrequency = 4; + + //Dryer Motor (Min = 0, Max = 100, PPF = 1) + repeated double DryerMotor = 5; + + //Poller Motor (Min = 0, Max = 100, PPF = 1) + repeated double PollerMotor = 6; + + //Winder Motor (Min = 0, Max = 100, PPF = 1) + repeated double WinderMotor = 7; + + //Screw Motor (Min = 0, Max = 100, PPF = 1) + repeated double ScrewMotor = 8; + + //Thread Speed (Min = 0, Max = 100, PPF = 1) + repeated double ThreadSpeed = 9; + + //Mixer (Min = 0, Max = 100, PPF = 1) + repeated double MixerTemperature = 10; + + //Head Zone 1 (Min = 0, Max = 100, PPF = 1) + repeated double HeadZone1Temperature = 11; + + //Head Zone 2 (Min = 0, Max = 100, PPF = 1) + repeated double HeadZone2Temperature = 12; + + //Head Zone 3 (Min = 0, Max = 100, PPF = 1) + repeated double HeadZone3Temperature = 13; + + //Head Air Flow (Min = 0, Max = 100, PPF = 1) + repeated double HeadAirFlow = 14; + + //Feeder Tension (Min = 0, Max = 100, PPF = 1) + repeated double FeederTension = 15; + + //Puller Tension (Min = 0, Max = 100, PPF = 1) + repeated double PullerTension = 16; + + //Dryer Zone 1 (Min = 0, Max = 100, PPF = 1) + repeated double DryerZone1Temperature = 17; + + //Dryer Zone 2 (Min = 0, Max = 100, PPF = 1) + repeated double DryerZone2Temperature = 18; + + //Dryer Zone 3 (Min = 0, Max = 100, PPF = 1) + repeated double DryerZone3Temperature = 19; + + //Dryer Air Flow (Min = 0, Max = 100, PPF = 1) + repeated double DryerAirFlow = 20; + + //Winder Tension (Min = 0, Max = 100, PPF = 1) + repeated double WinderTension = 21; + + //Dispensers Motors (Min = 0, Max = 1080, PPF = 10) Channel Count = 8 + repeated DoubleArray DispensersMotorsFrequency = 22; + + //Dispensers Angular Encoders (Min = 0, Max = 100, PPF = 1) Channel Count = 8 + repeated DoubleArray DispensersAngularEncoders = 23; + + //Dispensers Linear Positions (Min = 0, Max = 100, PPF = 1) Channel Count = 8 + repeated DoubleArray DispensersLinearPositions = 24; + + //Dispensers Pressure (Min = 0, Max = 100, PPF = 1) Channel Count = 8 + repeated DoubleArray DispensersPressure = 25; + + //Mid Tank Pressure (Min = 0, Max = 100, PPF = 1) + repeated double MidTankPressure = 26; + + //Filter Delta Pressure (Min = 0, Max = 100, PPF = 1) + repeated double FilterDeltaPressure = 27; + + //Chiller Temperature (Min = 0, Max = 100, PPF = 1) + repeated double ChillerTemperature = 28; + + //Dispenser 1 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser1MotorFrequency = 29; + + //Dispenser 2 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser2MotorFrequency = 30; + + //Dispenser 3 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser3MotorFrequency = 31; + + //Dispenser 4 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser4MotorFrequency = 32; + + //Dispenser 5 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser5MotorFrequency = 33; + + //Dispenser 6 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser6MotorFrequency = 34; + + //Dispenser 7 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser7MotorFrequency = 35; + + //Dispenser 8 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + repeated double Dispenser8MotorFrequency = 36; + +} diff --git a/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto b/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto index c6af16fce..5a0940b78 100644 --- a/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto +++ b/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto @@ -1,35 +1,25 @@ syntax = "proto3"; -import "DoubleArray.proto"; import "DigitalPin.proto"; +import "ValueComponentState.proto"; +import "DiagnosticsMonitors.proto"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; message PushDiagnosticsResponse { - repeated double Dancer1Angle = 1; - repeated double Dancer2Angle = 2; - repeated double Dancer3Angle = 3; - - //Dispensers Motors Frequency Multi - repeated DoubleArray DispensersMotorsFrequency = 4; - - //Dispensers Motors Frequency Singles - repeated double Dispenser1MotorFrequency = 5; - repeated double Dispenser2MotorFrequency = 6; - repeated double Dispenser3MotorFrequency = 7; - repeated double Dispenser4MotorFrequency = 8; - repeated double Dispenser5MotorFrequency = 9; - repeated double Dispenser6MotorFrequency = 10; - repeated double Dispenser7MotorFrequency = 11; - repeated double Dispenser8MotorFrequency = 12; + //Monitors + DiagnosticsMonitors Monitors = 1; //Digital Pins States - repeated DigitalPin DigitalPins = 13; + repeated DigitalPin DigitalPins = 2; + + //Value Components Effective Values + repeated ValueComponentState ComponentsStates = 3; //Software Information - string Version = 14; - string VersionName = 15; - string VersionBuildDate = 16; + string Version = 4; + string VersionName = 5; + string VersionBuildDate = 6; }
\ No newline at end of file diff --git a/Software/PMR/Messages/Diagnostics/SetComponentValueRequest.proto b/Software/PMR/Messages/Diagnostics/SetComponentValueRequest.proto new file mode 100644 index 000000000..c38ec90d6 --- /dev/null +++ b/Software/PMR/Messages/Diagnostics/SetComponentValueRequest.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +import "ValueComponent.proto"; + +package Tango.PMR.Diagnostics; +option java_package = "com.twine.tango.pmr.diagnostics"; + +message SetComponentValueRequest +{ + ValueComponent Component = 1; + double Value = 2; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/Diagnostics/SetComponentValueResponse.proto b/Software/PMR/Messages/Diagnostics/SetComponentValueResponse.proto new file mode 100644 index 000000000..e590d0778 --- /dev/null +++ b/Software/PMR/Messages/Diagnostics/SetComponentValueResponse.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.Diagnostics; +option java_package = "com.twine.tango.pmr.diagnostics"; + +message SetComponentValueResponse +{ + +}
\ No newline at end of file diff --git a/Software/PMR/Messages/Diagnostics/ValueComponent.proto b/Software/PMR/Messages/Diagnostics/ValueComponent.proto new file mode 100644 index 000000000..a6bc1a50a --- /dev/null +++ b/Software/PMR/Messages/Diagnostics/ValueComponent.proto @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +syntax = "proto3"; + +package Tango.PMR.Diagnostics; +option java_package = "com.twine.tango.pmr.diagnostics"; + +enum ValueComponent +{ + + //Heater 1 Temperature (Min = 0, Max = 100) + Heater1Temp = 0; + + //Heater 2 Temperature (Min = 0, Max = 100) + Heater2Temp = 1; + +} diff --git a/Software/PMR/Messages/Diagnostics/ValueComponentState.proto b/Software/PMR/Messages/Diagnostics/ValueComponentState.proto new file mode 100644 index 000000000..d22c7ba97 --- /dev/null +++ b/Software/PMR/Messages/Diagnostics/ValueComponentState.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +import "ValueComponent.proto"; + +package Tango.PMR.Diagnostics; +option java_package = "com.twine.tango.pmr.diagnostics"; + +message ValueComponentState +{ + ValueComponent Component = 1; + double Value = 2; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/Hardware/HardwareDancer.proto b/Software/PMR/Messages/Hardware/HardwareDancer.proto index 43b9435ee..5933b7cb4 100644 --- a/Software/PMR/Messages/Hardware/HardwareDancer.proto +++ b/Software/PMR/Messages/Hardware/HardwareDancer.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; import "HardwareDancerType.proto"; diff --git a/Software/PMR/Messages/Hardware/HardwareDancerType.proto b/Software/PMR/Messages/Hardware/HardwareDancerType.proto index f61b00ec3..b51f10c7a 100644 --- a/Software/PMR/Messages/Hardware/HardwareDancerType.proto +++ b/Software/PMR/Messages/Hardware/HardwareDancerType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Hardware; option java_package = "com.twine.tango.pmr.hardware"; @@ -8,10 +16,13 @@ option java_package = "com.twine.tango.pmr.hardware"; enum HardwareDancerType { + //Left Dancer LeftDancer = 0; + //Middle Dancer MiddleDancer = 1; + //Right Dancer RightDancer = 2; } diff --git a/Software/PMR/Messages/Hardware/HardwareDispenser.proto b/Software/PMR/Messages/Hardware/HardwareDispenser.proto index 7e8461193..ab5d766df 100644 --- a/Software/PMR/Messages/Hardware/HardwareDispenser.proto +++ b/Software/PMR/Messages/Hardware/HardwareDispenser.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; import "HardwareDispenserType.proto"; diff --git a/Software/PMR/Messages/Hardware/HardwareDispenserType.proto b/Software/PMR/Messages/Hardware/HardwareDispenserType.proto index fd723f896..21dc87530 100644 --- a/Software/PMR/Messages/Hardware/HardwareDispenserType.proto +++ b/Software/PMR/Messages/Hardware/HardwareDispenserType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Hardware; option java_package = "com.twine.tango.pmr.hardware"; diff --git a/Software/PMR/Messages/Hardware/HardwareMotor.proto b/Software/PMR/Messages/Hardware/HardwareMotor.proto index accc2a5ff..dbce226c7 100644 --- a/Software/PMR/Messages/Hardware/HardwareMotor.proto +++ b/Software/PMR/Messages/Hardware/HardwareMotor.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; import "HardwareMotorType.proto"; diff --git a/Software/PMR/Messages/Hardware/HardwareMotorType.proto b/Software/PMR/Messages/Hardware/HardwareMotorType.proto index 46c6911f9..d67bb5b0a 100644 --- a/Software/PMR/Messages/Hardware/HardwareMotorType.proto +++ b/Software/PMR/Messages/Hardware/HardwareMotorType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Hardware; option java_package = "com.twine.tango.pmr.hardware"; @@ -8,12 +16,16 @@ option java_package = "com.twine.tango.pmr.hardware"; enum HardwareMotorType { + //Winder Motor WinderMotor = 0; + //Feeder Motor FeederMotor = 1; + //Dryer Motor DryerMotor = 2; + //Pooler Motor PoolerMotor = 3; } diff --git a/Software/PMR/Messages/Hardware/HardwarePidControl.proto b/Software/PMR/Messages/Hardware/HardwarePidControl.proto index 49f1928cd..d02ea14d1 100644 --- a/Software/PMR/Messages/Hardware/HardwarePidControl.proto +++ b/Software/PMR/Messages/Hardware/HardwarePidControl.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; import "HardwarePidControlType.proto"; diff --git a/Software/PMR/Messages/Hardware/HardwarePidControlType.proto b/Software/PMR/Messages/Hardware/HardwarePidControlType.proto index e9fa9fd30..38785e85b 100644 --- a/Software/PMR/Messages/Hardware/HardwarePidControlType.proto +++ b/Software/PMR/Messages/Hardware/HardwarePidControlType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Hardware; option java_package = "com.twine.tango.pmr.hardware"; @@ -8,32 +16,46 @@ option java_package = "com.twine.tango.pmr.hardware"; enum HardwarePidControlType { + //Dryer Heater 1000w DryerHeater1000w = 0; + //Dryer Heater 200w 1 DryerHeater200w1 = 1; + //Dryer Heater 200w 2 DryerHeater200w2 = 2; + //Head Heater Zone 1 HeadHeaterZ1 = 3; + //Head Heater Zone 2 HeadHeaterZ2 = 4; + //Head Heater Zone 3 HeadHeaterZ3 = 5; + //Head Heater Zone 4 HeadHeaterZ4 = 6; + //Mixer Heater MixerHeater = 7; + //Waste Control WasteControl = 8; + //Dryer Motor MotorDryer = 9; + //Feeder Motor MotorFeeder = 10; + //Pooler Motor MotorPooler = 11; + //Winder Motor MotorWinder = 12; + //Dryer Heater 400 DryerHeater400 = 13; } diff --git a/Software/PMR/Messages/Hardware/HardwareWinder.proto b/Software/PMR/Messages/Hardware/HardwareWinder.proto index a9ba73af2..c00b56c83 100644 --- a/Software/PMR/Messages/Hardware/HardwareWinder.proto +++ b/Software/PMR/Messages/Hardware/HardwareWinder.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; import "HardwareWinderType.proto"; diff --git a/Software/PMR/Messages/Hardware/HardwareWinderType.proto b/Software/PMR/Messages/Hardware/HardwareWinderType.proto index 4064c96af..d3cc0a74e 100644 --- a/Software/PMR/Messages/Hardware/HardwareWinderType.proto +++ b/Software/PMR/Messages/Hardware/HardwareWinderType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Hardware; option java_package = "com.twine.tango.pmr.hardware"; @@ -8,6 +16,7 @@ option java_package = "com.twine.tango.pmr.hardware"; enum HardwareWinderType { + //Internal Winder InternalWinder = 0; } diff --git a/Software/PMR/Messages/Printing/DispenserLiquidType.proto b/Software/PMR/Messages/Printing/DispenserLiquidType.proto index 27757a92d..0288ee949 100644 --- a/Software/PMR/Messages/Printing/DispenserLiquidType.proto +++ b/Software/PMR/Messages/Printing/DispenserLiquidType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Printing; option java_package = "com.twine.tango.pmr.printing"; diff --git a/Software/PMR/Messages/Printing/JobSpool.proto b/Software/PMR/Messages/Printing/JobSpool.proto index a431ff9f8..ba2fb4112 100644 --- a/Software/PMR/Messages/Printing/JobSpool.proto +++ b/Software/PMR/Messages/Printing/JobSpool.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; import "JobSpoolType.proto"; diff --git a/Software/PMR/Messages/Printing/JobSpoolType.proto b/Software/PMR/Messages/Printing/JobSpoolType.proto index c9bc45ed8..afe6b3331 100644 --- a/Software/PMR/Messages/Printing/JobSpoolType.proto +++ b/Software/PMR/Messages/Printing/JobSpoolType.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Printing; option java_package = "com.twine.tango.pmr.printing"; diff --git a/Software/PMR/Messages/Printing/JobWindingMethod.proto b/Software/PMR/Messages/Printing/JobWindingMethod.proto index a567915b7..32c354458 100644 --- a/Software/PMR/Messages/Printing/JobWindingMethod.proto +++ b/Software/PMR/Messages/Printing/JobWindingMethod.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Printing; option java_package = "com.twine.tango.pmr.printing"; @@ -8,8 +16,10 @@ option java_package = "com.twine.tango.pmr.printing"; enum JobWindingMethod { + //Embroidery Winding Embroidery = 0; + //Calibration Winding Calibration = 1; } diff --git a/Software/PMR/Messages/Printing/ProcessParameters.proto b/Software/PMR/Messages/Printing/ProcessParameters.proto index 9f4209571..7fd398fa0 100644 --- a/Software/PMR/Messages/Printing/ProcessParameters.proto +++ b/Software/PMR/Messages/Printing/ProcessParameters.proto @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; package Tango.PMR.Printing; option java_package = "com.twine.tango.pmr.printing"; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml new file mode 100644 index 000000000..60b96bc9d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml @@ -0,0 +1,140 @@ +<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.ControllerElementEditor" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" + xmlns:gauge="clr-namespace:Tango.CircularGauge;assembly=Tango.CircularGauge" + xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors" + xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals" + xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors" + mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:ControllerItem, IsDesignTimeCreatable=False}" Height="245.074" Width="321.75"> + + <UserControl.Resources> + <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter> + <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" /> + + <!--Theme--> + <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush> + <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush> + </UserControl.Resources> + + <UserControl.RenderTransform> + <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform> + </UserControl.RenderTransform> + + <Grid ClipToBounds="False"> + + + <!--Content--> + <Grid ClipToBounds="False" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}"> + <Border> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*" /> + <ColumnDefinition Width="100" /> + </Grid.ColumnDefinitions> + <Viewbox> + <Grid> + <gauge:CircularGaugeControl + Margin="10" + Radius="150" + ScaleRadius="110" + ScaleStartAngle="120" + ScaleSweepAngle="300" + PointerLength="85" + PointerCapRadius="35" + MinValue="{Binding TechController.Min}" + MaxValue="{Binding TechController.Max}" + MajorDivisionsCount="10" + MinorDivisionsCount="5" + CurrentValue="{Binding EffectiveValue}" + ImageSize="40,50" + RangeIndicatorThickness="8" + RangeIndicatorRadius="120" + RangeIndicatorLightRadius="10" + RangeIndicatorLightOffset="80" + ScaleLabelRadius="90" + ScaleLabelSize="40,20" + ScaleLabelFontSize="10" + ScaleLabelForeground="LightGray" + MajorTickSize="10,3" + MinorTickSize="3,1" + MajorTickColor="LightGray" + MinorTickColor="LightGray" + ImageOffset="-50" + GaugeBackgroundColor="Black" + PointerThickness ="16" + OptimalRangeStartValue="300" + OptimalRangeEndValue="700" + DialTextOffset="40" + DialTextColor="Black" + > + + </gauge:CircularGaugeControl> + </Grid> + </Viewbox> + + <Grid Grid.Column="1" HorizontalAlignment="Right"> + <Slider Orientation="Vertical" Margin="15" TickPlacement="None" Minimum="{Binding TechController.Min}" Maximum="{Binding TechController.Max}" Value="{Binding Value,Delay=1000}"> + <Slider.Foreground> + <SolidColorBrush Color="{Binding Color}" /> + </Slider.Foreground> + </Slider> + + <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" FontFamily="../Fonts/#digital-7" TextAlignment="Right" Margin="-80 10 0 0" FontSize="30" Text="{Binding Value,StringFormat=0.00}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding Color}" /> + </TextBlock.Foreground> + </TextBlock> + </Grid> + </Grid> + </Border> + + <Border Margin="0 0 0 -23" VerticalAlignment="Bottom"> + <TextBlock Text="{Binding TechController.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock> + </Border> + </Grid> + <!--Content--> + + + <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected),Converter={StaticResource BoolToVisibilityConverter}}"> + <Grid> + <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter> + + <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + + <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10"> + <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse> + <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle> + <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border> + <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border> + <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border> + <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border> + <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb> + </Grid> + </Grid> + </Border> + </Grid> +</local:ElementEditor> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml.cs new file mode 100644 index 000000000..4d183dac6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.Editors; +using Tango.BL.Entities; +using Tango.MachineStudio.Technician.TechItems; + +namespace Tango.MachineStudio.Technician.Editors +{ + [ContentProperty("InnerContent")] + public partial class ControllerElementEditor : ElementEditor + { + public ControllerElementEditor() + : base() + { + InitializeComponent(); + } + + public ControllerElementEditor(ControllerItem controllerItem) + : this() + { + ControllerItem = controllerItem; + DataContext = ControllerItem; + } + + public ControllerElementEditor(ControllerItem controllerItem, Rect bounds) + : this(controllerItem) + { + Left = bounds.Left; + Top = bounds.Top; + Width = bounds.Width; + Height = bounds.Height; + } + + private ControllerItem _controllerItem; + + public ControllerItem ControllerItem + { + get { return _controllerItem; } + set { _controllerItem = value; RaisePropertyChanged(nameof(ControllerItem)); } + } + + + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> + public override IElementEditor Clone() + { + try + { + var clonedItem = ControllerItem.Clone() as ControllerItem; + ControllerElementEditor cloned = new ControllerElementEditor(clonedItem); + cloned.Top = Top; + cloned.Left = Left; + cloned.Width = Width; + cloned.Height = Height; + cloned.Angle = Angle; + return cloned; + } + catch (Exception ex) + { + throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex); + } + } + + /// <summary> + /// Gets the hosted element. + /// </summary> + [ParameterIgnore] + public override Object HostedElement + { + get { return ControllerItem; } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/controller.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/controller.png Binary files differnew file mode 100644 index 000000000..5794f6cd8 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/controller.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml new file mode 100644 index 000000000..57d807b09 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml @@ -0,0 +1,41 @@ +<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.ControllerTemplate" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker" + xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates" + mc:Ignorable="d" + d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:ControllerItem, IsDesignTimeCreatable=False}"> + + <UserControl.Resources> + <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}"> + <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" /> + <Setter Property="Margin" Value="2" /> + </Style> + </UserControl.Resources> + + <Grid> + <StackPanel> + <GroupBox Header="INPUT"> + <StackPanel> + <TextBlock FontSize="10">Selected Input</TextBlock> + <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechControllers}" SelectedItem="{Binding TechController,Mode=TwoWay}" DisplayMemberPath="Description" /> + + <TextBlock FontSize="10" Margin="0 20 0 0"><Run>Update Interval</Run> <Run Text="{Binding UpdateInterval,StringFormat={}{0:N0} ms,FallbackValue=0}"></Run></TextBlock> + <Slider Margin="0 5 0 0" Minimum="1" Maximum="1000" Value="{Binding UpdateInterval,Mode=TwoWay}"></Slider> + </StackPanel> + </GroupBox> + <GroupBox Header="COLOR" Margin="0 10 0 0"> + <StackPanel> + <Viewbox Margin="0 5 0 0"> + <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" /> + </Viewbox> + </StackPanel> + </GroupBox> + </StackPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml.cs new file mode 100644 index 000000000..624eef296 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Technician.PropertiesTemplates +{ + /// <summary> + /// Interaction logic for MonitorTemplate.xaml + /// </summary> + public partial class ControllerTemplate : UserControl + { + public ControllerTemplate() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj index 56bab4135..ecc235d02 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj @@ -102,6 +102,9 @@ <Compile Include="Converters\TechIosToDigitalInsConverter.cs" /> <Compile Include="Converters\TechIosToDigitalOutsConverter.cs" /> <Compile Include="Converters\TransitionLinkConverter.cs" /> + <Compile Include="Editors\ControllerElementEditor.xaml.cs"> + <DependentUpon>ControllerElementEditor.xaml</DependentUpon> + </Compile> <Compile Include="Editors\DigitalInElementEditor.xaml.cs"> <DependentUpon>DigitalInElementEditor.xaml</DependentUpon> </Compile> @@ -146,6 +149,9 @@ <Compile Include="PropertiesTemplates\DispenserTemplate.xaml.cs"> <DependentUpon>DispenserTemplate.xaml</DependentUpon> </Compile> + <Compile Include="PropertiesTemplates\ControllerTemplate.xaml.cs"> + <DependentUpon>ControllerTemplate.xaml</DependentUpon> + </Compile> <Compile Include="PropertiesTemplates\MotorGroupTemplate.xaml.cs"> <DependentUpon>MotorGroupTemplate.xaml</DependentUpon> </Compile> @@ -164,6 +170,7 @@ <Compile Include="PropertiesTemplates\SingleGraphTemplate.xaml.cs"> <DependentUpon>SingleGraphTemplate.xaml</DependentUpon> </Compile> + <Compile Include="TechItems\ControllerItem.cs" /> <Compile Include="TechItems\DigitalInItem.cs" /> <Compile Include="TechItems\DigitalOutItem.cs" /> <Compile Include="TechItems\MeterItem.cs" /> @@ -202,6 +209,10 @@ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> <Link>GlobalVersionInfo.cs</Link> </Compile> + <Page Include="Editors\ControllerElementEditor.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Editors\DigitalInElementEditor.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -258,6 +269,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="PropertiesTemplates\ControllerTemplate.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="PropertiesTemplates\MotorGroupTemplate.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -342,6 +357,10 @@ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.CircularGauge\Tango.CircularGauge.csproj"> + <Project>{6efd5895-177b-4bbb-af52-29f4d53b3fbd}</Project> + <Name>Tango.CircularGauge</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.ColorPicker\Tango.ColorPicker.csproj"> <Project>{a2f5af44-29ff-45d6-9d25-ecda5cce88b5}</Project> <Name>Tango.ColorPicker</Name> @@ -460,5 +479,8 @@ <ItemGroup> <Resource Include="Images\digital-in.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\controller.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs new file mode 100644 index 000000000..67266ee66 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using System.Xml.Serialization; +using Tango.BL.Entities; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Technician.TechItems +{ + /// <summary> + /// Represents a single component value controller and monitor. + /// </summary> + /// <seealso cref="TechItem" /> + [TechItem(10)] + public class ControllerItem : TechItem + { + /// <summary> + /// Occurs when the controller value has changed. + /// </summary> + public event EventHandler<double> ValueChanged; + + private TechController _techController; + /// <summary> + /// Gets or sets the DB controller item. + /// </summary> + [XmlIgnore] + public TechController TechController + { + get { return _techController; } + set { _techController = value; RaisePropertyChangedAuto(); TechName = _techController != null ? _techController.Description : null; ItemGuid = value != null ? value.Guid : null; } + } + + private double _value; + /// <summary> + /// Gets or sets the component value. + /// </summary> + [XmlIgnore] + public double Value + { + get { return _value; } + set + { + _value = value; RaisePropertyChangedAuto(); + ValueChanged?.Invoke(this, _value); + } + } + + private int _updateInterval; + /// <summary> + /// Gets or sets the update interval. + /// </summary> + public int UpdateInterval + { + get { return _updateInterval; } + set { _updateInterval = value; RaisePropertyChangedAuto(); } + } + + /// <summary> + /// Gets or sets the last update time. + /// </summary> + [XmlIgnore] + public DateTime LastUpdateTime { get; set; } + + + private double _effectiveValue; + /// <summary> + /// Gets or sets the effective value received from the embedded device. + /// </summary> + [XmlIgnore] + public double EffectiveValue + { + get { return _effectiveValue; } + set + { + LastUpdateTime = DateTime.Now; + + if (_effectiveValue != value) + { + _effectiveValue = value; + RaisePropertyChangedAuto(); + } + } + } + + /// <summary> + /// Initializes a new instance of the <see cref="ControllerItem"/> class. + /// </summary> + public ControllerItem() : base() + { + Name = "Value Controller"; + Description = "Single component value controller"; + Image = ResourceHelper.GetImageFromResources("Images/controller.png"); + Color = Colors.DodgerBlue; + LastUpdateTime = DateTime.Now; + UpdateInterval = 10; + } + + /// <summary> + /// Initializes a new instance of the <see cref="ControllerItem"/> class. + /// </summary> + /// <param name="techController">The db tech controller.</param> + public ControllerItem(TechController techController) : this() + { + TechController = techController; + } + + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> + public override TechItem Clone() + { + ControllerItem cloned = base.Clone() as ControllerItem; + cloned.TechController = TechController; + return cloned; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index 44d5d2c5a..e18250594 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -29,6 +29,7 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(ThreadMotionItem))] [XmlInclude(typeof(MotorGroupItem))] [XmlInclude(typeof(DigitalInItem))] + [XmlInclude(typeof(ControllerItem))] public abstract class TechItem : ExtendedObject { /// <summary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index a5a95fc35..63aca3e70 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -39,7 +39,7 @@ namespace Tango.MachineStudio.Technician.ViewModels /// <seealso cref="Tango.MachineStudio.Common.StudioApplication.IShutdownListener" /> public class MachineTechViewVM : ViewModel, IShutdownListener { - private List<PropertyInfo> _diagnoticsDataProperties; + private List<PropertyInfo> _diagnoticsMonitorsDataProperties; private Dictionary<SingleGraphItem, GraphController> _singleControllers; private Dictionary<MultiGraphItem, GraphMultiController> _multiControllers; private static object _elementsLock = new object(); @@ -178,7 +178,7 @@ namespace Tango.MachineStudio.Technician.ViewModels _multiControllers = new Dictionary<MultiGraphItem, GraphMultiController>(); AvailableTechItems = TechItem.GetAvailableTechItems().ToObservableCollection(); SelectedTechItem = AvailableTechItems.FirstOrDefault(); - _diagnoticsDataProperties = typeof(PushDiagnosticsResponse).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList(); + _diagnoticsMonitorsDataProperties = typeof(DiagnosticsMonitors).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList(); ApplicationManager = applicationManager; ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged; @@ -252,11 +252,11 @@ namespace Tango.MachineStudio.Technician.ViewModels if (DateTime.Now > monitorItem.LastUpdateTime.AddMilliseconds(monitorItem.UpdateInterval)) { - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name); if (prop != null) { - monitorItem.Value = GetDataLastValue(monitorItem.TechMonitor, prop.GetValue(data)); + monitorItem.Value = GetDataLastValue(monitorItem.TechMonitor, prop.GetValue(data.Monitors)); } } } @@ -266,11 +266,11 @@ namespace Tango.MachineStudio.Technician.ViewModels if (DateTime.Now > meterItem.LastUpdateTime.AddMilliseconds(meterItem.UpdateInterval)) { - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == meterItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == meterItem.TechMonitor.Name); if (prop != null) { - meterItem.Value = GetDataLastValue(meterItem.TechMonitor, prop.GetValue(data)); + meterItem.Value = GetDataLastValue(meterItem.TechMonitor, prop.GetValue(data.Monitors)); } } } @@ -278,7 +278,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { SingleGraphItem graphItem = item as SingleGraphItem; - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); if (prop != null) { @@ -286,7 +286,7 @@ namespace Tango.MachineStudio.Technician.ViewModels if (_singleControllers.TryGetValue(graphItem, out controller)) { - controller.PushData(GetDataArray(graphItem.TechMonitor, prop.GetValue(data))); + controller.PushData(GetDataArray(graphItem.TechMonitor, prop.GetValue(data.Monitors))); } } } @@ -294,7 +294,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { MultiGraphItem graphItem = item as MultiGraphItem; - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); if (prop != null) { @@ -302,7 +302,7 @@ namespace Tango.MachineStudio.Technician.ViewModels if (_multiControllers.TryGetValue(graphItem, out controller)) { - controller.PushData(GetDataMatrix(graphItem.TechMonitor, prop.GetValue(data))); + controller.PushData(GetDataMatrix(graphItem.TechMonitor, prop.GetValue(data.Monitors))); } } } @@ -328,6 +328,20 @@ namespace Tango.MachineStudio.Technician.ViewModels digitalInItem.Value = digitalPin.Value; } } + else if (item.GetType() == typeof(ControllerItem)) + { + ControllerItem controllerItem = item as ControllerItem; + + if (DateTime.Now > controllerItem.LastUpdateTime.AddMilliseconds(controllerItem.UpdateInterval)) + { + var componentState = data.ComponentsStates.SingleOrDefault(x => (int)x.Component == controllerItem.TechController.Code); + + if (componentState != null) + { + controllerItem.EffectiveValue = componentState.Value; + } + } + } } } } @@ -466,6 +480,11 @@ namespace Tango.MachineStudio.Technician.ViewModels { CreateElement<DigitalInElementEditor, DigitalInItem, TechIo>(bounds, Adapter.TechIos.Where(x => x.Type == IOType.DigitalInput.ToInt32()).FirstOrDefault()); } + else if (item is ControllerItem) + { + var editor = CreateElement<ControllerElementEditor, ControllerItem, TechController>(bounds, Adapter.TechControllers.FirstOrDefault()); + InitControllerItem(editor.ControllerItem); + } } /// <summary> @@ -559,6 +578,11 @@ namespace Tango.MachineStudio.Technician.ViewModels (item as DigitalInItem).TechIo = Adapter.TechIos.FirstOrDefault(x => x.Guid == item.ItemGuid); CreateElement<DigitalInElementEditor>(item); } + else if (item is ControllerItem) + { + (item as ControllerItem).TechController = Adapter.TechControllers.FirstOrDefault(x => x.Guid == item.ItemGuid); + CreateElement<ControllerElementEditor>(item); + } } /// <summary> @@ -651,6 +675,11 @@ namespace Tango.MachineStudio.Technician.ViewModels var motorGroupItem = element.HostedElement as MotorGroupItem; InitMotorGroupItem(motorGroupItem); } + else if (element is ControllerItem) + { + var controllerItem = element.HostedElement as ControllerItem; + InitControllerItem(controllerItem); + } } } @@ -971,6 +1000,29 @@ namespace Tango.MachineStudio.Technician.ViewModels }; } + /// <summary> + /// Initializes the controller item. + /// </summary> + /// <param name="item">The controller item.</param> + private void InitControllerItem(ControllerItem item) + { + item.ValueChanged += async (x, value) => + { + try + { + await MachineOperator.SetComponentValue(new SetComponentValueRequest() + { + Component = (ValueComponent)item.TechController.Code, + Value = value + }); + } + catch (Exception ex) + { + //TODO: Show Exception. + } + }; + } + #endregion #region Public Methods diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml index 5996c351b..3d4ecdac1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml @@ -364,6 +364,9 @@ <DataTemplate DataType="{x:Type sys:Nullable}"> </DataTemplate> + <DataTemplate DataType="{x:Type items:ControllerItem}"> + <templates:ControllerTemplate/> + </DataTemplate> <DataTemplate DataType="{x:Type items:MonitorItem}"> <templates:MonitorTemplate/> </DataTemplate> diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechController.cs b/Software/Visual_Studio/Tango.BL/Entities/TechController.cs new file mode 100644 index 000000000..5f6b14463 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/TechController.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; + +namespace Tango.BL.Entities +{ + [Table("TECH_CONTROLLERS")] + public partial class TechController : ObservableEntity<TechController> + { + + protected Int32 _code; + /// <summary> + /// Gets or sets the techcontroller code. + /// </summary> + [Column("CODE")] + + public Int32 Code + { + get + { + return _code; + } + + set + { + _code = value; RaisePropertyChanged(nameof(Code)); + } + + } + + protected String _name; + /// <summary> + /// Gets or sets the techcontroller name. + /// </summary> + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + _name = value; RaisePropertyChanged(nameof(Name)); + } + + } + + protected String _description; + /// <summary> + /// Gets or sets the techcontroller description. + /// </summary> + [Column("DESCRIPTION")] + + public String Description + { + get + { + return _description; + } + + set + { + _description = value; RaisePropertyChanged(nameof(Description)); + } + + } + + protected Double _min; + /// <summary> + /// Gets or sets the techcontroller min. + /// </summary> + [Column("MIN")] + + public Double Min + { + get + { + return _min; + } + + set + { + _min = value; RaisePropertyChanged(nameof(Min)); + } + + } + + protected Double _max; + /// <summary> + /// Gets or sets the techcontroller max. + /// </summary> + [Column("MAX")] + + public Double Max + { + get + { + return _max; + } + + set + { + _max = value; RaisePropertyChanged(nameof(Max)); + } + + } + + protected String _units; + /// <summary> + /// Gets or sets the techcontroller units. + /// </summary> + [Column("UNITS")] + + public String Units + { + get + { + return _units; + } + + set + { + _units = value; RaisePropertyChanged(nameof(Units)); + } + + } + + /// <summary> + /// Initializes a new instance of the <see cref="TechController" /> class. + /// </summary> + public TechController() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs b/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs deleted file mode 100644 index dff290eb1..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Xml.Serialization; -using Newtonsoft.Json; -using System.Linq; -using Tango.DAL.Remote.DB; - -namespace Tango.BL.Entities -{ - [Table("TECH_HEATERS")] - public partial class TechHeater : ObservableEntity<TechHeater> - { - - protected Int32 _code; - /// <summary> - /// Gets or sets the techheater code. - /// </summary> - [Column("CODE")] - - public Int32 Code - { - get - { - return _code; - } - - set - { - _code = value; RaisePropertyChanged(nameof(Code)); - } - - } - - protected String _name; - /// <summary> - /// Gets or sets the techheater name. - /// </summary> - [Column("NAME")] - - public String Name - { - get - { - return _name; - } - - set - { - _name = value; RaisePropertyChanged(nameof(Name)); - } - - } - - protected String _description; - /// <summary> - /// Gets or sets the techheater description. - /// </summary> - [Column("DESCRIPTION")] - - public String Description - { - get - { - return _description; - } - - set - { - _description = value; RaisePropertyChanged(nameof(Description)); - } - - } - - /// <summary> - /// Initializes a new instance of the <see cref="TechHeater" /> class. - /// </summary> - public TechHeater() : base() - { - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/User.cs b/Software/Visual_Studio/Tango.BL/Entities/User.cs index 4d1cc4c54..546ff4a1a 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/User.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/User.cs @@ -137,6 +137,26 @@ namespace Tango.BL.Entities } + protected Nullable<DateTime> _lastlogin; + /// <summary> + /// Gets or sets the user last login. + /// </summary> + [Column("LAST_LOGIN")] + + public Nullable<DateTime> LastLogin + { + get + { + return _lastlogin; + } + + set + { + _lastlogin = value; RaisePropertyChanged(nameof(LastLogin)); + } + + } + protected Address _address; /// <summary> /// Gets or sets the user address. diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Sensors.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Sensors.cs deleted file mode 100644 index 9d80595d2..000000000 --- a/Software/Visual_Studio/Tango.BL/Enumerations/Sensors.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.ComponentModel; - -namespace Tango.BL.Entities -{ - public enum Sensors - { - - /// <summary> - /// (Dancer 1) - /// </summary> - [Description("Dancer 1")] - Dancer1Angle = 0, - - /// <summary> - /// (Dancer 2) - /// </summary> - [Description("Dancer 2")] - Dancer2Angle = 1, - - /// <summary> - /// (Dancer 3) - /// </summary> - [Description("Dancer 3")] - Dancer3Angle = 2, - - /// <summary> - /// (Feeder Motor) - /// </summary> - [Description("Feeder Motor")] - FeederMotorFrequency = 3, - - /// <summary> - /// (Dryer Motor) - /// </summary> - [Description("Dryer Motor")] - DryerMotor = 4, - - /// <summary> - /// (Poller Motor) - /// </summary> - [Description("Poller Motor")] - PollerMotor = 5, - - /// <summary> - /// (Winder Motor) - /// </summary> - [Description("Winder Motor")] - WinderMotor = 6, - - /// <summary> - /// (Screw Motor) - /// </summary> - [Description("Screw Motor")] - ScrewMotor = 7, - - /// <summary> - /// (Thread Speed) - /// </summary> - [Description("Thread Speed")] - ThreadSpeed = 8, - - /// <summary> - /// (Mixer) - /// </summary> - [Description("Mixer")] - MixerTemperature = 9, - - /// <summary> - /// (Head Zone 1) - /// </summary> - [Description("Head Zone 1")] - HeadZone1Temperature = 10, - - /// <summary> - /// (Head Zone 2) - /// </summary> - [Description("Head Zone 2")] - HeadZone2Temperature = 11, - - /// <summary> - /// (Head Zone 3) - /// </summary> - [Description("Head Zone 3")] - HeadZone3Temperature = 12, - - /// <summary> - /// (Head Air Flow) - /// </summary> - [Description("Head Air Flow")] - HeadAirFlow = 13, - - /// <summary> - /// (Feeder Tension) - /// </summary> - [Description("Feeder Tension")] - FeederTension = 14, - - /// <summary> - /// (Puller Tension) - /// </summary> - [Description("Puller Tension")] - PullerTension = 15, - - /// <summary> - /// (Dryer Zone 1) - /// </summary> - [Description("Dryer Zone 1")] - DryerZone1Temperature = 16, - - /// <summary> - /// (Dryer Zone 2) - /// </summary> - [Description("Dryer Zone 2")] - DryerZone2Temperature = 17, - - /// <summary> - /// (Dryer Zone 3) - /// </summary> - [Description("Dryer Zone 3")] - DryerZone3Temperature = 18, - - /// <summary> - /// (Dryer Air Flow) - /// </summary> - [Description("Dryer Air Flow")] - DryerAirFlow = 19, - - /// <summary> - /// (Winder Tension) - /// </summary> - [Description("Winder Tension")] - WinderTension = 20, - - /// <summary> - /// (Dispensers Motors) - /// </summary> - [Description("Dispensers Motors")] - DispensersMotorsFrequency = 21, - - /// <summary> - /// (Dispensers Angular Encoders) - /// </summary> - [Description("Dispensers Angular Encoders")] - DispensersAngularEncoders = 22, - - /// <summary> - /// (Dispensers Linear Positions) - /// </summary> - [Description("Dispensers Linear Positions")] - DispensersLinearPositions = 23, - - /// <summary> - /// (Dispensers Pressure) - /// </summary> - [Description("Dispensers Pressure")] - DispensersPressure = 24, - - /// <summary> - /// (Mid Tank Pressure) - /// </summary> - [Description("Mid Tank Pressure")] - MidTankPressure = 25, - - /// <summary> - /// (Filter Delta Pressure) - /// </summary> - [Description("Filter Delta Pressure")] - FilterDeltaPressure = 26, - - /// <summary> - /// (Chiller Temperature) - /// </summary> - [Description("Chiller Temperature")] - ChillerTemperature = 27, - - } -} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/TechControllers.cs b/Software/Visual_Studio/Tango.BL/Enumerations/TechControllers.cs new file mode 100644 index 000000000..570f647c0 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/TechControllers.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum TechControllers + { + + /// <summary> + /// (Heater 1 Temperature) + /// </summary> + [Description("Heater 1 Temperature")] + Heater1Temp = 0, + + /// <summary> + /// (Heater 2 Temperature) + /// </summary> + [Description("Heater 2 Temperature")] + Heater2Temp = 1, + + } +} diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index aa64cebcb..20eabd0ae 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -469,17 +469,17 @@ namespace Tango.BL } /// <summary> - /// Gets or sets the TechDispensers. + /// Gets or sets the TechControllers. /// </summary> - public DbSet<TechDispenser> TechDispensers + public DbSet<TechController> TechControllers { get; set; } /// <summary> - /// Gets or sets the TechHeaters. + /// Gets or sets the TechDispensers. /// </summary> - public DbSet<TechHeater> TechHeaters + public DbSet<TechDispenser> TechDispensers { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs index 297de3b88..59f5d31fa 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs @@ -274,7 +274,7 @@ namespace Tango.BL TechIos = Context.TechIos.ToObservableCollection(); - TechHeaters = Context.TechHeaters.ToObservableCollection(); + TechControllers = Context.TechControllers.ToObservableCollection(); IdsPackFormulas = Context.IdsPackFormulas.ToObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 0964f29f7..97265b8a8 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -2059,74 +2059,74 @@ namespace Tango.BL } - private ObservableCollection<TechDispenser> _techdispensers; + private ObservableCollection<TechController> _techcontrollers; /// <summary> - /// Gets or sets the TechDispensers. + /// Gets or sets the TechControllers. /// </summary> - public ObservableCollection<TechDispenser> TechDispensers + public ObservableCollection<TechController> TechControllers { get { - return _techdispensers; + return _techcontrollers; } set { - _techdispensers = value; RaisePropertyChanged(nameof(TechDispensers)); + _techcontrollers = value; RaisePropertyChanged(nameof(TechControllers)); } } - private ICollectionView _techdispensersViewSource; + private ICollectionView _techcontrollersViewSource; /// <summary> - /// Gets or sets the TechDispensers View Source. + /// Gets or sets the TechControllers View Source. ///</summary> - public ICollectionView TechDispensersViewSource + public ICollectionView TechControllersViewSource { get { - return _techdispensersViewSource; + return _techcontrollersViewSource; } set { - _techdispensersViewSource = value; RaisePropertyChanged(nameof(TechDispensersViewSource)); + _techcontrollersViewSource = value; RaisePropertyChanged(nameof(TechControllersViewSource)); } } - private ObservableCollection<TechHeater> _techheaters; + private ObservableCollection<TechDispenser> _techdispensers; /// <summary> - /// Gets or sets the TechHeaters. + /// Gets or sets the TechDispensers. /// </summary> - public ObservableCollection<TechHeater> TechHeaters + public ObservableCollection<TechDispenser> TechDispensers { get { - return _techheaters; + return _techdispensers; } set { - _techheaters = value; RaisePropertyChanged(nameof(TechHeaters)); + _techdispensers = value; RaisePropertyChanged(nameof(TechDispensers)); } } - private ICollectionView _techheatersViewSource; + private ICollectionView _techdispensersViewSource; /// <summary> - /// Gets or sets the TechHeaters View Source. + /// Gets or sets the TechDispensers View Source. ///</summary> - public ICollectionView TechHeatersViewSource + public ICollectionView TechDispensersViewSource { get { - return _techheatersViewSource; + return _techdispensersViewSource; } set { - _techheatersViewSource = value; RaisePropertyChanged(nameof(TechHeatersViewSource)); + _techdispensersViewSource = value; RaisePropertyChanged(nameof(TechDispensersViewSource)); } } @@ -2503,9 +2503,9 @@ namespace Tango.BL SyncConfigurationsViewSource = CreateCollectionView(SyncConfigurations); - TechDispensersViewSource = CreateCollectionView(TechDispensers); + TechControllersViewSource = CreateCollectionView(TechControllers); - TechHeatersViewSource = CreateCollectionView(TechHeaters); + TechDispensersViewSource = CreateCollectionView(TechDispensers); TechIosViewSource = CreateCollectionView(TechIos); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index a3f952644..714d74b77 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -89,6 +89,7 @@ <Compile Include="Dispensing\StandardColorDispensingCalc.cs" /> <Compile Include="Dispensing\TransparentLiquidDispensingCalc.cs" /> <Compile Include="EntitiesExtensions\Contact.cs" /> + <Compile Include="Entities\TechController.cs" /> <Compile Include="ExtensionMethods\MediaColor.cs" /> <Compile Include="LiquidVolume.cs" /> <Compile Include="Entities\ActionType.cs" /> @@ -149,7 +150,6 @@ <Compile Include="Entities\SpoolType.cs" /> <Compile Include="Entities\SyncConfiguration.cs" /> <Compile Include="Entities\TechDispenser.cs" /> - <Compile Include="Entities\TechHeater.cs" /> <Compile Include="Entities\TechIo.cs" /> <Compile Include="Entities\TechMonitor.cs" /> <Compile Include="Entities\TechMotor.cs" /> @@ -174,7 +174,6 @@ <Compile Include="Enumerations\MidTankTypes.cs" /> <Compile Include="Enumerations\Permissions.cs" /> <Compile Include="Enumerations\Roles.cs" /> - <Compile Include="Enumerations\Sensors.cs" /> <Compile Include="Enumerations\WindingMethods.cs" /> <Compile Include="ExtensionMethods\ConfigurationExtensions.cs" /> <Compile Include="ExtensionMethods\LiquidTypeExtensions.cs" /> diff --git a/Software/Visual_Studio/Tango.CircularGauge/CircularGaugeControl.cs b/Software/Visual_Studio/Tango.CircularGauge/CircularGaugeControl.cs new file mode 100644 index 000000000..1d1d598c6 --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/CircularGaugeControl.cs @@ -0,0 +1,1419 @@ +/*Copyright (c) 2009 T.Evelyn (evescode@gmail.com) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + +DAMAGE.*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Media.Animation; + +namespace Tango.CircularGauge +{ + /// <summary> + /// Represents a Circular Gauge control + /// </summary> + [TemplatePart(Name = "LayoutRoot", Type = typeof(Grid))] + [TemplatePart(Name = "Pointer", Type = typeof(Path))] + [TemplatePart(Name = "RangeIndicatorLight", Type = typeof(Ellipse))] + [TemplatePart(Name = "PointerCap", Type = typeof(Ellipse))] + public class CircularGaugeControl : Control + { + #region Private variables + + //Private variables + private Grid rootGrid; + private Path rangeIndicator; + private Path pointer; + private Ellipse pointerCap; + private Ellipse lightIndicator; + private bool isInitialValueSet = false; + private Double arcradius1; + private Double arcradius2; + private int animatingSpeedFactor = 6; + + #endregion + + #region Dependency properties + + /// <summary> + /// Dependency property to Get/Set the current value + /// </summary> + public static readonly DependencyProperty CurrentValueProperty = + DependencyProperty.Register("CurrentValue", typeof(double), typeof(CircularGaugeControl), + new PropertyMetadata(Double.MinValue, new PropertyChangedCallback(CircularGaugeControl.OnCurrentValuePropertyChanged))); + + /// <summary> + /// Dependency property to Get/Set the Minimum Value + /// </summary> + public static readonly DependencyProperty MinValueProperty = + DependencyProperty.Register("MinValue", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Maximum Value + /// </summary> + public static readonly DependencyProperty MaxValueProperty = + DependencyProperty.Register("MaxValue", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Radius of the gauge + /// </summary> + public static readonly DependencyProperty RadiusProperty = + DependencyProperty.Register("Radius", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Pointer cap Radius + /// </summary> + public static readonly DependencyProperty PointerCapRadiusProperty = + DependencyProperty.Register("PointerCapRadius", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the pointer length + /// </summary> + public static readonly DependencyProperty PointerLengthProperty = + DependencyProperty.Register("PointerLength", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the scale Radius + /// </summary> + public static readonly DependencyProperty ScaleRadiusProperty = + DependencyProperty.Register("ScaleRadius", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the starting angle of scale + /// </summary> + public static readonly DependencyProperty ScaleStartAngleProperty = + DependencyProperty.Register("ScaleStartAngle", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the sweep angle of scale + /// </summary> + public static readonly DependencyProperty ScaleSweepAngleProperty = + DependencyProperty.Register("ScaleSweepAngle", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the number of major divisions on the scale + /// </summary> + public static readonly DependencyProperty MajorDivisionsCountProperty = + DependencyProperty.Register("MajorDivisionsCount", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the number of minor divisions on the scale + /// </summary> + public static readonly DependencyProperty MinorDivisionsCountProperty = + DependencyProperty.Register("MinorDivisionsCount", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set Optimal Range End Value + /// </summary> + public static readonly DependencyProperty OptimalRangeEndValueProperty = + DependencyProperty.Register("OptimalRangeEndValue", typeof(double), typeof(CircularGaugeControl), new PropertyMetadata(new PropertyChangedCallback(CircularGaugeControl.OnOptimalRangeEndValuePropertyChanged))); + + /// <summary> + /// Dependency property to Get/Set Optimal Range Start Value + /// </summary> + public static readonly DependencyProperty OptimalRangeStartValueProperty = + DependencyProperty.Register("OptimalRangeStartValue", typeof(double), typeof(CircularGaugeControl), new PropertyMetadata(new PropertyChangedCallback(CircularGaugeControl.OnOptimalRangeStartValuePropertyChanged))); + + /// <summary> + /// Dependency property to Get/Set the image source + /// </summary> + public static readonly DependencyProperty ImageSourceProperty = + DependencyProperty.Register("ImageSource", typeof(ImageSource), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the image offset + /// </summary> + public static readonly DependencyProperty ImageOffsetProperty = + DependencyProperty.Register("ImageOffset", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the range indicator light offset + /// </summary> + public static readonly DependencyProperty RangeIndicatorLightOffsetProperty = + DependencyProperty.Register("RangeIndicatorLightOffset", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the image Size + /// </summary> + public static readonly DependencyProperty ImageSizeProperty = + DependencyProperty.Register("ImageSize", typeof(Size), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Range Indicator Radius + /// </summary> + public static readonly DependencyProperty RangeIndicatorRadiusProperty = + DependencyProperty.Register("RangeIndicatorRadius", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Range Indicator Thickness + /// </summary> + public static readonly DependencyProperty RangeIndicatorThicknessProperty = + DependencyProperty.Register("RangeIndicatorThickness", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the scale label Radius + /// </summary> + public static readonly DependencyProperty ScaleLabelRadiusProperty = + DependencyProperty.Register("ScaleLabelRadius", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Scale Label Size + /// </summary> + public static readonly DependencyProperty ScaleLabelSizeProperty = + DependencyProperty.Register("ScaleLabelSize", typeof(Size), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Scale Label FontSize + /// </summary> + public static readonly DependencyProperty ScaleLabelFontSizeProperty = + DependencyProperty.Register("ScaleLabelFontSize", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Scale Label Foreground + /// </summary> + + public static readonly DependencyProperty ScaleLabelForegroundProperty = + DependencyProperty.Register("ScaleLabelForeground", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Major Tick Size + /// </summary> + public static readonly DependencyProperty MajorTickSizeProperty = + DependencyProperty.Register("MajorTickRectSize", typeof(Size), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Minor Tick Size + /// </summary> + public static readonly DependencyProperty MinorTickSizeProperty = + DependencyProperty.Register("MinorTickSize", typeof(Size), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Major Tick Color + /// </summary> + public static readonly DependencyProperty MajorTickColorProperty = + DependencyProperty.Register("MajorTickColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Minor Tick Color + /// </summary> + public static readonly DependencyProperty MinorTickColorProperty = + DependencyProperty.Register("MinorTickColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Gauge Background Color + /// </summary> + public static readonly DependencyProperty GaugeBackgroundColorProperty = + DependencyProperty.Register("GaugeBackgroundColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Pointer Thickness + /// </summary> + public static readonly DependencyProperty PointerThicknessProperty = + DependencyProperty.Register("PointerThickness", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the an option to reset the pointer on start up to the minimum value + /// </summary> + public static readonly DependencyProperty ResetPointerOnStartUpProperty = + DependencyProperty.Register("ResetPointerOnStartUp", typeof(bool), typeof(CircularGaugeControl), new PropertyMetadata(false, null)); + + /// <summary> + /// Dependency property to Get/Set the Scale Value Precision + /// </summary> + public static readonly DependencyProperty ScaleValuePrecisionProperty = + DependencyProperty.Register("ScaleValuePrecision", typeof(int), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Below Optimal Range Color + /// </summary> + + public static readonly DependencyProperty BelowOptimalRangeColorProperty = + DependencyProperty.Register("BelowOptimalRangeColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Optimal Range Color + /// </summary> + + public static readonly DependencyProperty OptimalRangeColorProperty = + DependencyProperty.Register("OptimalRangeColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Above Optimal Range Color + /// </summary> + + public static readonly DependencyProperty AboveOptimalRangeColorProperty = + DependencyProperty.Register("AboveOptimalRangeColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Dial Text + /// </summary> + + public static readonly DependencyProperty DialTextProperty = + DependencyProperty.Register("DialText", typeof(string), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Dial Text Color + /// </summary> + + public static readonly DependencyProperty DialTextColorProperty = + DependencyProperty.Register("DialTextColor", typeof(Color), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Dial Text Font Size + /// </summary> + + public static readonly DependencyProperty DialTextFontSizeProperty = + DependencyProperty.Register("DialTextFontSize", typeof(int), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Dial Text Offset + /// </summary> + + public static readonly DependencyProperty DialTextOffsetProperty = + DependencyProperty.Register("DialTextOffset", typeof(double), typeof(CircularGaugeControl), null); + + /// <summary> + /// Dependency property to Get/Set the Range Indicator light Radius + /// </summary> + + public static readonly DependencyProperty RangeIndicatorLightRadiusProperty = + DependencyProperty.Register("RangeIndicatorLightRadius", typeof(double), typeof(CircularGaugeControl), null); + + + #endregion + + #region Wrapper properties + + /// <summary> + /// Gets/Sets the current value + /// </summary> + public double CurrentValue + { + get + { + return (double)GetValue(CurrentValueProperty); + } + set + { + SetValue(CurrentValueProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Minimum Value + /// </summary> + public double MinValue + { + get + { + return (double)GetValue(MinValueProperty); + } + set + { + SetValue(MinValueProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Maximum Value + /// </summary> + public double MaxValue + { + get + { + return (double)GetValue(MaxValueProperty); + } + set + { + SetValue(MaxValueProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Minimum Value + /// </summary> + public double Radius + { + get + { + return (double)GetValue(RadiusProperty); + } + set + { + SetValue(RadiusProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Pointer cap radius + /// </summary> + public double PointerCapRadius + { + get + { + return (double)GetValue(PointerCapRadiusProperty); + } + set + { + SetValue(PointerCapRadiusProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Pointer Length + /// </summary> + public double PointerLength + { + get + { + return (double)GetValue(PointerLengthProperty); + } + set + { + SetValue(PointerLengthProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Pointer Thickness + /// </summary> + public double PointerThickness + { + get + { + return (double)GetValue(PointerThicknessProperty); + } + set + { + SetValue(PointerThicknessProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Scale radius + /// </summary> + public double ScaleRadius + { + get + { + return (double)GetValue(ScaleRadiusProperty); + } + set + { + SetValue(ScaleRadiusProperty, value); + } + } + + /// <summary> + /// Gets/Sets the scale start angle + /// </summary> + public double ScaleStartAngle + { + get + { + return (double)GetValue(ScaleStartAngleProperty); + } + set + { + SetValue(ScaleStartAngleProperty, value); + } + } + + /// <summary> + /// Gets/Sets the scale sweep angle + /// </summary> + public double ScaleSweepAngle + { + get + { + return (double)GetValue(ScaleSweepAngleProperty); + } + set + { + SetValue(ScaleSweepAngleProperty, value); + } + } + + /// <summary> + /// Gets/Sets the number of major divisions on the scale + /// </summary> + public double MajorDivisionsCount + { + get + { + return (double)GetValue(MajorDivisionsCountProperty); + } + set + { + SetValue(MajorDivisionsCountProperty, value); + } + } + + /// <summary> + /// Gets/Sets the number of minor divisions on the scale + /// </summary> + public double MinorDivisionsCount + { + get + { + return (double)GetValue(MinorDivisionsCountProperty); + } + set + { + SetValue(MinorDivisionsCountProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Optimal range end value + /// </summary> + public double OptimalRangeEndValue + { + get + { + return (double)GetValue(OptimalRangeEndValueProperty); + } + set + { + SetValue(OptimalRangeEndValueProperty, value); + } + } + /// <summary> + /// Gets/Sets the Optimal Range Start Value + /// </summary> + public double OptimalRangeStartValue + { + get + { + return (double)GetValue(OptimalRangeStartValueProperty); + } + set + { + SetValue(OptimalRangeStartValueProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Gauge image source + /// </summary> + public ImageSource ImageSource + { + get + { + return (ImageSource)GetValue(ImageSourceProperty); + } + set + { + SetValue(ImageSourceProperty, value); + } + } + + + /// <summary> + /// Gets/Sets the Image offset + /// </summary> + public double ImageOffset + { + get + { + return (double)GetValue(ImageOffsetProperty); + } + set + { + SetValue(ImageOffsetProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Range Indicator Light offset + /// </summary> + public double RangeIndicatorLightOffset + { + get + { + return (double)GetValue(RangeIndicatorLightOffsetProperty); + } + set + { + SetValue(RangeIndicatorLightOffsetProperty, value); + } + } + + + /// <summary> + /// Gets/Sets the Image width and height + /// </summary> + public Size ImageSize + { + get + { + return (Size)GetValue(ImageSizeProperty); + } + set + { + SetValue(ImageSizeProperty, value); + } + } + /// <summary> + /// Gets/Sets the Range Indicator Radius + /// </summary> + public double RangeIndicatorRadius + { + get + { + return (double)GetValue(RangeIndicatorRadiusProperty); + } + set + { + SetValue(RangeIndicatorRadiusProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Range Indicator Thickness + /// </summary> + public double RangeIndicatorThickness + { + get + { + return (double)GetValue(RangeIndicatorThicknessProperty); + } + set + { + SetValue(RangeIndicatorThicknessProperty, value); + } + } + /// <summary> + /// Gets/Sets the Scale Label Radius + /// </summary> + public double ScaleLabelRadius + { + get + { + return (double)GetValue(ScaleLabelRadiusProperty); + } + set + { + SetValue(ScaleLabelRadiusProperty, value); + } + } + /// <summary> + /// Gets/Sets the Scale Label Size + /// </summary> + public Size ScaleLabelSize + { + get + { + return (Size)GetValue(ScaleLabelSizeProperty); + } + set + { + SetValue(ScaleLabelSizeProperty, value); + } + } + /// <summary> + /// Gets/Sets the Scale Label Font Size + /// </summary> + public double ScaleLabelFontSize + { + get + { + return (double)GetValue(ScaleLabelFontSizeProperty); + } + set + { + SetValue(ScaleLabelFontSizeProperty, value); + } + } + /// <summary> + /// Gets/Sets the Scale Label Foreground + /// </summary> + public Color ScaleLabelForeground + { + get + { + return (Color)GetValue(ScaleLabelForegroundProperty); + } + set + { + SetValue(ScaleLabelForegroundProperty, value); + } + } + /// <summary> + /// Gets/Sets the Major Tick Size + /// </summary> + public Size MajorTickSize + { + get + { + return (Size)GetValue(MajorTickSizeProperty); + } + set + { + SetValue(MajorTickSizeProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Minor Tick Size + /// </summary> + public Size MinorTickSize + { + get + { + return (Size)GetValue(MinorTickSizeProperty); + } + set + { + SetValue(MinorTickSizeProperty, value); + } + } + /// <summary> + /// Gets/Sets the Major Tick Color + /// </summary> + public Color MajorTickColor + { + get + { + return (Color)GetValue(MajorTickColorProperty); + } + set + { + SetValue(MajorTickColorProperty, value); + } + } + /// <summary> + /// Gets/Sets the Minor Tick Color + /// </summary> + public Color MinorTickColor + { + get + { + return (Color)GetValue(MinorTickColorProperty); + } + set + { + SetValue(MinorTickColorProperty, value); + } + } + + /// <summary> + /// Gets/Sets the Gauge Background color + /// </summary> + public Color GaugeBackgroundColor + { + get + { + return (Color)GetValue(GaugeBackgroundColorProperty); + } + set + { + SetValue(GaugeBackgroundColorProperty, value); + } + } + + + /// <summary> + /// Gets/Sets option to reset the pointer to minimum on start up, Default is true + /// </summary> + public bool ResetPointerOnStartUp + { + get + { + return (bool)GetValue(ResetPointerOnStartUpProperty); + } + set + { + SetValue(ResetPointerOnStartUpProperty, value); + } + } + + /// <summary> + /// Gets/Sets scale value precision + /// </summary> + public int ScaleValuePrecision + { + get + { + return (int)GetValue(ScaleValuePrecisionProperty); + } + set + { + SetValue(ScaleValuePrecisionProperty, value); + } + } + /// <summary> + /// Gets/Sets Below Optimal Range Color + /// </summary> + public Color BelowOptimalRangeColor + { + get + { + return (Color)GetValue(BelowOptimalRangeColorProperty); + } + set + { + SetValue(BelowOptimalRangeColorProperty, value); + } + } + + /// <summary> + /// Gets/Sets Optimal Range Color + /// </summary> + public Color OptimalRangeColor + { + get + { + return (Color)GetValue(OptimalRangeColorProperty); + } + set + { + SetValue(OptimalRangeColorProperty, value); + } + } + + /// <summary> + /// Gets/Sets Above Optimal Range Color + /// </summary> + public Color AboveOptimalRangeColor + { + get + { + return (Color)GetValue(AboveOptimalRangeColorProperty); + } + set + { + SetValue(AboveOptimalRangeColorProperty, value); + } + } + /// <summary> + /// Gets/Sets Dial Text + /// </summary> + public string DialText + { + get + { + return (string)GetValue(DialTextProperty); + } + set + { + SetValue(DialTextProperty, value); + } + } + /// <summary> + /// Gets/Sets Dial Text Color + /// </summary> + public Color DialTextColor + { + get + { + return (Color)GetValue(DialTextColorProperty); + } + set + { + SetValue(DialTextColorProperty, value); + } + } + /// <summary> + /// Gets/Sets Dial Text Font Size + /// </summary> + public int DialTextFontSize + { + get + { + return (int)GetValue(DialTextFontSizeProperty); + } + set + { + SetValue(DialTextFontSizeProperty, value); + } + } + /// <summary> + /// Gets/Sets Dial Text Offset + /// </summary> + public double DialTextOffset + { + get + { + return (double)GetValue(DialTextOffsetProperty); + } + set + { + SetValue(DialTextOffsetProperty, value); + } + } + + /// <summary> + /// Gets/Sets Range Indicator Light Radius + /// </summary> + public double RangeIndicatorLightRadius + { + get + { + return (double)GetValue(RangeIndicatorLightRadiusProperty); + } + set + { + SetValue(RangeIndicatorLightRadiusProperty, value); + } + } + + #endregion + + #region Constructor + static CircularGaugeControl() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(CircularGaugeControl), new FrameworkPropertyMetadata(typeof(CircularGaugeControl))); + } + #endregion + + #region Methods + private static void OnCurrentValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + //Get access to the instance of CircularGaugeConrol whose property value changed + CircularGaugeControl gauge = d as CircularGaugeControl; + gauge.OnCurrentValueChanged(e); + + } + + private static void OnOptimalRangeEndValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + //Get access to the instance of CircularGaugeConrol whose property value changed + CircularGaugeControl gauge = d as CircularGaugeControl; + if ((double)e.NewValue > gauge.MaxValue) + { + gauge.OptimalRangeEndValue = gauge.MaxValue; + } + + } + private static void OnOptimalRangeStartValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + //Get access to the instance of CircularGaugeConrol whose property value changed + CircularGaugeControl gauge = d as CircularGaugeControl; + if ((double)e.NewValue < gauge.MinValue) + { + gauge.OptimalRangeStartValue = gauge.MinValue; + } + + + } + + public virtual void OnCurrentValueChanged(DependencyPropertyChangedEventArgs e) + { + //Validate and set the new value + double newValue = (double)e.NewValue; + double oldValue = (double)e.OldValue; + + if (newValue > this.MaxValue) + { + newValue = this.MaxValue; + } + else if (newValue < this.MinValue) + { + newValue = this.MinValue; + } + + if (oldValue > this.MaxValue) + { + oldValue = this.MaxValue; + } + else if (oldValue < this.MinValue) + { + oldValue = this.MinValue; + } + + if (pointer != null) + { + double db1 = 0; + Double oldcurr_realworldunit = 0; + Double newcurr_realworldunit = 0; + Double realworldunit = (ScaleSweepAngle / (MaxValue - MinValue)); + //Resetting the old value to min value the very first time. + if (oldValue == 0 && !isInitialValueSet) + { + oldValue = MinValue; + isInitialValueSet = true; + + } + if (oldValue < 0) + { + db1 = MinValue + Math.Abs(oldValue); + oldcurr_realworldunit = ((double)(Math.Abs(db1 * realworldunit))); + } + else + { + db1 = Math.Abs(MinValue) + oldValue; + oldcurr_realworldunit = ((double)(db1 * realworldunit)); + } + if (newValue < 0) + { + db1 = MinValue + Math.Abs(newValue); + newcurr_realworldunit = ((double)(Math.Abs(db1 * realworldunit))); + } + else + { + db1 = Math.Abs(MinValue) + newValue; + newcurr_realworldunit = ((double)(db1 * realworldunit)); + } + + Double oldcurrentvalueAngle = (ScaleStartAngle + oldcurr_realworldunit); + Double newcurrentvalueAngle = (ScaleStartAngle + newcurr_realworldunit); + + //Animate the pointer from the old value to the new value + AnimatePointer(oldcurrentvalueAngle, newcurrentvalueAngle); + + } + + } + + /// <summary> + /// Animates the pointer to the current value to the new one + /// </summary> + /// <param name="oldcurrentvalueAngle"></param> + /// <param name="newcurrentvalueAngle"></param> + void AnimatePointer(double oldcurrentvalueAngle, double newcurrentvalueAngle) + { + if (pointer != null) + { + DoubleAnimation da = new DoubleAnimation(); + da.From = oldcurrentvalueAngle; + da.To = newcurrentvalueAngle; + + double animDuration = Math.Abs(oldcurrentvalueAngle - newcurrentvalueAngle) * animatingSpeedFactor; + da.Duration = new Duration(TimeSpan.FromMilliseconds(animDuration)); + + Storyboard sb = new Storyboard(); + sb.Completed += new EventHandler(sb_Completed); + sb.Children.Add(da); + Storyboard.SetTarget(da, pointer); + Storyboard.SetTargetProperty(da, new PropertyPath("(Path.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)")); + + if (newcurrentvalueAngle != oldcurrentvalueAngle) + { + sb.Begin(); + } + } + } + + /// <summary> + /// Move pointer without animating + /// </summary> + /// <param name="angleValue"></param> + void MovePointer(double angleValue) + { + if (pointer != null) + { + TransformGroup tg = pointer.RenderTransform as TransformGroup; + RotateTransform rt = tg.Children[0] as RotateTransform; + rt.Angle = angleValue; + + } + } + + /// <summary> + /// Switch on the Range indicator light after the pointer completes animating + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + void sb_Completed(object sender, EventArgs e) + { + if (this.CurrentValue > OptimalRangeEndValue) + { + lightIndicator.Fill = GetRangeIndicatorGradEffect(AboveOptimalRangeColor); + + } + else if (this.CurrentValue <= OptimalRangeEndValue && this.CurrentValue >= OptimalRangeStartValue) + { + lightIndicator.Fill = GetRangeIndicatorGradEffect(OptimalRangeColor); + + } + else if (this.CurrentValue < OptimalRangeStartValue) + { + lightIndicator.Fill = GetRangeIndicatorGradEffect(BelowOptimalRangeColor); + } + + } + + /// <summary> + /// Get gradient brush effect for the range indicator light + /// </summary> + /// <param name="gradientColor"></param> + /// <returns></returns> + private GradientBrush GetRangeIndicatorGradEffect(Color gradientColor) + { + + LinearGradientBrush gradient = new LinearGradientBrush(); + gradient.StartPoint = new Point(0, 0); + gradient.EndPoint = new Point(1, 1); + GradientStop color1 = new GradientStop(); + if (gradientColor == Colors.Transparent) + { + color1.Color = gradientColor; + } + else + color1.Color = Colors.LightGray; + + color1.Offset = 0.2; + gradient.GradientStops.Add(color1); + GradientStop color2 = new GradientStop(); + color2.Color = gradientColor; color2.Offset = 0.5; + gradient.GradientStops.Add(color2); + GradientStop color3 = new GradientStop(); + color3.Color = gradientColor; color3.Offset = 0.8; + gradient.GradientStops.Add(color3); + return gradient; + } + + + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + //Get reference to known elements on the control template + rootGrid = GetTemplateChild("LayoutRoot") as Grid; + pointer = GetTemplateChild("Pointer") as Path; + pointerCap = GetTemplateChild("PointerCap") as Ellipse; + lightIndicator = GetTemplateChild("RangeIndicatorLight") as Ellipse; + + //Draw scale and range indicator + DrawScale(); + DrawRangeIndicator(); + + //Set Zindex of pointer and pointer cap to a really high number so that it stays on top of the + //scale and the range indicator + Canvas.SetZIndex(pointer, 100000); + Canvas.SetZIndex(pointerCap, 100001); + + if (ResetPointerOnStartUp) + { + //Reset Pointer + MovePointer(ScaleStartAngle); + } + + + + } + + + //Drawing the scale with the Scale Radius + private void DrawScale() + { + //Calculate one major tick angle + Double majorTickUnitAngle = ScaleSweepAngle / MajorDivisionsCount; + + //Obtaining One minor tick angle + Double minorTickUnitAngle = ScaleSweepAngle / MinorDivisionsCount; + + //Obtaining One major ticks value + Double majorTicksUnitValue = (MaxValue - MinValue) / MajorDivisionsCount; + majorTicksUnitValue = Math.Round(majorTicksUnitValue, ScaleValuePrecision); + + Double minvalue = MinValue; ; + + // Drawing Major scale ticks + for (Double i = ScaleStartAngle; i <= (ScaleStartAngle + ScaleSweepAngle); i = i + majorTickUnitAngle) + { + + //Majortick is drawn as a rectangle + Rectangle majortickrect = new Rectangle(); + majortickrect.Height = MajorTickSize.Height; + majortickrect.Width = MajorTickSize.Width; + majortickrect.Fill = new SolidColorBrush(MajorTickColor); + Point p = new Point(0.5, 0.5); + majortickrect.RenderTransformOrigin = p; + majortickrect.HorizontalAlignment = HorizontalAlignment.Center; + majortickrect.VerticalAlignment = VerticalAlignment.Center; + + TransformGroup majortickgp = new TransformGroup(); + RotateTransform majortickrt = new RotateTransform(); + + //Obtaining the angle in radians for calulating the points + Double i_radian = (i * Math.PI) / 180; + majortickrt.Angle = i; + majortickgp.Children.Add(majortickrt); + TranslateTransform majorticktt = new TranslateTransform(); + + //Finding the point on the Scale where the major ticks are drawn + //here drawing the points with center as (0,0) + majorticktt.X = (int)((ScaleRadius) * Math.Cos(i_radian)); + majorticktt.Y = (int)((ScaleRadius) * Math.Sin(i_radian)); + + //Points for the textblock which hold the scale value + TranslateTransform majorscalevaluett = new TranslateTransform(); + //here drawing the points with center as (0,0) + majorscalevaluett.X = (int)((ScaleLabelRadius) * Math.Cos(i_radian)); + majorscalevaluett.Y = (int)((ScaleLabelRadius) * Math.Sin(i_radian)); + + //Defining the properties of the scale value textbox + TextBlock tb = new TextBlock(); + + tb.Height = ScaleLabelSize.Height; + tb.Width = ScaleLabelSize.Width; + tb.FontSize = ScaleLabelFontSize; + tb.Foreground = new SolidColorBrush(ScaleLabelForeground); + tb.TextAlignment = TextAlignment.Center; + tb.VerticalAlignment = VerticalAlignment.Center; + tb.HorizontalAlignment = HorizontalAlignment.Center; + + //Writing and appending the scale value + + //checking minvalue < maxvalue w.r.t scale precion value + if (Math.Round(minvalue, ScaleValuePrecision) <= Math.Round(MaxValue, ScaleValuePrecision)) + { + minvalue = Math.Round(minvalue, ScaleValuePrecision); + tb.Text = minvalue.ToString(); + minvalue = minvalue + majorTicksUnitValue; + + } + else + { + break; + } + majortickgp.Children.Add(majorticktt); + majortickrect.RenderTransform = majortickgp; + tb.RenderTransform = majorscalevaluett; + rootGrid.Children.Add(majortickrect); + rootGrid.Children.Add(tb); + + + //Drawing the minor axis ticks + Double onedegree = ((i + majorTickUnitAngle) - i) / (MinorDivisionsCount); + + if ((i < (ScaleStartAngle + ScaleSweepAngle)) && (Math.Round(minvalue, ScaleValuePrecision) <= Math.Round(MaxValue, ScaleValuePrecision))) + { + //Drawing the minor scale + for (Double mi = i + onedegree; mi < (i + majorTickUnitAngle); mi = mi + onedegree) + { + //here the minortick is drawn as a rectangle + Rectangle mr = new Rectangle(); + mr.Height = MinorTickSize.Height; + mr.Width = MinorTickSize.Width; + mr.Fill = new SolidColorBrush(MinorTickColor); + mr.HorizontalAlignment = HorizontalAlignment.Center; + mr.VerticalAlignment = VerticalAlignment.Center; + Point p1 = new Point(0.5, 0.5); + mr.RenderTransformOrigin = p1; + + TransformGroup minortickgp = new TransformGroup(); + RotateTransform minortickrt = new RotateTransform(); + minortickrt.Angle = mi; + minortickgp.Children.Add(minortickrt); + TranslateTransform minorticktt = new TranslateTransform(); + + //Obtaining the angle in radians for calulating the points + Double mi_radian = (mi * Math.PI) / 180; + //Finding the point on the Scale where the minor ticks are drawn + minorticktt.X = (int)((ScaleRadius) * Math.Cos(mi_radian)); + minorticktt.Y = (int)((ScaleRadius) * Math.Sin(mi_radian)); + + minortickgp.Children.Add(minorticktt); + mr.RenderTransform = minortickgp; + rootGrid.Children.Add(mr); + + + } + + } + + } + } + + /// <summary> + /// Obtaining the Point (x,y) in the circumference + /// </summary> + /// <param name="angle"></param> + /// <param name="radius"></param> + /// <returns></returns> + private Point GetCircumferencePoint(Double angle, Double radius) + { + Double angle_radian = (angle * Math.PI) / 180; + //Radius-- is the Radius of the gauge + Double X = (Double)((Radius) + (radius) * Math.Cos(angle_radian)); + Double Y = (Double)((Radius) + (radius) * Math.Sin(angle_radian)); + Point p = new Point(X, Y); + return p; + } + + /// <summary> + /// Draw the range indicator + /// </summary> + private void DrawRangeIndicator() + { + Double realworldunit = (ScaleSweepAngle / (MaxValue - MinValue)); + Double optimalStartAngle; + Double optimalEndAngle; + double db; + + //Checking whether the OptimalRangeStartvalue is -ve + if (OptimalRangeStartValue < 0) + { + db = MinValue + Math.Abs(OptimalRangeStartValue); + optimalStartAngle = ((double)(Math.Abs(db * realworldunit))); + } + else + { + db = Math.Abs(MinValue) + OptimalRangeStartValue; + optimalStartAngle = ((double)(db * realworldunit)); + } + + //Checking whether the OptimalRangeEndvalue is -ve + if (OptimalRangeEndValue < 0) + { + db = MinValue + Math.Abs(OptimalRangeEndValue); + optimalEndAngle = ((double)(Math.Abs(db * realworldunit))); + } + else + { + db = Math.Abs(MinValue) + OptimalRangeEndValue; + optimalEndAngle = ((double)(db * realworldunit)); + } + // calculating the angle for optimal Start value + + Double optimalStartAngleFromStart = (ScaleStartAngle + optimalStartAngle); + + // calculating the angle for optimal Start value + + Double optimalEndAngleFromStart = (ScaleStartAngle + optimalEndAngle); + + //Calculating the Radius of the two arc for segment + arcradius1 = (RangeIndicatorRadius + RangeIndicatorThickness); + arcradius2 = RangeIndicatorRadius; + + double endAngle = ScaleStartAngle + ScaleSweepAngle; + + // Calculating the Points for the below Optimal Range segment from the center of the gauge + + Point A = GetCircumferencePoint(ScaleStartAngle, arcradius1); + Point B = GetCircumferencePoint(ScaleStartAngle, arcradius2); + Point C = GetCircumferencePoint(optimalStartAngleFromStart, arcradius2); + Point D = GetCircumferencePoint(optimalStartAngleFromStart, arcradius1); + + bool isReflexAngle = Math.Abs(optimalStartAngleFromStart - ScaleStartAngle) > 180.0; + DrawSegment(A, B, C, D, isReflexAngle, BelowOptimalRangeColor); + + // Calculating the Points for the Optimal Range segment from the center of the gauge + + Point A1 = GetCircumferencePoint(optimalStartAngleFromStart, arcradius1); + Point B1 = GetCircumferencePoint(optimalStartAngleFromStart, arcradius2); + Point C1 = GetCircumferencePoint(optimalEndAngleFromStart, arcradius2); + Point D1 = GetCircumferencePoint(optimalEndAngleFromStart, arcradius1); + bool isReflexAngle1 = Math.Abs(optimalEndAngleFromStart - optimalStartAngleFromStart) > 180.0; + DrawSegment(A1, B1, C1, D1, isReflexAngle1, OptimalRangeColor); + + // Calculating the Points for the Above Optimal Range segment from the center of the gauge + + Point A2 = GetCircumferencePoint(optimalEndAngleFromStart, arcradius1); + Point B2 = GetCircumferencePoint(optimalEndAngleFromStart, arcradius2); + Point C2 = GetCircumferencePoint(endAngle, arcradius2); + Point D2 = GetCircumferencePoint(endAngle, arcradius1); + bool isReflexAngle2 = Math.Abs(endAngle - optimalEndAngleFromStart) > 180.0; + DrawSegment(A2, B2, C2, D2, isReflexAngle2, AboveOptimalRangeColor); + } + + //Drawing the segment with two arc and two line + + private void DrawSegment(Point p1, Point p2, Point p3, Point p4, bool reflexangle, Color clr) + { + + // Segment Geometry + PathSegmentCollection segments = new PathSegmentCollection(); + + // First line segment from pt p1 - pt p2 + segments.Add(new LineSegment() { Point = p2 }); + + //Arc drawn from pt p2 - pt p3 with the RangeIndicatorRadius + segments.Add(new ArcSegment() + { + Size = new Size(arcradius2, arcradius2), + Point = p3, + SweepDirection = SweepDirection.Clockwise, + IsLargeArc = reflexangle + + }); + + // Second line segment from pt p3 - pt p4 + segments.Add(new LineSegment() { Point = p4 }); + + //Arc drawn from pt p4 - pt p1 with the Radius of arcradius1 + segments.Add(new ArcSegment() + { + Size = new Size(arcradius1, arcradius1), + Point = p1, + SweepDirection = SweepDirection.Counterclockwise, + IsLargeArc = reflexangle + + }); + + // Defining the segment path properties + Color rangestrokecolor; + if (clr == Colors.Transparent) + { + rangestrokecolor = clr; + } + else + rangestrokecolor = Colors.White; + + + + rangeIndicator = new Path() + { + StrokeLineJoin = PenLineJoin.Round, + Stroke = new SolidColorBrush(rangestrokecolor), + //Color.FromArgb(0xFF, 0xF5, 0x9A, 0x86) + Fill = new SolidColorBrush(clr), + Opacity = 0.65, + StrokeThickness = 0.25, + Data = new PathGeometry() + { + Figures = new PathFigureCollection() + { + new PathFigure() + { + IsClosed = true, + StartPoint = p1, + Segments = segments + } + } + } + }; + + //Set Z index of range indicator + rangeIndicator.SetValue(Canvas.ZIndexProperty, 150); + // Adding the segment to the root grid + rootGrid.Children.Add(rangeIndicator); + + } + + #endregion + } +} diff --git a/Software/Visual_Studio/Tango.CircularGauge/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.CircularGauge/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..eaecfc80d --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("Tango - Circular Gauge Control")] +[assembly: ComVisible(false)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Software/Visual_Studio/Tango.CircularGauge/Properties/Resources.Designer.cs b/Software/Visual_Studio/Tango.CircularGauge/Properties/Resources.Designer.cs new file mode 100644 index 000000000..92a65f881 --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.CircularGauge.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.CircularGauge.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.CircularGauge/Properties/Resources.resx b/Software/Visual_Studio/Tango.CircularGauge/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?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.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: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" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </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" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.CircularGauge/Properties/Settings.Designer.cs b/Software/Visual_Studio/Tango.CircularGauge/Properties/Settings.Designer.cs new file mode 100644 index 000000000..791f73266 --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.CircularGauge.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.CircularGauge/Properties/Settings.settings b/Software/Visual_Studio/Tango.CircularGauge/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.CircularGauge/Tango.CircularGauge.csproj b/Software/Visual_Studio/Tango.CircularGauge/Tango.CircularGauge.csproj new file mode 100644 index 000000000..1773852f7 --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Tango.CircularGauge.csproj @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}</ProjectGuid> + <OutputType>library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.CircularGauge</RootNamespace> + <AssemblyName>Tango.CircularGauge</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>3.5</OldToolsVersion> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\Build\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\Build\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Xaml" /> + <Reference Include="System.Xml.Linq"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data.DataSetExtensions"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Page Include="Themes\Generic.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="CircularGaugeControl.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <Compile Include="TypeConverters.cs" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <AppDesigner Include="Properties\" /> + </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.CircularGauge/Themes/Generic.xaml b/Software/Visual_Studio/Tango.CircularGauge/Themes/Generic.xaml new file mode 100644 index 000000000..edef67f07 --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/Themes/Generic.xaml @@ -0,0 +1,174 @@ +<!--Copyright (c) 2009 T.Evelyn (evescode@gmail.com)
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.-->
+
+ <ResourceDictionary
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="clr-namespace:Tango.CircularGauge">
+ <!-- Type converters-->
+ <local:ImageOffsetConverter x:Key="imageOffsetConverter" />
+ <local:RadiusToDiameterConverter x:Key="radiusToDiameterConverter"/>
+ <local:PointerCenterConverter x:Key="pointerCenterConverter"/>
+ <local:RangeIndicatorLightPositionConverter x:Key="rangeIndicatorLightPositionConverter"/>
+ <local:SizeConverter x:Key="sizeConverter" />
+ <local:BackgroundColorConverter x:Key="backgroundColorConverter" />
+ <local:GlassEffectWidthConverter x:Key="glassEffectWidthConverter" />
+ <local:ColorToSolidColorBrushConverter x:Key="colorToSolidColorBrushConverter" />
+
+
+ <Style TargetType="local:CircularGaugeControl" >
+ <Setter Property="ResetPointerOnStartUp" Value="True" />
+ <Setter Property="ScaleValuePrecision" Value="5" />
+ <Setter Property="BorderBrush">
+ <Setter.Value>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FFA3AFD6" Offset="0.321"/>
+ <GradientStop Color="#FF8399A9" Offset="0.674"/>
+ <GradientStop Color="#FF718597" Offset="0.375"/>
+ <GradientStop Color="#FF617584" Offset="1"/>
+ </LinearGradientBrush>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="RangeIndicatorThickness" Value="5"/>
+ <Setter Property="GaugeBackgroundColor" Value="Black" />
+ <Setter Property="BelowOptimalRangeColor" Value="Yellow" />
+ <Setter Property="OptimalRangeColor" Value="Green" />
+ <Setter Property="AboveOptimalRangeColor" Value="Red" />
+ <Setter Property="DialTextColor" Value="White" />
+ <Setter Property="DialTextFontSize" Value="8" />
+
+ <Setter Property="Template" >
+ <Setter.Value>
+ <ControlTemplate TargetType="local:CircularGaugeControl">
+ <!-- Root Grid-->
+ <Grid x:Name="LayoutRoot"
+ Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource radiusToDiameterConverter}}"
+ Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource radiusToDiameterConverter}}" >
+
+
+ <Ellipse x:Name="OuterFrame" StrokeThickness="16"
+ Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource radiusToDiameterConverter}}"
+ Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource radiusToDiameterConverter}}"
+ Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=GaugeBackgroundColor, Converter={StaticResource backgroundColorConverter}}">
+
+ <Ellipse.Stroke>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF636060" Offset="1"/>
+ <GradientStop Color="#FF5F5C5C" Offset="0"/>
+ <GradientStop Color="#FFEEDEDE" Offset="0.35"/>
+ <GradientStop Color="#FFA09595" Offset="0.705"/>
+ </LinearGradientBrush>
+ </Ellipse.Stroke>
+ </Ellipse>
+
+
+ <!-- Gauge Image -->
+ <Image Source="{TemplateBinding ImageSource}"
+ Width="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=ImageSize, Converter={StaticResource sizeConverter}, ConverterParameter=Width }"
+
+ Height="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=ImageSize, Converter={StaticResource sizeConverter}, ConverterParameter=Height }"
+
+ RenderTransform="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=ImageOffset, Converter={StaticResource imageOffsetConverter}}">
+
+ </Image>
+
+ <!-- Dial Text -->
+ <TextBlock Text="{TemplateBinding DialText}"
+ HorizontalAlignment="Center" VerticalAlignment="Center"
+ Foreground="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=DialTextColor, Converter={StaticResource colorToSolidColorBrushConverter}}"
+ FontSize="{TemplateBinding DialTextFontSize}"
+ FontWeight="Bold"
+
+ RenderTransform="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=DialTextOffset, Converter={StaticResource rangeIndicatorLightPositionConverter}}">
+
+ </TextBlock>
+
+ <!-- Pointer -->
+ <Path x:Name="Pointer" Stroke="#FFE91C1C" StrokeThickness="2"
+ Width="{TemplateBinding PointerLength}"
+ Height="{TemplateBinding PointerThickness}" HorizontalAlignment="Center"
+ Data="M1,1 L1,10 L156,6 z" Stretch="Fill" RenderTransformOrigin="0,0.5"
+ RenderTransform="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=PointerLength, Converter={StaticResource pointerCenterConverter}}">
+ <Path.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF890A0A" Offset="0.197"/>
+ <GradientStop Color="#FFC40808" Offset="1"/>
+ <GradientStop Color="#FFE32323" Offset="0.61"/>
+ </LinearGradientBrush>
+ </Path.Fill>
+
+ </Path>
+
+
+ <!--Pointer Cap-->
+ <Ellipse x:Name="PointerCap" Height="{TemplateBinding PointerCapRadius}" Width="{TemplateBinding PointerCapRadius}" StrokeThickness="4" Opacity="1" >
+ <Ellipse.Stroke>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF000000" Offset="0.675"/>
+ <GradientStop Color="#FFC1B5B5" Offset="0.031"/>
+ </LinearGradientBrush>
+ </Ellipse.Stroke>
+ <Ellipse.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF152029" Offset="0.846"/>
+ <GradientStop Color="#FF140204" Offset="0.342"/>
+ </LinearGradientBrush>
+ </Ellipse.Fill>
+ </Ellipse>
+
+ <!--Range indicator light-->
+ <Ellipse x:Name="RangeIndicatorLight"
+ Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RangeIndicatorLightRadius, Converter={StaticResource radiusToDiameterConverter}}"
+ Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RangeIndicatorLightRadius, Converter={StaticResource radiusToDiameterConverter}}"
+
+ RenderTransform="{Binding RelativeSource={RelativeSource TemplatedParent},
+ Path=RangeIndicatorLightOffset, Converter={StaticResource rangeIndicatorLightPositionConverter}}">
+ <!--Range indicator light off position effect-->
+ <Ellipse.Fill>
+ <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
+ <GradientStop Color="LightGray" Offset="0.2" />
+ <GradientStop Color="Gray" Offset="0.5" />
+ <GradientStop Color="Black" Offset="0.8" />
+ </LinearGradientBrush>
+ </Ellipse.Fill>
+ </Ellipse>
+
+ <!--Glass effect ellipse-->
+ <Path x:Name="GlassEffect" StrokeThickness="1" Stretch="Fill" VerticalAlignment="Bottom"
+ Height="{TemplateBinding Radius}"
+ Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource glassEffectWidthConverter}}"
+ Opacity="0.18" Data="M265.99997,151.00005 C263.99994,194.00003 209.55908,259 135.00064,259 C60.442207,259 11,200.00003 5.9999995,157.00005 C5.0181994,148.55656 73.000877,112.00006 137.00053,112.00007 C199.00887,112.00008 266.72015,135.5164 265.99997,151.00005 z">
+ <Path.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#68FCFCFC"/>
+ <GradientStop Color="#FFF8FCF8" Offset="1"/>
+ </LinearGradientBrush>
+ </Path.Fill>
+ </Path>
+
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
diff --git a/Software/Visual_Studio/Tango.CircularGauge/TypeConverters.cs b/Software/Visual_Studio/Tango.CircularGauge/TypeConverters.cs new file mode 100644 index 000000000..98ef8933c --- /dev/null +++ b/Software/Visual_Studio/Tango.CircularGauge/TypeConverters.cs @@ -0,0 +1,277 @@ +/*Copyright (c) 2009 T.Evelyn (evescode@gmail.com)
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.*/
+
+
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Data;
+using System.Globalization;
+
+namespace Tango.CircularGauge
+{
+
+ /// <summary>
+ /// Converts the given color to a SolidColorBrush
+ /// </summary>
+ public class ColorToSolidColorBrushConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ Color c = (Color)value;
+
+ return new SolidColorBrush(c);
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+
+ /// <summary>
+ /// A type converter for converting image offset into render transform
+ /// </summary>
+ public class ImageOffsetConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ double dblVal = (double)value;
+ TranslateTransform tt = new TranslateTransform();
+ tt.Y = dblVal;
+ return tt;
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+
+ /// <summary>
+ /// Converts radius to diameter
+ /// </summary>
+ public class RadiusToDiameterConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ double dblVal = (double)value;
+
+ return (dblVal *2);
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ /// <summary>
+ /// Calculates the pointer position
+ /// </summary>
+ public class PointerCenterConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ double dblVal = (double)value;
+ TransformGroup tg = new TransformGroup();
+ RotateTransform rt = new RotateTransform();
+ TranslateTransform tt = new TranslateTransform();
+
+ tt.X = dblVal / 2;
+ tg.Children.Add(rt);
+ tg.Children.Add(tt);
+
+ return tg;
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ /// <summary>
+ /// Calculates the range indicator light position
+ /// </summary>
+ public class RangeIndicatorLightPositionConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ double dblVal = (double)value;
+ TransformGroup tg = new TransformGroup();
+ RotateTransform rt = new RotateTransform();
+ TranslateTransform tt = new TranslateTransform();
+
+ tt.Y = dblVal ;
+ tg.Children.Add(rt);
+ tg.Children.Add(tt);
+
+ return tg;
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ /// <summary>
+ /// Converts the given Size to height and width
+ /// </summary>
+ public class SizeConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ double i = 0;
+ Size s = (Size)value;
+ if (parameter.ToString() == "Height")
+ {
+ i = s.Height;
+ }
+ else if (parameter.ToString() == "Width")
+ {
+ i = s.Width;
+ }
+
+ return i;
+
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ /// <summary>
+ /// Scaling factor for drawing the glass effect.
+ /// </summary>
+ public class GlassEffectWidthConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ double dbl = (double)value;
+ return (dbl*2) * 0.94;
+
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ /// <summary>
+ /// Converts background color to Gradient effect
+ /// </summary>
+ public class BackgroundColorConverter : IValueConverter
+ {
+ public object Convert(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ Color c = (Color)value;
+ RadialGradientBrush radBrush = new RadialGradientBrush();
+ GradientStop g1 = new GradientStop();
+ g1.Offset = 0.982;
+ g1.Color = c;
+ GradientStop g2 = new GradientStop();
+ g2.Color = Color.FromArgb(0xFF, 0xAF, 0xB2, 0xB0);
+ radBrush.GradientStops.Add(g1);
+ radBrush.GradientStops.Add(g2);
+ return radBrush;
+
+ }
+
+ public object ConvertBack(
+ object value,
+ Type targetType,
+ object parameter,
+ CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/ProtoMessageFile.cs b/Software/Visual_Studio/Tango.CodeGeneration/ProtoMessageFile.cs index 6d771099a..2bcdac8b4 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/ProtoMessageFile.cs +++ b/Software/Visual_Studio/Tango.CodeGeneration/ProtoMessageFile.cs @@ -6,14 +6,18 @@ using System.Threading.Tasks; namespace Tango.CodeGeneration { - public class ProtoMessageFile : Class + public class ProtoMessageFile : CodeObject { + public String Name { get; set; } public String Package { get; set; } public List<String> Imports { get; set; } + public List<ProtoProperty> Properties { get; set; } + public ProtoMessageFile() { Imports = new List<string>(); + Properties = new List<ProtoProperty>(); } } } diff --git a/Software/Visual_Studio/Tango.CodeGeneration/ProtoProperty.cs b/Software/Visual_Studio/Tango.CodeGeneration/ProtoProperty.cs new file mode 100644 index 000000000..d63348b6b --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/ProtoProperty.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.CodeGeneration +{ + public class ProtoProperty : Property + { + public bool Repeated { get; set; } + + public String Description { get; set; } + + public ProtoProperty() + { + + } + + public ProtoProperty(String name, String type) : this() + { + Name = name; + Type = type; + } + } +} diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj index 0c093659f..3c6c9d085 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj +++ b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj @@ -70,6 +70,7 @@ <Compile Include="ObservablesContextCodeFile.cs" /> <Compile Include="ProtoEnumFile.cs" /> <Compile Include="ProtoMessageFile.cs" /> + <Compile Include="ProtoProperty.cs" /> <Compile Include="TangoDAOJavaFile.cs" /> <Compile Include="EnumerationFileJava.cs" /> <Compile Include="EnumerationFile.cs" /> diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml index 790e5dd93..d659a028e 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; @foreach (var import in Model.Imports) { @@ -17,6 +25,7 @@ enum @(Model.Name) @foreach (var prop in Model.Fields) { <div> + @(prop.Description != null ? ("//" + prop.Description) : "") @(prop.Name) = @(prop.Value); </div> } diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml index 7452db6e6..c1aa28fb1 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml @@ -1,6 +1,14 @@ -syntax = "proto3"; +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango PMR Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ -//This file is auto-generated. Do not modify! +syntax = "proto3"; @foreach (var import in Model.Imports) { @@ -18,7 +26,8 @@ message @(Model.Name) @for (int i = 0; i < Model.Properties.Count; i++) { <div> - @(Model.Properties[i].Type) @(Model.Properties[i].Name) = @(i + 1); + @(Model.Properties[i].Description != null ? ("//" + Model.Properties[i].Description) : "") + @(Model.Properties[i].Repeated ? "repeated" : "") @(Model.Properties[i].Type) @(Model.Properties[i].Name) = @(i + 1); </div> } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index a7a534dea..366561053 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -82,8 +82,8 @@ namespace Tango.DAL.Remote.DB public virtual DbSet<SEGMENT> SEGMENTS { get; set; } public virtual DbSet<SPOOL_TYPES> SPOOL_TYPES { get; set; } public virtual DbSet<SYNC_CONFIGURATIONS> SYNC_CONFIGURATIONS { get; set; } + public virtual DbSet<TECH_CONTROLLERS> TECH_CONTROLLERS { get; set; } public virtual DbSet<TECH_DISPENSERS> TECH_DISPENSERS { get; set; } - public virtual DbSet<TECH_HEATERS> TECH_HEATERS { get; set; } public virtual DbSet<TECH_IOS> TECH_IOS { get; set; } public virtual DbSet<TECH_MONITORS> TECH_MONITORS { get; set; } public virtual DbSet<TECH_MOTORS> TECH_MOTORS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index d60100532..739e2f6dc 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -784,7 +784,7 @@ <Property Name="TABLE_NAME" Type="varchar" MaxLength="100" Nullable="false" /> <Property Name="SYNC_TYPE" Type="int" Nullable="false" /> </EntityType> - <EntityType Name="TECH_DISPENSERS"> + <EntityType Name="TECH_CONTROLLERS"> <Key> <PropertyRef Name="ID" /> </Key> @@ -794,8 +794,11 @@ <Property Name="CODE" Type="int" Nullable="false" /> <Property Name="NAME" Type="varchar" MaxLength="100" Nullable="false" /> <Property Name="DESCRIPTION" Type="varchar" MaxLength="100" Nullable="false" /> + <Property Name="MIN" Type="float" Nullable="false" /> + <Property Name="MAX" Type="float" Nullable="false" /> + <Property Name="UNITS" Type="nvarchar" MaxLength="50" Nullable="false" /> </EntityType> - <EntityType Name="TECH_HEATERS"> + <EntityType Name="TECH_DISPENSERS"> <Key> <PropertyRef Name="ID" /> </Key> @@ -874,6 +877,7 @@ <Property Name="ORGANIZATION_GUID" Type="varchar" MaxLength="36" Nullable="false" /> <Property Name="CONTACT_GUID" Type="varchar" MaxLength="36" Nullable="false" /> <Property Name="ADDRESS_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_LOGIN" Type="datetime2" Precision="3" /> </EntityType> <EntityType Name="USERS_ROLES"> <Key> @@ -1308,7 +1312,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_JOBS_MACHINES"> - <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="1" /> + <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Role="JOBS" Type="Self.JOBS" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="MACHINES"> @@ -1420,7 +1426,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_MACHINES_CONFIGURATIONS"> - <End Role="CONFIGURATIONS" Type="Self.CONFIGURATIONS" Multiplicity="1" /> + <End Role="CONFIGURATIONS" Type="Self.CONFIGURATIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="CONFIGURATIONS"> @@ -1700,7 +1708,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_USERS_ADDRESSES"> - <End Role="ADDRESSES" Type="Self.ADDRESSES" Multiplicity="1" /> + <End Role="ADDRESSES" Type="Self.ADDRESSES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Role="USERS" Type="Self.USERS" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="ADDRESSES"> @@ -1712,7 +1722,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_USERS_CONTACTS"> - <End Role="CONTACTS" Type="Self.CONTACTS" Multiplicity="1" /> + <End Role="CONTACTS" Type="Self.CONTACTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Role="USERS" Type="Self.USERS" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="CONTACTS"> @@ -1821,8 +1833,8 @@ <EntitySet Name="SEGMENTS" EntityType="Self.SEGMENTS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="SPOOL_TYPES" EntityType="Self.SPOOL_TYPES" Schema="dbo" store:Type="Tables" /> <EntitySet Name="SYNC_CONFIGURATIONS" EntityType="Self.SYNC_CONFIGURATIONS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="TECH_CONTROLLERS" EntityType="Self.TECH_CONTROLLERS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="TECH_DISPENSERS" EntityType="Self.TECH_DISPENSERS" Schema="dbo" store:Type="Tables" /> - <EntitySet Name="TECH_HEATERS" EntityType="Self.TECH_HEATERS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="TECH_IOS" EntityType="Self.TECH_IOS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="TECH_MONITORS" EntityType="Self.TECH_MONITORS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="TECH_MOTORS" EntityType="Self.TECH_MOTORS" Schema="dbo" store:Type="Tables" /> @@ -2165,8 +2177,8 @@ <EntitySet Name="SEGMENTS" EntityType="RemoteModel.SEGMENT" /> <EntitySet Name="SPOOL_TYPES" EntityType="RemoteModel.SPOOL_TYPES" /> <EntitySet Name="SYNC_CONFIGURATIONS" EntityType="RemoteModel.SYNC_CONFIGURATIONS" /> + <EntitySet Name="TECH_CONTROLLERS" EntityType="RemoteModel.TECH_CONTROLLERS" /> <EntitySet Name="TECH_DISPENSERS" EntityType="RemoteModel.TECH_DISPENSERS" /> - <EntitySet Name="TECH_HEATERS" EntityType="RemoteModel.TECH_HEATERS" /> <EntitySet Name="TECH_IOS" EntityType="RemoteModel.TECH_IOS" /> <EntitySet Name="TECH_MONITORS" EntityType="RemoteModel.TECH_MONITORS" /> <EntitySet Name="TECH_MOTORS" EntityType="RemoteModel.TECH_MOTORS" /> @@ -3352,7 +3364,7 @@ <Property Name="TABLE_NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" /> <Property Name="SYNC_TYPE" Type="Int32" Nullable="false" /> </EntityType> - <EntityType Name="TECH_DISPENSERS"> + <EntityType Name="TECH_CONTROLLERS"> <Key> <PropertyRef Name="ID" /> </Key> @@ -3362,8 +3374,11 @@ <Property Name="CODE" Type="Int32" Nullable="false" /> <Property Name="NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" /> <Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" /> + <Property Name="MIN" Type="Double" Nullable="false" /> + <Property Name="MAX" Type="Double" Nullable="false" /> + <Property Name="UNITS" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /> </EntityType> - <EntityType Name="TECH_HEATERS"> + <EntityType Name="TECH_DISPENSERS"> <Key> <PropertyRef Name="ID" /> </Key> @@ -3442,6 +3457,7 @@ <Property Name="ORGANIZATION_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> <Property Name="CONTACT_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> <Property Name="ADDRESS_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_LOGIN" Type="DateTime" Precision="3" /> <NavigationProperty Name="ADDRESS" Relationship="RemoteModel.FK_USERS_ADDRESSES" FromRole="USER" ToRole="ADDRESS" /> <NavigationProperty Name="CONTACT" Relationship="RemoteModel.FK_USERS_CONTACTS" FromRole="USER" ToRole="CONTACT" /> <NavigationProperty Name="JOBS" Relationship="RemoteModel.FK_JOBS_USERS" FromRole="USER" ToRole="JOB" /> @@ -3502,7 +3518,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_USERS_ADDRESSES"> - <End Type="RemoteModel.ADDRESS" Role="ADDRESS" Multiplicity="1" /> + <End Type="RemoteModel.ADDRESS" Role="ADDRESS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Type="RemoteModel.USER" Role="USER" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="ADDRESS"> @@ -3742,7 +3760,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_MACHINES_CONFIGURATIONS"> - <End Type="RemoteModel.CONFIGURATION" Role="CONFIGURATION" Multiplicity="1" /> + <End Type="RemoteModel.CONFIGURATION" Role="CONFIGURATION" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="CONFIGURATION"> @@ -3780,7 +3800,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_USERS_CONTACTS"> - <End Type="RemoteModel.CONTACT" Role="CONTACT" Multiplicity="1" /> + <End Type="RemoteModel.CONTACT" Role="CONTACT" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Type="RemoteModel.USER" Role="USER" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="CONTACT"> @@ -4010,7 +4032,9 @@ </ReferentialConstraint> </Association> <Association Name="FK_JOBS_MACHINES"> - <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="1" /> + <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> <End Type="RemoteModel.JOB" Role="JOB" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="MACHINE"> @@ -5183,9 +5207,12 @@ </MappingFragment> </EntityTypeMapping> </EntitySetMapping> - <EntitySetMapping Name="TECH_DISPENSERS"> - <EntityTypeMapping TypeName="RemoteModel.TECH_DISPENSERS"> - <MappingFragment StoreEntitySet="TECH_DISPENSERS"> + <EntitySetMapping Name="TECH_CONTROLLERS"> + <EntityTypeMapping TypeName="RemoteModel.TECH_CONTROLLERS"> + <MappingFragment StoreEntitySet="TECH_CONTROLLERS"> + <ScalarProperty Name="UNITS" ColumnName="UNITS" /> + <ScalarProperty Name="MAX" ColumnName="MAX" /> + <ScalarProperty Name="MIN" ColumnName="MIN" /> <ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" /> <ScalarProperty Name="NAME" ColumnName="NAME" /> <ScalarProperty Name="CODE" ColumnName="CODE" /> @@ -5195,9 +5222,9 @@ </MappingFragment> </EntityTypeMapping> </EntitySetMapping> - <EntitySetMapping Name="TECH_HEATERS"> - <EntityTypeMapping TypeName="RemoteModel.TECH_HEATERS"> - <MappingFragment StoreEntitySet="TECH_HEATERS"> + <EntitySetMapping Name="TECH_DISPENSERS"> + <EntityTypeMapping TypeName="RemoteModel.TECH_DISPENSERS"> + <MappingFragment StoreEntitySet="TECH_DISPENSERS"> <ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" /> <ScalarProperty Name="NAME" ColumnName="NAME" /> <ScalarProperty Name="CODE" ColumnName="CODE" /> @@ -5269,6 +5296,7 @@ <EntitySetMapping Name="USERS"> <EntityTypeMapping TypeName="RemoteModel.USER"> <MappingFragment StoreEntitySet="USERS"> + <ScalarProperty Name="LAST_LOGIN" ColumnName="LAST_LOGIN" /> <ScalarProperty Name="ADDRESS_GUID" ColumnName="ADDRESS_GUID" /> <ScalarProperty Name="CONTACT_GUID" ColumnName="CONTACT_GUID" /> <ScalarProperty Name="ORGANIZATION_GUID" ColumnName="ORGANIZATION_GUID" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 77b727914..0ab9b672b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,72 +5,72 @@ <!-- Diagram content (shape and connector positions) --> <edmx:Diagrams> <Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1"> - <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="8" PointY="27.5" /> - <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="51.875" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="76.625" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="79.625" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="82.5" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="70" /> - <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="9.75" PointY="6.375" /> - <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="53" /> - <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="15.875" /> - <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="27.125" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="7.5" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="5.25" PointY="2.5" /> - <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="63.75" /> - <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="42.125" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6" PointY="47.375" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="56.25" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="59.125" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="3" PointY="36.375" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="10.25" PointY="34.5" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="25.875" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="11.75" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="4.5" PointY="78.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="6.75" PointY="72.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="4.5" PointY="82.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="6.75" PointY="76.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="1.5" PointY="86.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="3.75" PointY="71.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="73" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="4.5" PointY="68.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6.75" PointY="69.125" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="41" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="37.875" /> - <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="7.5" PointY="11.875" /> - <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="5.25" PointY="8.25" /> - <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="28.875" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="5" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="16.125" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="5.25" PointY="23.375" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="32.625" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="46.625" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="5.25" PointY="56.75" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="5.25" PointY="36.125" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="22.625" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="19.625" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="16.375" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="8.875" /> - <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="44.25" /> - <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="38.25" /> - <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="6" PointY="64.5" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="31.125" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="32.375" /> - <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="13.5" /> - <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="6" PointY="60.375" /> - <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="8.25" PointY="60.5" /> - <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="7.5" PointY="8.375" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="27.5" /> - <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="2.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="9.75" PointY="2.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="11.75" PointY="2.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="11.75" PointY="5.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="11.75" PointY="9.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MOTORS" Width="1.5" PointX="10.75" PointY="14.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="12.75" PointY="14.25" /> - <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="3" PointY="22.625" /> - <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="8.25" PointY="23.375" /> - <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="3" PointY="9.5" /> + <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="9" PointY="74.5" /> + <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="3.5" PointY="57.375" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="3.5" PointY="45.75" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="3.5" PointY="54.5" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="3.5" PointY="42.75" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="3.5" PointY="39.875" /> + <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="14.75" PointY="11.125" /> + <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="8.75" PointY="67.25" /> + <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="17.25" /> + <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="31.5" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="12.5" PointY="2.5" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="10.25" PointY="4.25" /> + <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="5.75" PointY="43.75" /> + <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="3.5" PointY="61.625" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="8.75" PointY="61.625" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="3.5" PointY="48.625" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="3.5" PointY="51.5" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="9" PointY="70.5" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="11.25" PointY="70.5" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="21.5" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="10.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="6.5" PointY="69.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="8.75" PointY="40.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="3.5" PointY="27.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="5.75" PointY="36.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="8.5" PointY="44.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="10.75" PointY="30.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="3.5" PointY="36.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="6.5" PointY="55.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="8.75" PointY="36.375" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="8.75" PointY="58.25" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="11" PointY="36.125" /> + <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="12.5" PointY="9.875" /> + <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="10.25" PointY="9.625" /> + <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="27.25" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="21.375" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="16.625" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="10.25" PointY="26" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="5.75" PointY="65.75" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="8" PointY="50.25" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="10.25" PointY="47.875" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="11.25" PointY="41.125" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="7.25" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="24.375" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="14.75" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="18.5" /> + <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="8.75" PointY="55.125" /> + <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="5.75" PointY="59.75" /> + <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="11" PointY="18.125" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="11.25" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="12.5" /> + <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="12" /> + <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="11" PointY="22" /> + <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="13.25" PointY="22.125" /> + <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="12.5" PointY="13.125" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="8" PointY="22" /> + <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="4.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="2.75" PointY="4.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="4.75" PointY="3.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MOTORS" Width="1.5" PointX="6.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="6.75" PointY="4.75" /> + <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="8" PointY="29.125" /> + <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="13.25" PointY="30" /> + <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="8" PointY="26" /> <AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" /> <AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" /> <AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_HEATERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_CONTROLLERS.cs index b37a0c5a1..d5e2119a4 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_HEATERS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_CONTROLLERS.cs @@ -12,7 +12,7 @@ namespace Tango.DAL.Remote.DB using System; using System.Collections.Generic; - public partial class TECH_HEATERS + public partial class TECH_CONTROLLERS { public int ID { get; set; } public string GUID { get; set; } @@ -20,5 +20,8 @@ namespace Tango.DAL.Remote.DB public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } + public double MIN { get; set; } + public double MAX { get; set; } + public string UNITS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs index 28dc2a2b8..6f4c40811 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs @@ -32,6 +32,7 @@ namespace Tango.DAL.Remote.DB public string ORGANIZATION_GUID { get; set; } public string CONTACT_GUID { get; set; } public string ADDRESS_GUID { get; set; } + public Nullable<System.DateTime> LAST_LOGIN { get; set; } public virtual ADDRESS ADDRESS { get; set; } public virtual CONTACT CONTACT { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index c9e2dbbed..83c839310 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -251,10 +251,10 @@ <Compile Include="DB\SYNC_CONFIGURATIONS.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> - <Compile Include="DB\TECH_DISPENSERS.cs"> + <Compile Include="DB\TECH_CONTROLLERS.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> - <Compile Include="DB\TECH_HEATERS.cs"> + <Compile Include="DB\TECH_DISPENSERS.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> <Compile Include="DB\TECH_IOS.cs"> diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 143a198eb..e6ad97427 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -42,6 +42,7 @@ namespace Tango.Emulations.Emulators private List<DigitalPin> _digitalOutputPinsStates; private List<DigitalPin> _digitalInputPinsStates; private LogManager LogManager = LogManager.Default; + private List<ValueComponentState> _componentsStates; #region Constructors @@ -74,6 +75,7 @@ namespace Tango.Emulations.Emulators _dispenserJoggingRequestCodes = new List<int>(); _dispenserHomingRequestCodes = new List<int>(); _digitalOutputPinsStates = new List<DigitalPin>(); + _componentsStates = new List<ValueComponentState>(); var adapter = ObservablesEntitiesAdapter.Instance; adapter.Initialize(); @@ -88,6 +90,15 @@ namespace Tango.Emulations.Emulators Port = x.Port, }).ToList(); + foreach (var item in adapter.TechControllers) + { + _componentsStates.Add(new ValueComponentState() + { + Component = (ValueComponent)item.Code, + Value = item.Min + }); + } + ResetGraphFactors(); } @@ -164,6 +175,9 @@ namespace Tango.Emulations.Emulators case MessageType.UploadProcessParametersRequest: HandleUploadProcessParametersRequest(MessageFactory.ParseTangoMessageFromContainer<UploadProcessParametersRequest>(container)); break; + case MessageType.SetComponentValueRequest: + HandleSetComponentValueRequest(MessageFactory.ParseTangoMessageFromContainer<SetComponentValueRequest>(container)); + break; } } @@ -214,17 +228,19 @@ namespace Tango.Emulations.Emulators while (Transporter.State == TransportComponentState.Connected) { PushDiagnosticsResponse res = new PushDiagnosticsResponse(); + DiagnosticsMonitors monitors = new DiagnosticsMonitors(); + res.Monitors = monitors; if (_diagnosticsRequest.PushSensors) { for (int i = 0; i < 10; i++) { value++; - res.Dancer1Angle.Add((int)(150 + _graphAmplitude * Math.Sin(2 * 3.14 * ((int)_graphFrequency) * value))); + monitors.Dancer1Angle.Add((int)(150 + _graphAmplitude * Math.Sin(2 * 3.14 * ((int)_graphFrequency) * value))); } - res.Dancer2Angle.Add(Cursor.Position.Y); - res.Dancer3Angle.Add(Cursor.Position.Y); + monitors.Dancer2Angle.Add(Cursor.Position.Y); + monitors.Dancer3Angle.Add(Cursor.Position.Y); } if (_diagnosticsRequest.PushMotors) @@ -245,19 +261,20 @@ namespace Tango.Emulations.Emulators dispenserFrequencies.Add(singleDispenser); } - res.DispensersMotorsFrequency.AddRange(dispenserFrequencies); + monitors.DispensersMotorsFrequency.AddRange(dispenserFrequencies); - res.Dispenser1MotorFrequency.AddRange(dispenserFrequencies[0].Data); - res.Dispenser2MotorFrequency.AddRange(dispenserFrequencies[1].Data); - res.Dispenser3MotorFrequency.AddRange(dispenserFrequencies[2].Data); - res.Dispenser4MotorFrequency.AddRange(dispenserFrequencies[3].Data); - res.Dispenser5MotorFrequency.AddRange(dispenserFrequencies[4].Data); - res.Dispenser6MotorFrequency.AddRange(dispenserFrequencies[5].Data); - res.Dispenser7MotorFrequency.AddRange(dispenserFrequencies[6].Data); - res.Dispenser8MotorFrequency.AddRange(dispenserFrequencies[7].Data); + monitors.Dispenser1MotorFrequency.AddRange(dispenserFrequencies[0].Data); + monitors.Dispenser2MotorFrequency.AddRange(dispenserFrequencies[1].Data); + monitors.Dispenser3MotorFrequency.AddRange(dispenserFrequencies[2].Data); + monitors.Dispenser4MotorFrequency.AddRange(dispenserFrequencies[3].Data); + monitors.Dispenser5MotorFrequency.AddRange(dispenserFrequencies[4].Data); + monitors.Dispenser6MotorFrequency.AddRange(dispenserFrequencies[5].Data); + monitors.Dispenser7MotorFrequency.AddRange(dispenserFrequencies[6].Data); + monitors.Dispenser8MotorFrequency.AddRange(dispenserFrequencies[7].Data); } res.DigitalPins.AddRange(_digitalOutputPinsStates.Concat(_digitalInputPinsStates)); + res.ComponentsStates.AddRange(_componentsStates); res.Version = "1.0.0.0"; res.VersionBuildDate = DateTime.Now.ToString(); @@ -531,7 +548,7 @@ namespace Tango.Emulations.Emulators { LogManager.Log("Upload process parameters request received: " + Environment.NewLine + request.Message.ToJsonString()); - Task.Factory.StartNew(() => + Task.Factory.StartNew(() => { Thread.Sleep(1000); @@ -540,6 +557,38 @@ namespace Tango.Emulations.Emulators }); } + private void HandleSetComponentValueRequest(TangoMessage<SetComponentValueRequest> request) + { + LogManager.Log("Set component value request received: " + Environment.NewLine + request.Message.ToJsonString()); + + var componentState = _componentsStates.SingleOrDefault(x => x.Component == request.Message.Component); + + double startValue = componentState.Value; + double targetValue = request.Message.Value; + + Transporter.SendResponse<SetComponentValueResponse>(new SetComponentValueResponse(), request.Container.Token); + + Task.Factory.StartNew(() => + { + if (targetValue > startValue) + { + while (componentState.Value < targetValue) + { + componentState.Value++; + Thread.Sleep(30); + } + } + else + { + while (componentState.Value > targetValue) + { + componentState.Value--; + Thread.Sleep(30); + } + } + }); + } + #endregion } } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index e17f515cc..5dfc1a1f4 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -139,5 +139,12 @@ namespace Tango.Integration.Operation /// <param name="request">The request.</param> /// <returns></returns> Task<ThreadAbortJoggingResponse> StopThreadJogging(ThreadAbortJoggingRequest request); + + /// <summary> + /// Sets the specified component value. + /// </summary> + /// <param name="request">The request.</param> + /// <returns></returns> + Task<SetComponentValueResponse> SetComponentValue(SetComponentValueRequest request); } } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 4f7ebbbdd..e65b67e26 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -473,6 +473,16 @@ namespace Tango.Integration.Operation return await SendRequest<ThreadAbortJoggingRequest, ThreadAbortJoggingResponse>(request); } + /// <summary> + /// Sets the specified component value. + /// </summary> + /// <param name="request">The request.</param> + /// <returns></returns> + public async Task<SetComponentValueResponse> SetComponentValue(SetComponentValueRequest request) + { + return await SendRequest<SetComponentValueRequest, SetComponentValueResponse>(request); + } + #endregion } } diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index 04fb2c1c6..6301c2d03 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Common { static MessageTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqEFwoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirDFwoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhQKEENhbGN1bGF0ZVJlcXVlc3QQAxIVChFD", "YWxjdWxhdGVSZXNwb25zZRAEEhMKD1Byb2dyZXNzUmVxdWVzdBAFEhQKEFBy", "b2dyZXNzUmVzcG9uc2UQBhIcChhTdHViQ2FydHJpZGdlUmVhZFJlcXVlc3QQ", @@ -82,14 +82,15 @@ namespace Tango.PMR.Common { "aWdpdGFsT3V0UmVzcG9uc2UQ4w8SGQoUVGhyZWFkSm9nZ2luZ1JlcXVlc3QQ", "5A8SGgoVVGhyZWFkSm9nZ2luZ1Jlc3BvbnNlEOUPEh4KGVRocmVhZEFib3J0", "Sm9nZ2luZ1JlcXVlc3QQ5g8SHwoaVGhyZWFkQWJvcnRKb2dnaW5nUmVzcG9u", - "c2UQ5w8SDwoKSm9iUmVxdWVzdBC4FxIQCgtKb2JSZXNwb25zZRC5FxIUCg9B", - "Ym9ydEpvYlJlcXVlc3QQuhcSFQoQQWJvcnRKb2JSZXNwb25zZRC7FxIjCh5V", - "cGxvYWRQcm9jZXNzUGFyYW1ldGVyc1JlcXVlc3QQvBcSJAofVXBsb2FkUHJv", - "Y2Vzc1BhcmFtZXRlcnNSZXNwb25zZRC9FxIUCg9EZWJ1Z0xvZ1JlcXVlc3QQ", - "oB8SFQoQRGVidWdMb2dSZXNwb25zZRChHxInCiJVcGxvYWRIYXJkd2FyZUNv", - "bmZpZ3VyYXRpb25SZXF1ZXN0EIgnEigKI1VwbG9hZEhhcmR3YXJlQ29uZmln", - "dXJhdGlvblJlc3BvbnNlEIknQhwKGmNvbS50d2luZS50YW5nby5wbXIuY29t", - "bW9uYgZwcm90bzM=")); + "c2UQ5w8SHQoYU2V0Q29tcG9uZW50VmFsdWVSZXF1ZXN0EOgPEh4KGVNldENv", + "bXBvbmVudFZhbHVlUmVzcG9uc2UQ6Q8SDwoKSm9iUmVxdWVzdBC4FxIQCgtK", + "b2JSZXNwb25zZRC5FxIUCg9BYm9ydEpvYlJlcXVlc3QQuhcSFQoQQWJvcnRK", + "b2JSZXNwb25zZRC7FxIjCh5VcGxvYWRQcm9jZXNzUGFyYW1ldGVyc1JlcXVl", + "c3QQvBcSJAofVXBsb2FkUHJvY2Vzc1BhcmFtZXRlcnNSZXNwb25zZRC9FxIU", + "Cg9EZWJ1Z0xvZ1JlcXVlc3QQoB8SFQoQRGVidWdMb2dSZXNwb25zZRChHxIn", + "CiJVcGxvYWRIYXJkd2FyZUNvbmZpZ3VyYXRpb25SZXF1ZXN0EIgnEigKI1Vw", + "bG9hZEhhcmR3YXJlQ29uZmlndXJhdGlvblJlc3BvbnNlEIknQhwKGmNvbS50", + "d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -203,6 +204,8 @@ namespace Tango.PMR.Common { [pbr::OriginalName("ThreadJoggingResponse")] ThreadJoggingResponse = 2021, [pbr::OriginalName("ThreadAbortJoggingRequest")] ThreadAbortJoggingRequest = 2022, [pbr::OriginalName("ThreadAbortJoggingResponse")] ThreadAbortJoggingResponse = 2023, + [pbr::OriginalName("SetComponentValueRequest")] SetComponentValueRequest = 2024, + [pbr::OriginalName("SetComponentValueResponse")] SetComponentValueResponse = 2025, /// <summary> ///Printing /// </summary> diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs new file mode 100644 index 000000000..3f558f414 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs @@ -0,0 +1,1017 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DiagnosticsMonitors.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Diagnostics { + + /// <summary>Holder for reflection information generated from DiagnosticsMonitors.proto</summary> + public static partial class DiagnosticsMonitorsReflection { + + #region Descriptor + /// <summary>File descriptor for DiagnosticsMonitors.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static DiagnosticsMonitorsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChlEaWFnbm9zdGljc01vbml0b3JzLnByb3RvEhVUYW5nby5QTVIuRGlhZ25v", + "c3RpY3MaEURvdWJsZUFycmF5LnByb3RvIpQJChNEaWFnbm9zdGljc01vbml0", + "b3JzEhQKDERhbmNlcjFBbmdsZRgBIAMoARIUCgxEYW5jZXIyQW5nbGUYAiAD", + "KAESFAoMRGFuY2VyM0FuZ2xlGAMgAygBEhwKFEZlZWRlck1vdG9yRnJlcXVl", + "bmN5GAQgAygBEhIKCkRyeWVyTW90b3IYBSADKAESEwoLUG9sbGVyTW90b3IY", + "BiADKAESEwoLV2luZGVyTW90b3IYByADKAESEgoKU2NyZXdNb3RvchgIIAMo", + "ARITCgtUaHJlYWRTcGVlZBgJIAMoARIYChBNaXhlclRlbXBlcmF0dXJlGAog", + "AygBEhwKFEhlYWRab25lMVRlbXBlcmF0dXJlGAsgAygBEhwKFEhlYWRab25l", + "MlRlbXBlcmF0dXJlGAwgAygBEhwKFEhlYWRab25lM1RlbXBlcmF0dXJlGA0g", + "AygBEhMKC0hlYWRBaXJGbG93GA4gAygBEhUKDUZlZWRlclRlbnNpb24YDyAD", + "KAESFQoNUHVsbGVyVGVuc2lvbhgQIAMoARIdChVEcnllclpvbmUxVGVtcGVy", + "YXR1cmUYESADKAESHQoVRHJ5ZXJab25lMlRlbXBlcmF0dXJlGBIgAygBEh0K", + "FURyeWVyWm9uZTNUZW1wZXJhdHVyZRgTIAMoARIUCgxEcnllckFpckZsb3cY", + "FCADKAESFQoNV2luZGVyVGVuc2lvbhgVIAMoARJFChlEaXNwZW5zZXJzTW90", + "b3JzRnJlcXVlbmN5GBYgAygLMiIuVGFuZ28uUE1SLkRpYWdub3N0aWNzLkRv", + "dWJsZUFycmF5EkUKGURpc3BlbnNlcnNBbmd1bGFyRW5jb2RlcnMYFyADKAsy", + "Ii5UYW5nby5QTVIuRGlhZ25vc3RpY3MuRG91YmxlQXJyYXkSRQoZRGlzcGVu", + "c2Vyc0xpbmVhclBvc2l0aW9ucxgYIAMoCzIiLlRhbmdvLlBNUi5EaWFnbm9z", + "dGljcy5Eb3VibGVBcnJheRI+ChJEaXNwZW5zZXJzUHJlc3N1cmUYGSADKAsy", + "Ii5UYW5nby5QTVIuRGlhZ25vc3RpY3MuRG91YmxlQXJyYXkSFwoPTWlkVGFu", + "a1ByZXNzdXJlGBogAygBEhsKE0ZpbHRlckRlbHRhUHJlc3N1cmUYGyADKAES", + "GgoSQ2hpbGxlclRlbXBlcmF0dXJlGBwgAygBEiAKGERpc3BlbnNlcjFNb3Rv", + "ckZyZXF1ZW5jeRgdIAMoARIgChhEaXNwZW5zZXIyTW90b3JGcmVxdWVuY3kY", + "HiADKAESIAoYRGlzcGVuc2VyM01vdG9yRnJlcXVlbmN5GB8gAygBEiAKGERp", + "c3BlbnNlcjRNb3RvckZyZXF1ZW5jeRggIAMoARIgChhEaXNwZW5zZXI1TW90", + "b3JGcmVxdWVuY3kYISADKAESIAoYRGlzcGVuc2VyNk1vdG9yRnJlcXVlbmN5", + "GCIgAygBEiAKGERpc3BlbnNlcjdNb3RvckZyZXF1ZW5jeRgjIAMoARIgChhE", + "aXNwZW5zZXI4TW90b3JGcmVxdWVuY3kYJCADKAFCIQofY29tLnR3aW5lLnRh", + "bmdvLnBtci5kaWFnbm9zdGljc2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.DoubleArrayReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DiagnosticsMonitors), global::Tango.PMR.Diagnostics.DiagnosticsMonitors.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle", "FeederMotorFrequency", "DryerMotor", "PollerMotor", "WinderMotor", "ScrewMotor", "ThreadSpeed", "MixerTemperature", "HeadZone1Temperature", "HeadZone2Temperature", "HeadZone3Temperature", "HeadAirFlow", "FeederTension", "PullerTension", "DryerZone1Temperature", "DryerZone2Temperature", "DryerZone3Temperature", "DryerAirFlow", "WinderTension", "DispensersMotorsFrequency", "DispensersAngularEncoders", "DispensersLinearPositions", "DispensersPressure", "MidTankPressure", "FilterDeltaPressure", "ChillerTemperature", "Dispenser1MotorFrequency", "Dispenser2MotorFrequency", "Dispenser3MotorFrequency", "Dispenser4MotorFrequency", "Dispenser5MotorFrequency", "Dispenser6MotorFrequency", "Dispenser7MotorFrequency", "Dispenser8MotorFrequency" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class DiagnosticsMonitors : pb::IMessage<DiagnosticsMonitors> { + private static readonly pb::MessageParser<DiagnosticsMonitors> _parser = new pb::MessageParser<DiagnosticsMonitors>(() => new DiagnosticsMonitors()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<DiagnosticsMonitors> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Diagnostics.DiagnosticsMonitorsReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DiagnosticsMonitors() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DiagnosticsMonitors(DiagnosticsMonitors other) : this() { + dancer1Angle_ = other.dancer1Angle_.Clone(); + dancer2Angle_ = other.dancer2Angle_.Clone(); + dancer3Angle_ = other.dancer3Angle_.Clone(); + feederMotorFrequency_ = other.feederMotorFrequency_.Clone(); + dryerMotor_ = other.dryerMotor_.Clone(); + pollerMotor_ = other.pollerMotor_.Clone(); + winderMotor_ = other.winderMotor_.Clone(); + screwMotor_ = other.screwMotor_.Clone(); + threadSpeed_ = other.threadSpeed_.Clone(); + mixerTemperature_ = other.mixerTemperature_.Clone(); + headZone1Temperature_ = other.headZone1Temperature_.Clone(); + headZone2Temperature_ = other.headZone2Temperature_.Clone(); + headZone3Temperature_ = other.headZone3Temperature_.Clone(); + headAirFlow_ = other.headAirFlow_.Clone(); + feederTension_ = other.feederTension_.Clone(); + pullerTension_ = other.pullerTension_.Clone(); + dryerZone1Temperature_ = other.dryerZone1Temperature_.Clone(); + dryerZone2Temperature_ = other.dryerZone2Temperature_.Clone(); + dryerZone3Temperature_ = other.dryerZone3Temperature_.Clone(); + dryerAirFlow_ = other.dryerAirFlow_.Clone(); + winderTension_ = other.winderTension_.Clone(); + dispensersMotorsFrequency_ = other.dispensersMotorsFrequency_.Clone(); + dispensersAngularEncoders_ = other.dispensersAngularEncoders_.Clone(); + dispensersLinearPositions_ = other.dispensersLinearPositions_.Clone(); + dispensersPressure_ = other.dispensersPressure_.Clone(); + midTankPressure_ = other.midTankPressure_.Clone(); + filterDeltaPressure_ = other.filterDeltaPressure_.Clone(); + chillerTemperature_ = other.chillerTemperature_.Clone(); + dispenser1MotorFrequency_ = other.dispenser1MotorFrequency_.Clone(); + dispenser2MotorFrequency_ = other.dispenser2MotorFrequency_.Clone(); + dispenser3MotorFrequency_ = other.dispenser3MotorFrequency_.Clone(); + dispenser4MotorFrequency_ = other.dispenser4MotorFrequency_.Clone(); + dispenser5MotorFrequency_ = other.dispenser5MotorFrequency_.Clone(); + dispenser6MotorFrequency_ = other.dispenser6MotorFrequency_.Clone(); + dispenser7MotorFrequency_ = other.dispenser7MotorFrequency_.Clone(); + dispenser8MotorFrequency_ = other.dispenser8MotorFrequency_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DiagnosticsMonitors Clone() { + return new DiagnosticsMonitors(this); + } + + /// <summary>Field number for the "Dancer1Angle" field.</summary> + public const int Dancer1AngleFieldNumber = 1; + private static readonly pb::FieldCodec<double> _repeated_dancer1Angle_codec + = pb::FieldCodec.ForDouble(10); + private readonly pbc::RepeatedField<double> dancer1Angle_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dancer 1 (Min = 0, Max = 255, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dancer1Angle { + get { return dancer1Angle_; } + } + + /// <summary>Field number for the "Dancer2Angle" field.</summary> + public const int Dancer2AngleFieldNumber = 2; + private static readonly pb::FieldCodec<double> _repeated_dancer2Angle_codec + = pb::FieldCodec.ForDouble(18); + private readonly pbc::RepeatedField<double> dancer2Angle_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dancer 2 (Min = 0, Max = 1200, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dancer2Angle { + get { return dancer2Angle_; } + } + + /// <summary>Field number for the "Dancer3Angle" field.</summary> + public const int Dancer3AngleFieldNumber = 3; + private static readonly pb::FieldCodec<double> _repeated_dancer3Angle_codec + = pb::FieldCodec.ForDouble(26); + private readonly pbc::RepeatedField<double> dancer3Angle_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dancer 3 (Min = 0, Max = 1200, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dancer3Angle { + get { return dancer3Angle_; } + } + + /// <summary>Field number for the "FeederMotorFrequency" field.</summary> + public const int FeederMotorFrequencyFieldNumber = 4; + private static readonly pb::FieldCodec<double> _repeated_feederMotorFrequency_codec + = pb::FieldCodec.ForDouble(34); + private readonly pbc::RepeatedField<double> feederMotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Feeder Motor (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> FeederMotorFrequency { + get { return feederMotorFrequency_; } + } + + /// <summary>Field number for the "DryerMotor" field.</summary> + public const int DryerMotorFieldNumber = 5; + private static readonly pb::FieldCodec<double> _repeated_dryerMotor_codec + = pb::FieldCodec.ForDouble(42); + private readonly pbc::RepeatedField<double> dryerMotor_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dryer Motor (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> DryerMotor { + get { return dryerMotor_; } + } + + /// <summary>Field number for the "PollerMotor" field.</summary> + public const int PollerMotorFieldNumber = 6; + private static readonly pb::FieldCodec<double> _repeated_pollerMotor_codec + = pb::FieldCodec.ForDouble(50); + private readonly pbc::RepeatedField<double> pollerMotor_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Poller Motor (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> PollerMotor { + get { return pollerMotor_; } + } + + /// <summary>Field number for the "WinderMotor" field.</summary> + public const int WinderMotorFieldNumber = 7; + private static readonly pb::FieldCodec<double> _repeated_winderMotor_codec + = pb::FieldCodec.ForDouble(58); + private readonly pbc::RepeatedField<double> winderMotor_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Winder Motor (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> WinderMotor { + get { return winderMotor_; } + } + + /// <summary>Field number for the "ScrewMotor" field.</summary> + public const int ScrewMotorFieldNumber = 8; + private static readonly pb::FieldCodec<double> _repeated_screwMotor_codec + = pb::FieldCodec.ForDouble(66); + private readonly pbc::RepeatedField<double> screwMotor_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Screw Motor (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> ScrewMotor { + get { return screwMotor_; } + } + + /// <summary>Field number for the "ThreadSpeed" field.</summary> + public const int ThreadSpeedFieldNumber = 9; + private static readonly pb::FieldCodec<double> _repeated_threadSpeed_codec + = pb::FieldCodec.ForDouble(74); + private readonly pbc::RepeatedField<double> threadSpeed_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Thread Speed (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> ThreadSpeed { + get { return threadSpeed_; } + } + + /// <summary>Field number for the "MixerTemperature" field.</summary> + public const int MixerTemperatureFieldNumber = 10; + private static readonly pb::FieldCodec<double> _repeated_mixerTemperature_codec + = pb::FieldCodec.ForDouble(82); + private readonly pbc::RepeatedField<double> mixerTemperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Mixer (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> MixerTemperature { + get { return mixerTemperature_; } + } + + /// <summary>Field number for the "HeadZone1Temperature" field.</summary> + public const int HeadZone1TemperatureFieldNumber = 11; + private static readonly pb::FieldCodec<double> _repeated_headZone1Temperature_codec + = pb::FieldCodec.ForDouble(90); + private readonly pbc::RepeatedField<double> headZone1Temperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Head Zone 1 (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> HeadZone1Temperature { + get { return headZone1Temperature_; } + } + + /// <summary>Field number for the "HeadZone2Temperature" field.</summary> + public const int HeadZone2TemperatureFieldNumber = 12; + private static readonly pb::FieldCodec<double> _repeated_headZone2Temperature_codec + = pb::FieldCodec.ForDouble(98); + private readonly pbc::RepeatedField<double> headZone2Temperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Head Zone 2 (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> HeadZone2Temperature { + get { return headZone2Temperature_; } + } + + /// <summary>Field number for the "HeadZone3Temperature" field.</summary> + public const int HeadZone3TemperatureFieldNumber = 13; + private static readonly pb::FieldCodec<double> _repeated_headZone3Temperature_codec + = pb::FieldCodec.ForDouble(106); + private readonly pbc::RepeatedField<double> headZone3Temperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Head Zone 3 (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> HeadZone3Temperature { + get { return headZone3Temperature_; } + } + + /// <summary>Field number for the "HeadAirFlow" field.</summary> + public const int HeadAirFlowFieldNumber = 14; + private static readonly pb::FieldCodec<double> _repeated_headAirFlow_codec + = pb::FieldCodec.ForDouble(114); + private readonly pbc::RepeatedField<double> headAirFlow_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Head Air Flow (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> HeadAirFlow { + get { return headAirFlow_; } + } + + /// <summary>Field number for the "FeederTension" field.</summary> + public const int FeederTensionFieldNumber = 15; + private static readonly pb::FieldCodec<double> _repeated_feederTension_codec + = pb::FieldCodec.ForDouble(122); + private readonly pbc::RepeatedField<double> feederTension_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Feeder Tension (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> FeederTension { + get { return feederTension_; } + } + + /// <summary>Field number for the "PullerTension" field.</summary> + public const int PullerTensionFieldNumber = 16; + private static readonly pb::FieldCodec<double> _repeated_pullerTension_codec + = pb::FieldCodec.ForDouble(130); + private readonly pbc::RepeatedField<double> pullerTension_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Puller Tension (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> PullerTension { + get { return pullerTension_; } + } + + /// <summary>Field number for the "DryerZone1Temperature" field.</summary> + public const int DryerZone1TemperatureFieldNumber = 17; + private static readonly pb::FieldCodec<double> _repeated_dryerZone1Temperature_codec + = pb::FieldCodec.ForDouble(138); + private readonly pbc::RepeatedField<double> dryerZone1Temperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dryer Zone 1 (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> DryerZone1Temperature { + get { return dryerZone1Temperature_; } + } + + /// <summary>Field number for the "DryerZone2Temperature" field.</summary> + public const int DryerZone2TemperatureFieldNumber = 18; + private static readonly pb::FieldCodec<double> _repeated_dryerZone2Temperature_codec + = pb::FieldCodec.ForDouble(146); + private readonly pbc::RepeatedField<double> dryerZone2Temperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dryer Zone 2 (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> DryerZone2Temperature { + get { return dryerZone2Temperature_; } + } + + /// <summary>Field number for the "DryerZone3Temperature" field.</summary> + public const int DryerZone3TemperatureFieldNumber = 19; + private static readonly pb::FieldCodec<double> _repeated_dryerZone3Temperature_codec + = pb::FieldCodec.ForDouble(154); + private readonly pbc::RepeatedField<double> dryerZone3Temperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dryer Zone 3 (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> DryerZone3Temperature { + get { return dryerZone3Temperature_; } + } + + /// <summary>Field number for the "DryerAirFlow" field.</summary> + public const int DryerAirFlowFieldNumber = 20; + private static readonly pb::FieldCodec<double> _repeated_dryerAirFlow_codec + = pb::FieldCodec.ForDouble(162); + private readonly pbc::RepeatedField<double> dryerAirFlow_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dryer Air Flow (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> DryerAirFlow { + get { return dryerAirFlow_; } + } + + /// <summary>Field number for the "WinderTension" field.</summary> + public const int WinderTensionFieldNumber = 21; + private static readonly pb::FieldCodec<double> _repeated_winderTension_codec + = pb::FieldCodec.ForDouble(170); + private readonly pbc::RepeatedField<double> winderTension_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Winder Tension (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> WinderTension { + get { return winderTension_; } + } + + /// <summary>Field number for the "DispensersMotorsFrequency" field.</summary> + public const int DispensersMotorsFrequencyFieldNumber = 22; + private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DoubleArray> _repeated_dispensersMotorsFrequency_codec + = pb::FieldCodec.ForMessage(178, global::Tango.PMR.Diagnostics.DoubleArray.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> dispensersMotorsFrequency_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray>(); + /// <summary> + ///Dispensers Motors (Min = 0, Max = 1080, PPF = 10) Channel Count = 8 + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> DispensersMotorsFrequency { + get { return dispensersMotorsFrequency_; } + } + + /// <summary>Field number for the "DispensersAngularEncoders" field.</summary> + public const int DispensersAngularEncodersFieldNumber = 23; + private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DoubleArray> _repeated_dispensersAngularEncoders_codec + = pb::FieldCodec.ForMessage(186, global::Tango.PMR.Diagnostics.DoubleArray.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> dispensersAngularEncoders_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray>(); + /// <summary> + ///Dispensers Angular Encoders (Min = 0, Max = 100, PPF = 1) Channel Count = 8 + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> DispensersAngularEncoders { + get { return dispensersAngularEncoders_; } + } + + /// <summary>Field number for the "DispensersLinearPositions" field.</summary> + public const int DispensersLinearPositionsFieldNumber = 24; + private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DoubleArray> _repeated_dispensersLinearPositions_codec + = pb::FieldCodec.ForMessage(194, global::Tango.PMR.Diagnostics.DoubleArray.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> dispensersLinearPositions_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray>(); + /// <summary> + ///Dispensers Linear Positions (Min = 0, Max = 100, PPF = 1) Channel Count = 8 + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> DispensersLinearPositions { + get { return dispensersLinearPositions_; } + } + + /// <summary>Field number for the "DispensersPressure" field.</summary> + public const int DispensersPressureFieldNumber = 25; + private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DoubleArray> _repeated_dispensersPressure_codec + = pb::FieldCodec.ForMessage(202, global::Tango.PMR.Diagnostics.DoubleArray.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> dispensersPressure_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray>(); + /// <summary> + ///Dispensers Pressure (Min = 0, Max = 100, PPF = 1) Channel Count = 8 + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> DispensersPressure { + get { return dispensersPressure_; } + } + + /// <summary>Field number for the "MidTankPressure" field.</summary> + public const int MidTankPressureFieldNumber = 26; + private static readonly pb::FieldCodec<double> _repeated_midTankPressure_codec + = pb::FieldCodec.ForDouble(210); + private readonly pbc::RepeatedField<double> midTankPressure_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Mid Tank Pressure (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> MidTankPressure { + get { return midTankPressure_; } + } + + /// <summary>Field number for the "FilterDeltaPressure" field.</summary> + public const int FilterDeltaPressureFieldNumber = 27; + private static readonly pb::FieldCodec<double> _repeated_filterDeltaPressure_codec + = pb::FieldCodec.ForDouble(218); + private readonly pbc::RepeatedField<double> filterDeltaPressure_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Filter Delta Pressure (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> FilterDeltaPressure { + get { return filterDeltaPressure_; } + } + + /// <summary>Field number for the "ChillerTemperature" field.</summary> + public const int ChillerTemperatureFieldNumber = 28; + private static readonly pb::FieldCodec<double> _repeated_chillerTemperature_codec + = pb::FieldCodec.ForDouble(226); + private readonly pbc::RepeatedField<double> chillerTemperature_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Chiller Temperature (Min = 0, Max = 100, PPF = 1) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> ChillerTemperature { + get { return chillerTemperature_; } + } + + /// <summary>Field number for the "Dispenser1MotorFrequency" field.</summary> + public const int Dispenser1MotorFrequencyFieldNumber = 29; + private static readonly pb::FieldCodec<double> _repeated_dispenser1MotorFrequency_codec + = pb::FieldCodec.ForDouble(234); + private readonly pbc::RepeatedField<double> dispenser1MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 1 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser1MotorFrequency { + get { return dispenser1MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser2MotorFrequency" field.</summary> + public const int Dispenser2MotorFrequencyFieldNumber = 30; + private static readonly pb::FieldCodec<double> _repeated_dispenser2MotorFrequency_codec + = pb::FieldCodec.ForDouble(242); + private readonly pbc::RepeatedField<double> dispenser2MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 2 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser2MotorFrequency { + get { return dispenser2MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser3MotorFrequency" field.</summary> + public const int Dispenser3MotorFrequencyFieldNumber = 31; + private static readonly pb::FieldCodec<double> _repeated_dispenser3MotorFrequency_codec + = pb::FieldCodec.ForDouble(250); + private readonly pbc::RepeatedField<double> dispenser3MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 3 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser3MotorFrequency { + get { return dispenser3MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser4MotorFrequency" field.</summary> + public const int Dispenser4MotorFrequencyFieldNumber = 32; + private static readonly pb::FieldCodec<double> _repeated_dispenser4MotorFrequency_codec + = pb::FieldCodec.ForDouble(258); + private readonly pbc::RepeatedField<double> dispenser4MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 4 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser4MotorFrequency { + get { return dispenser4MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser5MotorFrequency" field.</summary> + public const int Dispenser5MotorFrequencyFieldNumber = 33; + private static readonly pb::FieldCodec<double> _repeated_dispenser5MotorFrequency_codec + = pb::FieldCodec.ForDouble(266); + private readonly pbc::RepeatedField<double> dispenser5MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 5 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser5MotorFrequency { + get { return dispenser5MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser6MotorFrequency" field.</summary> + public const int Dispenser6MotorFrequencyFieldNumber = 34; + private static readonly pb::FieldCodec<double> _repeated_dispenser6MotorFrequency_codec + = pb::FieldCodec.ForDouble(274); + private readonly pbc::RepeatedField<double> dispenser6MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 6 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser6MotorFrequency { + get { return dispenser6MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser7MotorFrequency" field.</summary> + public const int Dispenser7MotorFrequencyFieldNumber = 35; + private static readonly pb::FieldCodec<double> _repeated_dispenser7MotorFrequency_codec + = pb::FieldCodec.ForDouble(282); + private readonly pbc::RepeatedField<double> dispenser7MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 7 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser7MotorFrequency { + get { return dispenser7MotorFrequency_; } + } + + /// <summary>Field number for the "Dispenser8MotorFrequency" field.</summary> + public const int Dispenser8MotorFrequencyFieldNumber = 36; + private static readonly pb::FieldCodec<double> _repeated_dispenser8MotorFrequency_codec + = pb::FieldCodec.ForDouble(290); + private readonly pbc::RepeatedField<double> dispenser8MotorFrequency_ = new pbc::RepeatedField<double>(); + /// <summary> + ///Dispenser 8 Motor Frequency (Min = 0, Max = 1080, PPF = 10) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<double> Dispenser8MotorFrequency { + get { return dispenser8MotorFrequency_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DiagnosticsMonitors); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DiagnosticsMonitors other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!dancer1Angle_.Equals(other.dancer1Angle_)) return false; + if(!dancer2Angle_.Equals(other.dancer2Angle_)) return false; + if(!dancer3Angle_.Equals(other.dancer3Angle_)) return false; + if(!feederMotorFrequency_.Equals(other.feederMotorFrequency_)) return false; + if(!dryerMotor_.Equals(other.dryerMotor_)) return false; + if(!pollerMotor_.Equals(other.pollerMotor_)) return false; + if(!winderMotor_.Equals(other.winderMotor_)) return false; + if(!screwMotor_.Equals(other.screwMotor_)) return false; + if(!threadSpeed_.Equals(other.threadSpeed_)) return false; + if(!mixerTemperature_.Equals(other.mixerTemperature_)) return false; + if(!headZone1Temperature_.Equals(other.headZone1Temperature_)) return false; + if(!headZone2Temperature_.Equals(other.headZone2Temperature_)) return false; + if(!headZone3Temperature_.Equals(other.headZone3Temperature_)) return false; + if(!headAirFlow_.Equals(other.headAirFlow_)) return false; + if(!feederTension_.Equals(other.feederTension_)) return false; + if(!pullerTension_.Equals(other.pullerTension_)) return false; + if(!dryerZone1Temperature_.Equals(other.dryerZone1Temperature_)) return false; + if(!dryerZone2Temperature_.Equals(other.dryerZone2Temperature_)) return false; + if(!dryerZone3Temperature_.Equals(other.dryerZone3Temperature_)) return false; + if(!dryerAirFlow_.Equals(other.dryerAirFlow_)) return false; + if(!winderTension_.Equals(other.winderTension_)) return false; + if(!dispensersMotorsFrequency_.Equals(other.dispensersMotorsFrequency_)) return false; + if(!dispensersAngularEncoders_.Equals(other.dispensersAngularEncoders_)) return false; + if(!dispensersLinearPositions_.Equals(other.dispensersLinearPositions_)) return false; + if(!dispensersPressure_.Equals(other.dispensersPressure_)) return false; + if(!midTankPressure_.Equals(other.midTankPressure_)) return false; + if(!filterDeltaPressure_.Equals(other.filterDeltaPressure_)) return false; + if(!chillerTemperature_.Equals(other.chillerTemperature_)) return false; + if(!dispenser1MotorFrequency_.Equals(other.dispenser1MotorFrequency_)) return false; + if(!dispenser2MotorFrequency_.Equals(other.dispenser2MotorFrequency_)) return false; + if(!dispenser3MotorFrequency_.Equals(other.dispenser3MotorFrequency_)) return false; + if(!dispenser4MotorFrequency_.Equals(other.dispenser4MotorFrequency_)) return false; + if(!dispenser5MotorFrequency_.Equals(other.dispenser5MotorFrequency_)) return false; + if(!dispenser6MotorFrequency_.Equals(other.dispenser6MotorFrequency_)) return false; + if(!dispenser7MotorFrequency_.Equals(other.dispenser7MotorFrequency_)) return false; + if(!dispenser8MotorFrequency_.Equals(other.dispenser8MotorFrequency_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= dancer1Angle_.GetHashCode(); + hash ^= dancer2Angle_.GetHashCode(); + hash ^= dancer3Angle_.GetHashCode(); + hash ^= feederMotorFrequency_.GetHashCode(); + hash ^= dryerMotor_.GetHashCode(); + hash ^= pollerMotor_.GetHashCode(); + hash ^= winderMotor_.GetHashCode(); + hash ^= screwMotor_.GetHashCode(); + hash ^= threadSpeed_.GetHashCode(); + hash ^= mixerTemperature_.GetHashCode(); + hash ^= headZone1Temperature_.GetHashCode(); + hash ^= headZone2Temperature_.GetHashCode(); + hash ^= headZone3Temperature_.GetHashCode(); + hash ^= headAirFlow_.GetHashCode(); + hash ^= feederTension_.GetHashCode(); + hash ^= pullerTension_.GetHashCode(); + hash ^= dryerZone1Temperature_.GetHashCode(); + hash ^= dryerZone2Temperature_.GetHashCode(); + hash ^= dryerZone3Temperature_.GetHashCode(); + hash ^= dryerAirFlow_.GetHashCode(); + hash ^= winderTension_.GetHashCode(); + hash ^= dispensersMotorsFrequency_.GetHashCode(); + hash ^= dispensersAngularEncoders_.GetHashCode(); + hash ^= dispensersLinearPositions_.GetHashCode(); + hash ^= dispensersPressure_.GetHashCode(); + hash ^= midTankPressure_.GetHashCode(); + hash ^= filterDeltaPressure_.GetHashCode(); + hash ^= chillerTemperature_.GetHashCode(); + hash ^= dispenser1MotorFrequency_.GetHashCode(); + hash ^= dispenser2MotorFrequency_.GetHashCode(); + hash ^= dispenser3MotorFrequency_.GetHashCode(); + hash ^= dispenser4MotorFrequency_.GetHashCode(); + hash ^= dispenser5MotorFrequency_.GetHashCode(); + hash ^= dispenser6MotorFrequency_.GetHashCode(); + hash ^= dispenser7MotorFrequency_.GetHashCode(); + hash ^= dispenser8MotorFrequency_.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + dancer1Angle_.WriteTo(output, _repeated_dancer1Angle_codec); + dancer2Angle_.WriteTo(output, _repeated_dancer2Angle_codec); + dancer3Angle_.WriteTo(output, _repeated_dancer3Angle_codec); + feederMotorFrequency_.WriteTo(output, _repeated_feederMotorFrequency_codec); + dryerMotor_.WriteTo(output, _repeated_dryerMotor_codec); + pollerMotor_.WriteTo(output, _repeated_pollerMotor_codec); + winderMotor_.WriteTo(output, _repeated_winderMotor_codec); + screwMotor_.WriteTo(output, _repeated_screwMotor_codec); + threadSpeed_.WriteTo(output, _repeated_threadSpeed_codec); + mixerTemperature_.WriteTo(output, _repeated_mixerTemperature_codec); + headZone1Temperature_.WriteTo(output, _repeated_headZone1Temperature_codec); + headZone2Temperature_.WriteTo(output, _repeated_headZone2Temperature_codec); + headZone3Temperature_.WriteTo(output, _repeated_headZone3Temperature_codec); + headAirFlow_.WriteTo(output, _repeated_headAirFlow_codec); + feederTension_.WriteTo(output, _repeated_feederTension_codec); + pullerTension_.WriteTo(output, _repeated_pullerTension_codec); + dryerZone1Temperature_.WriteTo(output, _repeated_dryerZone1Temperature_codec); + dryerZone2Temperature_.WriteTo(output, _repeated_dryerZone2Temperature_codec); + dryerZone3Temperature_.WriteTo(output, _repeated_dryerZone3Temperature_codec); + dryerAirFlow_.WriteTo(output, _repeated_dryerAirFlow_codec); + winderTension_.WriteTo(output, _repeated_winderTension_codec); + dispensersMotorsFrequency_.WriteTo(output, _repeated_dispensersMotorsFrequency_codec); + dispensersAngularEncoders_.WriteTo(output, _repeated_dispensersAngularEncoders_codec); + dispensersLinearPositions_.WriteTo(output, _repeated_dispensersLinearPositions_codec); + dispensersPressure_.WriteTo(output, _repeated_dispensersPressure_codec); + midTankPressure_.WriteTo(output, _repeated_midTankPressure_codec); + filterDeltaPressure_.WriteTo(output, _repeated_filterDeltaPressure_codec); + chillerTemperature_.WriteTo(output, _repeated_chillerTemperature_codec); + dispenser1MotorFrequency_.WriteTo(output, _repeated_dispenser1MotorFrequency_codec); + dispenser2MotorFrequency_.WriteTo(output, _repeated_dispenser2MotorFrequency_codec); + dispenser3MotorFrequency_.WriteTo(output, _repeated_dispenser3MotorFrequency_codec); + dispenser4MotorFrequency_.WriteTo(output, _repeated_dispenser4MotorFrequency_codec); + dispenser5MotorFrequency_.WriteTo(output, _repeated_dispenser5MotorFrequency_codec); + dispenser6MotorFrequency_.WriteTo(output, _repeated_dispenser6MotorFrequency_codec); + dispenser7MotorFrequency_.WriteTo(output, _repeated_dispenser7MotorFrequency_codec); + dispenser8MotorFrequency_.WriteTo(output, _repeated_dispenser8MotorFrequency_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += dancer1Angle_.CalculateSize(_repeated_dancer1Angle_codec); + size += dancer2Angle_.CalculateSize(_repeated_dancer2Angle_codec); + size += dancer3Angle_.CalculateSize(_repeated_dancer3Angle_codec); + size += feederMotorFrequency_.CalculateSize(_repeated_feederMotorFrequency_codec); + size += dryerMotor_.CalculateSize(_repeated_dryerMotor_codec); + size += pollerMotor_.CalculateSize(_repeated_pollerMotor_codec); + size += winderMotor_.CalculateSize(_repeated_winderMotor_codec); + size += screwMotor_.CalculateSize(_repeated_screwMotor_codec); + size += threadSpeed_.CalculateSize(_repeated_threadSpeed_codec); + size += mixerTemperature_.CalculateSize(_repeated_mixerTemperature_codec); + size += headZone1Temperature_.CalculateSize(_repeated_headZone1Temperature_codec); + size += headZone2Temperature_.CalculateSize(_repeated_headZone2Temperature_codec); + size += headZone3Temperature_.CalculateSize(_repeated_headZone3Temperature_codec); + size += headAirFlow_.CalculateSize(_repeated_headAirFlow_codec); + size += feederTension_.CalculateSize(_repeated_feederTension_codec); + size += pullerTension_.CalculateSize(_repeated_pullerTension_codec); + size += dryerZone1Temperature_.CalculateSize(_repeated_dryerZone1Temperature_codec); + size += dryerZone2Temperature_.CalculateSize(_repeated_dryerZone2Temperature_codec); + size += dryerZone3Temperature_.CalculateSize(_repeated_dryerZone3Temperature_codec); + size += dryerAirFlow_.CalculateSize(_repeated_dryerAirFlow_codec); + size += winderTension_.CalculateSize(_repeated_winderTension_codec); + size += dispensersMotorsFrequency_.CalculateSize(_repeated_dispensersMotorsFrequency_codec); + size += dispensersAngularEncoders_.CalculateSize(_repeated_dispensersAngularEncoders_codec); + size += dispensersLinearPositions_.CalculateSize(_repeated_dispensersLinearPositions_codec); + size += dispensersPressure_.CalculateSize(_repeated_dispensersPressure_codec); + size += midTankPressure_.CalculateSize(_repeated_midTankPressure_codec); + size += filterDeltaPressure_.CalculateSize(_repeated_filterDeltaPressure_codec); + size += chillerTemperature_.CalculateSize(_repeated_chillerTemperature_codec); + size += dispenser1MotorFrequency_.CalculateSize(_repeated_dispenser1MotorFrequency_codec); + size += dispenser2MotorFrequency_.CalculateSize(_repeated_dispenser2MotorFrequency_codec); + size += dispenser3MotorFrequency_.CalculateSize(_repeated_dispenser3MotorFrequency_codec); + size += dispenser4MotorFrequency_.CalculateSize(_repeated_dispenser4MotorFrequency_codec); + size += dispenser5MotorFrequency_.CalculateSize(_repeated_dispenser5MotorFrequency_codec); + size += dispenser6MotorFrequency_.CalculateSize(_repeated_dispenser6MotorFrequency_codec); + size += dispenser7MotorFrequency_.CalculateSize(_repeated_dispenser7MotorFrequency_codec); + size += dispenser8MotorFrequency_.CalculateSize(_repeated_dispenser8MotorFrequency_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DiagnosticsMonitors other) { + if (other == null) { + return; + } + dancer1Angle_.Add(other.dancer1Angle_); + dancer2Angle_.Add(other.dancer2Angle_); + dancer3Angle_.Add(other.dancer3Angle_); + feederMotorFrequency_.Add(other.feederMotorFrequency_); + dryerMotor_.Add(other.dryerMotor_); + pollerMotor_.Add(other.pollerMotor_); + winderMotor_.Add(other.winderMotor_); + screwMotor_.Add(other.screwMotor_); + threadSpeed_.Add(other.threadSpeed_); + mixerTemperature_.Add(other.mixerTemperature_); + headZone1Temperature_.Add(other.headZone1Temperature_); + headZone2Temperature_.Add(other.headZone2Temperature_); + headZone3Temperature_.Add(other.headZone3Temperature_); + headAirFlow_.Add(other.headAirFlow_); + feederTension_.Add(other.feederTension_); + pullerTension_.Add(other.pullerTension_); + dryerZone1Temperature_.Add(other.dryerZone1Temperature_); + dryerZone2Temperature_.Add(other.dryerZone2Temperature_); + dryerZone3Temperature_.Add(other.dryerZone3Temperature_); + dryerAirFlow_.Add(other.dryerAirFlow_); + winderTension_.Add(other.winderTension_); + dispensersMotorsFrequency_.Add(other.dispensersMotorsFrequency_); + dispensersAngularEncoders_.Add(other.dispensersAngularEncoders_); + dispensersLinearPositions_.Add(other.dispensersLinearPositions_); + dispensersPressure_.Add(other.dispensersPressure_); + midTankPressure_.Add(other.midTankPressure_); + filterDeltaPressure_.Add(other.filterDeltaPressure_); + chillerTemperature_.Add(other.chillerTemperature_); + dispenser1MotorFrequency_.Add(other.dispenser1MotorFrequency_); + dispenser2MotorFrequency_.Add(other.dispenser2MotorFrequency_); + dispenser3MotorFrequency_.Add(other.dispenser3MotorFrequency_); + dispenser4MotorFrequency_.Add(other.dispenser4MotorFrequency_); + dispenser5MotorFrequency_.Add(other.dispenser5MotorFrequency_); + dispenser6MotorFrequency_.Add(other.dispenser6MotorFrequency_); + dispenser7MotorFrequency_.Add(other.dispenser7MotorFrequency_); + dispenser8MotorFrequency_.Add(other.dispenser8MotorFrequency_); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: + case 9: { + dancer1Angle_.AddEntriesFrom(input, _repeated_dancer1Angle_codec); + break; + } + case 18: + case 17: { + dancer2Angle_.AddEntriesFrom(input, _repeated_dancer2Angle_codec); + break; + } + case 26: + case 25: { + dancer3Angle_.AddEntriesFrom(input, _repeated_dancer3Angle_codec); + break; + } + case 34: + case 33: { + feederMotorFrequency_.AddEntriesFrom(input, _repeated_feederMotorFrequency_codec); + break; + } + case 42: + case 41: { + dryerMotor_.AddEntriesFrom(input, _repeated_dryerMotor_codec); + break; + } + case 50: + case 49: { + pollerMotor_.AddEntriesFrom(input, _repeated_pollerMotor_codec); + break; + } + case 58: + case 57: { + winderMotor_.AddEntriesFrom(input, _repeated_winderMotor_codec); + break; + } + case 66: + case 65: { + screwMotor_.AddEntriesFrom(input, _repeated_screwMotor_codec); + break; + } + case 74: + case 73: { + threadSpeed_.AddEntriesFrom(input, _repeated_threadSpeed_codec); + break; + } + case 82: + case 81: { + mixerTemperature_.AddEntriesFrom(input, _repeated_mixerTemperature_codec); + break; + } + case 90: + case 89: { + headZone1Temperature_.AddEntriesFrom(input, _repeated_headZone1Temperature_codec); + break; + } + case 98: + case 97: { + headZone2Temperature_.AddEntriesFrom(input, _repeated_headZone2Temperature_codec); + break; + } + case 106: + case 105: { + headZone3Temperature_.AddEntriesFrom(input, _repeated_headZone3Temperature_codec); + break; + } + case 114: + case 113: { + headAirFlow_.AddEntriesFrom(input, _repeated_headAirFlow_codec); + break; + } + case 122: + case 121: { + feederTension_.AddEntriesFrom(input, _repeated_feederTension_codec); + break; + } + case 130: + case 129: { + pullerTension_.AddEntriesFrom(input, _repeated_pullerTension_codec); + break; + } + case 138: + case 137: { + dryerZone1Temperature_.AddEntriesFrom(input, _repeated_dryerZone1Temperature_codec); + break; + } + case 146: + case 145: { + dryerZone2Temperature_.AddEntriesFrom(input, _repeated_dryerZone2Temperature_codec); + break; + } + case 154: + case 153: { + dryerZone3Temperature_.AddEntriesFrom(input, _repeated_dryerZone3Temperature_codec); + break; + } + case 162: + case 161: { + dryerAirFlow_.AddEntriesFrom(input, _repeated_dryerAirFlow_codec); + break; + } + case 170: + case 169: { + winderTension_.AddEntriesFrom(input, _repeated_winderTension_codec); + break; + } + case 178: { + dispensersMotorsFrequency_.AddEntriesFrom(input, _repeated_dispensersMotorsFrequency_codec); + break; + } + case 186: { + dispensersAngularEncoders_.AddEntriesFrom(input, _repeated_dispensersAngularEncoders_codec); + break; + } + case 194: { + dispensersLinearPositions_.AddEntriesFrom(input, _repeated_dispensersLinearPositions_codec); + break; + } + case 202: { + dispensersPressure_.AddEntriesFrom(input, _repeated_dispensersPressure_codec); + break; + } + case 210: + case 209: { + midTankPressure_.AddEntriesFrom(input, _repeated_midTankPressure_codec); + break; + } + case 218: + case 217: { + filterDeltaPressure_.AddEntriesFrom(input, _repeated_filterDeltaPressure_codec); + break; + } + case 226: + case 225: { + chillerTemperature_.AddEntriesFrom(input, _repeated_chillerTemperature_codec); + break; + } + case 234: + case 233: { + dispenser1MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser1MotorFrequency_codec); + break; + } + case 242: + case 241: { + dispenser2MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser2MotorFrequency_codec); + break; + } + case 250: + case 249: { + dispenser3MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser3MotorFrequency_codec); + break; + } + case 258: + case 257: { + dispenser4MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser4MotorFrequency_codec); + break; + } + case 266: + case 265: { + dispenser5MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser5MotorFrequency_codec); + break; + } + case 274: + case 273: { + dispenser6MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser6MotorFrequency_codec); + break; + } + case 282: + case 281: { + dispenser7MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser7MotorFrequency_codec); + break; + } + case 290: + case 289: { + dispenser8MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser8MotorFrequency_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs index d08eb25dc..ed66a97c4 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs @@ -23,25 +23,19 @@ namespace Tango.PMR.Diagnostics { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Ch1QdXNoRGlhZ25vc3RpY3NSZXNwb25zZS5wcm90bxIVVGFuZ28uUE1SLkRp", - "YWdub3N0aWNzGhFEb3VibGVBcnJheS5wcm90bxoQRGlnaXRhbFBpbi5wcm90", - "byKqBAoXUHVzaERpYWdub3N0aWNzUmVzcG9uc2USFAoMRGFuY2VyMUFuZ2xl", - "GAEgAygBEhQKDERhbmNlcjJBbmdsZRgCIAMoARIUCgxEYW5jZXIzQW5nbGUY", - "AyADKAESRQoZRGlzcGVuc2Vyc01vdG9yc0ZyZXF1ZW5jeRgEIAMoCzIiLlRh", - "bmdvLlBNUi5EaWFnbm9zdGljcy5Eb3VibGVBcnJheRIgChhEaXNwZW5zZXIx", - "TW90b3JGcmVxdWVuY3kYBSADKAESIAoYRGlzcGVuc2VyMk1vdG9yRnJlcXVl", - "bmN5GAYgAygBEiAKGERpc3BlbnNlcjNNb3RvckZyZXF1ZW5jeRgHIAMoARIg", - "ChhEaXNwZW5zZXI0TW90b3JGcmVxdWVuY3kYCCADKAESIAoYRGlzcGVuc2Vy", - "NU1vdG9yRnJlcXVlbmN5GAkgAygBEiAKGERpc3BlbnNlcjZNb3RvckZyZXF1", - "ZW5jeRgKIAMoARIgChhEaXNwZW5zZXI3TW90b3JGcmVxdWVuY3kYCyADKAES", - "IAoYRGlzcGVuc2VyOE1vdG9yRnJlcXVlbmN5GAwgAygBEjYKC0RpZ2l0YWxQ", - "aW5zGA0gAygLMiEuVGFuZ28uUE1SLkRpYWdub3N0aWNzLkRpZ2l0YWxQaW4S", - "DwoHVmVyc2lvbhgOIAEoCRITCgtWZXJzaW9uTmFtZRgPIAEoCRIYChBWZXJz", - "aW9uQnVpbGREYXRlGBAgASgJQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlh", - "Z25vc3RpY3NiBnByb3RvMw==")); + "YWdub3N0aWNzGhBEaWdpdGFsUGluLnByb3RvGhlWYWx1ZUNvbXBvbmVudFN0", + "YXRlLnByb3RvGhlEaWFnbm9zdGljc01vbml0b3JzLnByb3RvIpUCChdQdXNo", + "RGlhZ25vc3RpY3NSZXNwb25zZRI8CghNb25pdG9ycxgBIAEoCzIqLlRhbmdv", + "LlBNUi5EaWFnbm9zdGljcy5EaWFnbm9zdGljc01vbml0b3JzEjYKC0RpZ2l0", + "YWxQaW5zGAIgAygLMiEuVGFuZ28uUE1SLkRpYWdub3N0aWNzLkRpZ2l0YWxQ", + "aW4SRAoQQ29tcG9uZW50c1N0YXRlcxgDIAMoCzIqLlRhbmdvLlBNUi5EaWFn", + "bm9zdGljcy5WYWx1ZUNvbXBvbmVudFN0YXRlEg8KB1ZlcnNpb24YBCABKAkS", + "EwoLVmVyc2lvbk5hbWUYBSABKAkSGAoQVmVyc2lvbkJ1aWxkRGF0ZRgGIAEo", + "CUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.DoubleArrayReflection.Descriptor, global::Tango.PMR.Diagnostics.DigitalPinReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.DigitalPinReflection.Descriptor, global::Tango.PMR.Diagnostics.ValueComponentStateReflection.Descriptor, global::Tango.PMR.Diagnostics.DiagnosticsMonitorsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.PushDiagnosticsResponse), global::Tango.PMR.Diagnostics.PushDiagnosticsResponse.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle", "DispensersMotorsFrequency", "Dispenser1MotorFrequency", "Dispenser2MotorFrequency", "Dispenser3MotorFrequency", "Dispenser4MotorFrequency", "Dispenser5MotorFrequency", "Dispenser6MotorFrequency", "Dispenser7MotorFrequency", "Dispenser8MotorFrequency", "DigitalPins", "Version", "VersionName", "VersionBuildDate" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.PushDiagnosticsResponse), global::Tango.PMR.Diagnostics.PushDiagnosticsResponse.Parser, new[]{ "Monitors", "DigitalPins", "ComponentsStates", "Version", "VersionName", "VersionBuildDate" }, null, null, null) })); } #endregion @@ -72,19 +66,9 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public PushDiagnosticsResponse(PushDiagnosticsResponse other) : this() { - dancer1Angle_ = other.dancer1Angle_.Clone(); - dancer2Angle_ = other.dancer2Angle_.Clone(); - dancer3Angle_ = other.dancer3Angle_.Clone(); - dispensersMotorsFrequency_ = other.dispensersMotorsFrequency_.Clone(); - dispenser1MotorFrequency_ = other.dispenser1MotorFrequency_.Clone(); - dispenser2MotorFrequency_ = other.dispenser2MotorFrequency_.Clone(); - dispenser3MotorFrequency_ = other.dispenser3MotorFrequency_.Clone(); - dispenser4MotorFrequency_ = other.dispenser4MotorFrequency_.Clone(); - dispenser5MotorFrequency_ = other.dispenser5MotorFrequency_.Clone(); - dispenser6MotorFrequency_ = other.dispenser6MotorFrequency_.Clone(); - dispenser7MotorFrequency_ = other.dispenser7MotorFrequency_.Clone(); - dispenser8MotorFrequency_ = other.dispenser8MotorFrequency_.Clone(); + Monitors = other.monitors_ != null ? other.Monitors.Clone() : null; digitalPins_ = other.digitalPins_.Clone(); + componentsStates_ = other.componentsStates_.Clone(); version_ = other.version_; versionName_ = other.versionName_; versionBuildDate_ = other.versionBuildDate_; @@ -95,136 +79,24 @@ namespace Tango.PMR.Diagnostics { return new PushDiagnosticsResponse(this); } - /// <summary>Field number for the "Dancer1Angle" field.</summary> - public const int Dancer1AngleFieldNumber = 1; - private static readonly pb::FieldCodec<double> _repeated_dancer1Angle_codec - = pb::FieldCodec.ForDouble(10); - private readonly pbc::RepeatedField<double> dancer1Angle_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dancer1Angle { - get { return dancer1Angle_; } - } - - /// <summary>Field number for the "Dancer2Angle" field.</summary> - public const int Dancer2AngleFieldNumber = 2; - private static readonly pb::FieldCodec<double> _repeated_dancer2Angle_codec - = pb::FieldCodec.ForDouble(18); - private readonly pbc::RepeatedField<double> dancer2Angle_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dancer2Angle { - get { return dancer2Angle_; } - } - - /// <summary>Field number for the "Dancer3Angle" field.</summary> - public const int Dancer3AngleFieldNumber = 3; - private static readonly pb::FieldCodec<double> _repeated_dancer3Angle_codec - = pb::FieldCodec.ForDouble(26); - private readonly pbc::RepeatedField<double> dancer3Angle_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dancer3Angle { - get { return dancer3Angle_; } - } - - /// <summary>Field number for the "DispensersMotorsFrequency" field.</summary> - public const int DispensersMotorsFrequencyFieldNumber = 4; - private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DoubleArray> _repeated_dispensersMotorsFrequency_codec - = pb::FieldCodec.ForMessage(34, global::Tango.PMR.Diagnostics.DoubleArray.Parser); - private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> dispensersMotorsFrequency_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray>(); + /// <summary>Field number for the "Monitors" field.</summary> + public const int MonitorsFieldNumber = 1; + private global::Tango.PMR.Diagnostics.DiagnosticsMonitors monitors_; /// <summary> - ///Dispensers Motors Frequency Multi + ///Monitors /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> DispensersMotorsFrequency { - get { return dispensersMotorsFrequency_; } - } - - /// <summary>Field number for the "Dispenser1MotorFrequency" field.</summary> - public const int Dispenser1MotorFrequencyFieldNumber = 5; - private static readonly pb::FieldCodec<double> _repeated_dispenser1MotorFrequency_codec - = pb::FieldCodec.ForDouble(42); - private readonly pbc::RepeatedField<double> dispenser1MotorFrequency_ = new pbc::RepeatedField<double>(); - /// <summary> - ///Dispensers Motors Frequency Singles - /// </summary> - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser1MotorFrequency { - get { return dispenser1MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser2MotorFrequency" field.</summary> - public const int Dispenser2MotorFrequencyFieldNumber = 6; - private static readonly pb::FieldCodec<double> _repeated_dispenser2MotorFrequency_codec - = pb::FieldCodec.ForDouble(50); - private readonly pbc::RepeatedField<double> dispenser2MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser2MotorFrequency { - get { return dispenser2MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser3MotorFrequency" field.</summary> - public const int Dispenser3MotorFrequencyFieldNumber = 7; - private static readonly pb::FieldCodec<double> _repeated_dispenser3MotorFrequency_codec - = pb::FieldCodec.ForDouble(58); - private readonly pbc::RepeatedField<double> dispenser3MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser3MotorFrequency { - get { return dispenser3MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser4MotorFrequency" field.</summary> - public const int Dispenser4MotorFrequencyFieldNumber = 8; - private static readonly pb::FieldCodec<double> _repeated_dispenser4MotorFrequency_codec - = pb::FieldCodec.ForDouble(66); - private readonly pbc::RepeatedField<double> dispenser4MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser4MotorFrequency { - get { return dispenser4MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser5MotorFrequency" field.</summary> - public const int Dispenser5MotorFrequencyFieldNumber = 9; - private static readonly pb::FieldCodec<double> _repeated_dispenser5MotorFrequency_codec - = pb::FieldCodec.ForDouble(74); - private readonly pbc::RepeatedField<double> dispenser5MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser5MotorFrequency { - get { return dispenser5MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser6MotorFrequency" field.</summary> - public const int Dispenser6MotorFrequencyFieldNumber = 10; - private static readonly pb::FieldCodec<double> _repeated_dispenser6MotorFrequency_codec - = pb::FieldCodec.ForDouble(82); - private readonly pbc::RepeatedField<double> dispenser6MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser6MotorFrequency { - get { return dispenser6MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser7MotorFrequency" field.</summary> - public const int Dispenser7MotorFrequencyFieldNumber = 11; - private static readonly pb::FieldCodec<double> _repeated_dispenser7MotorFrequency_codec - = pb::FieldCodec.ForDouble(90); - private readonly pbc::RepeatedField<double> dispenser7MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser7MotorFrequency { - get { return dispenser7MotorFrequency_; } - } - - /// <summary>Field number for the "Dispenser8MotorFrequency" field.</summary> - public const int Dispenser8MotorFrequencyFieldNumber = 12; - private static readonly pb::FieldCodec<double> _repeated_dispenser8MotorFrequency_codec - = pb::FieldCodec.ForDouble(98); - private readonly pbc::RepeatedField<double> dispenser8MotorFrequency_ = new pbc::RepeatedField<double>(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField<double> Dispenser8MotorFrequency { - get { return dispenser8MotorFrequency_; } + public global::Tango.PMR.Diagnostics.DiagnosticsMonitors Monitors { + get { return monitors_; } + set { + monitors_ = value; + } } /// <summary>Field number for the "DigitalPins" field.</summary> - public const int DigitalPinsFieldNumber = 13; + public const int DigitalPinsFieldNumber = 2; private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DigitalPin> _repeated_digitalPins_codec - = pb::FieldCodec.ForMessage(106, global::Tango.PMR.Diagnostics.DigitalPin.Parser); + = pb::FieldCodec.ForMessage(18, global::Tango.PMR.Diagnostics.DigitalPin.Parser); private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DigitalPin> digitalPins_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DigitalPin>(); /// <summary> ///Digital Pins States @@ -234,8 +106,21 @@ namespace Tango.PMR.Diagnostics { get { return digitalPins_; } } + /// <summary>Field number for the "ComponentsStates" field.</summary> + public const int ComponentsStatesFieldNumber = 3; + private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.ValueComponentState> _repeated_componentsStates_codec + = pb::FieldCodec.ForMessage(26, global::Tango.PMR.Diagnostics.ValueComponentState.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.ValueComponentState> componentsStates_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.ValueComponentState>(); + /// <summary> + ///Value Components Effective Values + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.Diagnostics.ValueComponentState> ComponentsStates { + get { return componentsStates_; } + } + /// <summary>Field number for the "Version" field.</summary> - public const int VersionFieldNumber = 14; + public const int VersionFieldNumber = 4; private string version_ = ""; /// <summary> ///Software Information @@ -249,7 +134,7 @@ namespace Tango.PMR.Diagnostics { } /// <summary>Field number for the "VersionName" field.</summary> - public const int VersionNameFieldNumber = 15; + public const int VersionNameFieldNumber = 5; private string versionName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string VersionName { @@ -260,7 +145,7 @@ namespace Tango.PMR.Diagnostics { } /// <summary>Field number for the "VersionBuildDate" field.</summary> - public const int VersionBuildDateFieldNumber = 16; + public const int VersionBuildDateFieldNumber = 6; private string versionBuildDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string VersionBuildDate { @@ -283,19 +168,9 @@ namespace Tango.PMR.Diagnostics { if (ReferenceEquals(other, this)) { return true; } - if(!dancer1Angle_.Equals(other.dancer1Angle_)) return false; - if(!dancer2Angle_.Equals(other.dancer2Angle_)) return false; - if(!dancer3Angle_.Equals(other.dancer3Angle_)) return false; - if(!dispensersMotorsFrequency_.Equals(other.dispensersMotorsFrequency_)) return false; - if(!dispenser1MotorFrequency_.Equals(other.dispenser1MotorFrequency_)) return false; - if(!dispenser2MotorFrequency_.Equals(other.dispenser2MotorFrequency_)) return false; - if(!dispenser3MotorFrequency_.Equals(other.dispenser3MotorFrequency_)) return false; - if(!dispenser4MotorFrequency_.Equals(other.dispenser4MotorFrequency_)) return false; - if(!dispenser5MotorFrequency_.Equals(other.dispenser5MotorFrequency_)) return false; - if(!dispenser6MotorFrequency_.Equals(other.dispenser6MotorFrequency_)) return false; - if(!dispenser7MotorFrequency_.Equals(other.dispenser7MotorFrequency_)) return false; - if(!dispenser8MotorFrequency_.Equals(other.dispenser8MotorFrequency_)) return false; + if (!object.Equals(Monitors, other.Monitors)) return false; if(!digitalPins_.Equals(other.digitalPins_)) return false; + if(!componentsStates_.Equals(other.componentsStates_)) return false; if (Version != other.Version) return false; if (VersionName != other.VersionName) return false; if (VersionBuildDate != other.VersionBuildDate) return false; @@ -305,19 +180,9 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - hash ^= dancer1Angle_.GetHashCode(); - hash ^= dancer2Angle_.GetHashCode(); - hash ^= dancer3Angle_.GetHashCode(); - hash ^= dispensersMotorsFrequency_.GetHashCode(); - hash ^= dispenser1MotorFrequency_.GetHashCode(); - hash ^= dispenser2MotorFrequency_.GetHashCode(); - hash ^= dispenser3MotorFrequency_.GetHashCode(); - hash ^= dispenser4MotorFrequency_.GetHashCode(); - hash ^= dispenser5MotorFrequency_.GetHashCode(); - hash ^= dispenser6MotorFrequency_.GetHashCode(); - hash ^= dispenser7MotorFrequency_.GetHashCode(); - hash ^= dispenser8MotorFrequency_.GetHashCode(); + if (monitors_ != null) hash ^= Monitors.GetHashCode(); hash ^= digitalPins_.GetHashCode(); + hash ^= componentsStates_.GetHashCode(); if (Version.Length != 0) hash ^= Version.GetHashCode(); if (VersionName.Length != 0) hash ^= VersionName.GetHashCode(); if (VersionBuildDate.Length != 0) hash ^= VersionBuildDate.GetHashCode(); @@ -331,29 +196,22 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - dancer1Angle_.WriteTo(output, _repeated_dancer1Angle_codec); - dancer2Angle_.WriteTo(output, _repeated_dancer2Angle_codec); - dancer3Angle_.WriteTo(output, _repeated_dancer3Angle_codec); - dispensersMotorsFrequency_.WriteTo(output, _repeated_dispensersMotorsFrequency_codec); - dispenser1MotorFrequency_.WriteTo(output, _repeated_dispenser1MotorFrequency_codec); - dispenser2MotorFrequency_.WriteTo(output, _repeated_dispenser2MotorFrequency_codec); - dispenser3MotorFrequency_.WriteTo(output, _repeated_dispenser3MotorFrequency_codec); - dispenser4MotorFrequency_.WriteTo(output, _repeated_dispenser4MotorFrequency_codec); - dispenser5MotorFrequency_.WriteTo(output, _repeated_dispenser5MotorFrequency_codec); - dispenser6MotorFrequency_.WriteTo(output, _repeated_dispenser6MotorFrequency_codec); - dispenser7MotorFrequency_.WriteTo(output, _repeated_dispenser7MotorFrequency_codec); - dispenser8MotorFrequency_.WriteTo(output, _repeated_dispenser8MotorFrequency_codec); + if (monitors_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Monitors); + } digitalPins_.WriteTo(output, _repeated_digitalPins_codec); + componentsStates_.WriteTo(output, _repeated_componentsStates_codec); if (Version.Length != 0) { - output.WriteRawTag(114); + output.WriteRawTag(34); output.WriteString(Version); } if (VersionName.Length != 0) { - output.WriteRawTag(122); + output.WriteRawTag(42); output.WriteString(VersionName); } if (VersionBuildDate.Length != 0) { - output.WriteRawTag(130, 1); + output.WriteRawTag(50); output.WriteString(VersionBuildDate); } } @@ -361,19 +219,11 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - size += dancer1Angle_.CalculateSize(_repeated_dancer1Angle_codec); - size += dancer2Angle_.CalculateSize(_repeated_dancer2Angle_codec); - size += dancer3Angle_.CalculateSize(_repeated_dancer3Angle_codec); - size += dispensersMotorsFrequency_.CalculateSize(_repeated_dispensersMotorsFrequency_codec); - size += dispenser1MotorFrequency_.CalculateSize(_repeated_dispenser1MotorFrequency_codec); - size += dispenser2MotorFrequency_.CalculateSize(_repeated_dispenser2MotorFrequency_codec); - size += dispenser3MotorFrequency_.CalculateSize(_repeated_dispenser3MotorFrequency_codec); - size += dispenser4MotorFrequency_.CalculateSize(_repeated_dispenser4MotorFrequency_codec); - size += dispenser5MotorFrequency_.CalculateSize(_repeated_dispenser5MotorFrequency_codec); - size += dispenser6MotorFrequency_.CalculateSize(_repeated_dispenser6MotorFrequency_codec); - size += dispenser7MotorFrequency_.CalculateSize(_repeated_dispenser7MotorFrequency_codec); - size += dispenser8MotorFrequency_.CalculateSize(_repeated_dispenser8MotorFrequency_codec); + if (monitors_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Monitors); + } size += digitalPins_.CalculateSize(_repeated_digitalPins_codec); + size += componentsStates_.CalculateSize(_repeated_componentsStates_codec); if (Version.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Version); } @@ -381,7 +231,7 @@ namespace Tango.PMR.Diagnostics { size += 1 + pb::CodedOutputStream.ComputeStringSize(VersionName); } if (VersionBuildDate.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(VersionBuildDate); + size += 1 + pb::CodedOutputStream.ComputeStringSize(VersionBuildDate); } return size; } @@ -391,19 +241,14 @@ namespace Tango.PMR.Diagnostics { if (other == null) { return; } - dancer1Angle_.Add(other.dancer1Angle_); - dancer2Angle_.Add(other.dancer2Angle_); - dancer3Angle_.Add(other.dancer3Angle_); - dispensersMotorsFrequency_.Add(other.dispensersMotorsFrequency_); - dispenser1MotorFrequency_.Add(other.dispenser1MotorFrequency_); - dispenser2MotorFrequency_.Add(other.dispenser2MotorFrequency_); - dispenser3MotorFrequency_.Add(other.dispenser3MotorFrequency_); - dispenser4MotorFrequency_.Add(other.dispenser4MotorFrequency_); - dispenser5MotorFrequency_.Add(other.dispenser5MotorFrequency_); - dispenser6MotorFrequency_.Add(other.dispenser6MotorFrequency_); - dispenser7MotorFrequency_.Add(other.dispenser7MotorFrequency_); - dispenser8MotorFrequency_.Add(other.dispenser8MotorFrequency_); + if (other.monitors_ != null) { + if (monitors_ == null) { + monitors_ = new global::Tango.PMR.Diagnostics.DiagnosticsMonitors(); + } + Monitors.MergeFrom(other.Monitors); + } digitalPins_.Add(other.digitalPins_); + componentsStates_.Add(other.componentsStates_); if (other.Version.Length != 0) { Version = other.Version; } @@ -423,78 +268,30 @@ namespace Tango.PMR.Diagnostics { default: input.SkipLastField(); break; - case 10: - case 9: { - dancer1Angle_.AddEntriesFrom(input, _repeated_dancer1Angle_codec); + case 10: { + if (monitors_ == null) { + monitors_ = new global::Tango.PMR.Diagnostics.DiagnosticsMonitors(); + } + input.ReadMessage(monitors_); break; } - case 18: - case 17: { - dancer2Angle_.AddEntriesFrom(input, _repeated_dancer2Angle_codec); + case 18: { + digitalPins_.AddEntriesFrom(input, _repeated_digitalPins_codec); break; } - case 26: - case 25: { - dancer3Angle_.AddEntriesFrom(input, _repeated_dancer3Angle_codec); + case 26: { + componentsStates_.AddEntriesFrom(input, _repeated_componentsStates_codec); break; } case 34: { - dispensersMotorsFrequency_.AddEntriesFrom(input, _repeated_dispensersMotorsFrequency_codec); - break; - } - case 42: - case 41: { - dispenser1MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser1MotorFrequency_codec); - break; - } - case 50: - case 49: { - dispenser2MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser2MotorFrequency_codec); - break; - } - case 58: - case 57: { - dispenser3MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser3MotorFrequency_codec); - break; - } - case 66: - case 65: { - dispenser4MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser4MotorFrequency_codec); - break; - } - case 74: - case 73: { - dispenser5MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser5MotorFrequency_codec); - break; - } - case 82: - case 81: { - dispenser6MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser6MotorFrequency_codec); - break; - } - case 90: - case 89: { - dispenser7MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser7MotorFrequency_codec); - break; - } - case 98: - case 97: { - dispenser8MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser8MotorFrequency_codec); - break; - } - case 106: { - digitalPins_.AddEntriesFrom(input, _repeated_digitalPins_codec); - break; - } - case 114: { Version = input.ReadString(); break; } - case 122: { + case 42: { VersionName = input.ReadString(); break; } - case 130: { + case 50: { VersionBuildDate = input.ReadString(); break; } diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/SetComponentValueRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetComponentValueRequest.cs new file mode 100644 index 000000000..a7149ed48 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetComponentValueRequest.cs @@ -0,0 +1,189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SetComponentValueRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Diagnostics { + + /// <summary>Holder for reflection information generated from SetComponentValueRequest.proto</summary> + public static partial class SetComponentValueRequestReflection { + + #region Descriptor + /// <summary>File descriptor for SetComponentValueRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SetComponentValueRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch5TZXRDb21wb25lbnRWYWx1ZVJlcXVlc3QucHJvdG8SFVRhbmdvLlBNUi5E", + "aWFnbm9zdGljcxoUVmFsdWVDb21wb25lbnQucHJvdG8iYwoYU2V0Q29tcG9u", + "ZW50VmFsdWVSZXF1ZXN0EjgKCUNvbXBvbmVudBgBIAEoDjIlLlRhbmdvLlBN", + "Ui5EaWFnbm9zdGljcy5WYWx1ZUNvbXBvbmVudBINCgVWYWx1ZRgCIAEoAUIh", + "Ch9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.ValueComponentReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetComponentValueRequest), global::Tango.PMR.Diagnostics.SetComponentValueRequest.Parser, new[]{ "Component", "Value" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class SetComponentValueRequest : pb::IMessage<SetComponentValueRequest> { + private static readonly pb::MessageParser<SetComponentValueRequest> _parser = new pb::MessageParser<SetComponentValueRequest>(() => new SetComponentValueRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<SetComponentValueRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Diagnostics.SetComponentValueRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetComponentValueRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetComponentValueRequest(SetComponentValueRequest other) : this() { + component_ = other.component_; + value_ = other.value_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetComponentValueRequest Clone() { + return new SetComponentValueRequest(this); + } + + /// <summary>Field number for the "Component" field.</summary> + public const int ComponentFieldNumber = 1; + private global::Tango.PMR.Diagnostics.ValueComponent component_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Diagnostics.ValueComponent Component { + get { return component_; } + set { + component_ = value; + } + } + + /// <summary>Field number for the "Value" field.</summary> + public const int ValueFieldNumber = 2; + private double value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Value { + get { return value_; } + set { + value_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SetComponentValueRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SetComponentValueRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Component != other.Component) return false; + if (Value != other.Value) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Component != 0) hash ^= Component.GetHashCode(); + if (Value != 0D) hash ^= Value.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Component != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) Component); + } + if (Value != 0D) { + output.WriteRawTag(17); + output.WriteDouble(Value); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Component != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Component); + } + if (Value != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SetComponentValueRequest other) { + if (other == null) { + return; + } + if (other.Component != 0) { + Component = other.Component; + } + if (other.Value != 0D) { + Value = other.Value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + component_ = (global::Tango.PMR.Diagnostics.ValueComponent) input.ReadEnum(); + break; + } + case 17: { + Value = input.ReadDouble(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/SetComponentValueResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetComponentValueResponse.cs new file mode 100644 index 000000000..0c498dccf --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetComponentValueResponse.cs @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SetComponentValueResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Diagnostics { + + /// <summary>Holder for reflection information generated from SetComponentValueResponse.proto</summary> + public static partial class SetComponentValueResponseReflection { + + #region Descriptor + /// <summary>File descriptor for SetComponentValueResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SetComponentValueResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch9TZXRDb21wb25lbnRWYWx1ZVJlc3BvbnNlLnByb3RvEhVUYW5nby5QTVIu", + "RGlhZ25vc3RpY3MiGwoZU2V0Q29tcG9uZW50VmFsdWVSZXNwb25zZUIhCh9j", + "b20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetComponentValueResponse), global::Tango.PMR.Diagnostics.SetComponentValueResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class SetComponentValueResponse : pb::IMessage<SetComponentValueResponse> { + private static readonly pb::MessageParser<SetComponentValueResponse> _parser = new pb::MessageParser<SetComponentValueResponse>(() => new SetComponentValueResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<SetComponentValueResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Diagnostics.SetComponentValueResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetComponentValueResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetComponentValueResponse(SetComponentValueResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetComponentValueResponse Clone() { + return new SetComponentValueResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SetComponentValueResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SetComponentValueResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SetComponentValueResponse other) { + if (other == null) { + return; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/ValueComponent.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/ValueComponent.cs new file mode 100644 index 000000000..88ba622ee --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/ValueComponent.cs @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ValueComponent.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Diagnostics { + + /// <summary>Holder for reflection information generated from ValueComponent.proto</summary> + public static partial class ValueComponentReflection { + + #region Descriptor + /// <summary>File descriptor for ValueComponent.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ValueComponentReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChRWYWx1ZUNvbXBvbmVudC5wcm90bxIVVGFuZ28uUE1SLkRpYWdub3N0aWNz", + "KjIKDlZhbHVlQ29tcG9uZW50Eg8KC0hlYXRlcjFUZW1wEAASDwoLSGVhdGVy", + "MlRlbXAQAUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZw", + "cm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Diagnostics.ValueComponent), }, null)); + } + #endregion + + } + #region Enums + public enum ValueComponent { + /// <summary> + ///Heater 1 Temperature (Min = 0, Max = 100) + /// </summary> + [pbr::OriginalName("Heater1Temp")] Heater1Temp = 0, + /// <summary> + ///Heater 2 Temperature (Min = 0, Max = 100) + /// </summary> + [pbr::OriginalName("Heater2Temp")] Heater2Temp = 1, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/ValueComponentState.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/ValueComponentState.cs new file mode 100644 index 000000000..a48590aec --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/ValueComponentState.cs @@ -0,0 +1,189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ValueComponentState.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Diagnostics { + + /// <summary>Holder for reflection information generated from ValueComponentState.proto</summary> + public static partial class ValueComponentStateReflection { + + #region Descriptor + /// <summary>File descriptor for ValueComponentState.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ValueComponentStateReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChlWYWx1ZUNvbXBvbmVudFN0YXRlLnByb3RvEhVUYW5nby5QTVIuRGlhZ25v", + "c3RpY3MaFFZhbHVlQ29tcG9uZW50LnByb3RvIl4KE1ZhbHVlQ29tcG9uZW50", + "U3RhdGUSOAoJQ29tcG9uZW50GAEgASgOMiUuVGFuZ28uUE1SLkRpYWdub3N0", + "aWNzLlZhbHVlQ29tcG9uZW50Eg0KBVZhbHVlGAIgASgBQiEKH2NvbS50d2lu", + "ZS50YW5nby5wbXIuZGlhZ25vc3RpY3NiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.ValueComponentReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.ValueComponentState), global::Tango.PMR.Diagnostics.ValueComponentState.Parser, new[]{ "Component", "Value" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ValueComponentState : pb::IMessage<ValueComponentState> { + private static readonly pb::MessageParser<ValueComponentState> _parser = new pb::MessageParser<ValueComponentState>(() => new ValueComponentState()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<ValueComponentState> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Diagnostics.ValueComponentStateReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ValueComponentState() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ValueComponentState(ValueComponentState other) : this() { + component_ = other.component_; + value_ = other.value_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ValueComponentState Clone() { + return new ValueComponentState(this); + } + + /// <summary>Field number for the "Component" field.</summary> + public const int ComponentFieldNumber = 1; + private global::Tango.PMR.Diagnostics.ValueComponent component_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Diagnostics.ValueComponent Component { + get { return component_; } + set { + component_ = value; + } + } + + /// <summary>Field number for the "Value" field.</summary> + public const int ValueFieldNumber = 2; + private double value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Value { + get { return value_; } + set { + value_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ValueComponentState); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ValueComponentState other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Component != other.Component) return false; + if (Value != other.Value) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Component != 0) hash ^= Component.GetHashCode(); + if (Value != 0D) hash ^= Value.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Component != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) Component); + } + if (Value != 0D) { + output.WriteRawTag(17); + output.WriteDouble(Value); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Component != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Component); + } + if (Value != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ValueComponentState other) { + if (other == null) { + return; + } + if (other.Component != 0) { + Component = other.Component; + } + if (other.Value != 0D) { + Value = other.Value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + component_ = (global::Tango.PMR.Diagnostics.ValueComponent) input.ReadEnum(); + break; + } + case 17: { + Value = input.ReadDouble(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs index 40bd0724c..6f9e53bf5 100644 --- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs +++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs @@ -13,7 +13,7 @@ namespace Tango.PMR /// <summary> /// Contains PMR extension methods. /// </summary> - public static class ExtensionMethods + public static class ExtensionMethods { /// <summary> /// Gets the protobuf <see cref="OriginalNameAttribute"/> attribute value from the message type. diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancerType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancerType.cs index a314c8996..f9273789e 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancerType.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancerType.cs @@ -35,8 +35,17 @@ namespace Tango.PMR.Hardware { } #region Enums public enum HardwareDancerType { + /// <summary> + ///Left Dancer + /// </summary> [pbr::OriginalName("LeftDancer")] LeftDancer = 0, + /// <summary> + ///Middle Dancer + /// </summary> [pbr::OriginalName("MiddleDancer")] MiddleDancer = 1, + /// <summary> + ///Right Dancer + /// </summary> [pbr::OriginalName("RightDancer")] RightDancer = 2, } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotorType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotorType.cs index 49aa1d688..c19e8b58c 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotorType.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotorType.cs @@ -35,9 +35,21 @@ namespace Tango.PMR.Hardware { } #region Enums public enum HardwareMotorType { + /// <summary> + ///Winder Motor + /// </summary> [pbr::OriginalName("WinderMotor")] WinderMotor = 0, + /// <summary> + ///Feeder Motor + /// </summary> [pbr::OriginalName("FeederMotor")] FeederMotor = 1, + /// <summary> + ///Dryer Motor + /// </summary> [pbr::OriginalName("DryerMotor")] DryerMotor = 2, + /// <summary> + ///Pooler Motor + /// </summary> [pbr::OriginalName("PoolerMotor")] PoolerMotor = 3, } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs index 1ef856a75..fe6f6ab97 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs @@ -40,19 +40,61 @@ namespace Tango.PMR.Hardware { } #region Enums public enum HardwarePidControlType { + /// <summary> + ///Dryer Heater 1000w + /// </summary> [pbr::OriginalName("DryerHeater1000w")] DryerHeater1000W = 0, + /// <summary> + ///Dryer Heater 200w 1 + /// </summary> [pbr::OriginalName("DryerHeater200w1")] DryerHeater200W1 = 1, + /// <summary> + ///Dryer Heater 200w 2 + /// </summary> [pbr::OriginalName("DryerHeater200w2")] DryerHeater200W2 = 2, + /// <summary> + ///Head Heater Zone 1 + /// </summary> [pbr::OriginalName("HeadHeaterZ1")] HeadHeaterZ1 = 3, + /// <summary> + ///Head Heater Zone 2 + /// </summary> [pbr::OriginalName("HeadHeaterZ2")] HeadHeaterZ2 = 4, + /// <summary> + ///Head Heater Zone 3 + /// </summary> [pbr::OriginalName("HeadHeaterZ3")] HeadHeaterZ3 = 5, + /// <summary> + ///Head Heater Zone 4 + /// </summary> [pbr::OriginalName("HeadHeaterZ4")] HeadHeaterZ4 = 6, + /// <summary> + ///Mixer Heater + /// </summary> [pbr::OriginalName("MixerHeater")] MixerHeater = 7, + /// <summary> + ///Waste Control + /// </summary> [pbr::OriginalName("WasteControl")] WasteControl = 8, + /// <summary> + ///Dryer Motor + /// </summary> [pbr::OriginalName("MotorDryer")] MotorDryer = 9, + /// <summary> + ///Feeder Motor + /// </summary> [pbr::OriginalName("MotorFeeder")] MotorFeeder = 10, + /// <summary> + ///Pooler Motor + /// </summary> [pbr::OriginalName("MotorPooler")] MotorPooler = 11, + /// <summary> + ///Winder Motor + /// </summary> [pbr::OriginalName("MotorWinder")] MotorWinder = 12, + /// <summary> + ///Dryer Heater 400 + /// </summary> [pbr::OriginalName("DryerHeater400")] DryerHeater400 = 13, } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs index af7e964bd..28aa18876 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs @@ -34,6 +34,9 @@ namespace Tango.PMR.Hardware { } #region Enums public enum HardwareWinderType { + /// <summary> + ///Internal Winder + /// </summary> [pbr::OriginalName("InternalWinder")] InternalWinder = 0, } diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobWindingMethod.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobWindingMethod.cs index af7a23b95..5172571c1 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobWindingMethod.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobWindingMethod.cs @@ -35,7 +35,13 @@ namespace Tango.PMR.Printing { } #region Enums public enum JobWindingMethod { + /// <summary> + ///Embroidery Winding + /// </summary> [pbr::OriginalName("Embroidery")] Embroidery = 0, + /// <summary> + ///Calibration Winding + /// </summary> [pbr::OriginalName("Calibration")] Calibration = 1, } diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index 2506e2373..4bb843619 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -61,6 +61,7 @@ <Compile Include="Debugging\DebugLogRequest.cs" /> <Compile Include="Debugging\DebugLogResponse.cs" /> <Compile Include="Diagnostics\DataFileFrame.cs" /> + <Compile Include="Diagnostics\DiagnosticsMonitors.cs" /> <Compile Include="Diagnostics\DigitalPin.cs" /> <Compile Include="Diagnostics\DispenserAbortHomingRequest.cs" /> <Compile Include="Diagnostics\DispenserAbortHomingResponse.cs" /> @@ -82,12 +83,16 @@ <Compile Include="Diagnostics\MotorJoggingResponse.cs" /> <Compile Include="Diagnostics\PushDiagnosticsRequest.cs" /> <Compile Include="Diagnostics\PushDiagnosticsResponse.cs" /> + <Compile Include="Diagnostics\SetComponentValueRequest.cs" /> + <Compile Include="Diagnostics\SetComponentValueResponse.cs" /> <Compile Include="Diagnostics\SetDigitalOutRequest.cs" /> <Compile Include="Diagnostics\SetDigitalOutResponse.cs" /> <Compile Include="Diagnostics\ThreadAbortJoggingRequest.cs" /> <Compile Include="Diagnostics\ThreadAbortJoggingResponse.cs" /> <Compile Include="Diagnostics\ThreadJoggingRequest.cs" /> <Compile Include="Diagnostics\ThreadJoggingResponse.cs" /> + <Compile Include="Diagnostics\ValueComponent.cs" /> + <Compile Include="Diagnostics\ValueComponentState.cs" /> <Compile Include="Embroidery\AnalyzeInput.cs" /> <Compile Include="Embroidery\AnalyzeOutput.cs" /> <Compile Include="Embroidery\ConvertFileInput.cs" /> diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index e8ae075d8..bb416646e 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -157,6 +157,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.ColorLa EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.UsersAndRoles", "MachineStudio\Modules\Tango.MachineStudio.UsersAndRoles\Tango.MachineStudio.UsersAndRoles.csproj", "{88028F14-0028-4DED-B119-19B8EE23CF32}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.CircularGauge", "Tango.CircularGauge\Tango.CircularGauge.csproj", "{6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2066,6 +2068,36 @@ Global {88028F14-0028-4DED-B119-19B8EE23CF32}.Release|x64.Build.0 = Release|Any CPU {88028F14-0028-4DED-B119-19B8EE23CF32}.Release|x86.ActiveCfg = Release|Any CPU {88028F14-0028-4DED-B119-19B8EE23CF32}.Release|x86.Build.0 = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|ARM.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|ARM.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|ARM64.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|x64.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|x64.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|x86.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Debug|x86.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|Any CPU.Build.0 = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|ARM.ActiveCfg = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|ARM.Build.0 = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|ARM64.ActiveCfg = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|ARM64.Build.0 = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|x64.ActiveCfg = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|x64.Build.0 = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|x86.ActiveCfg = Release|Any CPU + {6EFD5895-177B-4BBB-AF52-29F4D53B3FBD}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs index 6fc87e085..b782952a9 100644 --- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs @@ -36,6 +36,8 @@ namespace Tango.PMRGenerator.CLI GenerateColorLabColorSpaces(db, pmrFolder); GenerateColorLabLiquidTypes(db, pmrFolder); + GenerateDiagnosticsValueComponents(db, pmrFolder); + GenerateDiagnosticsMonitors(db, pmrFolder); } Console.WriteLine("Done"); @@ -55,6 +57,7 @@ namespace Tango.PMRGenerator.CLI { Name = field.Name.Replace(" ", ""), Value = field.Code, + Description = field.Description, }); } @@ -64,11 +67,11 @@ namespace Tango.PMRGenerator.CLI messageFile.Package = "Tango.PMR.Hardware"; messageFile.Imports.Add("HardwareMotorType.proto"); - messageFile.Properties.Add(new Property("HardwareMotorType", "HardwareMotorType")); + messageFile.Properties.Add(new ProtoProperty("HardwareMotorType", "HardwareMotorType")); foreach (var prop in typeof(HardwareMotor).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } String enumString = enumFile.GenerateCode(); @@ -92,6 +95,7 @@ namespace Tango.PMRGenerator.CLI { Name = field.Name.Replace(" ", ""), Value = field.Code, + Description = field.Description, }); } @@ -102,11 +106,11 @@ namespace Tango.PMRGenerator.CLI messageFile.Package = "Tango.PMR.Hardware"; messageFile.Imports.Add("HardwareDancerType.proto"); - messageFile.Properties.Add(new Property("HardwareDancerType", "HardwareDancerType")); + messageFile.Properties.Add(new ProtoProperty("HardwareDancerType", "HardwareDancerType")); foreach (var prop in typeof(HardwareDancer).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } String enumString = enumFile.GenerateCode(); @@ -130,6 +134,7 @@ namespace Tango.PMRGenerator.CLI { Name = field.Name.Replace(" ", ""), Value = field.Code, + Description = field.Description, }); } @@ -140,11 +145,11 @@ namespace Tango.PMRGenerator.CLI messageFile.Package = "Tango.PMR.Hardware"; messageFile.Imports.Add("HardwarePidControlType.proto"); - messageFile.Properties.Add(new Property("HardwarePidControlType", "HardwarePidControlType")); + messageFile.Properties.Add(new ProtoProperty("HardwarePidControlType", "HardwarePidControlType")); foreach (var prop in typeof(HardwarePidControl).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } String enumString = enumFile.GenerateCode(); @@ -178,13 +183,13 @@ namespace Tango.PMRGenerator.CLI messageFile.Package = "Tango.PMR.Hardware"; messageFile.Imports.Add("HardwareDispenserType.proto"); - messageFile.Properties.Add(new Property("HardwareDispenserType", "HardwareDispenserType")); + messageFile.Properties.Add(new ProtoProperty("HardwareDispenserType", "HardwareDispenserType")); foreach (var prop in typeof(DispenserType).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { if (prop.Name != "Name" && prop.Name != "Code") { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } } @@ -209,6 +214,7 @@ namespace Tango.PMRGenerator.CLI { Name = field.Name.Replace(" ", ""), Value = field.Code, + Description = field.Description, }); } @@ -218,11 +224,11 @@ namespace Tango.PMRGenerator.CLI messageFile.Package = "Tango.PMR.Hardware"; messageFile.Imports.Add("HardwareWinderType.proto"); - messageFile.Properties.Add(new Property("HardwareWinderType", "HardwareWinderType")); + messageFile.Properties.Add(new ProtoProperty("HardwareWinderType", "HardwareWinderType")); foreach (var prop in typeof(HardwareWinder).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } String enumString = enumFile.GenerateCode(); @@ -268,6 +274,7 @@ namespace Tango.PMRGenerator.CLI { Name = field.Name.Replace(" ", ""), Value = field.Code, + Description = field.Description, }); } @@ -299,13 +306,13 @@ namespace Tango.PMRGenerator.CLI messageFile.Package = "Tango.PMR.Printing"; messageFile.Imports.Add("JobSpoolType.proto"); - messageFile.Properties.Add(new Property("JobSpoolType", "JobSpoolType")); + messageFile.Properties.Add(new ProtoProperty("JobSpoolType", "JobSpoolType")); foreach (var prop in typeof(SpoolType).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { if (prop.Name != "Name" && prop.Name != "Code") { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } } @@ -325,7 +332,7 @@ namespace Tango.PMRGenerator.CLI foreach (var prop in typeof(ProcessParametersTable).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) { - messageFile.Properties.Add(new Property(prop.Name, CoercePropertyType(prop.PropertyType))); + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); } String messageString = messageFile.GenerateCode(); @@ -377,6 +384,64 @@ namespace Tango.PMRGenerator.CLI File.WriteAllText(Path.Combine(pmrFolder, "ColorLab", enumFile.Name + ".proto"), enumString); } + private static void GenerateDiagnosticsValueComponents(ObservablesContext db, String pmrFolder) + { + Console.WriteLine("Generating Diagnostics Value Component..."); + + ProtoEnumFile enumFile = new ProtoEnumFile(); + enumFile.Name = "ValueComponent"; + enumFile.Package = "Tango.PMR.Diagnostics"; + + foreach (var field in db.TechControllers.ToList().OrderBy(x => x.Code)) + { + enumFile.Fields.Add(new EnumerationField() + { + Name = field.Name.Replace(" ", ""), + Description = field.Description + String.Format(" (Min = {0}, Max = {1})", field.Min, field.Max), + Value = field.Code, + }); + } + + String enumString = enumFile.GenerateCode(); + + File.WriteAllText(Path.Combine(pmrFolder, "Diagnostics", enumFile.Name + ".proto"), enumString); + } + + private static void GenerateDiagnosticsMonitors(ObservablesContext db, String pmrFolder) + { + Console.WriteLine("Generating Monitors..."); + + ProtoMessageFile messageFile = new ProtoMessageFile(); + messageFile.Name = "DiagnosticsMonitors"; + messageFile.Package = "Tango.PMR.Diagnostics"; + + messageFile.Imports.Add("DoubleArray.proto"); + + foreach (var monitor in db.TechMonitors.ToList().OrderBy(x => x.Code)) + { + var prop = new ProtoProperty(); + prop.Name = monitor.Name.Replace(" ", ""); + prop.Description = monitor.Description + String.Format(" (Min = {0}, Max = {1}, PPF = {2})", monitor.Min, monitor.Max, monitor.PointsPerFrame); + prop.Repeated = true; + + if (!monitor.MultiChannel) + { + prop.Type = "double"; + } + else + { + prop.Type = "DoubleArray"; + prop.Description += String.Format(" Channel Count = {0}", monitor.ChannelCount); + } + + messageFile.Properties.Add(prop); + } + + String messageString = messageFile.GenerateCode(); + + File.WriteAllText(Path.Combine(pmrFolder, "Diagnostics", messageFile.Name + ".proto"), messageString); + } + private static String CoercePropertyType(Type type) { if (type == typeof(bool)) |
