Example #1
0
        private void ModifyOptions()
        {
            _log.FunctionEntryMessage("modify options");

            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.Version", 0, 10000);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.Karte", 0, 100);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.Adresse", 0, 100);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.Timeout", 10, 100000);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.Baudrate", 0, 100);
            _driverContext.SetBooleanProperty("DrvConfig.Options.StringHeader");
            _driverContext.SetUnsignedProperty("DrvConfig.Options.KartenVerbindung", 0, 1);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.IPAdresse", UInt32.MinValue, UInt32.MaxValue);
            _driverContext.SetUnsignedProperty("DrvConfig.Options.Karte", 0, 1);

            _log.FunctionExitMessage();
        }
        private void ModifyConnection(uint connIndex)
        {
            string connNamePrefix;

            connNamePrefix = "DrvConfig.Connections[" + connIndex.ToString() + "].";

            connIndex = connIndex + 1;
            string cis = connIndex.ToString();

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "NetAddress", connIndex * 2, 1, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "Port", connIndex, 1, 65535, true);
            _driverContext.SetStringProperty(connNamePrefix + "NetID", $"{cis}.{cis}.{cis}.{cis}.{cis}.{cis}", true);

            _log.FunctionExitMessage();
        }
        private void ModifyConnection(uint connIndex)
        {
            string connNamePrefix;

            connNamePrefix = "DrvConfig.Connections[" + connIndex.ToString() + "].";

            connIndex = connIndex + 1;

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "NetAddress", connIndex, 0, 65535, true);
            _driverContext.SetStringProperty(connNamePrefix + "ConnectionName", "connection #" + connIndex.ToString(), true);
            _driverContext.SetSignedProperty(connNamePrefix + "KnownID", (Int32)(connIndex), 0, 65535, false);
            _driverContext.SetStringProperty(connNamePrefix + "IPAddress", $"{connIndex}.{connIndex}.{connIndex}.{connIndex}", false);
            _driverContext.SetUnsignedProperty(connNamePrefix + "IPPort", connIndex * 1000, 1, 65535, false);

            _log.FunctionExitMessage();
        }
        private void ModifyConnection(uint connIndex)
        {
            string connNamePrefix;

            connNamePrefix = "DrvConfig.Connection[" + connIndex.ToString() + "].";

            connIndex = connIndex + 1;

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "HWAddress", 1000 + connIndex, 1000, 1999, true);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "ConnectionType", 0, 2);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "PLCVersion", 0, 1);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "GWConnection", 0, 2);

            _driverContext.SetStringProperty(connNamePrefix + "Address", "Address #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "NodeAddress", "NodeAddress #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "HostAddress", "HostAddress #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "AddressSecondary", "Addr 2nd #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "NodeAddressSecondary", "NAddr 2nd #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "HostAddressSecondary", "HAddr 2nd #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "SelectedConnectionVarName", "SCVN #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "GWAddress", "GWAddress #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "GWPassword", "GWPassword #" + connIndex.ToString(), true);
            _driverContext.SetStringProperty(connNamePrefix + "Alias", "Alias #" + connIndex.ToString(), true);

            _driverContext.SetUnsignedProperty(connNamePrefix + "GWPort", 2000 + connIndex, 1, 65535, true);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "BufferSize", 100, 65535);

            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "V23Transport", 0, 3);
            _driverContext.SetUnsignedProperty(connNamePrefix + "V23Port", 3000 + connIndex, 1, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "V23Target", 4000 + connIndex, 1, 65535, true);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "V23BufferSize", 100, 65535);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "V23Motorola", 0, 1);

            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "Timeout", 1, 1000000);
            _driverContext.IncreaseUnsignedProperty(connNamePrefix + "Retries", 1, 10);

            _log.FunctionExitMessage();
        }
        private void ModifyConnection(uint connIndex)
        {
            string connNamePrefix;
            string connIndexString = connIndex.ToString();

            connNamePrefix = "DrvConfig.Connections[" + connIndexString + "].";

            connIndex = connIndex + 1;

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "NetAdress", 0, 0, 999, true);
            _driverContext.SetStringProperty(connNamePrefix + "ConnectionName", "DeviceA" + connIndexString, true);
            _driverContext.SetStringProperty(connNamePrefix + "SerialNumber", "333.7777777" + connIndexString, true);

            _log.FunctionExitMessage();
        }
Example #6
0
        private void ModifyServer(uint srvrIndex)
        {
            var srvrNamePrefix = "DrvConfig.Server[" + srvrIndex + "].";

            srvrIndex = srvrIndex + 1;

            _log.FunctionEntryMessage($"modify {srvrIndex}. server");

            _driverContext.SetUnsignedProperty(srvrNamePrefix + "NetAddress", srvrIndex, 0, 65535, true);
            //_driverContext.SetBooleanProperty(srvrNamePrefix + "StorePassword");
            _driverContext.SetStringProperty(srvrNamePrefix + "Username", "555", true);
            _driverContext.SetStringProperty(srvrNamePrefix + "Password", "666", true);
            _driverContext.IncreaseUnsignedProperty(srvrNamePrefix + "SecurityMode", 1, 3);

            //ModifyServerCommunication(srvrNamePrefix);
            ModifyServerProtocol(srvrNamePrefix);
            ModifyServerOpLimits(srvrNamePrefix);

            _log.FunctionExitMessage();
        }
        private void ModifyConnection(uint connIndex, bool bComplete)
        {
            string connNamePrefix;
            string connIndexString = connIndex.ToString();

            connNamePrefix = "DrvConfig.Connections[" + connIndexString + "].";

            connIndex = connIndex + 1;

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "NetAddress", connIndex * 2, 0, 255, true);
            _driverContext.SetStringProperty(connNamePrefix + "Name", "Name_" + connIndexString, true);
            _driverContext.SetStringProperty(connNamePrefix + "DeviceParameter", "DevPrm_" + connIndexString, true);
            if (bComplete)
            {
                _driverContext.SetStringProperty(connNamePrefix + "CPUParameter", "CpuPrm_" + connIndexString, true);
                _driverContext.SetStringProperty(connNamePrefix + "PathTarget", "Target_" + connIndexString, true);
            }

            _log.FunctionExitMessage();
        }
