PlcTypeLayout Members

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

PlcTypeLayout(PlcTypeLayoutKind)

Initializes a new instance of the PlcTypeLayout class using the kind of layout specified and its corresponding default pack size.

C#

public PlcTypeLayout(PlcTypeLayoutKind kind)


Parameters

kind PlcTypeLayoutKind

One of the members defined by the PlcTypeLayoutKind enumeration which refers to the behaviour to use when members are laid out. Depending on the value used the corresponding default pack size is preset.

PlcTypeLayout(PlcTypeLayoutKind, Int32)

Initializes a new instance of the PlcTypeLayout class using the kind of layout and the custom pack size specified.

C#

public PlcTypeLayout(PlcTypeLayoutKind kind, int pack)


Parameters

kind PlcTypeLayoutKind

One of the members defined by the PlcTypeLayoutKind enumeration which refers to the behaviour to use when members are laid out.

pack Int32

The custom pack size to use when aligning the members of a PlcType.


Exceptions

ArgumentOutOfRangeException

The pack is less than zero or greater than sixteen.

Default

Defines the default layout characteristics used when no other layout information is known. The PlcTypeLayoutKind used by default is Sequential.

C#

public static readonly PlcTypeLayout Default


Field Value
PlcTypeLayout

Kind

Gets a value which defines how the members of a PlcType are arranged to each other.

C#

public PlcTypeLayoutKind Kind { get; }


Property Value

PlcTypeLayoutKind

One of the members defined by the PlcTypeLayoutKind enumeration.

Pack

Gets a value indicating the alignment of members to each other.

C#

public int Pack { get; }


Property Value

Int32

A value which defines a 'multiple of pack', which means that members typically shall be aligned at a multiple of the pack value. Whether the 'multiple of pack' is used to align a member depends on the Kind of layout.

GetAddresses(PlcAddress, IPlcMemberInfo[])

Calculates the according PlcAddress, starting at startAddress, for each relative item in the members specified.

C#

public PlcAddress[] GetAddresses(PlcAddress startAddress, params IPlcMemberInfo[] members)


Parameters

startAddress PlcAddress

The PlcAddress indiciating the very first address to use for the first relative addressed member in members to determine its layout specific absolute address.

members IPlcMemberInfo[]

An array of IPlcMemberInfo instances its absolute addresses have to be determined according the layouting ruled by this PlcTypeLayout.


Returns

PlcAddress[]

An array of PlcAddress instances with the same length used by the members array specified. Each item in this array provides the address of the member at the same index in members. This address has been determined using the specified startAddress appropriate to the layouting defined by this PlcTypeLayout. Note that only the address of relative members is calculated; absolutely addressed members address information is stored unmodified within the returned array.



Exceptions

ArgumentNullException

The startAddress, members or one of its items is a null reference (Nothing in Visual Basic).