diff --git a/SchematicDrawing/DrawingShape.cs b/SchematicDrawing/DrawingShape.cs index aef66bc4e..d92a6b64b 100644 --- a/SchematicDrawing/DrawingShape.cs +++ b/SchematicDrawing/DrawingShape.cs @@ -1,12 +1,8 @@ /// -/// Copyright (c) 2020 Sensus Slovensko a.s. +/// Copyright (c) 2020-2022 Sensus Slovensko a.s. /// using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace SchematicDrawing { @@ -26,8 +22,8 @@ namespace SchematicDrawing public readonly Edge[] Edges; /// Edges (in the open state in case there are two states: open/closed) /// open (route bit = 1), wet - public readonly bool HasImg; /// True when there is an image of this item to be displayed - public readonly Image ImgRight; /// Bitmap to be drawn (in the open state in case there are two states: open/closed) + public readonly bool HasImg; /// True when there is an image of this item to be displayed + public readonly Image ImgRight; /// Bitmap to be drawn (in the open state in case there are two states: open/closed) public readonly Image ImgUp; public readonly Image ImgLeft; public readonly Image ImgDown; @@ -80,13 +76,13 @@ namespace SchematicDrawing public readonly Image ImgDownFlippedVacuum; - DrawingShape(Shape shape, Sz sz, int szX, int szY, Node[] nodes = null, Edge[] edges = null, - int offsX = -10, int offsY = -10, int wid = 20, int hgh = 20, - Bitmap bmp = null, /// wet, open (route bit = 1) - Bitmap bmpClosedDry = null, /// dry (Dist == int.MaxValue), closed (route bit = 0) - Bitmap bmpVacuum = null, /// vacuum (int.MaxValue > Dist && Dist > Const.Vacuum) - Bitmap bmpOpenDry = null, /// dry (Dist == int.MaxValue), open (route bit = 1) - Bitmap bmpClosedWet = null) /// wet, closed (route bit = 0) ... diverter only + public DrawingShape(Shape shape, Sz sz, int szX, int szY, Node[] nodes = null, Edge[] edges = null, + int offsX = -10, int offsY = -10, int wid = 20, int hgh = 20, + Bitmap bmp = null, /// wet, open (route bit = 1) + Bitmap bmpClosedDry = null, /// dry (Dist == int.MaxValue), closed (route bit = 0) + Bitmap bmpVacuum = null, /// vacuum (int.MaxValue > Dist && Dist > Const.Vacuum) + Bitmap bmpOpenDry = null, /// dry (Dist == int.MaxValue), open (route bit = 1) + Bitmap bmpClosedWet = null) /// wet, closed (route bit = 0) ... diverter only { Shape = shape; Sz = sz; @@ -286,11 +282,31 @@ namespace SchematicDrawing public static DrawingShape[] Shapes; /// - public static int DrShIx(Shape shape, Sz sz) { return (int)shape * (int)Sz.Count + (int)sz; } + public static int DrShIx(Shape shape, Sz sz) + { + return (int)shape * (int)Sz.Count + (int)sz; + } /// - public static DrawingShape GetDrawingShape(Shape shape, Sz sz) { return Shapes[DrShIx(shape, sz)]; } + public static DrawingShape GetDrawingShape(Shape shape, Sz sz) + { + return Shapes[DrShIx(shape, sz)]; + } /// - public static DrawingShape GetDrawingShape(IDrawingItem item) { return (item != null) ? Shapes[DrShIx(item.Shape, item.Sz)] : null; } + public static DrawingShape GetDrawingShape(IDrawingItem item) + { + if (item == null) + { + return null; + } + else if (item is IDrawingItemWithCustomBmp) + { + return (item as IDrawingItemWithCustomBmp).GetSampleBitmap(); + } + else + { + return Shapes[DrShIx(item.Shape, item.Sz)]; + } + } /// /// Static constructor that initializes Shapes[] array diff --git a/SchematicDrawing/Enums.cs b/SchematicDrawing/Enums.cs index 7ad5dc782..0586416e6 100644 --- a/SchematicDrawing/Enums.cs +++ b/SchematicDrawing/Enums.cs @@ -51,7 +51,9 @@ namespace SchematicDrawing Vacuum, Valve, WaterM, - Count + + Count, + Custom, } public enum Sz diff --git a/SchematicDrawing/IDrawingItCmpntWithCustomBmp.cs b/SchematicDrawing/IDrawingItCmpntWithCustomBmp.cs new file mode 100644 index 000000000..a53321454 --- /dev/null +++ b/SchematicDrawing/IDrawingItCmpntWithCustomBmp.cs @@ -0,0 +1,12 @@ +/// +/// Copyright (c) 2022 Sensus Slovensko a.s. +/// +using System.Drawing; + +namespace SchematicDrawing +{ + public interface IDrawingItCmpntWithCustomBmp + { + DrawingShape GetCustomBitmap(); + } +} diff --git a/SchematicDrawing/IDrawingItemWithCustomBmp.cs b/SchematicDrawing/IDrawingItemWithCustomBmp.cs new file mode 100644 index 000000000..35cfb6d04 --- /dev/null +++ b/SchematicDrawing/IDrawingItemWithCustomBmp.cs @@ -0,0 +1,10 @@ +/// +/// Copyright (c) 2022 Sensus Slovensko a.s. +/// +namespace SchematicDrawing +{ + public interface IDrawingItemWithCustomBmp : IDrawingItem + { + DrawingShape GetSampleBitmap(); + } +} diff --git a/SchematicDrawing/SchematicDrawing.csproj b/SchematicDrawing/SchematicDrawing.csproj index de57fbf5f..1fe79deb8 100644 --- a/SchematicDrawing/SchematicDrawing.csproj +++ b/SchematicDrawing/SchematicDrawing.csproj @@ -46,6 +46,8 @@ + + diff --git a/SchematicDrawing/SchematicDrawingCtrl.cs b/SchematicDrawing/SchematicDrawingCtrl.cs index c7a8564db..d907e15fb 100644 --- a/SchematicDrawing/SchematicDrawingCtrl.cs +++ b/SchematicDrawing/SchematicDrawingCtrl.cs @@ -114,6 +114,16 @@ namespace SchematicDrawing get { return setpoints; } } + /// + /// Custom bitmaps + /// + private DrawingShape[] customBitmaps; + public DrawingShape[] CustomBitmaps + { + set { if (customBitmaps != value) { customBitmaps = value; Redraw(); } } + get { return customBitmaps; } + } + /// /// Pipes /// @@ -347,6 +357,7 @@ namespace SchematicDrawing if (!EditMode) { DrawingShape dshape = DrawingShape.GetDrawingShape(item); + if (dshape != null && dshape.Nodes != null && dshape.Nodes.Length > 0) { item.GNodes.Clear(); @@ -565,13 +576,22 @@ namespace SchematicDrawing /// /// Draw pictures of all items except of junctions /// + int customBmpIx = 0; foreach (var item in items) { DrawingShape dshape = DrawingShape.GetDrawingShape(item); - if (dshape != null && dshape.Shape != Shape.Junction && dshape.HasImg && (!Utils.IsHidden(item) || (EditMode && item == selectedItem))) + if (dshape != null && dshape.Shape != Shape.Junction && (!Utils.IsHidden(item) || (EditMode && item == selectedItem))) { - Rectangle rect = DrawItem(e, item, dshape); - ItemElementRectangles.Add(new ItemElementRect(item, Element.Body, rect)); + if (item is IDrawingItemWithCustomBmp && customBitmaps != null && customBitmaps.Length > customBmpIx) + { + Rectangle rect = DrawItem(e, item, customBitmaps[customBmpIx++]); + ItemElementRectangles.Add(new ItemElementRect(item, Element.Body, rect)); + } + else if (dshape.HasImg) + { + Rectangle rect = DrawItem(e, item, dshape); + ItemElementRectangles.Add(new ItemElementRect(item, Element.Body, rect)); + } } } @@ -639,7 +659,7 @@ namespace SchematicDrawing if (!string.IsNullOrEmpty(strVal)) { /// Paint water in the tank on a scale - DrawingShape dshape = DrawingShape.GetDrawingShape(item.Shape, item.Sz); + DrawingShape dshape = DrawingShape.GetDrawingShape(item); if (dshape.Shape == Shape.Scale) { Rectangle r = dshape.GetRotatedFlippedImageRectangle(item); diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 1dd57cf4d..faec80ab7 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1884.0")] -[assembly: AssemblyFileVersion("3.1.1884.0")] +[assembly: AssemblyVersion("3.1.1886.0")] +[assembly: AssemblyFileVersion("3.1.1886.0")] diff --git a/TBF/Properties/Resources.Designer.cs b/TBF/Properties/Resources.Designer.cs index f13c3c2e2..df446c6aa 100644 --- a/TBF/Properties/Resources.Designer.cs +++ b/TBF/Properties/Resources.Designer.cs @@ -150,6 +150,166 @@ namespace TBF.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_L_both { + get { + object obj = ResourceManager.GetObject("TControl_L_both", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_L_cooling { + get { + object obj = ResourceManager.GetObject("TControl_L_cooling", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_L_heating { + get { + object obj = ResourceManager.GetObject("TControl_L_heating", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_L_idle { + get { + object obj = ResourceManager.GetObject("TControl_L_idle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_M_both { + get { + object obj = ResourceManager.GetObject("TControl_M_both", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_M_cooling { + get { + object obj = ResourceManager.GetObject("TControl_M_cooling", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_M_heating { + get { + object obj = ResourceManager.GetObject("TControl_M_heating", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_M_idle { + get { + object obj = ResourceManager.GetObject("TControl_M_idle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_S_both { + get { + object obj = ResourceManager.GetObject("TControl_S_both", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_S_cooling { + get { + object obj = ResourceManager.GetObject("TControl_S_cooling", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_S_heating { + get { + object obj = ResourceManager.GetObject("TControl_S_heating", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_S_idle { + get { + object obj = ResourceManager.GetObject("TControl_S_idle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_XL_both { + get { + object obj = ResourceManager.GetObject("TControl_XL_both", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_XL_cooling { + get { + object obj = ResourceManager.GetObject("TControl_XL_cooling", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_XL_heating { + get { + object obj = ResourceManager.GetObject("TControl_XL_heating", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap TControl_XL_idle { + get { + object obj = ResourceManager.GetObject("TControl_XL_idle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/TBF/Properties/Resources.resx b/TBF/Properties/Resources.resx index 6feaca08c..46064472d 100644 --- a/TBF/Properties/Resources.resx +++ b/TBF/Properties/Resources.resx @@ -160,4 +160,52 @@ ..\Resources\qrcode-48x48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Rig\Modbus\TempControl\Pictures\TControl-L-both.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-L-cooling.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-L-heating.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-L-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-M-both.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-M-cooling.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-M-heating.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-M-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-S-both.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-S-cooling.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-S-heating.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-S-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-XL-both.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-XL-cooling.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-XL-heating.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Rig\Modbus\TempControl\Pictures\TControl-XL-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/TBF/Rig/ControlBoard/Papouch/PapouchCB.cs b/TBF/Rig/ControlBoard/Papouch/PapouchCB.cs index 8071feb2e..81c9e231e 100644 --- a/TBF/Rig/ControlBoard/Papouch/PapouchCB.cs +++ b/TBF/Rig/ControlBoard/Papouch/PapouchCB.cs @@ -203,7 +203,8 @@ namespace TBF.Rig.ControlBoard.Papouch ProcessData.MsrmntAvailableFlags, ProcessData.MeasuredValues, ProcessData.AltStrings, - ProcessData.Setpoints)); + ProcessData.Setpoints, + ProcessData.CustomBitmaps)); } public void StopDevice() diff --git a/TBF/Rig/ControlBoard/Uni/UniCB.cs b/TBF/Rig/ControlBoard/Uni/UniCB.cs index 2bc03589d..957180f7b 100644 --- a/TBF/Rig/ControlBoard/Uni/UniCB.cs +++ b/TBF/Rig/ControlBoard/Uni/UniCB.cs @@ -501,7 +501,7 @@ namespace TBF.Rig.ControlBoard.Uni ProcessData.UpdateMeasuredValuesAndSetpoints(); Bridge.OnStateMachineTick(this, new StateMachineTickEventArgs(route, ProcessData.MsrmntAvailableFlags, ProcessData.MeasuredValues, - ProcessData.AltStrings, ProcessData.Setpoints)); + ProcessData.AltStrings, ProcessData.Setpoints, ProcessData.CustomBitmaps)); /// Make sure the serial port is open if (cbCfg.DebugLevel == DebugMode.Normal && (serialPort == null || !serialPort.IsOpen)) diff --git a/TBF/Rig/Modbus/PumpFM/DanfossVLT/PumpCfg.cs b/TBF/Rig/Modbus/PumpFM/DanfossVLT/PumpCfg.cs index d41b2f8b8..65274de68 100644 --- a/TBF/Rig/Modbus/PumpFM/DanfossVLT/PumpCfg.cs +++ b/TBF/Rig/Modbus/PumpFM/DanfossVLT/PumpCfg.cs @@ -11,7 +11,7 @@ using TBF.Rig.Generic; namespace TBF.Rig.Modbus.PumpFM.DanfossVLT { - public class PumpCfg : ComponentCfgBase, Generic.IChildComponentCfg, IRouteBasedDrawingItem, IDrawingItemWithSetpoint + public class PumpCfg : ComponentCfgBase, IChildComponentCfg, IRouteBasedDrawingItem, IDrawingItemWithSetpoint { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PumpCfg) })[0]; public override XmlSerializer GetSerializer() { return Serializer; } diff --git a/TBF/Rig/Modbus/TempControl/Easytherm/TControlCfg.cs b/TBF/Rig/Modbus/TempControl/Easytherm/TControlCfg.cs index 845dd7559..aa80e5e22 100644 --- a/TBF/Rig/Modbus/TempControl/Easytherm/TControlCfg.cs +++ b/TBF/Rig/Modbus/TempControl/Easytherm/TControlCfg.cs @@ -76,7 +76,7 @@ namespace TBF.Rig.Modbus.TempControl.Easytherm Name = "Novus"; ParentName = "Modbus"; - Shape = Shape.TempControl; + Shape = Shape.Custom; Sz = Sz.M; MsrdValLimLo = 5; MsrdValLimHi = 95; diff --git a/TBF/Rig/Modbus/TempControl/Novus/TControl.cs b/TBF/Rig/Modbus/TempControl/Novus/TControl.cs index a21803afb..d45d9a61e 100644 --- a/TBF/Rig/Modbus/TempControl/Novus/TControl.cs +++ b/TBF/Rig/Modbus/TempControl/Novus/TControl.cs @@ -3,25 +3,29 @@ /// using System; using System.Collections.Generic; +using System.Drawing; using log4net; using Common; using Config.Entities; using SchematicDrawing; -using TBF.Rig.Generic; using TBF.Boxes; +using TBF.Rig.Generic; namespace TBF.Rig.Modbus.TempControl.Novus { - public class TControl : ComponentBase, IDevice, ITempControl, IDrawingItCmpntWithSetpoint, IDrawingItCmpntWithMeasuredVal + public class TControl : ComponentBase, IDevice, ITempControl, IDrawingItCmpntWithSetpoint, + IDrawingItCmpntWithMeasuredVal, IDrawingItCmpntWithCustomBmp { private static readonly ILog log = LogManager.GetLogger(typeof(TControl)); public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); } - const UInt16 SetpointAddress = 0; /// Temperature setpoint - const UInt16 ProcessValueAddress = 1; /// Actual temperature - const UInt16 StatusWord1 = 6; /// Status word 1 - const UInt16 StatusWord2 = 9; /// Status word 2 - const UInt16 StatusWord3 = 10; /// Status word 3 + const UInt16 SetpointAddress = 0; /// Temperature setpoint address + const UInt16 ProcessValueAddress = 1; /// Actual temperature address + const UInt16 Status1Address = 6; /// Status word 1 address + const UInt16 FWVersionAddress = 7; /// Firmware version address + const UInt16 ControllerIdAddress = 8; /// Controller ID address + const UInt16 Status2Address = 9; /// Status word 2 address + const UInt16 Status3Address = 10; /// Status word 3 address readonly TControlCfg novusCfg; public IDrawingItem DrawingItem { get { return novusCfg as IDrawingItem; } } @@ -51,17 +55,44 @@ namespace TBF.Rig.Modbus.TempControl.Novus if (temperatureSetPoint <= 5) temperatureSetPoint = 5; } + + public DrawingShape GetCustomBitmap() + { + switch (novusCfg.Sz) + { + case Sz.S: + return isHeating ? (isCooling ? TControlCfg.DSBothS : TControlCfg.DSHeatingS) + : (isCooling ? TControlCfg.DSCoolingS : TControlCfg.DSIdleS); + case Sz.M: + return isHeating ? (isCooling ? TControlCfg.DSBothM : TControlCfg.DSHeatingM) + : (isCooling ? TControlCfg.DSCoolingM : TControlCfg.DSIdleM); + default: + case Sz.L: + return isHeating ? (isCooling ? TControlCfg.DSBothL : TControlCfg.DSHeatingL) + : (isCooling ? TControlCfg.DSCoolingL : TControlCfg.DSIdleL); + case Sz.XL: + return isHeating ? (isCooling ? TControlCfg.DSBothXL : TControlCfg.DSHeatingXL) + : (isCooling ? TControlCfg.DSCoolingXL : TControlCfg.DSIdleXL); + } + } + + bool novusDataValid; - double temperatureSetPoint; - double actualTemperature; + bool temperatureSetPointValid { get { return novusDataValid; } } + bool temperatureSetPointRequested; + Int16 status1; Int16 status2; Int16 status3; Int16 fwVersion; Int16 controllerId; + double temperatureSetPoint; + double actualTemperature; - bool temperatureSetPointValid; - bool temperatureSetPointRequested; + bool isInvOutput { get { return (status2 & (1 << 2)) != 0; } } + bool isHeating { get { return isInvOutput ? ((status2 & (1 << 11)) == 0) : ((status2 & (1 << 11)) != 0); } } /// Output 1 + bool isCooling { get { return isInvOutput ? ((status2 & (1 << 12)) == 0) : ((status2 & (1 << 12)) != 0); } } /// Output 2 + bool isFahrenheit { get { return (status2 & (1 << 9)) != 0; } } public float requiredTemp @@ -73,9 +104,6 @@ namespace TBF.Rig.Modbus.TempControl.Novus } - bool heating; - bool cooling; - public TControl() { } @@ -83,17 +111,18 @@ namespace TBF.Rig.Modbus.TempControl.Novus : base(cfg) { novusCfg = cfg as TControlCfg; - } + } /// Initialize this device public override void Initialize() - { - temperatureSetPointValid = false; - temperatureSetPointRequested = false; + { novusDataValid = false; + temperatureSetPointRequested = false; if (novusCfg.DebugLevel == DebugMode.Simulate) { + actualTemperature = 22; + temperatureSetPoint = 18; log.FatalFormat("{0} simulated: {1}", Name, this); } else @@ -131,13 +160,17 @@ namespace TBF.Rig.Modbus.TempControl.Novus - ((telegram[2 * i + 3] & 0x80) != 0 ? 65536 : 0)); } - temperatureSetPoint = (double)values[0] * 0.1; /// setpoint in 0.1 °C - actualTemperature = (double)values[1] * 0.1; /// temperature in 0.1 °C - status1 = values[6]; - fwVersion = values[7]; - controllerId = values[8]; - status2 = values[9]; - status3 = values[10]; + status1 = values[Status1Address]; + status2 = values[Status2Address]; + status3 = values[Status3Address]; + fwVersion = values[FWVersionAddress]; + controllerId = values[ControllerIdAddress]; + + double setpointCorF = (double)values[SetpointAddress] * 0.1; + temperatureSetPoint = isFahrenheit ? Units.ConvertFrom(Unit.F, setpointCorF) : setpointCorF; + + double temperatureCorF = (double)values[ProcessValueAddress] * 0.1; + actualTemperature = isFahrenheit ? Units.ConvertFrom(Unit.F, temperatureCorF) : temperatureCorF; novusDataValid = true; @@ -151,10 +184,17 @@ namespace TBF.Rig.Modbus.TempControl.Novus log.InfoFormat("[{0}] received soemthing else", Name); } } + else if (novusCfg.DebugLevel == DebugMode.Simulate) + { + switch ((StateMachine.Time / 3) % 3) + { + case 0: status2 = 0; break; + case 1: status2 = 1 << 11; break; + case 2: status2 = 1 << 12; break; + } + } } - const int Modulo = 2; - /// Run this device public void RunDeviceAfter() { @@ -192,47 +232,33 @@ namespace TBF.Rig.Modbus.TempControl.Novus /// /// Set Easytherm controller to specified temperature /// - /// Temperature in °C + /// Temperature in °C /// true = OK, false = any error - public bool SetTemperatureSetpoint(float reqTemp) + public bool SetTemperatureSetpoint(double reqTempC) { - if (reqTemp != 0 && (reqTemp < 5 || reqTemp > 95.0f)) + if (reqTempC != 0 && (reqTempC < 5.0 || reqTempC > 95.0)) { return false; /// required temperature out of range } - if (novusDataValid && (reqTemp == temperatureSetPoint)) + if (novusDataValid && (reqTempC == temperatureSetPoint)) { return true; /// already set to the required temperature } - if (reqTemp != 0) /// temperature==0 disables sending the setpoint + if (reqTempC != 0) /// temperature==0 disables sending the setpoint { - Int16 usTempSetpoint = Convert.ToInt16(Math.Round(10 * reqTemp)); /// setpoint in 0.1 °C + double reqTemp = isFahrenheit ? Units.ConvertTo(Unit.F, reqTempC) : reqTempC; + Int16 tempSetpointInt16 = Convert.ToInt16(Math.Round(10 * reqTemp)); /// setpoint in 0.1 °C or °F ushort destAddress = SetpointAddress; /// - SendValueToNovus(Function.PresetSingleRegister, destAddress, usTempSetpoint); + SendValueToNovus(Function.PresetSingleRegister, destAddress, tempSetpointInt16); } - temperatureSetPoint = reqTemp; - temperatureSetPointValid = true; + temperatureSetPoint = reqTempC; return true; } - public void RequestTemperatureSetpoint() - { - SendValueToNovus(Function.ReadHoldingRegisters, SetpointAddress, 1); /// rel.address=2, 1 word - } - - public void RequestActualTemperature() - { - SendValueToNovus(Function.ReadInputRegister, ProcessValueAddress, 1); /// rel.address=x, 1 word - } - - public void RequestAll() - { - SendValueToNovus(Function.ReadInputRegister, 0, 2); /// Registers: Setpoint=0, ProcessValue=1, Status1=6, Status2=9, Status3=10 - } void SendValueToNovus(Function function, UInt16 address, Int16 value) { diff --git a/TBF/Rig/Modbus/TempControl/Novus/TControlCfg.cs b/TBF/Rig/Modbus/TempControl/Novus/TControlCfg.cs index 530de8c9e..9337c497d 100644 --- a/TBF/Rig/Modbus/TempControl/Novus/TControlCfg.cs +++ b/TBF/Rig/Modbus/TempControl/Novus/TControlCfg.cs @@ -13,7 +13,7 @@ using TBF.Rig.Generic; namespace TBF.Rig.Modbus.TempControl.Novus { public class TControlCfg : ComponentCfgBase, IChildComponentCfg, IParamsProvider, - IDrawingItemWithSetpoint, IDrawingItemWithMeasuredVal + IDrawingItemWithSetpoint, IDrawingItemWithMeasuredVal, IDrawingItemWithCustomBmp { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TControlCfg) })[0]; public override XmlSerializer GetSerializer() { return Serializer; } @@ -77,7 +77,7 @@ namespace TBF.Rig.Modbus.TempControl.Novus Name = "Novus"; ParentName = "Modbus"; - Shape = Shape.TempControl; + Shape = Shape.Custom; Sz = Sz.M; MsrdValLimLo = 5; MsrdValLimHi = 95; @@ -214,5 +214,41 @@ namespace TBF.Rig.Modbus.TempControl.Novus { return true; /// =OK, do nothing } + + /// + /// SchematicDrawing support + /// + public DrawingShape GetSampleBitmap() + { + return (Sz == Sz.S) ? DSCoolingS : (Sz == Sz.M) ? DSCoolingM : (Sz == Sz.XL) ? DSCoolingXL : DSCoolingL; + } + + /// + /// Static part, DrawingShape constructor arguments depend on bitmap properties + /// + public static DrawingShape DSIdleS, DSHeatingS, DSCoolingS, DSBothS; + public static DrawingShape DSIdleM, DSHeatingM, DSCoolingM, DSBothM; + public static DrawingShape DSIdleL, DSHeatingL, DSCoolingL, DSBothL; + public static DrawingShape DSIdleXL, DSHeatingXL, DSCoolingXL, DSBothXL; + /// + static TControlCfg() + { + DSIdleS = new DrawingShape(Shape.Custom, Sz.S, 2, 2, null, null, 0, 0, 20, 20, Properties.Resources.TControl_S_idle); + DSHeatingS = new DrawingShape(Shape.Custom, Sz.S, 2, 2, null, null, 0, 0, 20, 20, Properties.Resources.TControl_S_heating); + DSCoolingS = new DrawingShape(Shape.Custom, Sz.S, 2, 2, null, null, 0, 0, 20, 20, Properties.Resources.TControl_S_cooling); + DSBothS = new DrawingShape(Shape.Custom, Sz.S, 2, 2, null, null, 0, 0, 20, 20, Properties.Resources.TControl_S_both); + DSIdleM = new DrawingShape(Shape.Custom, Sz.S, 3, 4, null, null, 0, 5, 30, 30, Properties.Resources.TControl_M_idle); + DSHeatingM = new DrawingShape(Shape.Custom, Sz.S, 3, 4, null, null, 0, 5, 30, 30, Properties.Resources.TControl_M_heating); + DSCoolingM = new DrawingShape(Shape.Custom, Sz.S, 3, 4, null, null, 0, 5, 30, 30, Properties.Resources.TControl_M_cooling); + DSBothM = new DrawingShape(Shape.Custom, Sz.S, 3, 4, null, null, 0, 5, 30, 30, Properties.Resources.TControl_M_both); + DSIdleL = new DrawingShape(Shape.Custom, Sz.S, 4, 4, null, null, 0, 0, 40, 40, Properties.Resources.TControl_L_idle); + DSHeatingL = new DrawingShape(Shape.Custom, Sz.S, 4, 4, null, null, 0, 0, 40, 40, Properties.Resources.TControl_L_heating); + DSCoolingL = new DrawingShape(Shape.Custom, Sz.S, 4, 4, null, null, 0, 0, 40, 40, Properties.Resources.TControl_L_cooling); + DSBothL = new DrawingShape(Shape.Custom, Sz.S, 4, 4, null, null, 0, 0, 40, 40, Properties.Resources.TControl_L_both); + DSIdleXL = new DrawingShape(Shape.Custom, Sz.S, 5, 6, null, null, 0, 5, 50, 50, Properties.Resources.TControl_XL_idle); + DSHeatingXL = new DrawingShape(Shape.Custom, Sz.S, 5, 6, null, null, 0, 5, 50, 50, Properties.Resources.TControl_XL_heating); + DSCoolingXL = new DrawingShape(Shape.Custom, Sz.S, 5, 6, null, null, 0, 5, 50, 50, Properties.Resources.TControl_XL_cooling); + DSBothXL = new DrawingShape(Shape.Custom, Sz.S, 5, 6, null, null, 0, 5, 50, 50, Properties.Resources.TControl_XL_both); + } } } diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-both.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-both.png new file mode 100644 index 000000000..a4cd768fd Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-both.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-cooling.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-cooling.png new file mode 100644 index 000000000..93dfca2b5 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-cooling.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-heating.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-heating.png new file mode 100644 index 000000000..8e2db6e6b Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-heating.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-idle.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-idle.png new file mode 100644 index 000000000..b1f60ed47 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-L-idle.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-both.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-both.png new file mode 100644 index 000000000..6e6920707 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-both.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-cooling.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-cooling.png new file mode 100644 index 000000000..2325c2ddd Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-cooling.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-heating.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-heating.png new file mode 100644 index 000000000..efaff851d Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-heating.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-idle.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-idle.png new file mode 100644 index 000000000..2b5dba387 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-M-idle.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-both.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-both.png new file mode 100644 index 000000000..c225d4028 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-both.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-cooling.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-cooling.png new file mode 100644 index 000000000..7036f5869 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-cooling.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-heating.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-heating.png new file mode 100644 index 000000000..893234424 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-heating.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-idle.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-idle.png new file mode 100644 index 000000000..2f2196b12 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-S-idle.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-both.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-both.png new file mode 100644 index 000000000..50f0c5570 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-both.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-cooling.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-cooling.png new file mode 100644 index 000000000..9dad04f22 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-cooling.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-heating.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-heating.png new file mode 100644 index 000000000..d895fed54 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-heating.png differ diff --git a/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-idle.png b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-idle.png new file mode 100644 index 000000000..5c14d2299 Binary files /dev/null and b/TBF/Rig/Modbus/TempControl/Pictures/TControl-XL-idle.png differ diff --git a/TBF/Rig/Modbus/TempMeter/Meret/TempMeterCfg.cs b/TBF/Rig/Modbus/TempMeter/Meret/TempMeterCfg.cs index e3d9d2b3d..9679403eb 100644 --- a/TBF/Rig/Modbus/TempMeter/Meret/TempMeterCfg.cs +++ b/TBF/Rig/Modbus/TempMeter/Meret/TempMeterCfg.cs @@ -18,7 +18,7 @@ namespace TBF.Rig.Modbus.TempMeter.Meret public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0]; public override XmlSerializer GetSerializer() { return Serializer; } - public IComponentCfgCtrl GetControl(IList cmpntEntities) + public IComponentCfgCtrl GetControl(IList cmpntEntities) { var parents = cmpntEntities.Where(x => x.ClassName == "Modbus.Common"); return new Configs.ParamsProvider.ComponentCfgCtrl(this, parents); @@ -50,7 +50,7 @@ namespace TBF.Rig.Modbus.TempMeter.Meret public Orient MsrdOrient { get; set; } public string MsrdFormat { get; set; } /// 2 - public Unit MsrdUnit { get; set; } /// 3 + public Unit MsrdUnit { get; set; } /// 3 public double MsrdValLimLo { get; set; } /// 4 public double MsrdValLimHi { get; set; } /// 5 diff --git a/TBF/Rig/Sequences/ProcessData.cs b/TBF/Rig/Sequences/ProcessData.cs index 468eef5a8..9c38df743 100644 --- a/TBF/Rig/Sequences/ProcessData.cs +++ b/TBF/Rig/Sequences/ProcessData.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.IO; using log4net; using Common; @@ -51,6 +52,7 @@ namespace TBF.Rig.Sequences public static readonly IList ComponentsWithMeasuredVal; public static readonly IList ComponentsWithSetpoint; + public static readonly IList ComponentsWithCustomBmp; /// /// Measured values and setpoints to be displayed @@ -59,6 +61,7 @@ namespace TBF.Rig.Sequences public static double[] MeasuredValues; public static string[] AltStrings; public static double[] Setpoints; + public static DrawingShape[] CustomBitmaps; /// /// State variables to be saved after each completed test @@ -95,6 +98,7 @@ namespace TBF.Rig.Sequences ComponentsWithMeasuredVal = new List(); ComponentsWithSetpoint = new List(); + ComponentsWithCustomBmp = new List(); } /// @@ -305,6 +309,16 @@ namespace TBF.Rig.Sequences { ProcessData.Setpoints[i] = ProcessData.ComponentsWithSetpoint[i].SetpointVal; } + + /// Collect custom bitmaps + if (ProcessData.CustomBitmaps == null || ProcessData.CustomBitmaps.Length != ProcessData.ComponentsWithCustomBmp.Count) + { + ProcessData.CustomBitmaps = new DrawingShape[ProcessData.ComponentsWithCustomBmp.Count]; + } + for (int i = 0; i < ProcessData.ComponentsWithCustomBmp.Count; i++) + { + ProcessData.CustomBitmaps[i] = ProcessData.ComponentsWithCustomBmp[i].GetCustomBitmap(); + } } diff --git a/TBF/Rig/StateMachine.cs b/TBF/Rig/StateMachine.cs index 49d25873c..defcf3f1d 100644 --- a/TBF/Rig/StateMachine.cs +++ b/TBF/Rig/StateMachine.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2021 Sensus Slovensko a.s. +/// Copyright (c) 2013-2022 Sensus Slovensko a.s. /// using System; using System.Text; @@ -220,6 +220,7 @@ namespace TBF.Rig ProcessData.ComponentsWithMeasuredVal.Clear(); ProcessData.ComponentsWithSetpoint.Clear(); + ProcessData.ComponentsWithCustomBmp.Clear(); /// Find all balances (to initialize tank capacities in the control board) /// Find the control board @@ -239,6 +240,10 @@ namespace TBF.Rig { ProcessData.ComponentsWithSetpoint.Add(cmpnt as SchematicDrawing.IDrawingItCmpntWithSetpoint); } + if (cmpnt is SchematicDrawing.IDrawingItCmpntWithCustomBmp) + { + ProcessData.ComponentsWithCustomBmp.Add(cmpnt as SchematicDrawing.IDrawingItCmpntWithCustomBmp); + } if ((cmpnt is Output.DB.SensusOracle.Database) && (ProcessData.OracleDB == null)) { diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj index bd24ae2b4..a172914a4 100644 --- a/TBF/TBF.csproj +++ b/TBF/TBF.csproj @@ -3413,6 +3413,22 @@ + + + + + + + + + + + + + + + + Always diff --git a/TBF/UI/MainWnd.Designer.cs b/TBF/UI/MainWnd.Designer.cs index b070f0161..3665cc632 100644 --- a/TBF/UI/MainWnd.Designer.cs +++ b/TBF/UI/MainWnd.Designer.cs @@ -341,6 +341,7 @@ namespace TBF.UI this.drawingCtrl.SelectedElement = SchematicDrawing.Element.None; this.drawingCtrl.SelectedItem = null; this.drawingCtrl.Setpoints = null; + this.drawingCtrl.CustomBitmaps = null; this.drawingCtrl.SupressRedraws = false; this.drawingCtrl.MouseClick += new System.Windows.Forms.MouseEventHandler(this.drawingCtrl_MouseClick); // diff --git a/TBF/UI/MainWnd.cs b/TBF/UI/MainWnd.cs index d4b04d197..4392182ae 100644 --- a/TBF/UI/MainWnd.cs +++ b/TBF/UI/MainWnd.cs @@ -562,6 +562,13 @@ namespace TBF.UI drawingCtrl.Setpoints = new double[args.Setpoints.Length]; } for (int i = 0; i < args.Setpoints.Length; i++) drawingCtrl.Setpoints[i] = args.Setpoints[i]; + + /// Duplicate custom bitmaps + if (drawingCtrl.CustomBitmaps == null || drawingCtrl.CustomBitmaps.Length != args.CustomBitmaps.Length) + { + drawingCtrl.CustomBitmaps = new DrawingShape[args.CustomBitmaps.Length]; + } + for (int i = 0; i < args.CustomBitmaps.Length; i++) drawingCtrl.CustomBitmaps[i] = args.CustomBitmaps[i]; drawingCtrl.SupressRedraws = false; } diff --git a/TBF/UI/Process/ProcessTabPageCtrl.cs b/TBF/UI/Process/ProcessTabPageCtrl.cs index f39b92163..ce7a32cf8 100644 --- a/TBF/UI/Process/ProcessTabPageCtrl.cs +++ b/TBF/UI/Process/ProcessTabPageCtrl.cs @@ -223,6 +223,7 @@ namespace TBF.UI.Process IDrawingItCmpntWithMeasuredVal[] cmpntWithMeasuredVal; IDrawingItCmpntWithSetpoint[] cmpntWithSetpoint; + IDrawingItCmpntWithCustomBmp[] cmpntWithCustomBmp; /// @@ -236,6 +237,7 @@ namespace TBF.UI.Process int id = 1; int msrdIx = 0; int setpIx = 0; + int bmpIx = 0; processDrawingCtrl.AddItem( tankCfg = new TBF.Rig.Various.Drawing.Tank.Configuration("Tank", new TBF.Rig.Various.Drawing.Tank.Factory()) @@ -410,9 +412,11 @@ namespace TBF.UI.Process processDrawingCtrl.MeasuredValues = new double[msrdIx]; processDrawingCtrl.AltStrings = new string[msrdIx]; processDrawingCtrl.Setpoints = new double[setpIx]; + processDrawingCtrl.CustomBitmaps = new DrawingShape[bmpIx]; /// cmpntWithMeasuredVal = new IDrawingItCmpntWithMeasuredVal[msrdIx]; cmpntWithSetpoint = new IDrawingItCmpntWithSetpoint[setpIx]; + cmpntWithCustomBmp = new IDrawingItCmpntWithCustomBmp[bmpIx]; processDrawingCtrl.PipesS = new string[0]; processDrawingCtrl.PipesM = new string[0]; diff --git a/TBF/UiBridge/StateMachineTickEventArgs.cs b/TBF/UiBridge/StateMachineTickEventArgs.cs index 1d45e7296..c46bda5a3 100644 --- a/TBF/UiBridge/StateMachineTickEventArgs.cs +++ b/TBF/UiBridge/StateMachineTickEventArgs.cs @@ -1,8 +1,9 @@ /// -/// Copyright (c) 2020-2021 Sensus Slovensko a.s. +/// Copyright (c) 2020-2022 Sensus Slovensko a.s. /// using System; using Dirichlet.Numerics; +using SchematicDrawing; namespace TBF.UiBridge { @@ -13,14 +14,17 @@ namespace TBF.UiBridge public readonly double[] MeasuredValues; public readonly string[] AltStrings; public readonly double[] Setpoints; + public readonly DrawingShape[] CustomBitmaps; - public StateMachineTickEventArgs(UInt128 route, bool[] msrmntAvailableFlags, double[] measuredValues, string[] altStrings, double[] setpoints) + public StateMachineTickEventArgs(UInt128 route, bool[] msrmntAvailableFlags, double[] measuredValues, + string[] altStrings, double[] setpoints, DrawingShape[] customBitmaps) { Route = route; MsrmntAvailableFlags = msrmntAvailableFlags; MeasuredValues = measuredValues; AltStrings = altStrings; Setpoints = setpoints; + CustomBitmaps = customBitmaps; } } }