PlcObject Members

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

PlcObject()

Initializes a new instance of the PlcObject class.

C#

public PlcObject()

PlcObject(PlcIdentity)

Initializes a new instance of the PlcObject class using the specified identity

C#

public PlcObject(PlcIdentity identity)


Parameters

identity PlcIdentity

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


Exceptions

ArgumentNullException

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

PlcObject(PlcIdentity, PlcName)

Initializes a new instance of the PlcObject class using the specified identity and name.

C#

public PlcObject(PlcIdentity identity, PlcName name)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcObject to which the PLC object belongs.

name PlcName

The name of the object.


Exceptions

ArgumentNullException

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

PlcObject(PlcObjectType)

Initializes a new instance of the PlcObject class using the specified type

C#

public PlcObject(PlcObjectType type)


Parameters

type PlcObjectType

The PlcObjectType of the new PlcObject to which the PLC object belongs.


Exceptions

ArgumentNullException

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

PlcObject(PlcObjectType, PlcName)

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

C#

public PlcObject(PlcObjectType type, PlcName name)


Parameters

type PlcObjectType

The PlcObjectType of the new PlcObject 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).

MemberChanged

Occurs when the value of a PlcMember changed.

C#

public event PlcMemberChangedEventHandler MemberChanged

PropertyChanged

Occurs when a property value changes.

C#

public event PropertyChangedEventHandler PropertyChanged

Description

Gets or sets more meaningful information about the value and its usage than only using the Name property.

C#

public virtual string Description { get; set; }


Property Value

String

A String value containing additional information about the value and its usage.

Item[PlcMember]

Gets or sets the value of the member specified which is associated with this PlcObject.

C#

public object this[PlcMember member] { get; set; }


Property Value

Object

The value of the member.



Exceptions

ArgumentException

The member is not a valid/known member of the PlcObject.

InvalidOperationException

The member does not grant read/write access.

Item[String[]]

Gets or sets the value of the member with the names specified which are associated with this PlcObject.

C#

public object this[params string[] names] { get; set; }


Property Value

Object

The value of the member.



Exceptions

ArgumentException

The member with one of the names specified is not a valid/known member of the PlcObject.

InvalidOperationException

The member does not grant read/write access.

Item[String]

Gets or sets the value of the member with the name specified which is associated with this PlcObject.

C#

public object this[string name] { get; set; }


Property Value

Object

The value of the member.



Exceptions

ArgumentException

The member with the name specified is not a valid/known member of the PlcObject.

InvalidOperationException

The member does not grant read/write access.

Members

Gets a collection of PlcMember associated with the PlcObject.

C#

public PlcMemberCollection Members { get; }


Property Value

PlcMemberCollection

An instance of the PlcMemberCollection containing all PlcMember objects associated with the PlcObject.

Name

Gets the name of the object.

C#

public PlcName Name { get; }


Property Value

PlcName

An instance of the PlcName class containing the name of the object.

Tag

Gets or sets the object that contains additional user data about the object.

C#

public virtual object Tag { get; set; }


Property Value

Object

An Object that contains additional user data about the object. The default is null (Nothing in Visual Basic).

Type

Gets the PlcType of the object.

C#

public PlcType Type { get; }


Property Value

PlcType

The PlcType used by the object.

OnMemberChanged(PlcMemberChangedEventArgs)

Raises the MemberChanged event.

C#

protected virtual void OnMemberChanged(PlcMemberChangedEventArgs e)


Parameters

e PlcMemberChangedEventArgs

The PlcMemberChangedEventArgs that contains the event data.

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event.

C#

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)


Parameters

e PropertyChangedEventArgs

The PropertyChangedEventArgs that contains the event data.

Relocate(Int32)

Relocates the PlcObject using the specified offset. The original PlcObject remains unmodified.

C#

public PlcObject Relocate(int operandNumber)


Parameters

operandNumber Int32

The operand number offset used to adjust the address of the Type.


Returns

PlcObject

A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified offset.



Exceptions

ArgumentOutOfRangeException

The offset specified by operandNumber result into a new value that would be out of the bounds defined by MinOperandNumber or MaxOperandNumber.

InvalidOperationException

It is not possible to relocate relative types.

Relocate(Int32, Int32)

Relocates the PlcObject using the specified offset. The original PlcObject remains unmodified.

C#

public PlcObject Relocate(int operandNumber, int byteNumber)


Parameters

operandNumber Int32

The operand number offset used to adjust the address of the Type.

byteNumber Int32

The byte number offset used to adjust the address of the Type.


Returns

PlcObject

A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified offset.



Exceptions

ArgumentOutOfRangeException

One of the offsets specified by operandNumber or byteNumber result into a new value that would be out of the bounds defined by MinOperandNumber, MaxOperandNumber, MinByteNumber and MaxByteNumber.

InvalidOperationException

It is not possible to relocate relative types.

Relocate(Int32, Int32, Int32)

Relocates the PlcObject using the specified offset. The original PlcObject remains unmodified.

C#

public PlcObject Relocate(int operandNumber, int byteNumber, int bitNumber)


Parameters

operandNumber Int32

The operand number offset used to adjust the address of the Type.

byteNumber Int32

The byte number offset used to adjust the address of the Type.

bitNumber Int32

The bit number offset used to adjust the address of the Type.


Returns

PlcObject

A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified offset.



Exceptions

ArgumentOutOfRangeException

One of the offsets specified by operandNumber, byteNumber or bitNumber result into a new value that would be out of the bounds defined by MinOperandNumber, MaxOperandNumber, MinByteNumber, MaxByteNumber, MinBitNumber or MaxBitNumber.

InvalidOperationException

It is not possible to relocate relative types.

Relocate(PlcAddress)

Relocates the PlcObject using the specified address. The original PlcObject remains unmodified.

C#

public PlcObject Relocate(PlcAddress address)


Parameters

address PlcAddress

The PlcAddress to that the value is to be relocated.


Returns

PlcObject

A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified address.



Exceptions

ArgumentNullException

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

ArgumentException

The address does not refer to the same RawType as this PlcType.

InvalidOperationException

It is not possible to relocate absolute object types without relative type information.


Remarks

The RawType of the address specified needs to be the same as defined by the address of the Type of the PLC value.

RelocateCore(PlcType)

Relocates the object to the type specified.

C#

protected virtual PlcObject RelocateCore(PlcType type)


Parameters

type PlcType

The PlcType to that the object is to be relocated.


Returns

PlcObject

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

ToString()

Converts the object to its string representation.

C#

public override string ToString()


Returns

String

A string that contains the object.