A compositional implementation of Modbus in Protege

Network protocols today play a major role in embedded software for industrial automation, with constant efforts to adapt existing device software to new emerging standards. In earlier work, we have proposed a compilation-based approach using a domain-specific language, Protege, which automatically generates protocol stack implementations in C from modular high-level descriptions. In this paper, we provide a case study of the Protege language in an industrial setting. We have implemented the Modbus protocol over TCP/IP and over serial line, and tested it using an industrial gateway. Our implementation demonstrates Protege's advantages for software productivity, easy maintenance and code reuse, and it achieves many desirable properties of industrial embedded network software.