Work In Progress: 02-Feb-2017
Versioning is to address the compatibility issue whereas multiple devices on the network with different specification versions. The scope covers from Framework level to application level. The purpose for payload versioning support is to make sure that client and server can understand each others payload, especially in the case that client and server are based on different version of code base.
The next step is to support Device level versioning so that OCF devices can be aware of each others version.
It is also note that OCF version and IoTivity version are different. We will address IoTivity version in a separate thread.
The versioning feature is introduced from OCF 1.0.0. While testing, please check the #defines of OC_SPEC_VERSION and OC_SPEC_VERSION_VALUE in <IOTIVITY_DIR>/resource/csdk/include/octypes.h
OC_SPEC_VERSION needs to be OCF version 1.xx and OC_SPEC_VERSION_VALUE is the corresponding integer value of OC_SPEC_VERSION. For example, for OCF version 1.0.0, we may have
#define OC_SPEC_VERSION "OCF.1.0.0" #define OC_SPEC_VERSION_VALUE 2048
For scenario that OCF 1.x client connects to OIC 1.1 server, client needs to be built on top of OCF 1.x code base and server built on OIC 1.1 code base. The following example code has given examples on tests of this scenario.