A communication synthesis infrastructure for heterogeneous networked control systems and its application to building automation