A library created by Yingzhe and Luis from University Relation, Software AG
This library enables you to obtain the real-time data, alarm and events from the Cumulocity IoT platform to your edge device.
Prerequisite
- WiFi liraries, e.g., WiFiNINA, WiFi101.
void subscriptionDelete(char* user, char* password,char* URL, char* context,char* source);
char* user
user name for your tenant loggingchar* URL
The URL where your tenant is. The format should be: MyTenant.cumulocity.comchar* password
The password of your tenantchar* context
The context within which the subscription should cover. It can be either "mo" or "tenant".char* source
ID device of the source when the context is "mo".
void subscriptionCreate(char* user, char* password, char* URL, char* device_ID,char* context ,char* SubName, char* API,char* typeFilter, char* fragmentsToCopy);
char* user
user name for your tenant loggingchar* password
The password of your tenantchar* URL
The URL where your tenant is. The format should be: MyTenant.cumulocity.comchar* device_ID
ID device of the source when the context is "mo".char* context
The context within which the subscription should cover. It can be either "mo" or "tenant".char* Subname
The name of the subscriptionchar* API
The apis you want to subscribe to. It could be "alarms", "events", "managedobjects", "measurements", "operations" or "*" which means wildcard.char* typeFilter
The data needs to have the specified value in its type property to meet the filter criteria.char* fragmentsToCopy
Transforms the data to only include specified custom fragments. Each custom fragment is identified by a unique name. If nothing is specified here, the data is forwarded as-is.
void tokenCreate(char* URL, char* Subname, char* Suber, int expiretime);
char* URL
The URL where your tenant is. The format should be: MyTenant.cumulocity.comchar* Subname
The name of the subscriptionchar* Suber
The subscriber which subscribes to the subscriptionint expiretime
The time for expiration in minutes.
void tokenCreatePassword(char* user, char* password, char* URL, char* Subname, char* Suber, int expiretime);
char* user
user name for your tenant loggingchar* password
The password of your tenantchar* URL
The URL where your tenant is. The format should be: MyTenant.cumulocity.comchar* Subname
The name of the subscriptionchar* Suber
The subscriber which subscribes to the subscriptionint expiretime
The time for expiration in minutes.
void connectWSS(char* URL,char* Suber);
char* URL
The URL where your tenant is. The format should be: MyTenant.cumulocity.comchar* Suber
The subscriber which subscribes to the subscription
These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.