/**************************************************************************** * Copyright 2019 Nreal Techonology Limited. All rights reserved. * * This file is part of NRSDK. * * https://www.nreal.ai/ * *****************************************************************************/ namespace NRKernal { public class IntegratedSubsystem : ISubsystem { protected ISubsystemDescriptor m_Descripe; public IntegratedSubsystem(ISubsystemDescriptor descripe) { m_Descripe = descripe; } /// /// Whether or not the subsystem is running. /// public virtual bool running { get; protected set; } = false; /// /// Starts an instance of a subsystem. /// public virtual void Start() { running = true; } /// /// Pause an instance of a subsystem. /// public virtual void Pause() { running = false; } /// /// Resume an instance of a subsystem. /// public virtual void Resume() { running = true; } /// /// Destroys this instance of a subsystem. /// public virtual void Stop() { running = false; } } public class IntegratedSubsystem : IntegratedSubsystem where TSubsystemDescriptor : ISubsystemDescriptor { public IntegratedSubsystem(TSubsystemDescriptor descripe) : base(descripe) { } public virtual TSubsystemDescriptor SubsystemDescriptor => (TSubsystemDescriptor)m_Descripe; } }