by admin

Delphi Xe5 Serial Communication Protocols

Delphi Xe5 Serial Communication Protocols. Download - Update. Star - Update. Download the. Free trial version below to get started. Double- click the downloaded file. Star is compatible with Windows platforms. Star has been tested to meet all of the technical requirements to be. Feature overview. TMS Async is a communications package containing components which provide access to the serial ports under Windows. The event-driven architecture provides the highest possible performance and allows all the tools to run in the background. WinSoft Communication Protocol Suite for.NET v3.0. Discover ideas about Communication. WinSoft Communication Protocol Suite for.NET Communication protocols 3964 and for.NET 2 - source code included in registered version royalty free distri. Communication Coding Free. More information.

* Click on the product name to see complete details.

Delphi Xe5 Serial Communication Protocols Free

Product NameDescription
Absolute DatabaseComponentAce Limited
Russian Federation
Absolute Database - Delphi database system. No BDE, no DLLs, SQL, strong encryption, BLOBs compression, single-file database, high-speed, embedded database. This BDE alternative is free for personal use.
Add-in Express™ for Office and VCLAdd-in Express Ltd.
Belarus
Perfect platform for developing robust, compact and fast Microsoft Office extensions, such as COM add-ins, smart tags, real-time data servers and Excel UDFs in Delphi 5 - XE4.
ApolloVista Software
United States
Apollo is a high-performance BDE replacement for managing Clipper and FoxPro database files in Delphi and C++Builder. 100% TDataSet compatible, Apollo components are fully integrated into the VCL.
BS1 AccountingDavis Software
Canada
Delphi source code for accounting: Accounts Payable, Accounts Receivable, General Ledger, Inventory, and Sales Analysis.
BS1 Enterprise AccountingDavis Software
Canada
Delphi source code for ERP accounting and distribution: Accounts Payable, Accounts Receivable, General Ledger, Inventory, Purchase Orders, Sales Orders and Quotes, and Sales Analysis.
BS1 Enterprise Accounting ManufacturingDavis Software
Canada
Delphi source code for accounting, distribution, and manufacturing ERP/MRP: Accounts Payable, Accounts Receivable, General Ledger, Inventory, Purchase Orders, Sales Orders and Quotes, Manufacturing, and Sales Analysis.
BS1 General LedgerDavis Software
Canada
BS1 General Ledger tracks budget and actual financial data to produce financial statements such as an Income Statement and Balance Sheet, the Trial Balance report, and General Ledger (detail) report.
Delphi source code is available for several database
BS1 Professional Time BillingDavis Software
Canada
Delphi source code for time billing and accounting: Accounts Payable, Accounts Receivable, General Ledger, Inventory, Time Billing, and Sales Analysis.
CadoDrawLTS Software Tools & Solutions
Germany
With CadoDraw you can develop drawing apps where the user can build, display, store, load and print object structures.
Chant Developer WorkbenchChant Inc.
United States
Develop Software that Speaks and Listens
CnPack IDE WizardsCnPack
China
CnPack IDE Wizards, with the short name CnWizards, is a free plug-in tools set used in Delphi/C++Builder/BDS/RAD Studio to improve development efficiency.
CodeJak® Debugging SuiteiBiSS Software Solutions GmbH
Germany
The universal debugging and logging engine for software developers
CodeSiteRaize Software, Inc.
United States
The CodeSite Logging System enables developers to locate problems more quickly and ensure their application is running correctly. CodeSite's loggging classes allow capturing (locally/remotely) all kinds of information to a live display or a log file.
CompressionMaster SuiteComponentAce Limited
Russian Federation
CompressionMaster is the most advanced data compression library for Delphi and C++ Builder.
The Suite includes the following independent products:
Easy Compression Library, FlexCompress and ZipForge.
DAC for MySQLMicroOLAP Technologies Ltd
Russian Federation
DAC for MySQL (also known as MySQLDAC) is the most powerful component suite for Delphi/C++Builder/ MySQL. It allows you to create Delphi/BCB applications with direct access to MySQL DB without BDE/ODBC. Any MySQL library is not required.
DD Service Application FrameworkDuoData
Germany
DDService is an enhanced Windows NT service application framework.
DebugDelphiDipl. Inform. Helmuth Adolph
Germany
Debugging terminal for applications built with Delphi
Dew Lab Studio 2013Dew Research
Slovenia
Dew Lab Studio is a set of products for science and engeering. It includes modules for vectorized math, linear algebra, statistics and signal processing.
DropMasterRaize Software, Inc.
United States
DropMaster™ is a set of 4 native VCL controls for Delphi and C++Builder that enabled developers to support inter-application drag and drop between their application and others such as Microsoft Office, a Web browser, etc.
Easy Compression LibraryComponentAce Limited
Russian Federation
Easy Compression Library is an easy-to-use streaming compression library with strong encryption.
EhLibEhlib Team
Russian Federation
Set of components and classes for Borland Delphi and
Borland C++ Builder and intended to increase capacity of the
client part of the database application in part of interaction
with applications user.
ESBPCS for VCLESB Consultancy
Australia
Collection of VCL Components and Routines making Data Entry and Manipulation Easier for the Developer and their Customers.
ESBPCS-Calcs for VCLESB Consultancy
Australia
ESBPCS-Calcs is a subset of ESBPCS containing Components and Routines for Calculators and Unit Conversion in Delphi and C++ Builder. Includes Data Aware Components and full source, as well as a good subset of the controls.
ESBPCS-Dates for VCLESB Consultancy
Australia
ESBPCS-Dates is a subset of ESBPCS containing Components and Routines for Calendars and Date/Time Manipulation in Delphi and C++ Builder. Includes Data Aware Components and full source, as well as a good subset of the controls.
ESBPCS-Stats for VCLESB Consultancy
Australia
ESBPCS-Stats is a subset of ESBPCS containing Components and Routines for Statistical Analysis and Matrix/Vector Manipulation in Delphi and C++ Builder. Includes Data Aware Components and full source, as well as a good subset of the controls.
FastMMProfessional Software Development
South Africa
FastMM is a lightning fast replacement memory manager for Embarcadero Delphi applications that scales well in multi-threaded applications, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.
FlexCompressComponentAce Limited
Russian Federation
FlexCompress is a flexible tool designed for creating compact archives with strong encryption.
Fuzzy Logic Component LibraryRiversoft AVG
United States
The Fuzzy Logic Component Library allows you to add fuzzy logic, a method for modeling and reasoning about imprecise or approximate concepts, to your programs
Genetic Algorithms Component LibraryRiversoft AVG
United States
The Genetic Algorithms Component Library (GACL) is a powerful genetic algorithms solution for Delphi Win32, Win64, OSX, iOS and Android! The GACL provides simple yet powerful components for designing, evolving, and using genetic algorithms.
GrammarKitChant Inc.
United States
Develop Grammars for High-performance Recognition
ImageEnXequte Software
New Zealand
Image Editing and Display Library for Delphi, C++ Builder and .Net
Inference Engine Component Suite (IECS)Riversoft AVG
United States
The Inference Engine Component Suite (IECS) is the powerful Delphi component suite for adding rule-based intelligence and fuzzy logic to your programs! This professional suite provides expert system (rule-based) programming from within the Borland Delphi
InspexRaize Software, Inc.
United States
Inspex™ is an advanced set of native VCL grid controls specifically designed for inspecting objects and other data types in your programs.
KinectKitChant Inc.
United States
Build Humanlike Interfaces for Natural User Experience
LexiconKitChant Inc.
United States
Tailor Pronunciations for Maximum Clarity
LMD BarPack 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD BarPack provides components which help you to enhance your projects with advanced bar controls (ExplorerBar and SectionBar).
LMD DesignPack 2014 (Delphi/C++Builder)LMD Innovative
Germany
LMD DesignPack controls enhance your projects with advanced designing features - e.g. by adding an object inspector, extended form designer or diagrams.
LMD DockingPack 2014 for Delphi/CBuilderLMD Innovative
Germany
LMD DockingPack helps you to build applications with an entirely customizable and modern user interface. Add docking features with floating panels as known e.g. from Visual Studio!
LMD ElPack 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD ElPack - the Unicode enabled component suite including more than 170 controls!
LMD FxPack 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD FxPack was designed to help you adding exciting splash screens or form transitions to your applications - select from over 70 families of animation and transition effects which again provide hundreds of different variations.
LMD IDE-Tools 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD IDE-Tools represents a collection of native VCL components which help you to set up a complete IDE environment in a quick and easy way (designable forms, scripting features etc., syntax editor etc.)
LMD RichPack 2014 for Delphi /C++BuilderLMD Innovative
Germany
LMD RichPack contains several controls (based on MS RichEdit DLL) allowing integration of text editor functionality into your application.
LMD ScriptPack 2014 for Delphi/CBuilderLMD Innovative
Germany
LMD ScriptPack enables Delphi/CBuilder applications to support active scripting languages installed in Windows Scripting Host (such as VB Script, Java Script, etc).
LMD SearchPack 2014 for Delphi/CBuilderLMD Innovative
Germany
LMD SearchPack supports you integrating advanced search features (e.g. for HTML files) including support for wildcards and AND, OR, NEAR and NOT operators.
LMD ShellPack 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD ShellPack contains controls which help creating Windows Explorer like projects and solving shell/system related tasks.
LMD StoragePack 2014 Delphi/C++BuilderLMD Innovative
Germany
LMD StoragePack controls are used to save/restore configuration data. Possible target formats are the Registry or Ini-, XML- and binary files.
LMD SysPack 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD SysPack controls are used for retrieving extensive system information.
LMD WebPack 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD WebPack helps you to integrate advanced webbased features like updates via internet, display of news items, scanning of web sites or HTML pages.
LMD-Tools 2014 for Delphi/C++BuilderLMD Innovative
Germany
LMD-Tools - the legendary component suite containing more than 425 VCL components! Buttons, Dialogs, Multimedia, System, width='30%'>madExcept
Systemsoftware Mathias Rauen
Germany
extended exception catching
automatic exception analyzation
ModelMakerModelMaker Tools BV
Netherlands
Native Delphi Visual modeling and Refactoring tool based on UML[TM] 2.0 technology. Native Delphi integration, Instant Code generation, Reverse engineering (code import) and instant visualization. Point&click, drag&drop programming and Refactoring
ModelMaker Code ExplorerModelMaker Tools BV
Netherlands
Complete Code Completion with this every day Refactoring tool.
Fully integrated Delphi 5-XE5 code explorer featuring IntelliReplace™. Point&click, drag&drop programming. Instant two-way navigation and Instant Editing.
MonkeyGroomerLefebvre, Jeffrey
Canada
MonkeyGroomer is a simple application that aims to help convert your Delphi projects to FireMonkey projects. Currently only VGScene is supported. It also supports VGScene style files.
NexusDB ADO.Net providerNexusDB Pty Ltd
Australia
The NexusDB ADO.Net Provider is a full implementation of the MS ADO.Net Provider interfaces. It allows full ADO.NET Provider compatible access to a NexusDB database via the optimized NexusDB transports or direct access via embedded serverengine.
NexusDB AWE ServerNexusDB Pty Ltd
Australia
NexusDB Server AWE edition brings you the possibilities of 64-bit computing to your Win-32 or Win-64 operating system NOW! It breaks the dreaded 2 GB barrier and uses all the memory that your operating system has access to for your database cache.
NexusDB PHP ConnectorNexusDB Pty Ltd
Australia
PHP connector for NexusDB database
NexusDB v3NexusDB Pty Ltd
Australia
NexusDB is an ultra-fast, client/server database engine designed for the Delphi and C++Builder developer. It's nimble enough to be fully embedded into your desktop applications and powerful enough to be your primary database server.
NSELibGP Software (Thame) LTD
France
Name space extension library and wizard that allows production of Explorer namespace extensions
PlusMemoElectro-Concept Mauricie
Canada
Powerful native VCL/CLX memo component with dynamic syntax highlighting and enhanced editing capabilities. Also comes with rich set of free accesssories like print preview, gutter with numbers, language highlighters (html, Delphi, C++, ...).
PostgresDACMicroOLAP Technologies Ltd
Russian Federation
Powerful component suite for Delphi/C++Builder and PostgreSQL 8.x, 9.x/Pervasive Postgres/EnterpriseDB. It allows you to create Delphi/C++Builder applications with direct access to PostgreSQL/Pervasive Postgres/EnterpriseDB DB without BDE and ODBC.
ProDelphiDipl. Inform. Helmuth Adolph
Germany
Profiler (runtime measurement) for applications built with Delphi.
ProDelphi64Dipl. Inform. Helmuth Adolph
Germany
Profiler (runtime measurement) for 64 bit applications bult with Delphi.
ProfileKitChant Inc.
United States
Administer Speaker Profiles for Accurate Recognition
Raize ComponentsRaize Software, Inc.
United States
Raize™ Components is a user interface design system for Delphi and C++Builder. At its center are more than 125 general-purpose native VCL controls along with more than 100 component designers focused on simplifying user interface development.
RealThinClient SDKRealThinClient
Germany
Components for building reliable HTTP(S) Servers, Clients, Routers, Proxies, Load Balancers and ISAPIs with Delphi 7 - XE5 for Win32, Win64, Mac OSX, iOS and Android.
Report Generator List & Labelcombit Software GmbH
Germany
Professional report generator + Developer component for Windows 2000 and higher + Classic print and extensive export functions + High performance Designer + Integratable as DLL, OCX/ActiveX, VCL and .NET Assembly
RichViewActionsTRichView.com
Russian Federation
RichViewActions is a set of actions and components for creating user interface for a a word processor.
RiverSoftAVG Charting Component SuiteRiversoft AVG
United States
The RiverSoftAVG Charting Component Suite (RCCS) for Delphi (Win32/Win64/FMX) is a free (for non-commercial use) with SOURCE charting Suite for adding charts and graphs to your programs. A commercial license is available.
Rubicon Search EngineHREF Tools Corp
United States
Rubicon is a Delphi/C++Builder add-on suite that lets you put sophisticated full text search capabilities into your Vcl and FireMonkey applications.
ScaleRichView WYSIWYG Editor ComponentsTRichView.com
Russian Federation
ScaleRichView is a set of VCL components for creating WYSIWYG word processors.
SpeechKitChant Inc.
United States
Integrate Speech Technology for Hands-free Operation
TatukGIS Developer Kernel 10TatukGIS sp . z o.o.
Poland
A comprehensive GIS development toolkit provided as a:
  1. Delphi/C++Builder VCL (Win32 & Win64)
  2. ActiveX control (Win32 & Win64)
  3. .NET fully manageable component WinForms
  4. Compact Framework component
