Cyber-Physical Systems and Industry 4.0: Practical Applications and Security Management