PlcString Members

Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcString type exposes the following members.

PlcString(PlcIdentity, Int32)

Initializes a new instance of the PlcString class using the specified identity and length.

C#

public PlcString(PlcIdentity identity, int length)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcString to which the PLC value belongs.

length Int32

The maximum length used to store the PlcString value.


Exceptions

ArgumentException

The identity does not refer to the Byte.

ArgumentNullException

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

ArgumentOutOfRangeException

The length is out of the bounds defined by MinLength and MaxLength.

PlcString(PlcIdentity, PlcName, Int32)

Initializes a new instance of the PlcString class using the specified identity, name and length.

C#

public PlcString(PlcIdentity identity, PlcName name, int length)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcString to which the PLC value belongs.

name PlcName

The name of the value.

length Int32

The maximum length used to store the PlcString value.


Exceptions

ArgumentException

The identity does not refer to the Byte.

ArgumentNullException

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

ArgumentOutOfRangeException

The length is out of the bounds defined by MinLength and MaxLength.

PlcString(PlcIdentity, PlcName, String)

Initializes a new instance of the PlcString class using the specified identity, name and value.

C#

public PlcString(PlcIdentity identity, PlcName name, string value)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcString to which the PLC value belongs.

name PlcName

The name of the value.

value String

The initial value of the new PlcString.


Exceptions

ArgumentException

The identity does not refer to the Byte.

ArgumentNullException

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

PlcString(PlcIdentity, PlcName, String, Int32)

Initializes a new instance of the PlcString class using the specified identity, name, value and length.

C#

public PlcString(PlcIdentity identity, PlcName name, string value, int length)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcString to which the PLC value belongs.

name PlcName

The name of the value.

value String

The initial value of the new PlcString.

length Int32

The maximum length used to store the PlcString value.


Exceptions

ArgumentException

The identity does not refer to the Byte.

ArgumentNullException

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

ArgumentOutOfRangeException

The length is out of the bounds defined by MinLength and MaxLength.

PlcString(PlcIdentity, String)

Initializes a new instance of the PlcString class using the specified identity and value.

C#

public PlcString(PlcIdentity identity, string value)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcString to which the PLC value belongs.

value String

The initial value of the new PlcString.


Exceptions

ArgumentException

The identity does not refer to the Byte.

ArgumentNullException

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

PlcString(PlcIdentity, String, Int32)

Initializes a new instance of the PlcString class using the specified identity, value and length.

C#

public PlcString(PlcIdentity identity, string value, int length)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcString to which the PLC value belongs.

value String

The initial value of the new PlcString.

length Int32

The maximum length used to store the PlcString value.


Exceptions

ArgumentException

The identity does not refer to the Byte.

ArgumentNullException

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

ArgumentOutOfRangeException

The length is out of the bounds defined by MinLength and MaxLength.

PlcString(PlcStringType)

Initializes a new instance of the PlcString class using the specified type.

C#

public PlcString(PlcStringType type)


Parameters

type PlcStringType

The PlcStringType of the new PlcString to which the PLC value belongs.


Exceptions

ArgumentNullException

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

PlcString(PlcStringType, PlcName)

Initializes a new instance of the PlcString class using the specified type and name.

C#

public PlcString(PlcStringType type, PlcName name)


Parameters

type PlcStringType

The PlcStringType of the new PlcString to which the PLC value belongs.

name PlcName

The name of the value.


Exceptions

ArgumentNullException

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

PlcString(PlcStringType, PlcName, String)

Initializes a new instance of the PlcString class using the specified type, name and value.

C#

public PlcString(PlcStringType type, PlcName name, string value)


Parameters

type PlcStringType

The PlcStringType of the new PlcString to which the PLC value belongs.

name PlcName

The name of the value.

value String

The initial value of the new PlcString.


Exceptions

ArgumentNullException

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

PlcString(PlcStringType, String)

Initializes a new instance of the PlcString class using the specified type and value.

C#

public PlcString(PlcStringType type, string value)


Parameters

type PlcStringType

The PlcStringType of the new PlcString to which the PLC value belongs.

value String

The initial value of the new PlcString.


Exceptions

ArgumentNullException

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

MaxLength

Specifies the maximum value that can be used for the Length property.

C#

public const int MaxLength = 254


Field Value
Int32

MinLength

Specifies the minimum value that can be used for the Length property.

C#

public const int MinLength = 0


Field Value
Int32

Item[Int32]

Gets the element at the specified index.

C#

public char this[int index] { get; }


Property Value

Char

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 maximum number of characters that can be stored.

C#

public int Length { get; }


Property Value

Int32

A 32-bit integer that represents the maximum number of characters that can be stored.

Value

Gets or sets the value assigned to the PLC value.

C#

public override string Value { get; set; }


Property Value

String

The String value assigned to the PlcString.



Exceptions

ArgumentNullException

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

GetEnumerator()

Returns an enumerator that iterates through the array.

C#

public IEnumerator<char> GetEnumerator()


Returns

IEnumerator<Char>

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

GetValueCore(PlcDeviceConnection)

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

C#

protected override string GetValueCore(PlcDeviceConnection connection)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection from that the data is to be retrieved.


Returns

String

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.

RelocateCore(PlcAddress)

Relocates the value to the address specified.

C#

protected override IPlcValue RelocateCore(PlcAddress address)


Parameters

address PlcAddress

The PlcAddress to that the value is to be relocated.


Returns

IPlcValue

A new instance of the same type as this PLC value instance relocated to the address specified.

SetValueCore(PlcDeviceConnection, String)

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

C#

protected override void SetValueCore(PlcDeviceConnection connection, string value)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection to use to store the value.

value String

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()

Retrieves the string representation of the PlcString.

C#

public override string ToString()


Returns

String

The string representation of the PlcString.