Class IConnector
Abstract base class provides implementation contract for the PLC connector and basic common underlying logic.
Inherited Members
Namespace: Vortex.Connector
Assembly: Vortex.Connector.dll
Syntax
public abstract class IConnector : RootVortexerObject, IVortexObject, ITwinObject, IVortexElement, INotifyPropertyChanged
Constructors
IConnector()
Creates new instance of Connector class
Declaration
public IConnector()
IConnector(Object[])
Creates an instance of Connector class
Declaration
public IConnector(object[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | parameters | Connection parameters |
Examples
var connector = new IConnector();
Fields
_commState
Declaration
CommStateEnum _commState
Field Value
Type | Description |
---|---|
CommStateEnum |
_cyclicRwDuration
Declaration
long _cyclicRwDuration
Field Value
Type | Description |
---|---|
System.Int64 |
_DataExchangeStatus
Declaration
DataExchangeStatusEnum _DataExchangeStatus
Field Value
Type | Description |
---|---|
DataExchangeStatusEnum |
_loadingSymbol
Declaration
string _loadingSymbol
Field Value
Type | Description |
---|---|
System.String |
_logger
Declaration
ILogger _logger
Field Value
Type | Description |
---|---|
Serilog.ILogger |
_rwCycleCount
Declaration
long _rwCycleCount
Field Value
Type | Description |
---|---|
System.Int64 |
_startUpTime
Declaration
DateTime _startUpTime
Field Value
Type | Description |
---|---|
System.DateTime |
isRwLoopSuspended
Declaration
bool isRwLoopSuspended
Field Value
Type | Description |
---|---|
System.Boolean |
readWriteCycleDealy
Declaration
int readWriteCycleDealy
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
CommState
Gets the communication state CommStateEnum of the connector.
Declaration
public CommStateEnum CommState { get; set; }
Property Value
Type | Description |
---|---|
CommStateEnum |
CyclicRwDuration
Gets the last duration of Read/Write cycle in milliseconds.
Declaration
public long CyclicRwDuration { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 |
DataExchangeStatus
Get data exchange status on this connector.
Declaration
public DataExchangeStatusEnum DataExchangeStatus { get; protected set; }
Property Value
Type | Description |
---|---|
DataExchangeStatusEnum |
ErrorCount
Gets or sets error counter of the adapter.
Declaration
public abstract int ErrorCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
IdentityProvider
Gets object identity provider.
Declaration
public VortexIdentityProvider IdentityProvider { get; }
Property Value
Type | Description |
---|---|
VortexIdentityProvider |
IsRwLoopSuspended
Gets or set whether RW loop is suspended.
Declaration
public bool IsRwLoopSuspended { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LoadingSymbol
Gets currently loading symbol information from the remote system.
Declaration
public string LoadingSymbol { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Logger
Provides logging capability for this connector.
Declaration
public ILogger Logger { get; }
Property Value
Type | Description |
---|---|
Serilog.ILogger |
MonitorConnector
Gets or sets value indicating whether the performance of the monitor should be active.
Declaration
public bool MonitorConnector { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Online
Gets adapter for onliners.
Declaration
public ConnectorAdapter Online { get; }
Property Value
Type | Description |
---|---|
ConnectorAdapter |
OnlineTags
Gets online value items tags attached to this connector.
Declaration
public abstract IEnumerable<IValueTag> OnlineTags { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IValueTag> |
ReadWriteCycleDelay
Gets or sets delay between Read/Write cycles.
Declaration
public int ReadWriteCycleDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
RwCycleCount
Gets the number of Read Write cycles from the start of the connector.
Declaration
public long RwCycleCount { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 |
StartUpTime
Get the connector's startup timestamp.
Declaration
public DateTime StartUpTime { get; protected set; }
Property Value
Type | Description |
---|---|
System.DateTime |
WriteProtectionSuspended
Declaration
bool WriteProtectionSuspended
{
}
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
BuildAndStart()
Builds and starts this connector.
Declaration
public abstract IConnector BuildAndStart()
Returns
Type | Description |
---|---|
IConnector |
CreateSymbol(String, String)
Return symbol path combining parent's and member's symbol.
Declaration
public static string CreateSymbol(string parent, string member)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Parent's path. |
System.String | member | Members name. |
Returns
Type | Description |
---|---|
System.String | Combine symbol of parent and member. |
InvokeRpc(String, String, Object[])
Invokes a method from the plc.
Declaration
public abstract object InvokeRpc(string symbolPath, string methodName, object[] params)
Parameters
Type | Name | Description |
---|---|---|
System.String | symbolPath | Symbol path of the block whit remotely invokable method |
System.String | methodName | Method name. NOTE: Method must have attribute 'TcRpcEnable' declared.} |
System.Object[] | params | Method's parameters. NOTE: Only value type parameters are accepted. |
Returns
Type | Description |
---|---|
System.Object | Result of the remotely called method. NOTE:Only value types are allowed as return values. |
NotifyPropertyChanged(String)
Declaration
void NotifyPropertyChanged(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
ReadBatch(IEnumerable<IValueTag>)
Reads batch of value items from the plc.
Declaration
public abstract void ReadBatch(IEnumerable<IValueTag> valueTags)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IValueTag> | valueTags | Value items to be read. |
ReloadConnector()
Forces the connector to reload symbols.
Declaration
public abstract void ReloadConnector()
SubscribeAllEditValueObserver(OnlinerBaseType.ValueChangeDelegate)
Subscribes to observe changes on 'Edit' property of all tags attached to this connector.
Declaration
void SubscribeAllEditValueObserver(OnlinerBaseType.ValueChangeDelegate subscriber)
Parameters
Type | Name | Description |
---|---|---|
OnlinerBaseType.ValueChangeDelegate | subscriber |
WriteBatch(IEnumerable<IValueTag>)
Writes batch of value items to the plc.
Declaration
public abstract void WriteBatch(IEnumerable<IValueTag> valueTags)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IValueTag> | valueTags | Value items to be written. |
Events
PropertyChanged
Implementation of System.ComponentModel.INotifyPropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |