Back to index

salome-smesh  6.5.0
MESHJOB.idl
Go to the documentation of this file.
00001 // Copyright (C) 2011-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 // Authors : Guillaume Boulant (EDF) - 31/01/2011
00020 
00021 #ifndef _MESHJOB_IDL_
00022 #define _MESHJOB_IDL_
00023 
00024 #include "SALOME_Exception.idl"
00025 #include "SALOME_Component.idl"
00026 
00027 //
00028 // This interface is used for mesh job submission from within the
00029 // SALOME plugin for PADDER.
00030 //
00031 module MESHJOB
00032 {
00033 
00034   //
00035   // Structure to transmit the parameters requiered for the job to run
00036   // the executable program on the target resource. See configure
00037   // service.
00038   //
00039   struct ConfigParameter {
00040     string resname; // The name of the SALOME resource to be used
00041     string binpath; // The path of the executable program on this resource
00042     string envpath; // The path of the environment file on this resource
00043   };
00044 
00045   //
00046   // This set of specification defines the data structure used to
00047   // initialize a job on a specific resource, then supervise the job
00048   // and finally retrieve the result data.
00049   //
00050 
00051   // This defines the set of temporary folders used by the jobmanager
00052   // when executing a job (may depends on the job).
00053   struct MeshJobPaths
00054   {
00055     string local_inputdir;
00056     string local_resultdir;
00057     string remote_workdir;
00058   };
00059 
00060   // This defines the possible types for a job parameter
00061   enum FileType {MED_CONCRETE, MED_STEELBAR};
00062 
00063   // This defines a single parameter for the job initialization (a med file)
00064   struct MeshJobParameter
00065   {
00066     string file_name;
00067     FileType file_type;
00068     string group_name;
00069   };
00070   
00071   // This defines a set of parameters for the job initialization
00072   typedef sequence<MESHJOB::MeshJobParameter> MeshJobParameterList;
00073 
00074   // This defines the result data of a job 
00075   struct MeshJobResults
00076   {
00077     string results_dirname;
00078     string outputmesh_filename;
00079     string status;
00080   };
00081 
00082   // This defines the possible states of a job
00083   enum MeshJobState {CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR};
00084 
00085   //
00086   // This interface defines the computation services of the component
00087   //
00088 
00089   interface MeshJobManager: Engines::EngineComponent
00090   {
00091 
00095     boolean configure(in string configId, in MESHJOB::ConfigParameter configParameter)
00096       raises (SALOME::SALOME_Exception);
00097 
00099     long    initialize(in MESHJOB::MeshJobParameterList meshJobParameterList, in string configId)
00100       raises (SALOME::SALOME_Exception);
00101 
00103     boolean start(in long jobId)
00104       raises (SALOME::SALOME_Exception);
00105 
00107     string getState(in long jobId)
00108       raises (SALOME::SALOME_Exception);
00109 
00111     MeshJobResults finalize(in long jobid)
00112       raises (SALOME::SALOME_Exception);
00113 
00115     boolean clean(in long jobId)
00116       raises (SALOME::SALOME_Exception);
00117 
00119     MeshJobPaths getPaths(in long jobId)
00120       raises (SALOME::SALOME_Exception);
00121 
00122   };
00123 
00124 };
00125 
00126 #endif // _MESHJOB_IDL_