Esempio n. 1
0
        private void ModifyOptions()
        {
            _log.FunctionEntryMessage("modify options");

            _driverContext.SetStringProperty("DrvConfig.Options.ConfFileName", "d:\\temp\\ConfiguratuionFileName.txt", true);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.ErrorWaitTime", 0, 1000000);
            _driverContext.SetBooleanProperty("DrvConfig.Options.UseKennung");

            _log.FunctionExitMessage();
        }
Esempio n. 2
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 ModifyPVIInit()
        {
            _log.FunctionEntryMessage("modify PVIInit");

            //_driverContext.SetBooleanProperty("DrvConfig.PVIInit.Event");
            _driverContext.IncreaseUnsignedProperty("DrvConfig.PVIInit.Timeout", 0, 1000);
            _driverContext.IncreaseSignedProperty("DrvConfig.PVIInit.LM", 0x8000, 0x7fff);
            _driverContext.IncreaseSignedProperty("DrvConfig.PVIInit.PT", 0x8000, 0x7fff);
            //_driverContext.SetBooleanProperty("DrvConfig.PVIInit.Remote");
            _driverContext.SetStringProperty("DrvConfig.PVIInit.RemoteIP", "1.2.3.4", true);
            _driverContext.IncreaseSignedProperty("DrvConfig.PVIInit.RemotePort", 1, 0xc000);
            _driverContext.SetStringProperty("DrvConfig.PVIInit.Linie", "Linie", true);

            _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();
        }
Esempio n. 5
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();
        }
Esempio n. 6
0
        private void ModifyOptions()
        {
            _log.FunctionEntryMessage("modify options");

            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.NetworkNumber", 0, 255);
            _driverContext.SetStringProperty("DrvConfig.Options.Connection", "STRINGPROP", true);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.UDPPort", 0x80, 0xc000);
            _driverContext.SetCharacterProperty("DrvConfig.Options.PropertySeparator", 'ä');
            _driverContext.SetStringProperty("DrvConfig.Options.UDPBroadcastPorts", "1234", true);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.ErrorWaitTime_ms", 100, 1000000);
            _driverContext.IncreaseSignedProperty("DrvConfig.Options.SymAddressSourceProperty", -1000000, 1000000);
            _driverContext.SetBooleanProperty("DrvConfig.Options.DoNotExtractPropertyFromAddress");
            _driverContext.SetCharacterProperty("DrvConfig.Options.ObjectSeperator", 'ö');
            _driverContext.SetBooleanProperty("DrvConfig.Options.RegisterAsForeignDevice");
            _driverContext.SetStringProperty("DrvConfig.Options.ForeignDeviceBBMDAddress", "1.2.3.4", true);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.ForeignDeviceBBMDPort", 0x80, 0xc000);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.ForeignDeviceRegistrationLifeTime_s", 0, 0xffff);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.ForeignDeviceRegistrationTimeout_ms", 100, 1000000);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.ForeignDeviceRegistrationRetries", 1, 99);

            _log.FunctionExitMessage();
        }
Esempio n. 7
0
        private void ModifyOptions()
        {
            _log.FunctionEntryMessage("modify options");

            _driverContext.SetSignedProperty("DrvConfig.Options.Serial", 0, Int32.MinValue, Int32.MaxValue, false);
            _driverContext.SetStringProperty("DrvConfig.Options.NetworkAdapter", "STRINGPROP", true);
            _driverContext.SetBooleanProperty("DrvConfig.Options.EnableUDP");
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.LocalUDPPort", 0, 65535);
            _driverContext.SetStringProperty("DrvConfig.Options.BroadcastAddress", "STRINGPROP", true);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.BroadcastPort", 0, 65535);
            _driverContext.SetBooleanProperty("DrvConfig.Options.EnableDualEndpoint");
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.TCPListenerPort", 0, 65535);
            _driverContext.SetSignedProperty("DrvConfig.Options.DoublePointMapping", 0, Int32.MinValue, Int32.MaxValue, false);
            _driverContext.SetBooleanProperty("DrvConfig.Options.UTCTime");
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.RCVTimeout", 0, 4294967296);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.SendTimeout", 0, 4294967296);
            _driverContext.SetBooleanProperty("DrvConfig.Options.HalfDuplex");
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.NULOnTime", 0, 9999);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.NULOffTime", 0, 9999);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.TripOnTime", 0, 9999);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.TripOffTime", 0, 9999);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.CloseOnTime", 0, 9999);
            _driverContext.IncreaseUnsignedProperty("DrvConfig.Options.CloseOffTime", 0, 9999);

            _log.FunctionExitMessage();
        }