Henrique Dal Bello
Dec 5, 2018 · 3 min read
Image taken from Atlas Copco official website

Open protocol is a communication protocol created by Atlas Copco which defines the way we have to communicate with Atlas Copco tightening controllers

Years ago I had the opportunity to work with Atlas Copco Open Protocol and it was cool and funny to create and manipulate the controllers with it.

I could create applications that exchanges TCP/IP packages to operate it, such as setting up a Job/Parameter Set, retrieving old tightenings or receiving them in real time, as many other functions that are available inside these tightening controllers which Open Protocol help us to interact with them.

Although it was funny, it was a little troublesome too. Parsing all those dozens or even hundreds of bytes was a pain in the *** (head 😂), a bit stressful I should say.

By that time, I’ve noticed the packages structure and that could exists a library that does all the parsing, such as a .jar or .dll. And someday, while I was at home, I asked myself:

Have someone ever thought about creating a library to handle all these packages?

So I started searching if there was a library out there in any programming language. For my surprise, I have found NONE.
All I had was the docs and a Power Focus tightening controller…

Few days later I committed to build one! I knew it would be a big effort, but why not build something to help me and other people out there??

The Open Protocol Interpreter

Then the open protocol interpreter was born!

What I’ve done was to take their documentation and try compile into a single C# library which I called “Open Protocol Interpreter” (currently on version 2.1.0).

In a few words: It takes the received package and translates/”beautifies” it to an object which is better to work with. The inverse can be done too!

It took a lot of effort to build and test it, but it’s done and working!!

The structure

Check Chain of responsibilities pattern!

Basically I’ve build it under chain of responsibility pattern, which we iterate through each object and discover which package was received and when it. When it identifies the received package, it beautifies all that ugly string/bytes to a nice and beautiful object.

A bunch of packages was included (maybe 300, I don’t remember), so I had to make some modifications to achieve the best performance.

Well, there is much about it but I won’t write how it fully works at it’s core, since it is already written on my article at CodeProject. Please check it out for more information.
Also the project is open source and available at GitHub.

Training Center

Conectamos pessoas que querem aprender algo relacionado a desenvolvimento de software com gente que pode guiá-las.

Thanks to Lauren Ferreira

Henrique Dal Bello

Written by

Knowledge is for sharing. Developing bugs since 2012 💻

Training Center

Conectamos pessoas que querem aprender algo relacionado a desenvolvimento de software com gente que pode guiá-las.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade