work backup
- Register Reader Poseidon works - Smart Form - wrong functionality - refactoring
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -107,7 +108,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
|
||||
public enum CommunicationInterface
|
||||
{
|
||||
RFID,
|
||||
NFC
|
||||
[Description("RFID")]RFID,
|
||||
[Description("NFC")]NFC
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// <summary>
|
||||
/// This component = instance of this class is a placeholder for a combined main watermeter
|
||||
/// </summary>
|
||||
public class IperlHead : ComponentBase, IDevice,IRegReaderDatastream, ISessionDataMngmnt, IOperation, IntIPerlReader
|
||||
public class IperlHead : ComponentBase, IDevice,IRegReaderDatastream, ISessionDataMngmnt, IOperation, ISmartReader
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(IperlHead));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
@@ -42,16 +42,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
|
||||
|
||||
readonly IperlHeadCfg iperlHeadCfg;
|
||||
|
||||
RegisterReaders.CommonRR.CommunicationInterface IntIPerlReader.CommInterface => _commInterface;
|
||||
|
||||
|
||||
public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } }
|
||||
public bool CommFailed { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public int OptoComPortNr { get { return iperlHeadCfg.OptoComPortNr; } }
|
||||
public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } }
|
||||
public int Group { get { return iperlHeadCfg.Group; } }
|
||||
public iPerlHead.MeterType MeterType { get { return iperlHeadCfg.MeterType; } }
|
||||
public CommunicationInterface CommInterface { get { return iperlHeadCfg.CommunicationInterface; } }
|
||||
public string CommInterface { get { return iperlHeadCfg.CommunicationInterface.ToDescription(); } }
|
||||
|
||||
public int Position
|
||||
{
|
||||
@@ -89,8 +89,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
simulatedPcbNr = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Disabled;
|
||||
|
||||
public int ResultCode;
|
||||
|
||||
|
||||
@@ -933,9 +932,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
dataStreamState = DataStreamState.ProcessAndSave;
|
||||
}
|
||||
|
||||
public void SetCommunicationInterface(string commInterface)
|
||||
{
|
||||
CommunicationInterface com = (CommunicationInterface)Enum.Parse(typeof(CommunicationInterface), commInterface);
|
||||
SetCommunicationInterface(com);
|
||||
}
|
||||
|
||||
public void SetCommunicationInterface(RegisterReaders.CommonRR.CommunicationInterface commInterface)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
CommunicationInterface com = (CommunicationInterface)Enum.Parse(typeof(CommunicationInterface), commInterface.ToDescription());
|
||||
SetCommunicationInterface(com);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -946,7 +952,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
return dataStreamState == DataStreamState.ProcessAndSave;
|
||||
}
|
||||
|
||||
void IntIPerlReader.SetRfidInterface()
|
||||
void ISmartReader.SetRfidInterface()
|
||||
{
|
||||
SetRfidInterface();
|
||||
}
|
||||
@@ -967,6 +973,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
bool synchronized2;
|
||||
string partOfTelegram;
|
||||
private RegisterReaders.CommonRR.CommunicationInterface _commInterface;
|
||||
private string _commInterface1;
|
||||
|
||||
/// <summary>
|
||||
/// Reads opto-datastream via serial port. Invoked from RunDeviceBefore()
|
||||
@@ -1077,7 +1084,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
}
|
||||
|
||||
void IntIPerlReader.ResetNfcInterface(bool? nfc_on)
|
||||
void ISmartReader.ResetNfcInterface(bool? nfc_on)
|
||||
{
|
||||
ResetNfcInterface(nfc_on);
|
||||
}
|
||||
@@ -1099,7 +1106,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
return received;
|
||||
}
|
||||
|
||||
void IntIPerlReader.SetNfcInterface()
|
||||
void ISmartReader.SetNfcInterface()
|
||||
{
|
||||
SetNfcInterface();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user