203 |
*/ |
*/ |
204 |
const char *Event_get_description(Event_T E) { |
const char *Event_get_description(Event_T E) { |
205 |
|
|
206 |
int i; |
int i, event; |
207 |
int size= sizeof(Event_Table)/sizeof(Event_Table[0]); |
int size= sizeof(Event_Table)/sizeof(Event_Table[0]); |
208 |
|
|
209 |
ASSERT(E); |
ASSERT(E); |
210 |
|
|
211 |
|
/* In the case of passive mode we replace the description of start, stop |
212 |
|
* or restart event for for failed, because these actions are passive in |
213 |
|
* this mode */ |
214 |
|
event= (E->source->mode == MODE_PASSIVE && |
215 |
|
((E->id == EVENT_START)|| |
216 |
|
(E->id == EVENT_STOP) || |
217 |
|
(E->id == EVENT_RESTART)) |
218 |
|
)?EVENT_FAILED:E->id; |
219 |
|
|
220 |
for(i= 0; i < size; i++) |
for(i= 0; i < size; i++) |
221 |
if(E->id == Event_Table[i].id) |
if(event == Event_Table[i].id) |
222 |
return Event_Table[i].description; |
return Event_Table[i].description; |
223 |
|
|
224 |
return NULL; |
return NULL; |
225 |
|
|