Classification of and resilience to cyber-attacks on cyber-physical systems