PlcArray<T, TElement> Members

Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcArray<T, t> type exposes the following members.

PlcArray(PlcArrayType, PlcName, T[])

Initializes a new instance of the PlcArray´2 class using the specified type and name.

C#

protected PlcArray(PlcArrayType type, PlcName name, params T[] values)


Parameters

type PlcArrayType

The type of array represented.

name PlcName

The name of the array represented.

values T

The initial values of the new PlcArray´2.


Exceptions

ArgumentNullException

The type or name is a null reference (Nothing in Visual Basic).

PlcArray(PlcArrayType, T[])

Initializes a new instance of the PlcArray´2 class using the specified type.

C#

protected PlcArray(PlcArrayType type, params T[] values)


Parameters

type PlcArrayType

The type of array represented.

values T

The initial values of the new PlcArray´2.


Exceptions

ArgumentNullException

The type is a null reference (Nothing in Visual Basic).

Item[Int32]

Gets the element at the specified index.

C#

public T this[int index] { get; }


Property Value

T

The element at the specified index.



Exceptions

ArgumentOutOfRangeException

The index is less than zero or index is equal to or greater than Length.

Length

Gets a 32-bit integer that represents the total number of elements within the array.

C#

public int Length { get; }


Property Value

Int32

A 32-bit integer that represents the total number of elements within the array.

Value

Gets or sets the value assigned to the PLC value.

C#

public override sealed T[] Value { get; set; }


Property Value

T

The T value assigned to the PLC value.



Exceptions

ArgumentException

The Length of the value specified does not match the Length of the array.

ArgumentNullException

The value is a null reference (Nothing in Visual Basic).

BeginInitCore()

Signals the PlcArray´2 that initialization is started.

C#

protected override void BeginInitCore()

EndInitCore()

Signals the PlcValue´1 that initialization is completed.

C#

protected override void EndInitCore()

GetElement(Int32)

Retrieves the TElement at the specified index.

C#

public TElement GetElement(int index)


Parameters

index Int32

The zero-based index of the element to get.


Returns

t

The TElement at the specified index.



Exceptions

ArgumentOutOfRangeException

The index is less than zero or index is equal to or greater than Length.

GetElementCore(Int32)

When implemented in a derived class, retrieves the TElement at the specified index.

C#

protected abstract TElement GetElementCore(int index)


Parameters

index Int32

The zero-based index of the element to get.


Returns

t

The TElement at the specified index.

GetEnumerator()

Returns an enumerator that iterates through the array.

C#

public IEnumerator<T> GetEnumerator()


Returns

IEnumerator<T>

An IEnumerator´1 object that can be used to iterate through the array.

GetInstanceValue()

Retrieves the value assigned to the PLC value.

C#

protected override T[] GetInstanceValue()


Returns

T

The value assigned to the PLC value.

GetValueCore(PlcDeviceConnection)

Retrieves the current value of the PLC value from a IPlcDevice using the connection specified.

C#

protected override T[] GetValueCore(PlcDeviceConnection connection)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection from that the data is to be retrieved.


Returns

T

The current value of the PLC value.



Exceptions

InvalidOperationException

The connection is in Faulted state and cannot longer be opened.

ObjectDisposedException

The connection has been disposed of.

SetValueCore(PlcDeviceConnection, T[])

Stores the value in the IPlcDevice assigned to the connection specified.

C#

protected override void SetValueCore(PlcDeviceConnection connection, T[] value)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection to use to store the value.

value T

The value to be stored.



Exceptions

InvalidOperationException

The connection is in Faulted state and cannot longer be opened.

ObjectDisposedException

The connection has been disposed of.

ToString()

Converts the array to its string representation.

C#

public override string ToString()


Returns

String

A string that contains the array.