This commit is contained in:
luosheng
2023-07-16 08:17:03 +08:00
parent 6d655b24d1
commit 2055c10c59
127 changed files with 7414 additions and 7470 deletions

View File

@@ -26,45 +26,45 @@ using System;
namespace Technosoftware.DaAeHdaClient.Da
{
/// <summary>
/// Describes the state of a subscription.
/// </summary>
[Serializable]
public class TsCDaSubscriptionState : ICloneable
{
#region Fields
/// <summary>
/// Describes the state of a subscription.
/// </summary>
[Serializable]
public class TsCDaSubscriptionState : ICloneable
{
#region Fields
private bool active_ = true;
private int updateRate_ = 500;
private float deadband_;
private int updateRate_ = 500;
private float deadband_;
#endregion
#region Properties
#region Properties
/// <summary>
/// A unique name for the subscription controlled by the client.
/// </summary>
public string Name { get; set; }
/// A unique name for the subscription controlled by the client.
/// </summary>
public string Name { get; set; }
/// <summary>
/// A unique identifier for the subscription assigned by the client.
/// </summary>
public object ClientHandle { get; set; }
/// <summary>
/// A unique identifier for the subscription assigned by the client.
/// </summary>
public object ClientHandle { get; set; }
/// <summary>
/// A unique subscription identifier assigned by the server.
/// </summary>
public object ServerHandle { get; set; }
/// <summary>
/// A unique subscription identifier assigned by the server.
/// </summary>
public object ServerHandle { get; set; }
/// <summary>
/// The locale used for any error messages or results returned to the client.
/// </summary>
public string Locale { get; set; }
/// <summary>
/// The locale used for any error messages or results returned to the client.
/// </summary>
public string Locale { get; set; }
/// <summary>
/// Whether the subscription is scanning for updates to send to the client.
/// </summary>
public bool Active
{
get => active_;
/// <summary>
/// Whether the subscription is scanning for updates to send to the client.
/// </summary>
public bool Active
{
get => active_;
set => active_ = value;
}
@@ -82,8 +82,8 @@ namespace Technosoftware.DaAeHdaClient.Da
/// the fastest practical rate.
/// </remarks>
public int UpdateRate
{
get => updateRate_;
{
get => updateRate_;
set => updateRate_ = value;
}
@@ -114,59 +114,59 @@ namespace Technosoftware.DaAeHdaClient.Da
/// </remarks>
public int KeepAlive { get; set; }
/// <summary>
/// The minimum percentage change from 0.0 to 100.0 required to trigger a data update
/// for an item.
/// </summary>
/// <remarks>
/// <para>The range of the Deadband is from 0.0 to 100.0 Percent. Deadband will only
/// apply to items in the subscription that have a dwEUType of Analog available. If the
/// EU Type is Analog, then the EU Low and EU High values for the item can be used to
/// calculate the range for the item. This range will be multiplied with the Deadband
/// to generate an exception limit. An exception is determined as follows:</para>
/// <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
/// <para>Exception if (absolute value of (last cached value - current value) &gt;
/// (pPercentDeadband/100.0) * (EU High - EU Low) )</para>
/// </blockquote>
/// <para>The PercentDeadband can be set when CreateSubscription is called, allowing
/// the same PercentDeadband to be used for all items within that particular
/// subscription. However, with OPC DA 3.0, it is allowable to set the PercentDeadband
/// on a per item basis. This means that each item can potentially override the
/// PercentDeadband set for the subscription it resides within.</para>
/// <para>If the exception limit is exceeded, then the last cached value is updated
/// with the new value and a notification will be sent to the clients callback (if
/// any). The PercentDeadband is an optional behavior for the server. If the client
/// does not specify this value on a server that does support the behavior, the default
/// value of 0 (zero) will be assumed, and all value changes will update the CACHE.
/// Note that the timestamp will be updated regardless of whether the cached value is
/// updated. A server which does not support deadband should return an error
/// (OPC_E_DEADBANDNOTSUPPORTED) if the client requests a deadband other than
/// 0.0.</para>
/// <para>The UpdateRate for a subscription or the sampling rate of the item, if set,
/// determines time between when a value is checked to see if the exception limit has
/// been exceeded. The PercentDeadband is used to keep noisy signals from updating the
/// client unnecessarily.</para>
/// </remarks>
public float Deadband
{
get => deadband_;
/// <summary>
/// The minimum percentage change from 0.0 to 100.0 required to trigger a data update
/// for an item.
/// </summary>
/// <remarks>
/// <para>The range of the Deadband is from 0.0 to 100.0 Percent. Deadband will only
/// apply to items in the subscription that have a dwEUType of Analog available. If the
/// EU Type is Analog, then the EU Low and EU High values for the item can be used to
/// calculate the range for the item. This range will be multiplied with the Deadband
/// to generate an exception limit. An exception is determined as follows:</para>
/// <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
/// <para>Exception if (absolute value of (last cached value - current value) &gt;
/// (pPercentDeadband/100.0) * (EU High - EU Low) )</para>
/// </blockquote>
/// <para>The PercentDeadband can be set when CreateSubscription is called, allowing
/// the same PercentDeadband to be used for all items within that particular
/// subscription. However, with OPC DA 3.0, it is allowable to set the PercentDeadband
/// on a per item basis. This means that each item can potentially override the
/// PercentDeadband set for the subscription it resides within.</para>
/// <para>If the exception limit is exceeded, then the last cached value is updated
/// with the new value and a notification will be sent to the clients callback (if
/// any). The PercentDeadband is an optional behavior for the server. If the client
/// does not specify this value on a server that does support the behavior, the default
/// value of 0 (zero) will be assumed, and all value changes will update the CACHE.
/// Note that the timestamp will be updated regardless of whether the cached value is
/// updated. A server which does not support deadband should return an error
/// (OPC_E_DEADBANDNOTSUPPORTED) if the client requests a deadband other than
/// 0.0.</para>
/// <para>The UpdateRate for a subscription or the sampling rate of the item, if set,
/// determines time between when a value is checked to see if the exception limit has
/// been exceeded. The PercentDeadband is used to keep noisy signals from updating the
/// client unnecessarily.</para>
/// </remarks>
public float Deadband
{
get => deadband_;
set => deadband_ = value;
}
/// <summary>
/// TimeZone Bias of Group (in minutes).
/// </summary>
public int TimeBias { get; set; }
/// <summary>
/// TimeZone Bias of Group (in minutes).
/// </summary>
public int TimeBias { get; set; }
#endregion
#region ICloneable Members
#region ICloneable Members
/// <summary>
/// Creates a shallow copy of the object.
/// </summary>
public virtual object Clone()
{
return MemberwiseClone();
}
/// Creates a shallow copy of the object.
/// </summary>
public virtual object Clone()
{
return MemberwiseClone();
}
#endregion
}
}
}