Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

schmgt/schmgt_bridge_itk.h

Go to the documentation of this file.
00001 // @<COPYRIGHT_START>@
00002 // ===============================================
00003 // Copyright 2011 Siemens Corp. All Rights Reserved.
00004 // ===============================================
00005 // @<COPYRIGHT_END>@
00006 
00007 
00014 #ifndef SCHMGTBRIITK_H
00015 #define SCHMGTBRIITK_H
00016 #include <tc/tc_startup.h>
00017 #include <itk/mem.h>
00018 #include <schmgt_bridge/libschmgt_bridge_exports.h>
00019 
00020 #define RECALCULATE_EXEC 1  
00021 #define RECALCULATE_SCHED 2 
00022 #define RECALCULATE_ALL 0   
00023 #define NUM_OF_ATTRIBS 28   
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif        
00028 
00031 typedef struct AttributeUpdateContainer_d
00032 {       
00033     char* attrName;     
00034     char* attrValue;    
00035     int attrType;       
00036 } AttributeUpdateContainer_t;
00037 
00040 typedef struct TypedAttributeUpdateContainer_d
00041 {
00042     char* objectType;                                   
00043     int updatesSize;                                    
00044     AttributeUpdateContainer_t updates[NUM_OF_ATTRIBS]; 
00045 } TypedAttributeUpdateContainer_t;
00046 
00049 typedef struct TaskCreateContainer_d
00050 {
00051     char* name;                 
00052     char* desc;                 
00053     char* objectType;           
00054     date_t start;               
00055     date_t finish;              
00056     int workEstimate;           
00057     tag_t parent;               
00058     tag_t prevSibling;          
00059     int otherAttributesSize;    
00060     AttributeUpdateContainer_t otherAttributes[NUM_OF_ATTRIBS];            
00061     int typedAttrContSize;      
00062     TypedAttributeUpdateContainer_t typedOtherAttributes[NUM_OF_ATTRIBS];  
00063 } TaskCreateContainer_t;
00064 
00065 
00068 typedef struct ObjectUpdateContainer_d
00069 {
00070     tag_t object;                                                   
00071     int updatesSize;                                                
00072     AttributeUpdateContainer_t updates[NUM_OF_ATTRIBS];             
00073     int typedUpdatesSize;                                           
00074     TypedAttributeUpdateContainer_t typedUpdates[NUM_OF_ATTRIBS];   
00075 } ObjectUpdateContainer_t;
00076 
00077 
00080 typedef struct MoveRequest_d
00081 {        
00082  tag_t task;        
00083  tag_t newParent;   
00084  tag_t prevSibling; 
00085 } MoveRequest_t;
00086 
00090 typedef struct AssignmentCreate_d
00091 {
00092     char* taskID;           
00093     char* assigneeID;       
00094     char* disciplineID;     
00095     double assignedPercentage;  
00096 } AssignmentCreate_t;
00097 
00101 typedef struct AssignmentUpdate_d
00102 {
00103     tag_t assignment;           
00104     double assignedPercentage;  
00105 } AssignmentUpdate_t;
00106 
00107 
00111 typedef struct DependencyCreate_d
00112 {
00113     tag_t pred_task;    
00114     tag_t succ_task;    
00115     int dep_type;       
00116     int lag_time;       
00117 } DependencyCreate_t;
00118 
00122 typedef struct DependencyUpdate_d
00123 {
00124     tag_t dependency;       
00125     int new_type;           
00126     int new_lag;            
00127 } DependencyUpdate_t;
00128 
00129 
00133 typedef struct AddMembers_d
00134 {
00135     tag_t schedule;         
00136     char* resource_id;      
00137     int membership_level;   
00138     char* cost;             
00139     char* currency;         
00140 } AddMembers_t;
00141 
00142 
00146     extern SCHMGTBRI_API int SCHMGT_scale_schedule_non_interactive( 
00147         tag_t schedule,        
00148         double factor,         
00149         int type,              
00150         logical checkState,    
00151         int* numUpdatedTasks,  
00152         tag_t** updatedTasks   
00153     );      
00154     
00158     extern SCHMGTBRI_API int SCHMGT_recalculate_schedule_non_interactive (
00159         tag_t schedule,  
00160         int type,        
00161         logical async    
00162         );
00163 
00167     extern SCHMGTBRI_API int SCHMGT_shift_schedule_non_interactive( 
00168                         tag_t schedule,               
00169                         date_t newDate,               
00170                         logical newFinish,            
00171                         int* numUpdatedTasks,         
00172                         tag_t** updatedTasks          
00173                         );                
00174                         
00178     extern SCHMGTBRI_API int SCHMGT_create_tasks_non_interactive (
00179         const tag_t &schedule,                   
00180         int numCreate,                           
00181         TaskCreateContainer_t* createInputs,     
00182         tag_t** createdTasks,                    
00183         int* numUpdated,                         
00184         tag_t** updatedTasks                     
00185         );
00186        
00190     extern SCHMGTBRI_API int SCHMGT_update_tasks_non_interactive(
00191         const tag_t &schedule,                   
00192         int numTasksToUpdate,                     
00193         ObjectUpdateContainer_t* updateInputs,   
00194         int *numUpdated,                         
00195         tag_t** updatedTasks                     
00196         );
00197 
00201     extern SCHMGTBRI_API int SCHMGT_move_tasks_non_interactive(
00202         const tag_t &schedule,                   
00203         int numTaskToMove,                       
00204         MoveRequest_t* updateInputs              
00205         );
00206        
00210     extern SCHMGTBRI_API int SCHMGT_create_dependency2( 
00211         tag_t schedule,                     
00212         int numCreate,                      
00213         DependencyCreate_t* createInputs,   
00214         tag_t** createdDependencies,        
00215         int* numUpdatedTasks,               
00216         tag_t** updatedTasks,               
00217         int* numProxyCreated,               
00218         tag_t** createdProxies              
00219         );
00220 
00224     extern SCHMGTBRI_API int SCHMGT_create_dependency( 
00225         tag_t schedule,                   
00226         int numCreate,                    
00227         DependencyCreate_t* createInputs, 
00228         tag_t** createdDependencies,      
00229         int* numUpdatedTasks,             
00230         tag_t** updatedTasks              
00231         );
00232 
00236     extern SCHMGTBRI_API int SCHMGT_update_dependency( 
00237         tag_t schedule,                     
00238         int numUpdate,                      
00239         DependencyUpdate_t* updateInputs,   
00240         int* numUpdatedTasks,               
00241         tag_t** updatedTasks                
00242         );
00243 
00247     extern SCHMGTBRI_API int SCHMGT_delete_dependency( 
00248         tag_t schedule,         
00249         int numDelete,          
00250         tag_t** dependencies,   
00251         int* numUpdatedTasks,   
00252         tag_t** updatedTasks    
00253         );
00254 
00258     extern SCHMGTBRI_API int SCHMGT_critical_tasks( 
00259         tag_t schedule,             
00260         int* numTask,               
00261         tag_t** criticalTasks,      
00262         int* numProxyTask,          
00263         tag_t** criticalProxyTasks  
00264         );
00265 
00269     extern SCHMGTBRI_API int SCHMGT_launch_workflow( 
00270                         tag_t task,      
00271                         tag_t* epmJob    
00272                         );
00273 
00277 extern SCHMGTBRI_API  int SCHMGT_delete_tasks_non_interactive
00278 (
00279    tag_t   schedule,            
00280    int     numTasksToDelete,    
00281    tag_t*  tasksToDelete,       
00282    int*    numUpdatedTasks,     
00283    tag_t** updatedTasks,        
00284    int*    numOrphanedTasks,    
00285    tag_t** orphanedTasks        
00286 );
00287 
00291     extern SCHMGTBRI_API int SCHMGT_create_assignments (
00292         const tag_t &schedule,                   
00293         int numCreate,                           
00294         AssignmentCreate_t* createInputs,        
00295         int* numCreatedAssignments,              
00296         tag_t** createdAssignments               
00297         );
00298 
00299 
00303     extern SCHMGTBRI_API int SCHMGT_update_assignments (
00304         const tag_t &schedule,                   
00305         int numUpdate,                           
00306         AssignmentUpdate_t* updateInputs,        
00307         int* numUpdatedAssignments,              
00308         tag_t** updatedAssignments               
00309         );
00310 
00314     extern SCHMGTBRI_API int SCHMGT_delete_assignments( 
00315         tag_t schedule,       
00316         int numDelete,        
00317         tag_t* assignments    
00318         );
00319 
00323     extern SCHMGTBRI_API int SCHMGT_update_schedule_non_interactive( 
00324                         ObjectUpdateContainer_t  update,    
00325                         int* numUpdatedTasks,               
00326                         tag_t** updatedTasks                
00327                         );
00328 
00332     extern SCHMGTBRI_API int SCHMGT_claim_assignment (
00333         const tag_t &task,                  
00334         const tag_t &assignment,            
00335         tag_t* newAssignments               
00336         );
00337 
00338 
00339    
00358     extern SCHMGTBRI_API int SCHMGT_add_members (
00359         int num_members,                    
00360         AddMembers_t* add_member_inputs,    
00361         int *invalid_input_index,           
00362         int *num_added_members,             
00363         tag_t** members                     
00364         );
00365 
00366 #ifdef __cplusplus
00367 }
00368 #endif
00369 
00370 
00371 #include <schmgt_bridge/libschmgt_bridge_undef.h>
00372 #endif