Safe4RAIL-2: Advanced architectures and components for the next-generation train control and monitoring system