Preserving safety in distributed cyber physical systems with unreliable communication channels