Skip to content

IArrayParameter Interface#

Interface class for array parameter access.

Syntax#

C#

public interface IArrayParameter : IParameter

VB

Public Interface IArrayParameter
    Inherits IParameter

The IArrayParameter type exposes the following members.

Properties#

NameDescription
Public propertyAdvanced The advanced parameter settings, if available. (Inherited from IParameter.)
Public propertyFullName The full name of the parameter including path information. (Inherited from IParameter.)
Public propertyIsEmpty Indicates if the parameter is empty. If true, the parameter is invalid or does not exist. If a requested parameter does not exist in a parameter collection, an empty parameter object will be returned to simplify handling. An empty parameter is never readable or writable. (Inherited from IParameter.)
Public propertyIsReadable Indicates if the parameter is readable. (Inherited from IParameter.)
Public propertyIsWritable Indicates if the parameter is writable. (Inherited from IParameter.)
Public propertyName The name of the parameter without path information. (Inherited from IParameter.)
 

Methods#

NameDescription
Public methodGetLength Retrieves the length in bytes.
Public methodParseAndSetValue Parses the value as string and sets the value. (Inherited from IParameter.)
Public methodRead(T) Reads data into the array passed.
Public methodReadRaw Reads data into the buffer passed.
Public methodToString The parameter value as a string. (Inherited from IParameter.)
Public methodWrite(T) Writes data from the array passed.
Public methodWriteRaw Writes data from the buffer.
 

Events#

NameDescription
Public eventParameterChanged This event fires after any of the parameter properties (value, readability, writability, or advanced parameter settings) have changed. (Inherited from IParameter.)
Public eventParameterValueChanged This event fires after the parameter value has changed. (Inherited from IParameter.)
 

IArrayParameter.GetLength Method#

Retrieves the length in bytes.

Syntax#

C#

long GetLength()

VB

Function GetLength As Long

Return Value#

Type: Int64
Returns the length in bytes.

IArrayParameter.ReadRaw Method#

Reads data into the buffer passed.

Syntax#

C#

void ReadRaw(
    IntPtr pBuffer,
    long bufferSize
)

VB

Sub ReadRaw ( 
    pBuffer As IntPtr,
    bufferSize As Long
)

Parameters#

 

pBuffer
Type: System.IntPtr
The memory pointer to store the data read.
bufferSize
Type: System.Int64
The number of bytes to read.

Remarks#

Some cameras may not report a failure if an error occurs and return 0 data instead.

Thread Safety: This method is synchronized with the source of the parameter collection, if any.

Error Safety: Can throw exceptions if reading fails or if the pointer is invalid.

IArrayParameter.Read(T) Method#

Reads data into the array passed.

Syntax#

C#

void Read<T>(
    ref T[] buffer
)

VB

Sub Read(Of T) ( 
    ByRef buffer As T()
)

Parameters#

 

buffer
Type: T[]
The one-dimensional array to store the data read.

Type Parameters#

 

T
The value type of the one-dimensional array to store the data read.

Remarks#

Some cameras may not report a failure if an error occurs and return 0 data instead.

The number of bytes read is determined by the GetLength parameter and the size of an element in the array.

Preconditions:
 

  • The array must be one-dimensional and elements must be value types.
  Thread Safety: This method is synchronized with the source of the parameter collection, if any.

Error Safety: Can throw exceptions if reading fails or if the array is not initialized.

IArrayParameter.WriteRaw Method#

Writes data from the buffer.

Syntax#

C#

void WriteRaw(
    IntPtr pBuffer,
    long bufferSize
)

VB

Sub WriteRaw ( 
    pBuffer As IntPtr,
    bufferSize As Long
)

Parameters#

 

pBuffer
Type: System.IntPtr
The memory pointer to read the data from.
bufferSize
Type: System.Int64
The number of bytes to read from the buffer and write to the address.

Remarks#

Thread Safety: This method is synchronized with the source of the parameter collection, if any.

Error Safety: Can throw exceptions if writing fails or if the pointer is invalid.

IArrayParameter.Write(T) Method#

Writes data from the array passed.

Syntax#

C#

void Write<T>(
    T[] buffer
)

VB

Sub Write(Of T) ( 
    buffer As T()
)

Parameters#

 

buffer
Type: T[]
The one-dimensional array containing the data to store.

Type Parameters#

 

T
The value type of the one-dimensional array containing the data to store.

Remarks#

The number of bytes written is determined by the GetLength parameter and the size of an element in the array.

Preconditions:
 

  • The array must be one-dimensional and elements must be value types.
  Thread Safety: This method is synchronized with the source of the parameter collection, if any.

Error Safety: Can throw exceptions if writing fails or if the array is not initialized