TCompLHA LHA/LHArc compression componentWebcentre Limited
New Zealand
Native compression components for the creation and management of LHA/LHArc-compatible compressed archives up to 8 exabytes in size.
TCompress generic/DB compressionWebcentre Limited
New Zealand
Native components for stream-based compression, multi-file compressed archives, DB image/text compression and self-extracting EXEs.
TeeChart™ ProSteema Software
Spain
Charting and diagramming library of components for FireMonkey and VCL in RAD XE5, Delphi, C++Builder, and for RPCL in HTML5 Builder (PHP and JavaScript).
TMS Advanced Chartstmssoftware.com
Belgium
Create DB-aware or non DB-aware multi-pane or multi-serie financial & business charts and spectacular 3D Pie charts.
TMS Advanced Toolbars & Menustmssoftware.com
Belgium
Office 2003 & Visual Studio style docking toolbars & menus + Office 2007, Office 2010, Office 2013, Windows 7 scenic, Windows 8 ribbon style, Metro ribbon style
TMS Asynctmssoftware.com
Belgium
High performance lightweight serial communications library with support for X,Y,Z modem protocols and terminal component
TMS Cloud Packtmssoftware.com
Belgium
Set of VCL components to offer easy access from Windows applications to cloud services.
TMS Cloud Pack for FireMonkeytmssoftware.com
Belgium
Seamless access to cloud services from FireMonkey applications.
TMS Component Pack Protmssoftware.com
Belgium
Over 350 TMS productivity components for Delphi and C++Builder in one money and time saving pack including grids, planners, enhanced edits, html enabled controls, outlookbar, ...
TMS Component Studiotmssoftware.com
Belgium
Wide and rich offering of over 500 components for VCL Windows application development, FireMonkey cross platform application development and IntraWeb web application development.
TMS Component Studio for FireMonkeytmssoftware.com
Belgium
All TMS components for FireMonkey application development bundled
TMS Diagram Studiotmssoftware.com
Belgium
Add diagram and flowchart capabilities to your application. Diagram Studio provides MS Visio-like interface for building diagrams and flowcharts at runtime, including predefined blocks and open architecture for adding your own blocks.
TMS FlexCel for VCL & FireMonkeytmssoftware.com
Belgium
Powerful, extensive & flexible component suite for native Excel report & file generation & manipulation for VCL & FireMonkey
TMS Grid Packtmssoftware.com
Belgium
Feature packed grid, spreadsheet, width='30%'>TMS GUIMotions
tmssoftware.com
Belgium
Create spectacular 3D animated user experiences in your Delphi applications
TMS iCLtmssoftware.com
Belgium
100% native iOS components for FireMonkey applications for iPhone, iPad, iPod. No compromises: 100% iOS performance, 100% iOS look, 100% iOS feel components
TMS Instrumentation Workshoptmssoftware.com
Belgium
TMS Instrumentation Workshop is a library full of components, methods and routines enabling you to create professional looking instrumentation and multimedia applications. A set containing over 80 instrumentation and digital components like leds, scopes, b
TMS IntraWeb Component Pack Protmssoftware.com
Belgium
Components for RAD web application development with Delphi & C++Builder and IntraWeb including advanced edits, calendars, outlookbar, grids, imagemap and much more...
TMS IntraWeb Component Studiotmssoftware.com
Belgium
Over 100 IntraWeb components for all your needs, including grids, menus, scheduling, query builder, charts, user-rights management system and more ... in one money saving bundle.
TMS mCLtmssoftware.com
Belgium
Set of components for true native Mac OS-X application development
TMS Pack for FireMonkeytmssoftware.com
Belgium
Set of highly configurable and styleable components for cross-platform FireMonkey application development. Target Windows 32 bit, 64 bit, Mac OS X, iOS and Android operating systems with one-codebase.
TMS Plugin Frameworktmssoftware.com
Belgium
Component framework for building applications with plugin architecture
TMS Scriptertmssoftware.com
Belgium
Add the ultimate flexibility and power into your applications with native Pascal or Basic scripting and full IDE (Integrated Development Environment) with visual form designer, object inspector, and more.
TMS Security Systemtmssoftware.com
Belgium
User-rights management system for your Delphi & C++Builder Windows applications
TMS TAdvMemotmssoftware.com
Belgium
Highly configurable syntax highlighting memo control with code-folding, autocompletion, bookmarks & source code container
TMS TAdvStringGridtmssoftware.com
Belgium
Highly configurable productivity grid control with built-in save/load in various file formats, printing, clipboard support, various inplace editors, cell graphics & cell formatting, sorting, grouping, cell merging and a lot more...
TMS TPlanner / TDBPlannertmssoftware.com
Belgium
Award-winning highly configurable planner/scheduler component for interactive scheduling applications.
TMS VCL Subscriptiontmssoftware.com
Belgium
2 year subscription to all our current & future VCL products for Windows application development.
TMS WebGMapstmssoftware.com
Belgium
VCL Component with extensive configurability for integrating Google Maps in Delphi & C++Builder
TMS WebOSMapstmssoftware.com
Belgium
Mapping component to integrate, display & control OpenStreetMaps in VCL Windows applications.
TMS Workflow Studiotmssoftware.com
Belgium
Add workflow/BPM (Business Process Management) capabilities to your applications. Build workflow definitions/flowcharts, run workflows, create tasks for multi-user environment, follow-up tasks, keep log tracking of task changes and more. Workflow Studio in
TRichView Editor ComponentsTRichView.com
Russian Federation
Components for editing documents with images, tables and hypertext links
TurboDBdataweb GmbH
Germany
Lightweight multi-user database engine for Delphi & C++ Builder. Replaces the BDE and includes Table, Query, Database, BatchMove components and others. TurboDB applications don't need any special installation and can run from CD or Web space.
Visagesoft eXPert PDF ViewerXvisagesoft
Greece
Activex control for viewing pdf documents
VoiceMarkupKitChant Inc.
United States
Fine-tune Speech Synthesis with Text-to-Speech Markup
VoiceXMLKitChant Inc.
United States
Win over your audience with enriched communications.
WebHubHREF Tools Corp
United States
The original and still unsurpassed Web Application Development Platform using Delphi
X-DBData ComponentsX-Files Software
Poland
X-DBData Components package was designed to can directly use any indexed data structures with db-aware data components, especially with our TXDBGrid component.
X-DBGrid ComponentX-Files Software
Poland
X-DBGrid Component Package contains a set of professional advanced components designed for Delphi and C++Builder. X-DBGrid Component Package is a main part of X-Files Components Package.
X-Files ComponentsX-Files Software
Poland
X-Files Components package contains a full set of advanced components designed for Delphi and C++Builder.
XE5 Plus PackJED Software
Australia
An evolving collection of IDE Experts, Component Editors, Property Editors and Utilities for Delphi XE4.
ZieglerCollection oneZieglerSoft
Denmark
ZieglerCollection one' is a collection of Delphi 16/32-bit components together with a lot of functions and procedures. The collection is made to make your life as a Delphi or C++Builder programmer a lot easier
ZipForgeComponentAce Limited
Russian Federation
ZipForge is a free for personal use ZIP Delphi component.
115 product(s) found.
</form>
Active7 years, 10 months ago

