Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcTypeLayout type exposes the following members.
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.
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
The pack
is less than zero or greater than sixteen.
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
Gets a value which defines how the members of a PlcType are arranged to each other.
C#
public PlcTypeLayoutKind Kind { get; }
Property Value
One of the members defined by the PlcTypeLayoutKind enumeration.
Gets a value indicating the alignment of members to each other.
C#
public int Pack { get; }
Property Value
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.
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
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
The startAddress
, members
or one of its items is a null reference (Nothing in Visual Basic).