Example #8
0
        private void ModifyConnection(uint connIndex)
        {
            string connNamePrefix;
            string connIndexString = connIndex.ToString();

            connNamePrefix = "DrvConfig.Connections[" + connIndexString + "].";

            connIndex = connIndex + 1;

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "NetAdress", 1, 0, 999, true);
            _driverContext.SetStringProperty(connNamePrefix + "FriendlyName", "Name_" + connIndexString, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "LinkId", 53453, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "SrcAddress", 53453, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "DstAddress", 4, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "ReplyTimeout", 10000, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "Retries", 3, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "Keepalive", 120, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "ErrorWaitTime", 20, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "IntIv", 3600, 0, 99999, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "InitialWaitTime", 0, 0, 99999, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "EvIv1", 3, 0, 99999, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "EvIv2", 3, 0, 99999, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "EvIv3", 3, 0, 99999, true);
            _driverContext.SetBooleanProperty(connNamePrefix + "Unsol1");
            _driverContext.SetBooleanProperty(connNamePrefix + "Unsol2");
            _driverContext.SetBooleanProperty(connNamePrefix + "Unsol3");
            _driverContext.SetSignedProperty(connNamePrefix + "AuthUse", 0, Int32.MinValue, Int32.MaxValue, false);
            _driverContext.SetSignedProperty(connNamePrefix + "AuthKeyWrapType", 0, Int32.MinValue, Int32.MaxValue, false);
            _driverContext.SetStringProperty(connNamePrefix + "AuthUpdateKey", "" + connIndexString, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "AuthSessionTimer", 900, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "AuthSessionCounter", 1000, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "AuthErrorCounter", 2, 0, 65535, true);
            _driverContext.SetSignedProperty(connNamePrefix + "AuthHMACType", 0, Int32.MinValue, Int32.MaxValue, false);
            _driverContext.SetBooleanProperty(connNamePrefix + "AuthAggressiveMode");
            _driverContext.SetBooleanProperty(connNamePrefix + "AuthResponse");
            _driverContext.SetUnsignedProperty(connNamePrefix + "MaxAPDUSize", 2048, 0, 65535, true);
            _driverContext.SetBooleanProperty(connNamePrefix + "TimesyncLAN");
            _driverContext.SetBooleanProperty(connNamePrefix + "NoAutoIIN_ClassPoll");
            _driverContext.SetBooleanProperty(connNamePrefix + "NoAutoIIN_TimeSync");
            _driverContext.SetBooleanProperty(connNamePrefix + "NoAutoIIN_IntPoll");
            _driverContext.SetBooleanProperty(connNamePrefix + "TimeSyncDelayMeasure");
            _driverContext.SetUnsignedProperty(connNamePrefix + "FileTransferTimeout", 5, 0, 99999999, true);
            _driverContext.SetStringProperty(connNamePrefix + "FileTransferDir", "", true);
            _driverContext.SetStringProperty(connNamePrefix + "FileTransferRevDir", "", true);

            _log.FunctionExitMessage();
        }
Example #9
0
        private void ModifyConnection(uint connIndex)
        {
            string connNamePrefix;
            string connIndexString = connIndex.ToString();

            connNamePrefix = "DrvConfig.Connections[" + connIndexString + "].";

            connIndex = connIndex + 1;

            _log.FunctionEntryMessage($"modify {connIndex}. connection");

            _driverContext.SetUnsignedProperty(connNamePrefix + "ProcessId", connIndex * 2, 0, 255, true);
            _driverContext.SetStringProperty(connNamePrefix + "DeviceName", "Name_" + connIndexString, true);
            _driverContext.SetBooleanProperty(connNamePrefix + "ManualAddress");
            _driverContext.SetBooleanProperty(connNamePrefix + "ReadAPDUTimeouts");
            _driverContext.SetUnsignedProperty(connNamePrefix + "APDURetries", 15, 0, 255, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "CharacterEncoding", 2, 0, 255, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "MaxAPDUSize", 999, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "MaxConcurrentRequests", 256, 0, 65535, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "APDUTimeout", 111, 0, 4294967295, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "APDUSegmentTimeout", 222, 0, 4294967295, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "COVLifetime", 333, 0, 4294967295, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "COVResubscriptionConst", 444, 0, 4294967295, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "TrendLogPollingInterval", 555, 0, 4294967295, true);
            _driverContext.SetUnsignedProperty(connNamePrefix + "NetworkNumber", 9, 0, 65535, true);
            _driverContext.SetStringProperty(connNamePrefix + "RouterAddress", "01:00:00:01:00:01", true);
            _driverContext.SetStringProperty(connNamePrefix + "DeviceAddress", "01:00:00:01:00:02", true);

            _log.FunctionExitMessage();
        }