SAP

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

Robert Waywell R Robert Waywell August 21, 2026
Created on April 17, 2018
Contributors

More from Robert Waywell

See all 21 tutorials by Robert Waywell →

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
Next