> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sensor-bridge/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sensor-bridge/_mcp/server.

# hololink::emulation::sensors::Vb1940Emulator

```cpp showLineNumbers={false}
#include <hololink/emulation/sensors/vb1940_emulator.hpp>
```

**Inherits from:** `hololink::emulation::I2CPeripheral` (public)

***

## Constructors

### Vb1940Emulator \[#vb1940emulator]

```cpp showLineNumbers={false}
hololink::emulation::sensors::Vb1940Emulator::Vb1940Emulator()
```

### Destructor \[#destructor]

### \~Vb1940Emulator

```cpp showLineNumbers={false}
hololink::emulation::sensors::Vb1940Emulator::~Vb1940Emulator()
```

***

## Methods

### reset \[#reset]

```cpp showLineNumbers={false}
void hololink::emulation::sensors::Vb1940Emulator::reset()
```

Reset the `Vb1940Emulator` internal state machines to their initial states.

### attach\_to\_i2c \[#attachtoi2c]

```cpp showLineNumbers={false}
void hololink::emulation::sensors::Vb1940Emulator::attach_to_i2c(
    I2CController &i2c_controller,
    uint8_t bus_address
) override
```

python:

`def `[`attach_to_i2c`](#attachtoi2c)`(self: hemu.sensors.Vb1940Emulator, i2c_controller: hemu.I2CController, bus_address: int)`

Attach the `Vb1940Emulator` to an I2C controller at a specified bus

**Parameters**

The I2C controller to attach to. Retrieved from [HSBEmulator](../../../classes/hsbemulator) with get\_i2c(controller\_address)

The bus address of the I2C controller

### i2c\_transaction \[#i2ctransaction]

```cpp showLineNumbers={false}
I2CStatus hololink::emulation::sensors::Vb1940Emulator::i2c_transaction(
    uint16_t peripheral_address,
    const uint8_t *write_bytes,
    uint16_t write_size,
    uint8_t *read_bytes,
    uint16_t read_size
) override
```

python:

`def `[`i2c_transaction`](#i2ctransaction)`(self: hemu.sensors.Vb1940Emulator, peripheral_address: int, write_bytes: bytes, write_size: int, read_bytes: bytes, read_size: int) -> hemu.I2CStatus`

Receive and act on I2C transaction from [HSBEmulator](../../../classes/hsbemulator)'s I2C controller(s)

**Returns:** The status of the I2C transaction

**Parameters**

The address of the peripheral to transaction with

The bytes to write to the peripheral

The size of the write bytes

The bytes to read from the peripheral

The size of the read bytes

### is\_streaming \[#isstreaming]

```cpp showLineNumbers={false}
bool hololink::emulation::sensors::Vb1940Emulator::is_streaming() const
```

Check if the Host application has set the sensor to streaming mode.

It is expected that the host application does not send any commands that set the sensor to streaming mode if the sensor is not yet configured.

**Returns:** True if the `Vb1940Emulator` is streaming, false otherwise

### get\_pixel\_width \[#getpixelwidth]

```cpp showLineNumbers={false}
uint16_t hololink::emulation::sensors::Vb1940Emulator::get_pixel_width() const
```

Get the width of the configured image in pixels.

**Returns:** The width of the image in pixels or 0 if the sensor has not been configured; see is\_streaming().

### get\_pixel\_height \[#getpixelheight]

```cpp showLineNumbers={false}
uint16_t hololink::emulation::sensors::Vb1940Emulator::get_pixel_height() const
```

Get the height of the configured image in pixels.

**Returns:** The height of the image in pixels or 0 if the sensor has not been configured; see is\_streaming().

### get\_bytes\_per\_line \[#getbytesperline]

```cpp showLineNumbers={false}
uint16_t hololink::emulation::sensors::Vb1940Emulator::get_bytes_per_line() const
```

Get the number of bytes per line of the sensor CSI image frame - not the packetized CSI image frame.

**Returns:** The number of bytes per line of the CSI image frame or 0 if the sensor has not been configured; see is\_streaming().

### get\_image\_start\_byte \[#getimagestartbyte]

```cpp showLineNumbers={false}
uint32_t hololink::emulation::sensors::Vb1940Emulator::get_image_start_byte() const
```

Get the start byte offset for the CSI image frame.

**Returns:** The byte offset of the CSI image frame where the image starts or 0 if the sensor has not been configured; see is\_streaming().

### get\_csi\_length \[#getcsilength]

```cpp showLineNumbers={false}
uint32_t hololink::emulation::sensors::Vb1940Emulator::get_csi_length() const
```

Get the length of the CSI data in bytes for the CSI image frame - not the packetized CSI image frame.

**Returns:** The length of the CSI data in bytes or 0 if the sensor has not been configured; see is\_streaming().

### get\_pixel\_bits \[#getpixelbits]

```cpp showLineNumbers={false}
uint8_t hololink::emulation::sensors::Vb1940Emulator::get_pixel_bits() const
```

Get the number of bits per pixel.

**Returns:** The number of bits per pixel or 0 if the sensor has not been configured; see is\_streaming().

### set\_eeprom\_data \[#seteepromdata]

```cpp showLineNumbers={false}
void hololink::emulation::sensors::Vb1940Emulator::set_eeprom_data(
    const uint8_t *data,
    size_t size
)
```

Populate the rig calibration EEPROM region served at I²C peripheral 0x51.

The 256-byte region holds 30 big-endian doubles in the layout consumed by `NativeVb1940Sensor::read_calibration_from_eeprom()`. Without this, the emulator no-ops EEPROM reads and downstream cuVSLAM rejects with "Focal length must be > 0" because intrinsics come back zero. Used by Isaac Sim's HSBSender to wire USDA Camera prim values through to the live receiver via the standard I²C calibration channel.

**Parameters**

Source bytes; `nullptr` is accepted and treated as a 0-byte payload (the region is zero-filled).

Number of bytes available at `data`; clamped to EEPROM\_REGION\_BYTES. Any remainder beyond `size` is zero-filled so a short payload does not leave stale bytes from a prior call.

### start \[#start]

```cpp showLineNumbers={false}
virtual void hololink::emulation::sensors::Vb1940Emulator::start()
```

start the peripheral.

This will be called when [I2CController](../../../classes/i2ccontroller) itself starts and should not be done by the client code

### stop \[#stop]

```cpp showLineNumbers={false}
virtual void hololink::emulation::sensors::Vb1940Emulator::stop()
```

stop the peripheral.

This will be called when the [I2CController](../../../classes/i2ccontroller) is stopped and should not be done by the client code

Peripheral should release all resources in case a subsequent start() is called.

### build\_state\_machine \[#buildstatemachine]

```cpp showLineNumbers={false}
void hololink::emulation::sensors::Vb1940Emulator::build_state_machine()
```

Build the internal state machine for the `Vb1940Emulator`.

### system\_up\_reg \[#systemupreg]

```cpp showLineNumbers={false}
I2CStatus hololink::emulation::sensors::Vb1940Emulator::system_up_reg(
    const uint8_t *write_bytes,
    uint16_t write_size,
    uint8_t *read_bytes,
    uint16_t read_size
)
```

state machine callback for writes to the system up register

### boot\_reg \[#bootreg]

```cpp showLineNumbers={false}
I2CStatus hololink::emulation::sensors::Vb1940Emulator::boot_reg(
    const uint8_t *write_bytes,
    uint16_t write_size,
    uint8_t *read_bytes,
    uint16_t read_size
)
```

state machine callback for writes to the boot register

### sw\_stby\_reg \[#swstbyreg]

```cpp showLineNumbers={false}
I2CStatus hololink::emulation::sensors::Vb1940Emulator::sw_stby_reg(
    const uint8_t *write_bytes,
    uint16_t write_size,
    uint8_t *read_bytes,
    uint16_t read_size
)
```

state machine callback for writes to the software standby register

### streaming\_reg \[#streamingreg]

```cpp showLineNumbers={false}
I2CStatus hololink::emulation::sensors::Vb1940Emulator::streaming_reg(
    const uint8_t *write_bytes,
    uint16_t write_size,
    uint8_t *read_bytes,
    uint16_t read_size
)
```

state machine callback for writes to the streaming register

### get\_callback \[#getcallback]

```cpp showLineNumbers={false}
Vb1940Emulator::i2c_callback_type hololink::emulation::sensors::Vb1940Emulator::get_callback(
    uint16_t reg_addr
)
```

***

## Types

### Typedefs

| Name                | Definition                    | Description                                                                  |
| ------------------- | ----------------------------- | ---------------------------------------------------------------------------- |
| `i2c_callback_type` | `I2CStatus(Vb1940Emulator::*` | The map of register addresses to their corresponding state machine callback. |

***

## Member variables

| Name                                   | Type                | Description                                                                                                       |
| -------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `EEPROM_REGION_BYTES` static constexpr | `size_t`            | Size (bytes) of the rig calibration EEPROM region that NativeVb1940Sensor reads over I²C at EEPROM\_I2C\_ADDRESS. |
| `VB1940_CALLBACK_MAP` static constexpr | `i2c_callback_type` |                                                                                                                   |
| `memory_`                              | `uint8_t`           | The memory map of the `Vb1940Emulator`.                                                                           |
| `eeprom_memory_`                       | `uint8_t`           | Backing store for the rig calibration EEPROM at I²C peripheral 0x51.                                              |