This C++ Client Library can be used to simplify interactions with the IBM Watson IoT Platform. Supported platforms are OSX and Linux.
Feature | Supported? | Description |
---|---|---|
Device connectivity | ✔ | Connect your device(s) to Watson IoT Platform with ease using this library. Click here for detailed information on how devices can publish events and handle commands. |
Gateway connectivity | ✔ | Connect your gateway(s) to Watson IoT Platform with ease using this library. Click here for detailed information on how gateways can publish events and handle commands for itself and for the attached devices. |
Device Management | ✔ | Connects your device/gateway as managed device/gateway to Watson IoT Platform. Click here for more information on how to perform device management operations like firmware update, reboot, location update and diagnostics update for a device. |
Event/Command publish using MQTT | ✔ | Enables device/gateway/application to publish messages using MQTT. Refer to Device and Gateway section for more information. |
SSL/TLS support | ✔ | Enables Device/Gateway Client to connect to Watson IoT Platform securely using SSL/TLS feature. |
Client side Certificate based authentication | ✘ | Support to be added in the near future |
Device Management Extension(DME) | ✘ | Support to be added in the near future |
Auto reconnect | ✘ | Support to be added in the near future |
Run the setup.sh file in the iot-cpp directory. This script installs the required dependencies and copies the dependencies into the lib directory after making necessary changes.
Note: If the dependencies were not able to be installed with the script on the device, manually pull the dependencies from the links mentioned in setup.sh and follow the steps for making the necessary changes.
- Install CMake and CppTest
- git clone https://github.com/ibm-watson-iot/iot-cpp.git
- cd iot-cpp
- sh setup.sh
- mkdir build ; cd build
- cmake ..
- make
All the output files will be created under the build directory.
- cp iot-cpp/src/log4cpp.properties iot-cpp/build
- Update device.cfg and gateway.cfg properties files present in iot-cpp/samples
- cd iot-cpp/build
- Execute Device Sample: ./samples/sampleDevice
- Execute Gateway Sample: ./samples/sampleGateway
- The Devices section contains information on how Device Client connect, publish events and handle commands using the C++ ibmiotf Client Library.
- The Gateway section contains information on how Gateway Client connect, publish events and handle commands for itself and for the attached devices using the C++ ibmiotf Client Library.
The library is shipped with Eclipse Public License. For more information about the public licensing, see the License file.