Ejemplo n.º 1
0
 public Variable(ControllerConnection connection, TcAdsSymbolInfo symbol, int handle, bool isWriteable, int[] arrayDimensions)
 {
     _connection      = connection;
     _symbol          = symbol;
     _handle          = handle;
     _isWriteable     = isWriteable;
     _arrayDimensions = arrayDimensions;
 }
        public IControllerConnection <string> Connect(TimeSpan timeout)
        {
            try
            {
                TcAdsClient client = new TcAdsClient();
                client.Connect(_address.NetId, _address.Port);

                var result = new ControllerConnection(client);

                return(result);
            }
            catch (AdsException ex)
            {
                throw new ControllerCommunicationException("Unable to connect to controller.", ex);
            }
        }
Ejemplo n.º 3
0
 public DeclarationSpace(ControllerConnection connection)
 {
     _connection = connection;
 }
Ejemplo n.º 4
0
 public Variable(ControllerConnection connection, TcAdsSymbolInfo symbol, int handle, bool isWriteable)
     : this(connection, symbol, handle, isWriteable, null)
 {
 }