I’m working on with an embedded device that is connected to PC using RS232.

I need to do a software to communicate with this embedded device.

I program in Delphi. I never used to use object-oriented in the past. But I'm trying to change this.

I am not able to think in an object oriented manner to solve this problem.

I have this protocol:

where:

The software computer will send a command via serial, and the device will answer, using the same protocol.

For example:

I have to send a file stream to the device.

I'd like to obtain suggestions and/or examples of the best way to implement this in an object oriented manner. I'd like to be able to do unit-test too.

Thanks

BalusC
882k312 gold badges3251 silver badges3284 bronze badges
Daniel GrilloDaniel Grillo
1,4194 gold badges29 silver badges58 bronze badges

3 Answers

Serial Communication Software

You should look at other serial send/receive communication models, such as HTTP. In .NET, the HTTPWebRequest object is where you gather together all the pieces of info to be sent across the wire - including command (HTTP METHOD: GET, PUT, POST, etc) and byte stream. The HTTPWebRequest object (and the HTTP stack) internally deals with the 'paperwork' of calculating checksums of the data, chunking large data into smaller packets, etc. All your code has to do is construct the request object, set the command, assign a stream of data to the request object's property, and send.

Another reason why you should look at existing communication object models like .NET HTTP is that serial comms are generally asynchronous from the perspective of your host CPU. A lot of CPU time can pass by while transmitting the characters of the request on the serial port, and while waiting for the response. Use an async model for your request/response so that you don't block the calling thread and potentially freeze your UI.

