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
      • IPvDeviceAdapter
      • IPvDeviceAdapterSwigInterface
      • IUpdaterObserver
      • OnAcquisitionStateChanged
      • OnBufferCreated
      • OnBufferDeleted
      • OnBufferDisplay
      • OnBufferDone
      • OnBufferLog
      • OnBufferRetrieved
      • OnBufferTextOverlay
      • OnBufferTooSmall
      • OnCmdLinkRead
      • OnCmdLinkReadSafe
      • OnCmdLinkWrite
      • OnCmdLinkWriteSafe
      • OnEvent
      • OnEventGenICam
      • OnEventSafe
      • OnLinkDisconnectedHandler
      • OnLinkReconnectedHandler
      • OnReset
      • OnStart
      • OnStop
      • PvAccessType
      • PvAcquisitionState
      • PvAcquisitionStateEventSink
      • PvAcquisitionStateManager
      • PvActionAckStatusEnum
      • PvBayerFilterType
      • PvBiColorFilterType
      • PvBufferConverter
      • PvBufferConverterRGBFilter
      • PvBufferFormatType
      • PvBufferWriter
      • PvCameraBridge
      • PvCameraBridgeEventSink
      • PvCameraBridgeType
      • PvConfigurationReader
      • PvConfigurationWriter
      • PvDataReceiverType
      • PvDevice
      • PvDeviceAdapter
      • PvDeviceEventSink
      • PvDeviceEventSinkSwigInterface
      • PvDeviceGEV
      • PvDeviceI2CBus
      • PvDevicePleoraProtocol
      • PvDeviceSPIBus
      • PvDeviceSerial
      • PvDeviceSerialPort
      • PvDeviceSerialPortEchoSink
      • PvDeviceU3V
      • PvDisplayThread
      • PvGenFUUpdater
      • PvParity
      • PvPipeline
      • PvPipelineEventSink
      • PvProperty
      • PvPropertyList
      • PvSerialPortConfiguration
      • PvStream
      • PvStreamEventSink
      • PvStreamGEV
      • PvStreamInfo
      • PvStreamRTP
      • PvStreamType
      • PvStreamU3V
      • PvThreadPriority
      • PvTruesenseConverter
      • SWIGTYPE_p_IPvDeviceEventSink
      • SWIGTYPE_p_PvDeinterlacingType
      • SWIGTYPE_p_PvSessionInfoSDP
      • SWIGTYPE_p_PvStringList
      • SWIGTYPE_p_PvTapGeometryEnum
      • SWIGTYPE_p_bool
      • SWIGTYPE_p_double
      • eBUSDotNetReceive

    Class PvDeviceI2CBus

    Provides I2C bus communication interface for device serial ports.

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

    This class enables I2C protocol communication through a device's serial port, supporting various transfer modes including burst read/write and master transmit/receive.

    Constructors

    View Source

    PvDeviceI2CBus()

    Constructor.

    Declaration
    public PvDeviceI2CBus()

    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 I2C bus is currently opened.

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

    Methods

    View Source

    BurstRead(byte, byte[], uint, out uint)

    Performs a burst read operation from an I2C slave device.

    Declaration
    public PvResult BurstRead(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, out uint aBytesRead)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer to receive the read data.

    uint aBufferSize

    Maximum number of bytes to read.

    uint aBytesRead

    Number of bytes actually read.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    BurstRead(byte, byte[], uint, out uint, bool)

    Performs a burst read operation from an I2C slave device.

    Declaration
    public PvResult BurstRead(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, out uint aBytesRead, bool aFastMode)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer to receive the read data.

    uint aBufferSize

    Maximum number of bytes to read.

    uint aBytesRead

    Number of bytes actually read.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    BurstWrite(byte, byte[], uint)

    Performs a burst write operation to an I2C slave device.

    Declaration
    public PvResult BurstWrite(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer containing data to write.

    uint aBufferSize

    Number of bytes to write.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    BurstWrite(byte, byte[], uint, bool)

    Performs a burst write operation to an I2C slave device.

    Declaration
    public PvResult BurstWrite(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, bool aFastMode)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer containing data to write.

    uint aBufferSize

    Number of bytes to write.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    Close()

    Closes the I2C bus connection.

    Declaration
    public PvResult Close()
    Returns
    Type Description
    PvResult

    Result of the operation.

    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

    ~PvDeviceI2CBus()

    Destructor.

    Declaration
    protected ~PvDeviceI2CBus()
    View Source

    IndirectBurstRead(byte, byte, byte[], uint, out uint)

    Performs an indirect burst read operation with offset addressing.

    Declaration
    public PvResult IndirectBurstRead(byte aSlaveAddress, byte aOffset, byte[] aBuffer, uint aBufferSize, out uint aBytesRead)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte aOffset

    The register offset/address to read from.

    byte[] aBuffer

    Buffer to receive the read data.

    uint aBufferSize

    Maximum number of bytes to read.

    uint aBytesRead

    Number of bytes actually read.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    IndirectBurstRead(byte, byte, byte[], uint, out uint, bool)

    Performs an indirect burst read operation with offset addressing.

    Declaration
    public PvResult IndirectBurstRead(byte aSlaveAddress, byte aOffset, byte[] aBuffer, uint aBufferSize, out uint aBytesRead, bool aFastMode)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte aOffset

    The register offset/address to read from.

    byte[] aBuffer

    Buffer to receive the read data.

    uint aBufferSize

    Maximum number of bytes to read.

    uint aBytesRead

    Number of bytes actually read.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    IndirectBurstRead(byte, byte, byte[], uint, out uint, bool, bool)

    Performs an indirect burst read operation with offset addressing.

    Declaration
    public PvResult IndirectBurstRead(byte aSlaveAddress, byte aOffset, byte[] aBuffer, uint aBufferSize, out uint aBytesRead, bool aFastMode, bool aUseCombinedFormat)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte aOffset

    The register offset/address to read from.

    byte[] aBuffer

    Buffer to receive the read data.

    uint aBufferSize

    Maximum number of bytes to read.

    uint aBytesRead

    Number of bytes actually read.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    bool aUseCombinedFormat

    If true, use combined format for address and data. Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    IndirectBurstWrite(byte, byte, byte[], uint)

    Performs an indirect burst write operation with offset addressing.

    Declaration
    public PvResult IndirectBurstWrite(byte aSlaveAddress, byte aOffset, byte[] aBuffer, uint aBufferSize)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte aOffset

    The register offset/address to write to.

    byte[] aBuffer

    Buffer containing data to write.

    uint aBufferSize

    Number of bytes to write.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    IndirectBurstWrite(byte, byte, byte[], uint, bool)

    Performs an indirect burst write operation with offset addressing.

    Declaration
    public PvResult IndirectBurstWrite(byte aSlaveAddress, byte aOffset, byte[] aBuffer, uint aBufferSize, bool aFastMode)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte aOffset

    The register offset/address to write to.

    byte[] aBuffer

    Buffer containing data to write.

    uint aBufferSize

    Number of bytes to write.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    IsSupported(IPvDeviceAdapterSwigInterface, PvDeviceSerial)

    Checks if I2C bus communication is supported on the specified device port.

    Declaration
    public static bool IsSupported(IPvDeviceAdapterSwigInterface aDevice, PvDeviceSerial aPort = PvDeviceSerial.PvDeviceSerialBulk0)
    Parameters
    Type Name Description
    IPvDeviceAdapterSwigInterface aDevice

    The device adapter to check.

    PvDeviceSerial aPort

    The serial port to check. Default is PvDeviceSerialBulk0.

    Returns
    Type Description
    bool

    True if supported, false otherwise.

    View Source

    MasterReceiverAfterFirstByte(byte, byte[], uint, out uint)

    Receives data as I2C master after the first byte has been sent.

    Declaration
    public PvResult MasterReceiverAfterFirstByte(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, out uint aBytesRead)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer to receive the data.

    uint aBufferSize

    Maximum number of bytes to receive.

    uint aBytesRead

    Number of bytes actually received.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    MasterReceiverAfterFirstByte(byte, byte[], uint, out uint, bool)

    Receives data as I2C master after the first byte has been sent.

    Declaration
    public PvResult MasterReceiverAfterFirstByte(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, out uint aBytesRead, bool aFastMode)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer to receive the data.

    uint aBufferSize

    Maximum number of bytes to receive.

    uint aBytesRead

    Number of bytes actually received.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    MasterReceiverAfterFirstByte(byte, byte[], uint, out uint, bool, bool)

    Receives data as I2C master after the first byte has been sent.

    Declaration
    public PvResult MasterReceiverAfterFirstByte(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, out uint aBytesRead, bool aFastMode, bool aGenerateStopCondition)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer to receive the data.

    uint aBufferSize

    Maximum number of bytes to receive.

    uint aBytesRead

    Number of bytes actually received.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    bool aGenerateStopCondition

    If true, generate stop condition after reception. Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    MasterTransmitter(byte, byte[], uint)

    Transmits data as I2C master.

    Declaration
    public PvResult MasterTransmitter(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer containing data to transmit.

    uint aBufferSize

    Number of bytes to transmit.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    MasterTransmitter(byte, byte[], uint, bool)

    Transmits data as I2C master.

    Declaration
    public PvResult MasterTransmitter(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, bool aFastMode)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer containing data to transmit.

    uint aBufferSize

    Number of bytes to transmit.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    MasterTransmitter(byte, byte[], uint, bool, bool)

    Transmits data as I2C master.

    Declaration
    public PvResult MasterTransmitter(byte aSlaveAddress, byte[] aBuffer, uint aBufferSize, bool aFastMode, bool aGenerateStopCondition)
    Parameters
    Type Name Description
    byte aSlaveAddress

    The 7-bit I2C slave address.

    byte[] aBuffer

    Buffer containing data to transmit.

    uint aBufferSize

    Number of bytes to transmit.

    bool aFastMode

    If true, use fast mode (400 kHz), otherwise standard mode (100 kHz). Default is true.

    bool aGenerateStopCondition

    If true, generate stop condition after transmission. Default is true.

    Returns
    Type Description
    PvResult

    Result of the operation.

    View Source

    Open(IPvDeviceAdapterSwigInterface, PvDeviceSerial)

    Opens the I2C bus on the specified device serial port.

    Declaration
    public PvResult Open(IPvDeviceAdapterSwigInterface aDevice, PvDeviceSerial aPort = PvDeviceSerial.PvDeviceSerialBulk0)
    Parameters
    Type Name Description
    IPvDeviceAdapterSwigInterface aDevice

    The device adapter providing access to the device.

    PvDeviceSerial aPort

    The serial port to use for I2C communication. Default is PvDeviceSerialBulk0.

    Returns
    Type Description
    PvResult

    Result of the operation.

    Implements

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