-
Create your application:
-
Enter the name and description of your app.
-
Define the service name and select "Databus" from the drop-down menu.
-
-
Generate the source code and download the .zip file.
-
Go to "Test your Application" in the navigation.
- Start the Databus and Flow Creator services.
- Open the Flow Creator UI.
- Create the following flow to receive the timestamp.
-
Start services for app - Go to test workflow and start Databus service and Flow Creator Edge App. Go to Flow Creator and create the flow to receive timestamp.
-
Add the following nodes as shown:
- Inject (for the timestamp)
- MQTT in
- MQTT out
- Function
- Debug
-
Configure the timestamp as shown.
-
Configure the function as shown.
-
Edit the MQTT broker node as shown.
-
Provide the following credentials:
Username - edge Password - edge
-
-
Deploy the flow.
The timestamp is shown in the debug pane.
-
Add the business logic to your app for generating triangular wave using timestamp data received from Databus and Flow Creator.
Source code
You can find the source code for this example here.
-
Once the code is ready: To build the image, run the command
make servicename_build
-
Start the Dockerfile to check if the application is running on the desired port.