- 0. Introduction
- 1. Highlights
- 2. Categories
- 3. Advanced users
- 4. Forms
- 5. Input fields
- 6. Groovy code
- 7. Starting point
Altair SmartCore SDK (Software Development Kit) allows users to execute arbitrary code for listeners and rules, and it is developed with Groovy technology a “dynamic language for the Java Virtual Machine that builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby or Smalltalk”.
Where to use Altair SmartCore bussines engine?
- listener’s expressions
- rule scripts
- Altair SmartCore test console
Smart behaviour and business logic is performed through expressions and rules coded in listeners.
FLOW tool is a simple way to generate Groovy code for users without experience.
However, if you are an advanced user and you like to program, do not be discouraged, we have created a special node designed for you, so you'll be able to write your own code in the traditional way.
- Flow tool
KEEP READING ;-) to receive some "tips" to take into account to build business logic easily and quickly.
Grouped into 4 categories of nodes to facilitate their location
If you are an advanced user, we have a special node for you
A section "Node Help" in each node with the all the necessary details
Custom input fields to help you
We have divided the nodes into 4 categories to facilitate their location, in addition, you have a search engine to help you in filtering.
In this category you will find all the nodes needed to work with Altair SmartCore entities, from creating a project to searching for a device.
Do you need to give logic to your business rule?, Here you will find everything you need, selective sentences, loops, casting, ...
A section created specifically for the streams management, especially useful to locate a data or to resend a stream.
Specially created nodes to further facilitate integration with external systems. Do you want to make an HTTP request? Send an alert SMS? here you will find the tools for it.
If you love to program and you just need a place to create your code, your favourite node will be the "function node". You can create all your code in a single node or combine it with other nodes if you wish.
- Node function
Just drag the node to the workspace, double click on it, give it a nice name in the "Label" field and write your code in the "Payload" field. In addition, you can maximize this field by clicking on the expand icon and enjoy the syntax highlighting.
- Custom code
Each node has a form with different fields that you must complete according to your needs. You always find a section "Node Help" with important information, do not forget to check it to know the details of that node.
- Node Form - Node Help
In the forms you will find different types of input fields, for what should I use each of them?
To type whatever you want
You will only need to select a proposed value
Typed input fields
Are special types that offer different options to suit your needs:
String, number or boolean
The simplest case, select any of them if in this field you want to add a text, a number or a boolean.
If you need to refer to a field that you will send in a data stream, this is your selection, just select it and include the key used in the request's payload
Last payload data
One more step of the previous case. This option will show you the available keys in the last data stream sent, very useful if you have already sent a test stream.
Along with the information sent, Altair SmartCore stores some metadata that may be useful in some business logics. Some of the metadata that you can find here are "X-real-Ip", "User-Agent", "device", ....
Have you stored something in some variable in your flow and it's time to use it? With this option you can recover its content and use it in this field.
- Typed input fields
What code has my flow generated?
This is not a secret, so you can always see the code generated by your listener or rule, for that you just have to press the button "Generated Source Code".
- Generated code
Working with real examples is always a good starting point, so here you can find a set of tutorials to use as a base.
Create your first listener
How to create a simple listener to control a smart door.
Arduino Alert System
How to connect an Arduino to Altair SmartCore and build an Alert System.
Arduino Yun Alert System
How to connect an Arduino Yun to Altair SmartCore and build an Alert System.
Raspberry Pi Alert System
How to connect a Raspberry Pi to Altair SmartCore and build an Alert System.
BeagleBone Alert System
How to connect a BeagleBone to Altair SmartCore and build an Alert System.
Cerbuino Alert System
How to connect a Fez Cerbuino Bee to Altair SmartCore and build an Alert System.
Electric Imp Alert System
How to connect a Electric Imp to Altair SmartCore and build an Alert System.