Heya, Folks,
It's been a while since our last dispatch, so it's only fitting that we return to actively working on the Blog with a post called "A Simple Serial Dispatcher." Apologies for being silent for so long—we've been super busy cooking up a massive update to the AppBlocks platform. This is a scope-changing thing for the entire project, so stay tuned for further announcements. As for now, let's talk about that "dispatcher."
So, a customer of ours in the marine navigation business recently received an online presentation on the merits of AppBlocks. After the presentation, he asked us if it was possible to create an "RS232 message dispatcher." The operation would be simple:
- Four RS232 ports.
- Traffic consists of encapsulated messages (that is, there is a start and an end character for each data packet).
- It must be possible to define where to route incoming messages for each port.
As an example of the last point, imagine a system that routes:
- Incoming packets of port 1 to ports 2 and 4 (blue arrows on the diagram below)
- Incoming packets of port 2 to port 3 (green arrows)
- Incoming packets of port 3 to port 1 (purple arrows)
- Incoming packets of port 4 to port 1 as well (orange arrows)

Nothing too complex, right?... Yet, if you attempt to code this the old-fashioned way, you will spend some time! With Appblocks, it is just a matter of defining a few settings and creating a simple flow diagram (1/4 of the project shown):

Not only is this diagram simple, but it's also intuitively clear to anyone after a cursory look! The cherry on top: With a few clicks, AppBlocks automatically generates a very nice web interface for editing the settings, saving you even more tedious work!
Click here to try this project.