ICALEPCS 2009
TUP024
Generation of Simple, Type-Safe Messages for Inter-Task Communications
C.King, R.Neswold* (Fermilab)
Messages exchanged between ACNET tasks have been, traditionally, C structures defined using a certain "endianness" and packed with a specific alignment. This is less than ideal since every new implementation experiences the same error-prone development cycle to get the layout correct and there are no guarantees the data is validated by the receiver. We present a utility, inspired by Google's Protocol Buffers, which generates the source code that marshals and unmarshals messages. The utility generates C++ and Java source, with more target languages planned. Messages are represented and manipulated using the host language's native data types. The generated module guarantees the received message contains the required fields and is of the correct type.