barco-pulse-rs 0.1.6

Rust client for Barco Pulse projector JSON-RPC API
Documentation

barco-pulse-rs

A Rust client library for communicating with Barco Pulse projectors via the official JSON-RPC API.

This crate provides fully autogenerated async bindings for both:

  • properties
  • methods

The API bindings are generated at build time from a distilled specification extracted from the Barco reference guide.

This keeps the crate lightweight, maintainable, and easy to update when new projector firmware versions are released.


Features

  • Fully autogenerated API bindings
  • Async API using tokio
  • JSON-RPC over persistent TCP sessions
  • Generated property getters and setters
  • Generated method calls
  • Generated directly from distilled spec files
  • Suitable for simulation and Pulse projector families
  • Minimal runtime overhead
  • crates.io friendly, zero codegen step required for end users
  • Session-based authentication support

How it works

The crate ships with a distilled JSON specification for:

  • properties
  • methods

During build:

distilled spec
    ↓
build.rs generator
    ↓
generated Rust bindings
    ↓
ready-to-use async API

This means users of the crate do not need to run generators themselves.


Transport layer

Unlike traditional JSON-RPC-over-HTTP implementations, Barco Pulse projectors use a persistent TCP JSON-RPC session.

This crate therefore communicates directly over:

TCP/IP

typically on:

<Projector IP>:9090

using a reusable PulseSession.

This is required for authenticated operations because projector permissions are tied to the active TCP session.


Example

Create session

use barco_pulse_rs::property_api::PulseSession;

let mut session = PulseSession::connect(
    "192.168.1.10:9090"
).await?;

Login

use barco_pulse_rs::method_api;

let res = method_api::set_login_basic(
    &mut session,
    "password".to_string(),
    false,
    "admin".to_string()
).await?;

Read property

use barco_pulse_rs::property_api;

let res = property_api::get_backup_auto_state(
    &mut session
).await?;

Write property

use barco_pulse_rs::property_api;

let res = property_api::set_dmx_mode(
    &mut session,
    "ArtNet".to_string()
).await?;

Call method

use barco_pulse_rs::method_api;

let res = method_api::set_logout(
    &mut session
).await?;

Power control example

use barco_pulse_rs::method_api;

method_api::set_system_poweron(
    &mut session
).await?;

API structure

The generated API is split into two modules:

property_api

Contains autogenerated property calls:

get_<property>()
set_<property>()

Examples:

get_firmware_availablepackages(...)
set_dmx_mode(...)

method_api

Contains autogenerated method calls:

set_<method>()

Examples:

set_login(...)
set_logout(...)
set_environment_getcontrolblocks(...)

Session model

All autogenerated API calls accept:

&mut PulseSession

instead of a raw address string.

This allows:

  • persistent authenticated sessions
  • projector permission reuse
  • lower connection overhead
  • proper compatibility with Pulse authentication behavior

About enums and special values

Some Barco methods and properties accept a predefined set of values.

To keep the generated API lightweight and flexible, these values are currently represented as:

String

This means callers pass projector-compatible string values directly.

Example:

set_dmx_mode(&mut session, "ArtNet".to_string())

This avoids regeneration issues when firmware-specific enum values change.


Supported projectors

This crate targets Barco Pulse-based projector families, including:

  • I600
  • F70 / FS70
  • simulation projectors
  • other Pulse-compatible models

Compatibility depends on firmware support.


Generated source

The API surface is generated from the distilled specification during build time.

This allows future firmware updates to be integrated by updating only the distilled spec.


Disclaimer

This project is not affiliated with or endorsed by Barco.

All API definitions are derived from publicly available projector API documentation.


License

MPL-2.0