- 2016 American Automatic Control Council (AACC). This paper addresses the problem of cross-layer design of cyber-physical systems to cope with interactions between the cyber layer and the physical layer in a dynamic environment. We propose a bi-directional middleware that allows the optimal utilization of the common resources for the benefit of either or both the layers in order to obtain overall system performance. This has been implemented over Etherware, a prior developed separation-based middleware for networked control systems as the bridge between the layers. Our implementation employs a Resource Manager module to handle common resources between the layers on Etherware. A case study of network connectivity preservation in vehicular formation control illustrates how this approach applies to particular situations of interest.