Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?



This Tool has various functions to work with OCF swagger type definitions. The base function of DeviceBuilder is to:

  • create a single Swagger2.0 file from OCF swagger type definitions (IoTDataModels, Core,...) The single Swagger definition file of a full device (application level resources) can be used for:
    • code generation (as input of swagger2x)
    • generation of the introspection file.

This tool is part of the tool chain.

Table of Contents


Installation of DeviceBuilder is making a clone of the repository and use the tool relative of where the repository is located on your system. To install the dependencies:

run pip3 install -U -r requirements.txt to install the dependencies.

The full installation of all tools and repos can be achieved via setup.



Typical flow to create an OCF device using DeviceBuilder is:

Tool Chain

The tool chain script implements the following tool chain to generate code: ToolChain

The generated code depends on the available code generation templates in swagger2x.

Available scripts

Currently available DeviceBuilder script:

    • C code generation for the IoTivity stack in C.
    • see for details here
      • usage : see here for examples of the DeviceBuilder input format and command line options.
  • Note: there are more scripts but those will not use IoTivity as stack.

The DeviceBuilder script installs the following components:

Manual steps

Manual steps to build the generated code:

  • Download IoTivity
  • Edit build files in IoTivity
    • see additional instructions that are supplied with generated with the code.
  • Build
    • Instructions vary according the used platform
      • See read me file with the generated code
  • Test against CTT (see additional instructions that are supplied with the generated code)

Individual python tools

The usage of the individual python scripts in this repo can be found here