Introduction
This article demonstrates a multi-serial port terminal with a plug-in architecture to allow different views.
Background
This started off as an internal project by myself for our company Pi Logic. I thought that it might be useful to others who do serial port development.
Using the Code
The source zip file contains one Visual Studio 2005 solution with three projects.
Terminal3
This is the actual program, it is very simplistic because most of the important stuff happens in the support libraries.
Terminal3.Core
This implements the core functionality of the terminal program. This was separated out into a DLL so that the plugins can reference this one without having the program's code cluttering up things.
Terminal3.GraphWindow
This is a simple implementation of a plug-in viewer, it derives from PortWindow
which has some basic controls to support adding ports, etc. and parses data (with no error handling) to plot a graph of the values.
To see this in action, send it two double values in the range 0-10 separated by a comma and it will plot the value as it receives it.
Points of Interest
One driver which I have found invaluable in this project and in others is com0com which is a null-modem emulator. Basically it creates two virtual COM ports and maps the input and output of each one to the output and input of the other respectively, resulting in a software COM port for testing stuff.
Docking has been accomplished through Weifen Luo's Dock Panel Suite.
The GraphWindow
demo was accomplished using ZedGraph.
The file associations are managed by Bredan Grant's System File Association classes, with the namespace changed for ease of use.
Summary
Sorry the article is so short. Hopefully when I get some time, I shall update it to include more code snippets and more detailed explanations of how things operate.
Please let me know of any bugs as this was written overnight from an existing code-base (Terminal 2 by coincidence) so I haven't fully tested it.
History
- 7th June, 2007 - v1 - Uploaded the initial project
- 7th June, 2007 - v2 - Updated project to include "Restore File Associations..." menu item
Ed is a student who due to a form of cancer (now clear) took a year out before going to Imperial College, London to study Electronic Engineering.
His interests include shooting (clay-pigeon (shotgun), air-rifle and rifle), playing with his three labradors (Sandy, Rosie and Tundra), programming (most experienced in C# and C, although those are not the only ones), walking (has completed Gold Duke of Edinburgh's Award), playing games and reading.
He lives in two places on a 57 acre farm in West Waleswith the rest of the family during the holidays; and Greater London during term time.
Languages and Technologies: C#, C, VB6, VB.NET, XAML, (X)HTML, CSS, XSLT, Assembler (PIC), ASP.NET, WPF, Windows.Forms, ASP, VBScript, JavaScript, Pascal / Delphi, XML
Current Stuff:
1st Year MEng Electronics Engineering (Imperial College, London)