init
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
|
||||
using DTS.Common.Interface.DASFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.DASLib.Service
|
||||
{
|
||||
|
||||
// Custom comparer for the IDASCommunication class.
|
||||
public class IDASCommunicationEqComparer : IEqualityComparer<IDASCommunication>
|
||||
{
|
||||
// GainInfo are equal if their Gain is equal.
|
||||
public bool Equals(IDASCommunication x, IDASCommunication y)
|
||||
{
|
||||
// Check whether the compared objects reference the same data.
|
||||
if (Object.ReferenceEquals(x, y))
|
||||
return true;
|
||||
|
||||
// Check whether any of the compared objects is null.
|
||||
if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
|
||||
return false;
|
||||
|
||||
// Check whether the GainInfos' properties are equal.
|
||||
return x.SerialNumber == y.SerialNumber;
|
||||
}
|
||||
|
||||
// If Equals() returns true for a pair of objects,
|
||||
// GetHashCode must return the same value for these objects.
|
||||
|
||||
public int GetHashCode(IDASCommunication idascom)
|
||||
{
|
||||
// Check whether the object is null.
|
||||
if (Object.ReferenceEquals(idascom, null))
|
||||
return 0;
|
||||
|
||||
// Get the hash code for the Gain field.
|
||||
return idascom.SerialNumber.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
|
||||
namespace DTS.DASLib.Service
|
||||
{
|
||||
internal interface ITriggerCheckActions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// handles any preparation work that must be done before StartTriggerCheck
|
||||
/// is called on any units
|
||||
/// this is designed to be called by the StartTriggerCheck service explicitly
|
||||
/// and not as part of it's own generic service
|
||||
///13820 With the S6 ATD and a SLICE PRO system in the setup, consistently see Trigger Check Fail
|
||||
/// </summary>
|
||||
void PreStartTriggerCheck(ServiceCallback callback, object userData);
|
||||
/// <summary>
|
||||
/// handles any actions that must be done AFTER StartTriggerCheck is called
|
||||
/// this is designed to be called by the StartTriggerCheck service explicitly
|
||||
/// and not as part of it's own generic service
|
||||
///13820 With the S6 ATD and a SLICE PRO system in the setup, consistently see Trigger Check Fail
|
||||
/// </summary>
|
||||
void PostStartTriggerCheck(ServiceCallback callback, object userData);
|
||||
/// <summary>
|
||||
/// change mode in the DAS to latch signal lines
|
||||
/// </summary>
|
||||
/// <param name="callback">The function to call with information</param>
|
||||
/// <param name="userData">Whatever you want to pass along</param>
|
||||
void StartTriggerCheck(ServiceCallback callback, object userData);
|
||||
|
||||
/// <summary>
|
||||
/// Perform the trigger check and store the result in the TriggerResult property
|
||||
/// </summary>
|
||||
/// <param name="callback">The function to call with information</param>
|
||||
/// <param name="userData">Whatever you want to pass along</param>
|
||||
void DoTriggerCheck(ServiceCallback callback, object userData);
|
||||
|
||||
/// <summary>
|
||||
/// DoTriggerCheck is Async, this is a Sync form (which the async form calls asynchronously)
|
||||
/// </summary>
|
||||
void DoTriggerCheckSync();
|
||||
|
||||
/// <summary>
|
||||
/// Perform the start check and store the results in the StartResult property
|
||||
/// </summary>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="userData"></param>
|
||||
void DoStartCheck(ServiceCallback callback, object userData);
|
||||
|
||||
/// <summary>
|
||||
/// Set the latching mechanism in the DAS back to normal
|
||||
/// </summary>
|
||||
/// <param name="callback">The function to call with information</param>
|
||||
/// <param name="userData">Whatever you want to pass along</param>
|
||||
void CancelTriggerCheck(ServiceCallback callback, object userData);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user