SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Code Custom C/C++ Adapter for Freezer Monitoring Lite

## Prerequisites

Overview

🎓 intermediate 30 min. SAP HANA Streaming AnalyticsIntermediateInternet Of ThingsSAP HANAExpress Edition
Robert Waywell R Robert Waywell January 15, 2025
Created by March 20, 2018
Contributors

Prerequisites

Steps

Next Steps

Intro

The full source for custom_c_adapter.cpp is available in the Appendix section of this tutorial.


Step 1 Create File
โ€”

Remember how we created a Makefile in the root directory (/home/pi) in the previous tutorial Introduction to Custom C/C++ Adapters for Freezer Monitoring Lite. Now inside of the same folder, create another new blank file called "custom_c_adapter.cpp".

Save the file, and close the window. (You may need to type something and then delete it in order to save the blank file).

Reopen it using a C/C++ editor from your own computer. To do this, right click the file, go to Edit With > Edit With..., and point to the location of the editor executable on your local machine. We will be using Notepad++.

Create CPP Adapter File
Create CPP Adapter File

Step 2 Include Statements
+
Step 3 Declare Global Variables
+
Step 4 `print_error_and_exit` function
+
Step 5 `exec` function
+
Step 6 `main` function
+
Step 7 Appendix
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 7
1. Create File 2. Include Statements 3. Declare Global Variables 4. `print_error_and_exit` function 5. `exec` function 6. `main` function 7. Appendix

Learn more →