To continue the .NET HTTP example, HTTPWebRequest has a GetResponse method which sends the request and will block the calling thread until a response is received. HTTPWebRequest also has a BeginGetResponse()/EndGetResponse() pair so that you can send the request and provide a callback to be executed when the response arrives at some later time.

Even if your immediate design is ok with a thread-blocking synchronous call model, you should at least investigate asynchronous coding patterns and consider implementing your object as such. You can always call an asynchronous method in a thread-blocking synchronous way, but it's much more difficult to call a synchronous method in an asynchronous way. Invest a little time now to give yourself more options down the road.

dthorpedthorpe
31.5k3 gold badges62 silver badges109 bronze badges

Well, I guess there are as many solutions as there are programmers. Without knowing more about your system I would probably go with this approach:

Create a base command class, lets say; TBaseCommand. Define your common interface at this level, like Send(), Receive(), Run() etc...

Only fill in code for functions common for all commands, such as sending, receiving etc...

Functions that will differ in execution are made virtual to be defined in the next layer.From this derive a new class for each command and fill in the command specific code, such as Run().

Having a Run() will easily allow you to simulate your commands on screen by overriding the Run() function.

, and are your transport protocol and should be applied and stripped of by your communication interface (separate protocol class?). Your protocol class can also handle checksum errors and try to resend etc.. If it can't be solved, signal error.

This was only a few things on top of my head with your limited description...

Max KiellandMax Kielland
3,5317 gold badges42 silver badges81 bronze badges

Sort of hard to answer but from the small amount of info I have, here's how I'd do it:

Either you class that knows how to serialize themself or you use the visitor pattern for serializing. This has the advantage of decoupling your data from the serialization and let you implement other serialization mechanism more easily.

So I'd have a Data class, a Command class which contains a collection(choose your preferred container) of Data. The Command class would likely handle the checksum calculation through a public method. I would also have a communication class to encapsulate the Command and begin and end the communication. Then I'd have a class responsible for interfacing with the serial port which would have a Send method that would take a reference on the communication class.

From the available info, that's what I can come up with design-wise.

Delphi Xe5 Serial Communication Protocols List

As for unit test, with a good design, you should be able to unit test almost everything. Remember to use stubs, you don't want to hit that serial port during testing so make a fake serial communication class that writes in a string for example and compare the outputted string to the expected value specification wise.

Eric FortinEric Fortin
6,7652 gold badges19 silver badges29 bronze badges
Protocols

Not the answer you're looking for? Browse other questions tagged delphioopcommunication or ask your own question.