Introduction:
E870-EG01 is a visually programmable edge computing gateway independently developed by Chengdu Ebyte Electronic Technology Co., Ltd. The previous article mentioned that the two featured nodes supported by the device are serial port node and LED node. This time we will continue to introduce other featured nodes.
Featured node introduction
1. Logical conversion node:
The function of this node is very easy to understand. It can output true or false according to the rules set by the user in advance.
As shown in the figure below, we use an injection node, a logical conversion node and a debug node. After connecting them, switch the mode of the logical conversion node to output True. In this case, no matter what message the injection node outputs, it will only output true after passing through the logical conversion node. Similarly, if the mode of the node is changed to output False, you will only output False. These two modes are easy to understand, so the third flip mode needs to be discussed separately.
When the node is in flip mode, if true is received, it will be converted to false, and vice versa. Note! If the message received by the node is not true or false but other data, the node will report an error. As shown in the figure below.
Node error:
Handle data correctly:
2. Cache Queue Node
This node will confirm the input message type according to the attributes of the input message, store the valid data in the message queue, and perform the corresponding operation on the message with attributes. So how do I get the corresponding message attributes and use them? Just drag the node into the canvas, then click on the node, and the introduction information of the node will appear on the right. Click the link below (click for details). The user will automatically jump to the help page of all supported nodes of E870-EG01. At this time, you only need to find the cache queue node, and then check the message in the input column, and the user can get the message attributes. If the user still doesn't understand how to use it at this time, look down to find the example column, copy the code in it, and import it into your own nodered. The final import is as shown below.
Let's introduce them one by one. According to the figure, the first injection node contains a simple timestamp, and its purpose is just to output a data (the data will be stored in the cache queue node and will not be directly output). The second immediate output is to output the data in the cache queue immediately in order. The message attribute used for this function is trigger. The third injection node contains the reset attribute, which is used to directly clear all the data stored in the cache queue node. The fourth injection node is used to temporarily save the payload data in the node in the cache queue. If the user does not output the data within the set time, the saved data will be directly cleared after the timeout. The message attribute of this node is ttl, which needs to be used with payload. The function of the fifth injection node is to output the specific number of messages in the current cache queue, and the message attribute used is queueCount. The function of the sixth injection node is to change the mode of the cache queue node to transparent transmission. In transparent transmission mode, the node will not store data, so the data passing through the node will be directly output. The message attribute used is bypass, and the content needs to be true. The function of the seventh injection node is to turn off the transparent transmission mode. If the user does not need the transparent transmission mode, it can be turned off through this function. The message attribute used is also bypass, and the content is false. The function of the eighth injection node is to turn on delayed transparent transmission. The specific function is to make each segment of data output according to the characteristic time according to the configured time, which can be understood as delayed output. The message attribute used is bypassInterval, and its content is the delay time configured by the user, such as 1000ms, 2000ms.
Ending:
With the advancement of time, the functions of the device are being gradually improved and enhanced. The two featured nodes introduced in this article are only part of the device, but they are enough to show the investment of the R&D personnel. In the future, we will introduce more, more interesting and more versatile nodes. For E870-EG01, everything is just the beginning!