eBUS SDK .NET API
  • Getting Started
    • Getting started with the eBUS SDK .NET API
    • Configuring Your IDE
    • Receiving Data from a GigE Vision or USB3 Vision Transmitter
    • Sample Applications
    • GigE Vision Device Communication Parameters
    • USB3 Vision Device Communication Parameters
    • PvStream USB3 Vision Parameters
    • PvStream GigE Vision Parameters
  • eBUS SDK .NET API Reference
    • API Overview
    • eBUSDotNet
    • eBUSDotNetReceive
    • eBUSDotNetEdge
Search Results for

    Show / Hide Table of Contents
      • GenDCComponentFlagsGroup
      • GenDCComponentHeader
      • GenDCComponentHeaderBase
      • GenDCComponentType
      • GenDCContainerFlagsGroup
      • GenDCContainerHeader
      • GenDCContainerHeaderBase
      • GenDCContainerVariableFieldsGroup
      • GenDCFlowTable
      • GenDCFlowTableHeader
      • GenDCGenericPartType
      • GenDCHeaderType
      • GenDCInfoTypeSpecificH264
      • GenDCInfoTypeSpecificH264.H264Flags
      • GenDCInfoTypeSpecificJPEG
      • GenDCPartFlagsGroup
      • GenDCPartHeader
      • GenDCPartHeader1D
      • GenDCPartHeader1DBase
      • GenDCPartHeader2D
      • GenDCPartHeader2DBase
      • GenDCPartHeaderBase
      • GenDCPartHeaderGenICamChunk
      • GenDCPartHeaderGenICamXML
      • GenDCPartHeaderH264
      • GenDCPartHeaderJPEG
      • GenDCPartHeaderJPEG2000
      • GenDCPartType
      • GenDCPredefinedComponentValue
      • GenDCPredefinedPartValue
      • GenDCPredefinedValue16
      • GenDCPredefinedValue32
      • GenDCPredefinedValue64
      • GenDCReservedValue
      • GenDCSignature
      • GenDCVersionValue
      • IPvChunkData
      • IPvFilter
      • IPvGenDCChunkData
      • IPvGenDCChunkWriter
      • IPvGenDCImage
      • IPvGenDCManager
      • IPvGenericDataComponent
      • IPvGenericDataContainer
      • IPvGenericDataPart
      • IPvH264AccessUnit
      • IPvImage
      • IPvImageJPEG
      • IPvMultiPartContainer
      • IPvMultiPartContainerReader
      • IPvMultiPartContainerWriter
      • IPvMultiPartSection
      • OnDeviceFoundHandler
      • OnParameterUpdateHandler
      • PvBuffer
      • PvChunkData
      • PvComponentType
      • PvCompressionFilter
      • PvDeInterlacer
      • PvDecompressionFilter
      • PvDeviceClass
      • PvDeviceInfo
      • PvDeviceInfoGEV
      • PvDeviceInfoPleoraProtocol
      • PvDeviceInfoType
      • PvDeviceInfoU3V
      • PvDeviceInfoUSB
      • PvDeviceType
      • PvEncodingEnum
      • PvException
      • PvFPSStabilizer
      • PvGenAccessMode
      • PvGenBoolean
      • PvGenCache
      • PvGenCategory
      • PvGenCommand
      • PvGenDCPart1DFields
      • PvGenDCPart2DFields
      • PvGenDCPartH264Fields
      • PvGenDCPartH264Fields.H264Flags
      • PvGenDCPartMetadataFields
      • PvGenDCPartType
      • PvGenDCVariableField
      • PvGenEndianness
      • PvGenEnum
      • PvGenEnumEntry
      • PvGenEventSink
      • PvGenEventSinkSwigInterface
      • PvGenFile
      • PvGenFloat
      • PvGenInteger
      • PvGenNameSpace
      • PvGenOpenMode
      • PvGenParameter
      • PvGenParameterArray
      • PvGenParameterList
      • PvGenRefresh
      • PvGenRegister
      • PvGenRepresentation
      • PvGenSign
      • PvGenStateStack
      • PvGenString
      • PvGenType
      • PvGenVisibility
      • PvImage
      • PvInterface
      • PvInterfaceType
      • PvMultiPartDataType
      • PvNetworkAdapter
      • PvPayloadType
      • PvPixelType
      • PvPleoraCompressed
      • PvRawData
      • PvResult
      • PvResult.Code
      • PvResult.Code.CodeEnum
      • PvSessionInfo
      • PvString
      • PvStringList
      • PvSystem
      • PvSystemEventSink
      • PvTapFilter
      • PvTapGeometryEnum
      • PvTftpClient
      • PvUSBHostController
      • PvUSBSpeed
      • PvUSBStatus
      • SWIGTYPE_p_PV_GENAPI_NS__INode
      • SWIGTYPE_p_PV_GENAPI_NS__INodeMap
      • SWIGTYPE_p_long_long
      • SWIGTYPE_p_unsigned_char
      • SWIGTYPE_p_unsigned_long_long
      • eBUSDotNet
      • uint24_t

    Class PvGenFile

    Allows reading/writing to files hosted on the device.

    Inheritance
    object
    PvGenFile
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: eBUSDotNet
    Assembly: eBUSDotNet.dll
    Syntax
    public class PvGenFile : IDisposable
    Remarks

    These files could be debug information, look-up tables, new firmware, configuration files, persistent configurations or just about anything.

    Constructors

    View Source

    PvGenFile()

    Constructor.

    Declaration
    public PvGenFile()

    Fields

    View Source

    swigCMemOwn

    Determines who is responsible for deleting the underlying C++ object.

    Declaration
    protected bool swigCMemOwn
    Field Value
    Type Description
    bool

    Properties

    View Source

    IsOpened

    Gets whether the file object is opened or not. True if it is opened and attached to a PvGenParameterArray, false if not.

    Declaration
    public bool IsOpened { get; }
    Property Value
    Type Description
    bool
    View Source

    LastErrorMessage

    Used to retrieve string-based operation of the last operation on a PvGenFile.

    Declaration
    public string LastErrorMessage { get; }
    Property Value
    Type Description
    string

    Error message associated with the last PvException operation on a PvGenFile.

    Remarks

    Use this method to retrieve detailed information about the last failed operation that throws GENERIC_ERROR exception.

    EOFs and other status are not considered errors and are monitored through the GetStatus method.

    Methods

    View Source

    Close()

    Closes the PvGenFile.

    Declaration
    public PvResult Close()
    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the file is not opened.
    • #PvResult::Code::FILE_ERROR if the GenICam file close operation fails.
    View Source

    Dispose()

    Dispose.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Dispose

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    View Source

    ~PvGenFile()

    Destructor.

    Declaration
    protected ~PvGenFile()
    View Source

    GetFiles(ref PvGenParameterArray, ref PvStringList)

    Returns all files currently supported by a GenICam interface.

    Declaration
    public static void GetFiles(ref PvGenParameterArray aArray, ref PvStringList aFiles)
    Parameters
    Type Name Description
    PvGenParameterArray aArray

    The GenICam parameter array.

    PvStringList aFiles

    A string array that is filled with all available files.

    View Source

    GetProgress(out long, out long)

    Returns progress about the current read or write operation.

    Declaration
    public PvResult GetProgress(out long aCompleted, out long aTotal)
    Parameters
    Type Name Description
    long aCompleted

    How many bytes have been read or written.

    long aTotal

    Total byte count for the read or write operation.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if no read or write operation is in progress or completed.
    View Source

    GetStatus(out string)

    Returns the status of the last operation on a PvGenFile.

    Declaration
    public PvResult GetStatus(out string aStatus)
    Parameters
    Type Name Description
    string aStatus

    Last status from a read or write operation.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the file is not opened.
    View Source

    IsReadable(ref PvGenParameterArray, string)

    Returns true if a file defined by the GenICam interface can be read.

    Declaration
    public static bool IsReadable(ref PvGenParameterArray aArray, string aFilename)
    Parameters
    Type Name Description
    PvGenParameterArray aArray

    The GenICam parameter array.

    string aFilename

    The file we are testing readability on.

    Returns
    Type Description
    bool

    True if the file exist and is readable.

    View Source

    IsSupported(ref PvGenParameterArray)

    Static method used to query if a #PvGenParameterArray supports file access

    Declaration
    public static bool IsSupported(ref PvGenParameterArray aArray)
    Parameters
    Type Name Description
    PvGenParameterArray aArray

    The eBUS SDK GenApi parameter array to test.

    Returns
    Type Description
    bool

    True if supported, false if not.

    View Source

    IsWritable(ref PvGenParameterArray, string)

    Returns true if a file defined by the GenICam interface can be written.

    Declaration
    public static bool IsWritable(ref PvGenParameterArray aArray, string aFilename)
    Parameters
    Type Name Description
    PvGenParameterArray aArray

    The eBUS SDK GenApi parameter array.

    string aFilename

    The file we are testing writability on.

    Returns
    Type Description
    bool

    True if the file exist and is writable.

    View Source

    Open(ref PvGenParameterArray, string, PvGenOpenMode)

    Opens a file through the GenICam interface.

    Declaration
    public PvResult Open(ref PvGenParameterArray aArray, string aFilename, PvGenOpenMode aMode)
    Parameters
    Type Name Description
    PvGenParameterArray aArray

    The eBUS SDK GenApi parameter array to use.

    string aFilename

    The filename of the file to open on the device. Must match one of the pre-defined enumeration entry of the FileSelector feature. The filename is case sensitive.

    PvGenOpenMode aMode

    Mode used to access the file. Read or write.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the file is already opened.
    • #PvResult::Code::NOT_FOUND if the file does not exist.
    • #PvResult::Code::INVALID_PARAMETER if aMode is not one of the supported open modes.
    • #PvResult::Code::FILE_ERROR if the GenICam file open operation fails.
    • #PvResult::Code::NOT_SUPPORTED if the PvGenParameterArray does not have all expected features to support files.
    View Source

    Read(byte[], long, out long)

    Reads data from the opened device file.

    Declaration
    public PvResult Read(byte[] aBuffer, long aLength, out long aBytesRead)
    Parameters
    Type Name Description
    byte[] aBuffer

    Pointer to the buffer where to write the data read from the device file.

    long aLength

    Number of bytes to read to the device file.

    long aBytesRead

    Number of bytes successfully read from the device file.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the file is not opened.
    View Source

    ReadTo(string)

    Reads a complete device file and writes it to a local file.

    Declaration
    public PvResult ReadTo(string aLocalFilename)
    Parameters
    Type Name Description
    string aLocalFilename

    The full path of the local file where data read from the device file is written to.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the device file is not opened.
    • #PvResult::Code::CANNOT_OPEN_FILE if the local file cannot be opened.
    View Source

    Write(byte[], long, out long)

    Writes data to the opened device file.

    Declaration
    public PvResult Write(byte[] aBuffer, long aLength, out long aBytesWritten)
    Parameters
    Type Name Description
    byte[] aBuffer

    Pointer to the data to write to the device file.

    long aLength

    Number of bytes to write to the device file.

    long aBytesWritten

    Number of bytes successfully written to the device file.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the file is not opened.
    View Source

    WriteFrom(string)

    Writes a complete local file to the opened device file.

    Declaration
    public PvResult WriteFrom(string aLocalFilename)
    Parameters
    Type Name Description
    string aLocalFilename

    The full path of the local file to write to the device file.

    Returns
    Type Description
    PvResult

    Includes:

    • #PvResult::Code::OK
    • #PvResult::Code::GENERIC_ERROR (Use #PvGenFile::GetLastErrorMessage to get more information.)
    • #PvResult::Code::STATE_ERROR if the device file is not opened.
    • #PvResult::Code::CANNOT_OPEN_FILE if the local file cannot be opened.
    • #PvResult::Code::ERR_OVERFLOW if EOF was reached on the device file before the complete local file could be written.

    Implements

    IDisposable
    • View Source
    In this article
    Back to top Generated by DocFX