PropertyGroup Condition
BarcodeController
This commit is contained in:
@ -15,8 +15,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
#nullable enable
|
||||
|
||||
public const string BarcodeHostFileShare = @"\\messv02ecc1.ec.local\EC_Metrology_Si\BarcodeHost\API";
|
||||
public const string MetrologyFileShare = @"\\messv02ecc1.ec.local\EC_Metrology_Si\WorkMaterialOut\API";
|
||||
public const string LSL2SQLConnectionString = @"Data Source=10.95.128.28\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;";
|
||||
|
||||
private long? _TickOffset;
|
||||
private readonly string _BarcodeHostFileShare;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||
@ -31,21 +34,27 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
string metrologyFileShare = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Metrology.FileShare");
|
||||
_BarcodeHostFileShare = @"\\messv02ecc1.ec.local\EC_Metrology_Si\BarcodeHost\API"; // GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "BarcodeHost.FileShare");
|
||||
if (metrologyFileShare != MetrologyFileShare)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(MetrologyFileShare)}]");
|
||||
string barcodeHostFileShare = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "BarcodeHost.FileShare");
|
||||
if (barcodeHostFileShare != BarcodeHostFileShare)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(BarcodeHostFileShare)}]");
|
||||
string lsl2SQLConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ConnectionString.LSL2SQL");
|
||||
if (lsl2SQLConnectionString != LSL2SQLConnectionString)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(LSL2SQLConnectionString)}]");
|
||||
ModelObjectParameterDefinition[] tibcoParameters = GetProperties(cellInstanceConnectionName, modelObjectParameters, "TIBCO.");
|
||||
string tibcoParameterChannel = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_CHANNEL");
|
||||
string tibcoParameterSubject = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_SUBJECT");
|
||||
string tibcoParameterSubjectPrefix = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_SUBJECT_PREFIX");
|
||||
string tibcoParameterConfigurationLocation = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_CONFIGURATION_LOCATION");
|
||||
string tibcoParameterConfigurationLocationCopy = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_CONFIGURATION_LOCATION_LOCAL_COPY");
|
||||
if (!Directory.Exists(metrologyFileShare))
|
||||
throw new Exception($"Unable to access file-share <{metrologyFileShare}>");
|
||||
if (!Directory.Exists(_BarcodeHostFileShare))
|
||||
throw new Exception($"Unable to access file-share <{_BarcodeHostFileShare}>");
|
||||
if (!Directory.Exists(MetrologyFileShare))
|
||||
throw new Exception($"Unable to access file-share <{MetrologyFileShare}>");
|
||||
if (!Directory.Exists(BarcodeHostFileShare))
|
||||
throw new Exception($"Unable to access file-share <{BarcodeHostFileShare}>");
|
||||
if (_IsEAFHosted)
|
||||
{
|
||||
Transport.Main.Initialize(smtp, cellInstanceName, fileConnectorConfiguration, lsl2SQLConnectionString, metrologyFileShare, _BarcodeHostFileShare);
|
||||
Transport.Main.Initialize(smtp, cellInstanceName, fileConnectorConfiguration, LSL2SQLConnectionString, MetrologyFileShare, BarcodeHostFileShare);
|
||||
if (!string.IsNullOrEmpty(fileConnectorConfiguration.SourceFileLocation))
|
||||
_ = Transport.Main.Setup(useSleep: true, setIfxTransport: true, tibcoParameterChannel, tibcoParameterSubjectPrefix, tibcoParameterConfigurationLocation, tibcoParameterConfigurationLocationCopy, tibcoParameterSubject);
|
||||
else
|
||||
|
Reference in New Issue
Block a user