IArrayParameter Interface#
Syntax#
C#
VB
The IArrayParameter type exposes the following members.
Properties#
Name | Description | |
---|---|---|
Advanced | The advanced parameter settings, if available. (Inherited from IParameter.) | |
FullName | The full name of the parameter including path information. (Inherited from IParameter.) | |
IsEmpty | 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.) | |
IsReadable | Indicates if the parameter is readable. (Inherited from IParameter.) | |
IsWritable | Indicates if the parameter is writable. (Inherited from IParameter.) | |
Name | The name of the parameter without path information. (Inherited from IParameter.) |
Methods#
Name | Description | |
---|---|---|
GetLength | Retrieves the length in bytes. | |
ParseAndSetValue | Parses the value as string and sets the value. (Inherited from IParameter.) | |
Read(T) | Reads data into the array passed. | |
ReadRaw | Reads data into the buffer passed. | |
ToString | The parameter value as a string. (Inherited from IParameter.) | |
Write(T) | Writes data from the array passed. | |
WriteRaw | Writes data from the buffer. |
Events#
Name | Description | |
---|---|---|
ParameterChanged | This event fires after any of the parameter properties (value, readability, writability, or advanced parameter settings) have changed. (Inherited from IParameter.) | |
ParameterValueChanged | This event fires after the parameter value has changed. (Inherited from IParameter.) |
IArrayParameter.GetLength Method#
Retrieves the length in bytes.
Syntax#
C#
VB
Return Value#
Type: Int64
Returns the length in bytes.
IArrayParameter.ReadRaw Method#
Reads data into the buffer passed.
Syntax#
C#
VB
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#
VB
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.
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#
VB
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#
VB
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.
Error Safety: Can throw exceptions if writing fails or if the array is not initialized