aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-13 16:35:28 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-13 16:35:28 +0200
commitd5a5fd2813a98d97e0198342bbcc53df454c3e01 (patch)
tree8e3012262ba6417c3236d33a582df2d7ab0cd16a /Software/Visual_Studio/Tango.Integration
parent2b1e86aeee219b236ba8cb33c5ebfa8bde89f14f (diff)
downloadTango-d5a5fd2813a98d97e0198342bbcc53df454c3e01.tar.gz
Tango-d5a5fd2813a98d97e0198342bbcc53df454c3e01.zip
Digital out.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Entities/TechIo.cs162
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Entities/TechMotor.cs20
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Enumerations/IOType.cs17
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechDispensers.cs13
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechIos.cs25
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMonitors.cs48
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMotors.cs19
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/ObservableEntity.cs2
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/ObservablesContext.cs8
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapter.cs2
-rw-r--r--Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapterExtension.cs38
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operators/IMachineOperator.cs4
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs6
-rw-r--r--Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj2
14 files changed, 360 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechIo.cs b/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechIo.cs
new file mode 100644
index 000000000..90ac0de7c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechIo.cs
@@ -0,0 +1,162 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+
+namespace Tango.Integration.Observables
+{
+ [Table("TECH_IOS")]
+ public partial class TechIo : ObservableEntity<TechIo>
+ {
+
+ protected Int32 _code;
+ /// <summary>
+ /// Gets or sets the techio code.
+ /// </summary>
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ _code = value; RaisePropertyChanged(nameof(Code));
+ }
+
+ }
+
+ protected String _name;
+ /// <summary>
+ /// Gets or sets the techio name.
+ /// </summary>
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ _name = value; RaisePropertyChanged(nameof(Name));
+ }
+
+ }
+
+ protected String _description;
+ /// <summary>
+ /// Gets or sets the techio description.
+ /// </summary>
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ _description = value; RaisePropertyChanged(nameof(Description));
+ }
+
+ }
+
+ protected Int32 _port;
+ /// <summary>
+ /// Gets or sets the techio port.
+ /// </summary>
+ [Column("PORT")]
+
+ public Int32 Port
+ {
+ get
+ {
+ return _port;
+ }
+
+ set
+ {
+ _port = value; RaisePropertyChanged(nameof(Port));
+ }
+
+ }
+
+ protected Int32 _type;
+ /// <summary>
+ /// Gets or sets the techio type.
+ /// </summary>
+ [Column("TYPE")]
+
+ public Int32 Type
+ {
+ get
+ {
+ return _type;
+ }
+
+ set
+ {
+ _type = value; RaisePropertyChanged(nameof(Type));
+ }
+
+ }
+
+ protected Double _min;
+ /// <summary>
+ /// Gets or sets the techio min.
+ /// </summary>
+ [Column("MIN")]
+
+ public Double Min
+ {
+ get
+ {
+ return _min;
+ }
+
+ set
+ {
+ _min = value; RaisePropertyChanged(nameof(Min));
+ }
+
+ }
+
+ protected Double _max;
+ /// <summary>
+ /// Gets or sets the techio max.
+ /// </summary>
+ [Column("MAX")]
+
+ public Double Max
+ {
+ get
+ {
+ return _max;
+ }
+
+ set
+ {
+ _max = value; RaisePropertyChanged(nameof(Max));
+ }
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechIo" /> class.
+ /// </summary>
+ public TechIo() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechMotor.cs b/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechMotor.cs
index 8fb082850..fd872f636 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechMotor.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Entities/TechMotor.cs
@@ -72,6 +72,26 @@ namespace Tango.Integration.Observables
}
+ protected Boolean _supportshoming;
+ /// <summary>
+ /// Gets or sets the techmotor supports homing.
+ /// </summary>
+ [Column("SUPPORTS_HOMING")]
+
+ public Boolean SupportsHoming
+ {
+ get
+ {
+ return _supportshoming;
+ }
+
+ set
+ {
+ _supportshoming = value; RaisePropertyChanged(nameof(SupportsHoming));
+ }
+
+ }
+
/// <summary>
/// Initializes a new instance of the <see cref="TechMotor" /> class.
/// </summary>
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/IOType.cs b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/IOType.cs
new file mode 100644
index 000000000..c13f4cca8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/IOType.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.Integration.Observables.Enumerations
+{
+ public enum IOType
+ {
+ DigitalOutput,
+ DigitalInput,
+ AnalogOut,
+ AnalogInput,
+ PWM,
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechDispensers.cs b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechDispensers.cs
index 677a546d2..e14fbb397 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechDispensers.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechDispensers.cs
@@ -8,5 +8,18 @@ namespace Tango.Integration.Observables
{
public enum TechDispensers
{
+
+ /// <summary>
+ /// (Dispenser 1)
+ /// </summary>
+ [Description("Dispenser 1")]
+ Dispenser1 = 0,
+
+ /// <summary>
+ /// (Dispenser 2)
+ /// </summary>
+ [Description("Dispenser 2")]
+ Dispenser2 = 1,
+
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechIos.cs b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechIos.cs
new file mode 100644
index 000000000..301448c28
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechIos.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ComponentModel;
+
+namespace Tango.Integration.Observables
+{
+ public enum TechIos
+ {
+
+ /// <summary>
+ /// (Digital Out 1)
+ /// </summary>
+ [Description("Digital Out 1")]
+ PIN0 = 0,
+
+ /// <summary>
+ /// (Digital Out 2)
+ /// </summary>
+ [Description("Digital Out 2")]
+ PIN1 = 1,
+
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMonitors.cs b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMonitors.cs
index 1f8817f44..8e3e20f7d 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMonitors.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMonitors.cs
@@ -177,5 +177,53 @@ namespace Tango.Integration.Observables
[Description("Chiller Temperature")]
ChillerTemperature = 27,
+ /// <summary>
+ /// (Dispenser 1 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 1 Motor Frequency")]
+ Dispenser1MotorFrequency = 28,
+
+ /// <summary>
+ /// (Dispenser 2 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 2 Motor Frequency")]
+ Dispenser2MotorFrequency = 29,
+
+ /// <summary>
+ /// (Dispenser 3 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 3 Motor Frequency")]
+ Dispenser3MotorFrequency = 30,
+
+ /// <summary>
+ /// (Dispenser 4 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 4 Motor Frequency")]
+ Dispenser4MotorFrequency = 31,
+
+ /// <summary>
+ /// (Dispenser 5 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 5 Motor Frequency")]
+ Dispenser5MotorFrequency = 32,
+
+ /// <summary>
+ /// (Dispenser 6 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 6 Motor Frequency")]
+ Dispenser6MotorFrequency = 33,
+
+ /// <summary>
+ /// (Dispenser 7 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 7 Motor Frequency")]
+ Dispenser7MotorFrequency = 34,
+
+ /// <summary>
+ /// (Dispenser 8 Motor Frequency)
+ /// </summary>
+ [Description("Dispenser 8 Motor Frequency")]
+ Dispenser8MotorFrequency = 35,
+
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMotors.cs b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMotors.cs
index bef81b052..e99aacc83 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMotors.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/Enumerations/TechMotors.cs
@@ -8,5 +8,24 @@ namespace Tango.Integration.Observables
{
public enum TechMotors
{
+
+ /// <summary>
+ /// (Dispenser 1 Motor)
+ /// </summary>
+ [Description("Dispenser 1 Motor")]
+ Dispenser1Motor = 0,
+
+ /// <summary>
+ /// (Dancer 1 Motor)
+ /// </summary>
+ [Description("Dancer 1 Motor")]
+ Dancer1Motor = 1,
+
+ /// <summary>
+ /// (Dancer 2 Motor)
+ /// </summary>
+ [Description("Dancer 2 Motor")]
+ Dancer2Motor = 2,
+
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/ObservableEntity.cs b/Software/Visual_Studio/Tango.Integration/Observables/ObservableEntity.cs
index 63f45cd76..1e1874205 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/ObservableEntity.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/ObservableEntity.cs
@@ -95,7 +95,7 @@ namespace Tango.Integration.Observables
if (!DesignMode)
{
- ThreadsHelper.InvokeUI(() =>
+ ThreadsHelper.InvokeWhenAvailable(() =>
{
Parameters = new ReadOnlyObservableCollection<ParameterItem>(this.CreateParametersCollection(ParameterItemMode.Binding));
});
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContext.cs b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContext.cs
index 39bd02357..a21463c9b 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContext.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContext.cs
@@ -424,6 +424,14 @@ namespace Tango.Integration.Observables
}
/// <summary>
+ /// Gets or sets the TechIos.
+ /// </summary>
+ public DbSet<TechIo> TechIos
+ {
+ get; set;
+ }
+
+ /// <summary>
/// Gets or sets the TechMonitors.
/// </summary>
public DbSet<TechMonitor> TechMonitors
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapter.cs
index 194ea5669..7151cb188 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapter.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapter.cs
@@ -267,6 +267,8 @@ namespace Tango.Integration.Observables
TechValves = Context.TechValves.ToObservableCollection();
+ TechIos = Context.TechIos.ToObservableCollection();
+
IdsPackFormulas = Context.IdsPackFormulas.ToObservableCollection();
ColorSpaces = Context.ColorSpaces.ToObservableCollection();
diff --git a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapterExtension.cs
index 65d41e05a..67b2d786e 100644
--- a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapterExtension.cs
+++ b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesEntitiesAdapterExtension.cs
@@ -1698,6 +1698,42 @@ namespace Tango.Integration.Observables
}
+ private ObservableCollection<TechIo> _techios;
+ /// <summary>
+ /// Gets or sets the TechIos.
+ /// </summary>
+ public ObservableCollection<TechIo> TechIos
+ {
+ get
+ {
+ return _techios;
+ }
+
+ set
+ {
+ _techios = value; RaisePropertyChanged(nameof(TechIos));
+ }
+
+ }
+
+ private ICollectionView _techiosViewSource;
+ /// <summary>
+ /// Gets or sets the TechIos View Source.
+ ///</summary>
+ public ICollectionView TechIosViewSource
+ {
+ get
+ {
+ return _techiosViewSource;
+ }
+
+ set
+ {
+ _techiosViewSource = value; RaisePropertyChanged(nameof(TechIosViewSource));
+ }
+
+ }
+
private ObservableCollection<TechMonitor> _techmonitors;
/// <summary>
/// Gets or sets the TechMonitors.
@@ -2014,6 +2050,8 @@ namespace Tango.Integration.Observables
TechDispensersViewSource = CreateCollectionView(TechDispensers);
+ TechIosViewSource = CreateCollectionView(TechIos);
+
TechMonitorsViewSource = CreateCollectionView(TechMonitors);
TechMotorsViewSource = CreateCollectionView(TechMotors);
diff --git a/Software/Visual_Studio/Tango.Integration/Operators/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operators/IMachineOperator.cs
index 078375e4f..e067e7a98 100644
--- a/Software/Visual_Studio/Tango.Integration/Operators/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operators/IMachineOperator.cs
@@ -95,11 +95,11 @@ namespace Tango.Integration.Operators
Task<TangoMessage<DispenserAbortHomingResponse>> StopDispenserHoming(DispenserAbortHomingRequest request);
/// <summary>
- /// Turn on/off the specified GPIO port.
+ /// Turn on/off the specified digital output pin.
/// </summary>
/// <param name="request">The request.</param>
/// <returns></returns>
- Task<TangoMessage<SetGPIOStateResponse>> SetGPIOState(SetGPIOStateRequest request);
+ Task<TangoMessage<SetDigitalOutResponse>> SetDigitalOut(SetDigitalOutRequest request);
/// <summary>
/// Starts jogging the thread motion system.
diff --git a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
index b89a8c7ca..4bbd7aa64 100644
--- a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
@@ -265,13 +265,13 @@ namespace Tango.Integration.Operators
}
/// <summary>
- /// Turn on/off the specified GPIO port.
+ /// Turn on/off the specified digital output pin.
/// </summary>
/// <param name="request">The request.</param>
/// <returns></returns>
- public Task<TangoMessage<SetGPIOStateResponse>> SetGPIOState(SetGPIOStateRequest request)
+ public Task<TangoMessage<SetDigitalOutResponse>> SetDigitalOut(SetDigitalOutRequest request)
{
- return SendRequest<SetGPIOStateRequest, SetGPIOStateResponse>(request);
+ return SendRequest<SetDigitalOutRequest, SetDigitalOutResponse>(request);
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
index 346d91f12..dd6f8b99e 100644
--- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
+++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
@@ -110,6 +110,7 @@
<Compile Include="Observables\Entities\IdsPack.cs" />
<Compile Include="Observables\Entities\IdsPackFormula.cs" />
<Compile Include="Observables\Entities\TechDispenser.cs" />
+ <Compile Include="Observables\Entities\TechIo.cs" />
<Compile Include="Observables\Entities\TechMonitor.cs" />
<Compile Include="Observables\Entities\Job.cs" />
<Compile Include="Observables\Entities\JobRun.cs" />
@@ -148,6 +149,7 @@
<Compile Include="Observables\Enumerations\FiberShapes.cs" />
<Compile Include="Observables\Enumerations\FiberSynthesises.cs" />
<Compile Include="Observables\Enumerations\IdsPackFormulas.cs" />
+ <Compile Include="Observables\Enumerations\IOType.cs" />
<Compile Include="Observables\Enumerations\LinearMassDensityUnits.cs" />
<Compile Include="Observables\Enumerations\Liquids.cs" />
<Compile Include="Observables\Enumerations\MediaConditions.cs" />