~~NOTRANS~~ ====== PlcByteArray Members ====== **Namespace:** IPS7Lnk.Advanced \\ **Assemblies:** IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll \\ The [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] type exposes the following members. ===== Constructors ===== ==== PlcByteArray(PlcByteArrayType) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''type''. **C#** \\ <code csharp> public PlcByteArray(PlcByteArrayType type) </code> \\ **Parameters** ''type'' [[IPS7Lnk.Advanced.PlcByteArrayType|PlcByteArrayType]] \\ The [[IPS7Lnk.Advanced.PlcByteArrayType|PlcByteArrayType]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''type'' is a null reference (Nothing in Visual Basic).\\ </panel> ==== PlcByteArray(PlcByteArrayType, Byte[]) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''type'' and ''values''. **C#** \\ <code csharp> public PlcByteArray(PlcByteArrayType type, params byte[] values) </code> \\ **Parameters** ''type'' [[IPS7Lnk.Advanced.PlcByteArrayType|PlcByteArrayType]] \\ The [[IPS7Lnk.Advanced.PlcByteArrayType|PlcByteArrayType]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ ''values'' [[https://docs.microsoft.com/en-us/dotnet/api/system.byte|Byte]][] \\ The initial values of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]].\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''type'' is a null reference (Nothing in Visual Basic).\\ </panel> ==== PlcByteArray(PlcByteArrayType, PlcName, Byte[]) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''type'', ''name'' and ''values''. **C#** \\ <code csharp> public PlcByteArray(PlcByteArrayType type, PlcName name, params byte[] values) </code> \\ **Parameters** ''type'' [[IPS7Lnk.Advanced.PlcByteArrayType|PlcByteArrayType]] \\ The [[IPS7Lnk.Advanced.PlcByteArrayType|PlcByteArrayType]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ ''name'' [[IPS7Lnk.Advanced.PlcName|PlcName]] \\ The name of the array represented.\\ ''values'' [[https://docs.microsoft.com/en-us/dotnet/api/system.byte|Byte]][] \\ The initial values of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]].\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''type'' or ''name'' is a null reference (Nothing in Visual Basic).\\ </panel> ==== PlcByteArray(PlcIdentity, Byte[]) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''identity'' and ''values''. **C#** \\ <code csharp> public PlcByteArray(PlcIdentity identity, params byte[] values) </code> \\ **Parameters** ''identity'' [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] \\ The [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ ''values'' [[https://docs.microsoft.com/en-us/dotnet/api/system.byte|Byte]][] \\ The initial values of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]].\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception|ArgumentException]] \\ The ''identity'' does not refer to the [[IPS7Lnk.Advanced.PlcRawTypeMembers#Byte|Byte]].\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''identity'' is a null reference (Nothing in Visual Basic).\\ </panel> ==== PlcByteArray(PlcIdentity, Int32) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''identity'' and ''length''. **C#** \\ <code csharp> public PlcByteArray(PlcIdentity identity, int length) </code> \\ **Parameters** ''identity'' [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] \\ The [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ ''length'' [[https://docs.microsoft.com/en-us/dotnet/api/system.int32|Int32]] \\ The array length used to store the array values of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]].\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception|ArgumentException]] \\ The ''identity'' does not refer to the [[IPS7Lnk.Advanced.PlcRawTypeMembers#Byte|Byte]].\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''identity'' is a null reference (Nothing in Visual Basic).\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception|ArgumentOutOfRangeException]] \\ The ''length'' is out of the bounds defined by [[IPS7Lnk.Advanced.PlcTypeMembers#MinLength|MinLength]] and [[IPS7Lnk.Advanced.PlcTypeMembers#MaxLength|MaxLength]].\\ </panel> ==== PlcByteArray(PlcIdentity, PlcName, Byte[]) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''identity'', ''name'' and ''values''. **C#** \\ <code csharp> public PlcByteArray(PlcIdentity identity, PlcName name, params byte[] values) </code> \\ **Parameters** ''identity'' [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] \\ The [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ ''name'' [[IPS7Lnk.Advanced.PlcName|PlcName]] \\ The name of the array represented.\\ ''values'' [[https://docs.microsoft.com/en-us/dotnet/api/system.byte|Byte]][] \\ The initial values of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]].\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception|ArgumentException]] \\ The ''identity'' does not refer to the [[IPS7Lnk.Advanced.PlcRawTypeMembers#Byte|Byte]].\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''identity'' or ''name'' is a null reference (Nothing in Visual Basic).\\ </panel> ==== PlcByteArray(PlcIdentity, PlcName, Int32) ==== <panel> Initializes a new instance of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] class using the specified ''identity'', ''name'' and ''length''. **C#** \\ <code csharp> public PlcByteArray(PlcIdentity identity, PlcName name, int length) </code> \\ **Parameters** ''identity'' [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] \\ The [[IPS7Lnk.Advanced.PlcIdentity|PlcIdentity]] of the new [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]] to which the PLC array belongs.\\ ''name'' [[IPS7Lnk.Advanced.PlcName|PlcName]] \\ The name of the array represented.\\ ''length'' [[https://docs.microsoft.com/en-us/dotnet/api/system.int32|Int32]] \\ The array length used to store the array values of the [[IPS7Lnk.Advanced.PlcByteArray|PlcByteArray]].\\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception|ArgumentException]] \\ The ''identity'' does not refer to the [[IPS7Lnk.Advanced.PlcRawTypeMembers#Byte|Byte]].\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception|ArgumentNullException]] \\ The ''identity'' or ''name'' is a null reference (Nothing in Visual Basic).\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception|ArgumentOutOfRangeException]] \\ The ''length'' is out of the bounds defined by [[IPS7Lnk.Advanced.PlcTypeMembers#MinLength|MinLength]] and [[IPS7Lnk.Advanced.PlcTypeMembers#MaxLength|MaxLength]].\\ </panel> ===== Methods ===== ==== GetElementCore(Int32) ==== <panel> Retrieves the [[IPS7Lnk.Advanced.PlcByte|PlcByte]] at the specified index. **C#** \\ <code csharp> protected override PlcByte GetElementCore(int index) </code> \\ **Parameters** ''index'' [[https://docs.microsoft.com/en-us/dotnet/api/system.int32|Int32]] \\ The zero-based index of the element to get.\\ \\ **Returns** [[IPS7Lnk.Advanced.PlcByte|PlcByte]] \\ The [[IPS7Lnk.Advanced.PlcByte|PlcByte]] at the specified index. </panel> ==== GetValueCore(PlcDeviceConnection) ==== <panel> Retrieves the current value of the PLC value from a [[IPS7Lnk.Advanced.IPlcDevice|IPlcDevice]] using the ''connection'' specified. **C#** \\ <code csharp> protected override byte[] GetValueCore(PlcDeviceConnection connection) </code> \\ **Parameters** ''connection'' [[IPS7Lnk.Advanced.PlcDeviceConnection|PlcDeviceConnection]] \\ The [[IPS7Lnk.Advanced.PlcDeviceConnection|PlcDeviceConnection]] from that the data is to be retrieved.\\ \\ **Returns** [[https://docs.microsoft.com/en-us/dotnet/api/system.byte|Byte]][] \\ The current value of the PLC value. \\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception|InvalidOperationException]] \\ The ''connection'' is in [[IPS7Lnk.Advanced.PlcDeviceConnectionMembers#Faulted|Faulted]] state and cannot longer be opened.\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.objectdisposedexception|ObjectDisposedException]] \\ The ''connection'' has been disposed of.\\ </panel> ==== RelocateCore(PlcAddress) ==== <panel> Relocates the value to the ''address'' specified. **C#** \\ <code csharp> protected override IPlcValue RelocateCore(PlcAddress address) </code> \\ **Parameters** ''address'' [[IPS7Lnk.Advanced.PlcAddress|PlcAddress]] \\ The [[IPS7Lnk.Advanced.PlcAddress|PlcAddress]] to that the value is to be relocated.\\ \\ **Returns** [[IPS7Lnk.Advanced.IPlcValue|IPlcValue]] \\ A new instance of the same type as this PLC value instance relocated to the ''address'' specified. </panel> ==== SetValueCore(PlcDeviceConnection, Byte[]) ==== <panel> Stores the ''value'' in the [[IPS7Lnk.Advanced.IPlcDevice|IPlcDevice]] assigned to the ''connection'' specified. **C#** \\ <code csharp> protected override void SetValueCore(PlcDeviceConnection connection, byte[] value) </code> \\ **Parameters** ''connection'' [[IPS7Lnk.Advanced.PlcDeviceConnection|PlcDeviceConnection]] \\ The [[IPS7Lnk.Advanced.PlcDeviceConnection|PlcDeviceConnection]] to use to store the ''value''.\\ ''value'' [[https://docs.microsoft.com/en-us/dotnet/api/system.byte|Byte]][] \\ The value to be stored.\\ \\ \\ **Exceptions** [[https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception|InvalidOperationException]] \\ The ''connection'' is in [[IPS7Lnk.Advanced.PlcDeviceConnectionMembers#Faulted|Faulted]] state and cannot longer be opened.\\ [[https://docs.microsoft.com/en-us/dotnet/api/system.objectdisposedexception|ObjectDisposedException]] \\ The ''connection'' has been disposed of.\\ </panel>