swagger2x

Template: IoTivity OCF server

Introduction

The template generates application level code for the IoTivity stack. The generated code acts as a OCF Server acting as a simulator. e.g. the server does not have code to interact with the sensors/actuators. However the generated code stores the send information and returns the data on request. The generated code is a good start to hook up all the hardware that that the product will contain.

Table of Contents

Generic concept

The code that can be generated takes into account the following layering.

LiteStack

The generated code is using global variable to store the induced changes by a Client. The functions and global variable have a naming convention that allows that multiple resources of the same resource type can co-exist.

What is generated

IoTivity

IoTivity already has a set of build-in resources. These resources are not generated by the code, the generated code are configuring the build-in resources. The build-in resources are:

Introspection Device Data (IDD)

The IDD is generated, and can be imported in the code via:

The default setup is reading the IDD file from disk. The reading of the file (by means of std c library) is done from the generated code.

The header file option is available. The header file is at <installation folder>/include/server_introspection.dat.h

Onboarding on the secure domain

The following mechanisms are supported:

What is missing

The following constructs/mechanisms are not supported:

Build instructions

code repo

The code repo of IoTivity is available here

See also the folder iotivity-lite/port/<port> for more build instructions.

Windows

Note: to reduce the amount of debug information, remove OC_DEBUG from the compile flags in the property menu. please do this for the library.

CTT instructions