Skip to content

An SDF toolkit for connected-device models

Put device models
to work.

Explore interfaces, catch mistakes, spot breaking changes and turn model constraints into useful tests.

Esdieff is a command-line toolkit and Rust library for connected-device models written in Semantic Definition Format, or SDF. Use it with models you create, receive from a partner or find in a public collection.

Start with the supplied thermostat example / No physical device needed

Four generated values on the thermostat's target-temperature range The rule allows 5 to 30 degrees Celsius in half-degree steps. 5 and 30 are accepted at the boundaries. 31 is rejected above the maximum. 5.25 is rejected because it falls between the half-degree steps. targetTemperature number · 5 to 30 °C · steps of 0.5 51015202530 5 accepted 30 accepted 31 above max 5 5.5 5.25 not a half-degree step
One rule from the supplied thermostat model, four generated values.Static result

See it in action

One model rule.
Four test values.

A device model describes readings, settings, commands and events. Esdieff works with any SDF model; the supplied thermostat is just the example that ships with it. Here is one of its rules, and what Esdieff makes of it.

This thermostat model accepts a target temperature from 5 to 30 °C in half-degree steps. The rule, as written in thermostat.sdf.json:

thermostat.sdf.json JSON
1"targetTemperature": {2  "description": "Requested room temperature in half-degree increments",3  "type": "number",4  "nullable": false,5  "minimum": 5,6  "maximum": 30,7  "multipleOf": 0.5,8  "unit": "Cel",9  "readable": true,10  "writable": true11}

Generate values from its rules with Esdieff:

Terminal
$ esdieff generate --document thermostat.sdf.json thermostat.sdf.jsonGenerated values esdieff.generation/1: passedValues: 15 admitted, 60 rejected, 0 undeterminedDescriptions: 4

Here are four of the generated target-temperature values:

Generated valueResultWhy
5 °CAcceptedAt the lower boundary
30 °CAcceptedAt the upper boundary
31 °CRejectedAbove the maximum
5.25 °CRejectedOutside the half-degree steps

Bring values like these into your firmware or application tests.

Try this example

What you can do

Get more from the models
you work with.

01 / INTEGRATE

Understand an interface before you integrate it

Explore a supplier's properties, actions, events and allowed values. See how shared definitions fit together, find model mistakes and follow findings back to their source. Start your integration with a clearer picture of the interface.

02 / COMPOSE

Build on definitions you already have

Reuse existing capabilities, compose new device descriptions and make repeatable edits. Keep the links to shared definitions as your model collection grows.

03 / REVIEW

See what a change means for your apps

Compare model revisions before updating an integration. Spot breaking changes and see where an edit to a shared definition reaches the models that use it. Give your team something concrete to review.

04 / TEST

Bring the model into your tests

Generate boundary values and invalid inputs, check individual samples and find recorded values that do not fit the model. Reuse those checks as your firmware, application and interface evolve.

Built for your workflow

Fits the way
you work.

Use Esdieff from the terminal, save repeatable checks or build on its Rust library. Keep model work close to the code, tests and reviews that depend on it.

Explore the Rust library

Built for SDF models based on IETF RFC 9880.

  • Repeat useful checks

    Save model, sample and revision checks to run again as your collection changes.

  • Bring results into your workflow

    Use JSON reports for automation, SARIF for compatible code-review tools and Markdown comparisons for change notes.

  • Create your own tools

    Embed inspection, checking, generation and revision comparison in a Rust application.

Install it.
Try a model.

Start with the thermostat example or bring a model you already work with. Explore the interface, check its definitions and generate your first test values.