Beispiel #1
0
        /// <summary>
        /// Processing at the end
        /// </summary>
        public static void ShutdownModule()
        {
            Log(("VsModule shutting down..."));
            if (VsModule.EnableVsConnectServer)
            {
                VsConnectServer.ShutdownModule();

                BestMedia.VsDotnet.vs_connect_api_v3.vsc_Api_V3_t.DLLShutDown();
            }

            if (VsModule.EnableVsVehicle)
            {
                VsVehicleSolver.ShutdownModule();
            }
            ModuleStarted = false;
        }
Beispiel #2
0
        /// <summary>
        /// Start up
        /// </summary>
        public static void StartupModule()
        {
            Log(("VsModule starting..."));

            Log($"VsPass dir: %{VsModule.VsPath}");
            Log($"User Output dir: %{VsModule.VsEngineUserDir}");

            //Only Windows 64bit platform
            Check(System.Environment.Is64BitProcess && System.Environment.OSVersion.Platform == PlatformID.Win32NT);

            //Check server and client same
            Check(!(EnableVsConnectServer && EnableVsConnectClient));

            if (ModuleStarted)
            {
                LogError(("Attempting to restart module not allowed."));
            }
            else
            {
                ModuleStarted = true;
                if (System.IO.Directory.Exists(VsModule.VsEngineUserDir) == false)
                {
                    System.IO.Directory.CreateDirectory(VsModule.VsEngineUserDir);
                }

                if (EnableVsConnectServer || EnableVsConnectClient)
                {
                    BestMedia.VsDotnet.vs_connect_api_v3.vsc_Api_V3_t.DllInit(VsModule.VsPath);
                    if (EnableVsConnectServer)
                    {
                        VsConnectServer.StartupModule();
                    }


                    if (EnableVsConnectClient)
                    {
                    }
                }
                if (EnableVsVehicle)
                {
                    VsVehicleSolver.StartupModule();
                }
            }
        }
Beispiel #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="direction"></param>
 /// <param name="solver"></param>
 public VsVehicleVar(string name, VsVarDirection direction, VsVehicleSolver solver) : base(name, direction)
 {
     VsVehicleSolver = solver;
     VsVehicleSolver.AddVSVar(this);
     VsVehicleSolver.ResetVehicleEvent += (o, e) => OnResetVehicle();
 }
Beispiel #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="direction"></param>
 /// <param name="solver"></param>
 public VSVehicleVarDouble(string name, VsVarDirection direction, VsVehicleSolver solver) : base(name, direction, solver)
 {
     OnResetVehicle();
 }
Beispiel #5
0
        public VSVehicleVarImport(string name, double defaultValue, VsVehicleSolver solver) : base(name, VsVarDirection.Input, solver)
        {
            _value = defaultValue;

            OnResetVehicle();
        }