Exemple #1
0
 public void SetOutputDirectory(string OutputDirectoryPath)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     ControlLayer.SetOutputDirectoryExternal(theModel, OutputDirectoryPath);
 }
Exemple #2
0
 public void SetLogCallback(LogCallback theCallback)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     ControlLayer.SetLogCallbackExternal(theModel, theCallback);
 }
Exemple #3
0
 public ControlLayer()
 {
     theModel = ControlLayer.CreateModelExternal();
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Failed to initialize model");
     }
 }
Exemple #4
0
 public int SetModuleDirectory(string ModuleDirectoryPath)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.SetModuleDirectoryExternal(theModel, ModuleDirectoryPath));
 }
Exemple #5
0
 public int StopModules()
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.StopModulesExternal(theModel));
 }
Exemple #6
0
 public int RunModel(int NumFrames)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.RunModelExternal(theModel, NumFrames));
 }
Exemple #7
0
 public int LoadModuleParameters(string ModuleParameterFileName)
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     return(ControlLayer.LoadModuleParametersExternal(theModel, ModuleParameterFileName));
 }
Exemple #8
0
 public int UnloadModel()
 {
     if (theModel == IntPtr.Zero)
     {
         throw new ApplicationException("Model not initialized");
     }
     Environment.CurrentDirectory = SavedPath;
     return(ControlLayer.UnloadModelExternal(theModel));
 }
Exemple #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));
 }