Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00033 #ifndef SeART_H_
00034 #define SeART_H_
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041 #include "srterrno.h"
00042 #include "srttypes.h"
00043
00047 typedef struct{
00049 char* quality_indicator;
00051 u_int quality_value;
00053 SRT_FREQUENCY freq_constraint;
00055 float freq_value;
00056 }srt_data_attr;
00057
00058
00062 typedef struct{
00064 bool constraint_hard;
00066 bool constraint_forced;
00068 bool constraint_disabled;
00070 SRT_FREQUENCY freq_constraint;
00072 float freq_value;
00073 }srt_task_attr;
00074
00075
00079 typedef struct{
00081 bool disabled;
00083 u_int prominence;
00085 SRT_POLICY policy;
00087 SRT_FREQUENCY freq_constraint;
00089 float freq_value;
00090 }srt_job_attr;
00091
00092
00099 typedef bool (*schd_checker)(const float u, const u_int n);
00100
00101
00102
00103
00104
00105
00106
00107
00108
00115 SRT_DATA* srt_data_create(const char* label, const char* kind);
00116
00123 srt_status srt_data_set_attr(SRT_DATA* data, srt_data_attr attr);
00124
00131 srt_status srt_data_get_attr(SRT_DATA* data, srt_data_attr* pattr);
00132
00133
00134
00135
00136
00137
00144 SRT_RESOURCE* srt_res_create(const char* label, bool available);
00145
00152 srt_status srt_res_add_provision(SRT_RESOURCE *res, SRT_DATA *data);
00153
00160 srt_status srt_res_set_attr(SRT_RESOURCE *res, bool available);
00161
00162
00163
00164
00165
00166
00167
00174 SRT_JOB* srt_job_create(const char* label, SRT_POLICY policy );
00175
00182 srt_status srt_job_add_data(SRT_JOB* job, SRT_DATA* data );
00183
00190 srt_status srt_job_remove_data(SRT_JOB* job, SRT_DATA* data);
00191
00192
00199 srt_status srt_job_add_task(SRT_JOB* job, SRT_TASK* task );
00200
00207 srt_status srt_job_remove_task(SRT_JOB* job, SRT_TASK* task );
00208
00209
00216 srt_status srt_job_set_attr(SRT_JOB* job, srt_job_attr attr);
00217
00224 srt_status srt_job_get_attr(SRT_JOB* job, srt_job_attr* pattr);
00225
00226
00227
00228
00229
00230
00231
00237 SRT_DISJUNCTION* srt_disj_create(const char* label);
00238
00245 srt_status srt_disj_add_data(SRT_DISJUNCTION* disj, SRT_DATA* data);
00246
00253 srt_status srt_disj_add_disj(SRT_DISJUNCTION* disj, SRT_DISJUNCTION* disj2);
00254
00261 srt_status srt_disj_add_conj(SRT_DISJUNCTION* disj, SRT_CONJUNCTION* conj);
00262
00263
00264
00265
00266
00267
00268
00274 SRT_CONJUNCTION* srt_conj_create(const char* label);
00275
00282 srt_status srt_conj_add_data(SRT_CONJUNCTION* conj, SRT_DATA* data);
00283
00290 srt_status srt_conj_add_disj(SRT_CONJUNCTION* conj, SRT_DISJUNCTION* disj);
00291
00298 srt_status srt_conj_add_conj(SRT_CONJUNCTION* conj, SRT_CONJUNCTION* conj2);
00299
00300
00301
00302
00303
00304
00305
00312 SRT_TASK* srt_task_create(const char* label, u_int consumption);
00313
00320 srt_status srt_task_set_attr(SRT_TASK* task, srt_task_attr attr);
00321
00328 srt_status srt_task_get_attr(SRT_TASK* task, srt_task_attr* pattr);
00329
00336 srt_status srt_task_add_disj_input(SRT_TASK* task, SRT_DISJUNCTION* disj);
00337
00344 srt_status srt_task_add_conj_input(SRT_TASK* task, SRT_CONJUNCTION* conj);
00345
00352 srt_status srt_task_add_data_input(SRT_TASK* task, SRT_DATA* data);
00353
00360 srt_status srt_task_add_output(SRT_TASK* task, SRT_DATA* data);
00361
00374 srt_status srt_task_set_descriptor(SRT_TASK* task, void* descriptor);
00375
00376
00384 void* srt_get_entity_by_name(const char* name );
00385
00386
00387
00388
00389
00390
00391 #ifdef WITH_RDF
00392
00400 srt_status srt_kb_from_rdf(const char * filename);
00401
00402 #endif
00403
00404
00405
00406
00407
00408
00415 srt_status srt_init( void );
00416
00423 srt_status srt_finish( void );
00424
00429 srt_status srt_chek_kb( void );
00430
00436 srt_status srt_test_solution( void );
00437
00438
00444 srt_status srt_set_maxreason_time( long max_time );
00445
00446
00454 srt_status srt_switch_context( void* os_data );
00455
00456
00462 srt_status srt_set_sched_checker( schd_checker check_func );
00463
00464
00465
00466
00467
00473 srt_status srt_export_kb2dot( const char* filename );
00474
00475
00476
00477 #ifdef __cplusplus
00478 }
00479 #endif
00480
00481
00482 #endif