> This page is for version 3.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 3.0 (Latest) (default): https://docs.nvidia.com/holoscan/sensor-bridge/3-0/llms.txt
> - 2.7: https://docs.nvidia.com/holoscan/sensor-bridge/2-7/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sensor-bridge/archives/llms.txt

> 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::module::VsyncInterfaceV1

> Controls the VSYNC trigger that starts frames on a board's cameras.

Controls the VSYNC trigger that starts frames on a board's cameras.

VSYNC is a timing pulse train sent to the cameras' frame-start (external trigger) inputs, so that the cameras begin their frames together. Something has to generate those pulses; this interface is what a camera driver, or an application, needs in order to use whichever source is installed. [PtpPpsOutputInterfaceV1](ptpppsoutputinterfacev1) is the source currently provided, and the same object is available through both interfaces.

This interface does not configure the source: choosing the pulse rate and making the source ready (so that is_enabled() is true) is done through the source's own interface. Here, a camera driver checks is_enabled() to decide whether to put its sensor in external-trigger mode, and the application calls start() once the cameras are ready and stop() when done.

```cpp showLineNumbers={false}
#include <hololink/module/vsync.hpp>
```

**Inherits from:** `hololink::module::Service< VsyncInterfaceV1 >` (public)

---

## Methods

### is_enabled \[#isenabled]

```cpp showLineNumbers={false}
virtual bool hololink::module::VsyncInterfaceV1::is_enabled() const
```

Whether the source has been configured to produce pulses.

Camera drivers consult this while configuring, to decide whether to put their sensor in external-trigger mode. start() and stop() are only meaningful while this is `true`.

**Returns:** `true` if the source is configured; `false` otherwise.

### start \[#start]

```cpp showLineNumbers={false}
virtual hololink_module_status_t hololink::module::VsyncInterfaceV1::start()
```

Begin generating trigger pulses.

The application normally calls this once, after every camera has been put into external-trigger mode and is waiting, so that the first pulse reaches all of them at the same time. Calling it while pulses are already being generated has no effect. If the source is not enabled (see is_enabled()), no pulses are generated.

**Returns:** HOLOLINK_MODULE_OK on success, or an error status.

### stop \[#stop]

```cpp showLineNumbers={false}
virtual hololink_module_status_t hololink::module::VsyncInterfaceV1::stop()
```

Stop generating trigger pulses.

The source remains configured, so start() can resume the pulses. Calling it when no pulses are being generated has no effect.

**Returns:** HOLOLINK_MODULE_OK on success, or an error status.

### module \[#module]

```cpp showLineNumbers={false}
std::shared_ptr<Module> hololink::module::ServiceBase::module() const
```

The [Module](module) that this service was published from.

The service holds no strong reference to its [Module](module), so this does not extend the [Module](module)'s lifetime.

**Returns:** The owning [Module](module), or an empty pointer if the service has not been published or its [Module](module) no longer exists.

---

## Static methods

### get_service \[#getservice]

```cpp showLineNumbers={false}
static std::shared_ptr<VsyncInterfaceV1> hololink::module::Service<VsyncInterfaceV1>::get_service(
    std::shared_ptr<Module> module,
    const char *instance_id,
    bool allow_null = false
)
```

Type-safe way to fetch a std::shared_ptr to an instance of \<Derived> from a [Module](module).

Note that [Module](module) usually caches instances, it's likely that calls to get_service with the same locator_id will return pointers to the same implementation object.

**Returns:** A shared pointer to the service instance.

**Parameters**

**`module`** `std::shared_ptr<Module>`

Is the shared object that owns the instance we wish to fetch

---

**`instance_id`** `const char *`

Names the specific object, usually expressed as a set of "name=value;..." pairs, as defined by the implementations themselves. This name is normally fetched by calling `Derived::locator_id(enumeration_metadata)`.

---

**`allow_null`** `bool` — default: false

The default value of `false` causes this routine to throw a std::runtime_error if the service cannot be found within the module; this would be expected to terminate the calling program. If the application wants to handle the error, pass in `true` here and get_service will return `nullptr` when this module doesn't provide the requested service.

---

### for_each_type_id \[#foreachtypeid]

```cpp showLineNumbers={false}
static bool hololink::module::Service<VsyncInterfaceV1>::for_each_type_id(
    Callback &&cb
)
```

Iterate over every type_id supported by this instance.

The callback signature is `bool(const char*)` — returning false halts the walk; true continues. Iteration is depth-first, so you'll see the most specific implementation types first.