blob: 0e19e3830b3e02b4ee62bc1e444ed9bf8f483321 [file]
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
using System;
using org.apache.plc4net.api.authentication;
using org.apache.plc4net.api.metadata;
using org.apache.plc4net.messages;
using org.apache.plc4net.model;
namespace org.apache.plc4net.api
{
/// <summary>
/// A live connection to a device.
/// </summary>
public interface IPlcConnection : IDisposable
{
bool IsConnected { get; }
void Close();
IPlcConnectionMetadata PlcConnectionMetadata { get; }
/// <summary>
/// Parses a protocol-specific tag string, e.g. "%DB1.DBB0:INT".
/// </summary>
IPlcTag Parse(string tagQuery);
/// <summary>null when reading is not supported.</summary>
IPlcReadRequestBuilder? ReadRequestBuilder { get; }
/// <summary>null when writing is not supported.</summary>
IPlcWriteRequestBuilder? WriteRequestBuilder { get; }
/// <summary>null when subscriptions are not supported.</summary>
IPlcSubscriptionRequestBuilder? SubscriptionRequestBuilder { get; }
/// <summary>null when subscriptions are not supported.</summary>
IPlcUnsubscriptionRequestBuilder? UnsubscriptionRequestBuilder { get; }
/// <summary>null when the connection was established without authentication.</summary>
IPlcAuthentication? Authentication { get; }
}
}