Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs
===================================================================
diff -u -r1649 -r1686
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 1649)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 1686)
@@ -35,46 +35,17 @@
///
public class SensorLocation
{
- #region Business Rules
+ private SensorGroup sensorGroup;
///
- /// Specication to test if the value of the candidate is valid
- ///
-// internal class IgnoreOrLocationData : PredicateSpecification
-// {
-// public IgnoreOrLocationData()
-// : base(x => x == DataSourceTypeSensors.Ignore || x == DataSourceTypeSensors.LocationData)
-// {
-// Description = "Only Ignore or LocationData value allowed for this property.";
-// }
-// }
-
- ///
- /// Specication to test if the value of the candidate is valid
- ///
-// internal class SensorOrLocationData : PredicateSpecification
-// {
-// public SensorOrLocationData()
-// : base(x => x == DataSourceTypeSensors.Sensor || x == DataSourceTypeSensors.LocationData)
-// {
-// Description = "Only Sensor or LocationData value allowed for this property.";
-// }
-// }
-
- #endregion
-
- ///
/// Constructor is needed for XML deserialization
///
-
public SensorLocation()
{
SourceTypePl1WaterLevelAtRiver = DataSourceTypeSensors.LocationData;
SourceTypePl1WaterLevelAtPolder = DataSourceTypeSensors.LocationData;
}
- private SensorGroup sensorGroup;
-
///
/// Gets the PL line offset below dike top at river.
///
@@ -113,7 +84,6 @@
///
/// The location.
///
- // [Specification(typeof(NotNullSpecification))]
public Location Location { get; set; }
///
@@ -134,7 +104,6 @@
///
/// The sensorGroup.
///
- // [Specification(typeof(NotNullSpecification))]
public SensorGroup SensorGroup
{
get { return sensorGroup; }
@@ -191,7 +160,6 @@
///
/// The Pl3.
///
- // [Specification(typeof(SensorOrLocationData))]
public DataSourceTypeSensors SourceTypePl3 { get; set; }
///
@@ -200,17 +168,14 @@
///
/// The Pl4.
///
- // [Specification(typeof(SensorOrLocationData))]
public DataSourceTypeSensors SourceTypePl4 { get; set; }
-
///
/// Gets or sets the outer water level data source type.
///
///
/// The outer water level.
///
- // [Specification(typeof(SensorOrLocationData))]
public DataSourceTypeSensors SourceTypePl1WaterLevelAtRiver { get; set; }
///
@@ -219,7 +184,6 @@
///
/// Data source type for Pl1 PLLine offset below dike top at river.
///
- // [Specification(typeof(IgnoreOrLocationData))]
public DataSourceTypeSensors SourceTypePl1PlLineOffsetBelowDikeTopAtRiver { get; set; }
///
@@ -228,7 +192,6 @@
///
/// The Pl1 PL line offset below dike top at polder.
///
- // [Specification(typeof(IgnoreOrLocationData))]
public DataSourceTypeSensors SourceTypePl1PlLineOffsetBelowDikeTopAtPolder { get; set; }
///
@@ -237,7 +200,6 @@
///
/// The Pl1 PL line offset below shoulder base inside.
///
- // [Specification(typeof(IgnoreOrLocationData))]
public DataSourceTypeSensors SourceTypePl1PlLineOffsetBelowShoulderBaseInside { get; set; }
///
@@ -246,7 +208,6 @@
///
/// The Pl1 PL line offset below dike toe at polder.
///
- //[Specification(typeof(IgnoreOrLocationData))]
public DataSourceTypeSensors SourceTypePl1PlLineOffsetBelowDikeToeAtPolder { get; set; }
///
@@ -255,7 +216,6 @@
///
/// The Pl1 polder level.
///
- //[Specification(typeof(SensorOrLocationData))]
public DataSourceTypeSensors SourceTypePl1WaterLevelAtPolder { get; set; }
///
@@ -319,14 +279,6 @@
}
///
- /// Gets or sets the alias.
- ///
- ///
- /// The alias.
- ///
- public string Alias { get; set; } // ToDo Tom/Kin Sun Waarvoor nodig? Wordt nergens gebruikt. Kan gewoon weg!?
-
- ///
/// Gets or sets the profile.
///
///
@@ -339,10 +291,10 @@
}
///
- /// Gets or sets the m stab file.
+ /// Gets or sets the MStab file.
///
///
- /// The m stab file.
+ /// The MStab file.
///
public string MStabFile
{
@@ -430,7 +382,7 @@
}
///
- /// Gets the value.
+ /// Gets the sensor value.
///
/// The expression.
/// The sensor values.
@@ -517,17 +469,6 @@
}
///
- /// Determines whether this instance is valid.
- ///
- ///
- /// true if this instance is valid; otherwise, false.
- ///
-// public bool IsValid()
-// {
-// return !Validator.Validate(this).Any();
-// }
-
- ///
/// Gets or sets the GetGroups function (injectable list, for UI purposes).
///
///
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/ConversionHelper.cs
===================================================================
diff -u -r1624 -r1686
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 1624)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 1686)
@@ -1193,7 +1193,6 @@
return translationTable[timeStepUnit];
}
-
///
/// Constants for translating to Enums PlLineType
///
@@ -1275,12 +1274,15 @@
return translationTable[sensorType];
}
+ ///
+ /// Constants for translating to Enums DataSourceTypeSensors
+ ///
public const uint DataSourceTypeSensorsIgnore = 0;
public const uint DataSourceTypeSensorsLocationData = 1;
public const uint DataSourceTypeSensorsSensor = 2;
///
- /// Converts the Dam DataSourceType to input DataSourceTypeSensors.
+ /// Converts the Dam DataSourceTypeSensors to input DataSourceTypeSensors.
///
/// The data source type sensors.
///
Index: DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/DamEngineRunner.cs
===================================================================
diff -u -r1670 -r1686
--- DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/DamEngineRunner.cs (.../DamEngineRunner.cs) (revision 1670)
+++ DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/DamEngineRunner.cs (.../DamEngineRunner.cs) (revision 1686)
@@ -144,6 +144,9 @@
}
}
+ ///
+ /// Runs this instance.
+ ///
public void Run()
{
Initialize();
@@ -258,6 +261,7 @@
LogManager.Add(new LogMessage(LogMessageType.FatalError, typeof(EngineInterface), string.Format("{0}", e.Message)));
}
}
+
protected void WriteResultsToFile(string fileName)
{
if (string.IsNullOrWhiteSpace(fileName))
@@ -276,6 +280,7 @@
Logger.LogError("Could not export Fews xml file", e);
}
}
+
///
/// Reads the user settings of the slip circle definition.
///
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs
===================================================================
diff -u -r1614 -r1686
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 1614)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 1686)
@@ -137,10 +137,10 @@
}
///
- /// Gets a value indicating whether this instance has sensor data.
+ /// Gets a value indicating whether this instance has a sensor location.
///
///
- /// true if this instance has sensor data; otherwise, false.
+ /// true if this instance has a sensor location; otherwise, false.
///
public bool HasSensorLocation
{
@@ -151,10 +151,10 @@
}
///
- /// Gets or sets the sensor data.
+ /// Gets or sets the sensor location.
///
///
- /// The sensor data.
+ /// The sensor location.
///
public virtual SensorLocation SensorLocation
{
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorRepository.cs
===================================================================
diff -u -r1676 -r1686
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorRepository.cs (.../SensorRepository.cs) (revision 1676)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorRepository.cs (.../SensorRepository.cs) (revision 1686)
@@ -88,7 +88,6 @@
return SensorGroup.Selection.GetUniqueID(x => x.ID);
}
-
///
/// Adds the collection of sensors to the sensorGroup.
///
@@ -140,26 +139,5 @@
names.Add(sensor.Name);
sensorLocation.SensorGroup.Add(sensor);
}
-
- ///
- /// Serializes the state of this repository to a XML string.
- ///
- ///
- internal string Serialize()
- {
- throw new NotImplementedException();
- // return sensorLocation.Serialize();
- }
-
- ///
- /// Deserializes the specified XML to restore the state of this repository
- ///
- /// The XML.
- internal static SensorRepository Deserialize(string xml)
- {
- throw new NotImplementedException();
-// if (string.IsNullOrWhiteSpace(xml)) throw new ArgumentException("xml");
-// return new SensorRepository() { sensorLocation = SensorLocation.Deserialize(xml) };
- }
}
}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs
===================================================================
diff -u -r1613 -r1686
--- DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 1613)
+++ DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 1686)
@@ -1264,12 +1264,15 @@
return translationTable[sensorType];
}
+ ///
+ /// Constants for translating to Enums DataSourceTypeSensors
+ ///
public const uint DataSourceTypeSensorsIgnore = 0;
public const uint DataSourceTypeSensorsLocationData = 1;
public const uint DataSourceTypeSensorsSensor = 2;
///
- /// Converts the Dam DataSourceType to input DataSourceTypeSensors.
+ /// Converts the Dam DataSourceTypeSensors to input DataSourceTypeSensors.
///
/// The data source type sensors.
///
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Sensors/SensorLocation.cs
===================================================================
diff -u -r1669 -r1686
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 1669)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 1686)
@@ -412,6 +412,19 @@
internal static readonly string PL4 = StaticReflection.GetMemberName(x => x.SourceTypePl4);
}
+ ///
+ /// Gets the requested sensor value.
+ ///
+ /// The expression.
+ /// The sensor values.
+ /// The sensor.
+ ///
+ ///
+ /// sensorValues
+ /// or
+ /// sensor
+ ///
+ /// The given sensor is not an item/key in the table of sensor values
public double? GetValue(Expression> expression, IDictionary sensorValues, Sensor sensor)
{
if (sensorValues == null) throw new ArgumentNullException("sensorValues");