예제 #1
0
 public void SetOutputDirectory(string OutputDirectoryPath)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     ControlLayer.SetOutputDirectoryExternal(theModel, OutputDirectoryPath);
 }
예제 #2
0
 public void SetLogCallback(LogCallback theCallback)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     ControlLayer.SetLogCallbackExternal(theModel, theCallback);
 }
예제 #3
0
 public ControlLayer()
 {
     theModel = ControlLayer.CreateModelExternal();
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Failed to initialize model");
     }
 }
예제 #4
0
 public int SetModuleDirectory(string ModuleDirectoryPath)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.SetModuleDirectoryExternal(theModel, ModuleDirectoryPath));
 }
예제 #5
0
 public int StopModules()
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.StopModulesExternal(theModel));
 }
예제 #6
0
 public int RunModel(int NumFrames)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.RunModelExternal(theModel, NumFrames));
 }
예제 #7
0
 public int LoadModuleParameters(string ModuleParameterFileName)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.LoadModuleParametersExternal(theModel, ModuleParameterFileName));
 }
예제 #8
0
 public int UnloadModel()
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     Environment.CurrentDirectory = SavedPath;
     return(ControlLayer.UnloadModelExternal(theModel));
 }
예제 #9
0
 public int LoadModelConfigFile(string ModelConfigFileName, float FrameSize_uS)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     SavedPath = Environment.CurrentDirectory;
     Environment.CurrentDirectory = Path.GetDirectoryName(ModelConfigFileName);
     return(ControlLayer.LoadModelConfigFileExternal(theModel, ModelConfigFileName, FrameSize_uS));
 }