Designing agility and resilience into embedded systems