CORDET Framework - C2 Implementation
CrPsDpServEvt.h
Go to the documentation of this file.
1 
23 #ifndef CRPSDPSERVEVT_H_
24 #define CRPSDPSERVEVT_H_
25 
26 #include <CrFwUserConstants.h>
27 #include <CrPsUserConstants.h>
28 
32 typedef struct {
37  CrPsFlag_t isEidEnabled[EVT_N_EID];
73  CrPsNumberU4_t nOfDetectedEvts_1;
77  CrPsNumberU4_t nOfDetectedEvts_2;
81  CrPsNumberU4_t nOfDetectedEvts_3;
85  CrPsNumberU4_t nOfDetectedEvts_4;
89  CrPsNumberU2_t nOfDisabledEid_1;
93  CrPsNumberU2_t nOfDisabledEid_2;
97  CrPsNumberU2_t nOfDisabledEid_3;
101  CrPsNumberU2_t nOfDisabledEid_4;
105  CrPsNumberU4_t nOfGenEvtRep_1;
109  CrPsNumberU4_t nOfGenEvtRep_2;
113  CrPsNumberU4_t nOfGenEvtRep_3;
117  CrPsNumberU4_t nOfGenEvtRep_4;
119 
120 extern DpServEvtVars_t dpServEvtVars;
121 
125 void initDpServEvt(void);
126 
131 static inline CrPsFlag_t* getDpisEidEnabledArray()
132 {
133  return &dpServEvtVars.isEidEnabled[0];
134 }
135 
141 static inline CrPsFlag_t getDpisEidEnabledItem(int i)
142 {
143  return dpServEvtVars.isEidEnabled[i];
144 }
145 
152 static inline void setDpisEidEnabledItem(int i, CrPsFlag_t isEidEnabled)
153 {
154  dpServEvtVars.isEidEnabled[i] = isEidEnabled;
155 }
156 
162 {
163  return dpServEvtVars.lastEvtEid_1;
164 }
165 
171 static inline void setDplastEvtEid_1(CrPsEid_t lastEvtEid_1)
172 {
173  dpServEvtVars.lastEvtEid_1 = lastEvtEid_1;
174 }
175 
181 {
182  return dpServEvtVars.lastEvtEid_2;
183 }
184 
190 static inline void setDplastEvtEid_2(CrPsEid_t lastEvtEid_2)
191 {
192  dpServEvtVars.lastEvtEid_2 = lastEvtEid_2;
193 }
194 
200 {
201  return dpServEvtVars.lastEvtEid_3;
202 }
203 
209 static inline void setDplastEvtEid_3(CrPsEid_t lastEvtEid_3)
210 {
211  dpServEvtVars.lastEvtEid_3 = lastEvtEid_3;
212 }
213 
219 {
220  return dpServEvtVars.lastEvtEid_4;
221 }
222 
228 static inline void setDplastEvtEid_4(CrPsEid_t lastEvtEid_4)
229 {
230  dpServEvtVars.lastEvtEid_4 = lastEvtEid_4;
231 }
232 
238 {
239  return dpServEvtVars.lastEvtTime_1;
240 }
241 
247 static inline void setDplastEvtTime_1(CrFwTimeStamp_t lastEvtTime_1)
248 {
249  dpServEvtVars.lastEvtTime_1 = lastEvtTime_1;
250 }
251 
257 {
258  return dpServEvtVars.lastEvtTime_2;
259 }
260 
266 static inline void setDplastEvtTime_2(CrFwTimeStamp_t lastEvtTime_2)
267 {
268  dpServEvtVars.lastEvtTime_2 = lastEvtTime_2;
269 }
270 
276 {
277  return dpServEvtVars.lastEvtTime_3;
278 }
279 
285 static inline void setDplastEvtTime_3(CrFwTimeStamp_t lastEvtTime_3)
286 {
287  dpServEvtVars.lastEvtTime_3 = lastEvtTime_3;
288 }
289 
295 {
296  return dpServEvtVars.lastEvtTime_4;
297 }
298 
304 static inline void setDplastEvtTime_4(CrFwTimeStamp_t lastEvtTime_4)
305 {
306  dpServEvtVars.lastEvtTime_4 = lastEvtTime_4;
307 }
308 
313 static inline CrPsNumberU4_t getDpnOfDetectedEvts_1()
314 {
315  return dpServEvtVars.nOfDetectedEvts_1;
316 }
317 
323 static inline void setDpnOfDetectedEvts_1(CrPsNumberU4_t nOfDetectedEvts_1)
324 {
325  dpServEvtVars.nOfDetectedEvts_1 = nOfDetectedEvts_1;
326 }
327 
332 static inline CrPsNumberU4_t getDpnOfDetectedEvts_2()
333 {
334  return dpServEvtVars.nOfDetectedEvts_2;
335 }
336 
342 static inline void setDpnOfDetectedEvts_2(CrPsNumberU4_t nOfDetectedEvts_2)
343 {
344  dpServEvtVars.nOfDetectedEvts_2 = nOfDetectedEvts_2;
345 }
346 
351 static inline CrPsNumberU4_t getDpnOfDetectedEvts_3()
352 {
353  return dpServEvtVars.nOfDetectedEvts_3;
354 }
355 
361 static inline void setDpnOfDetectedEvts_3(CrPsNumberU4_t nOfDetectedEvts_3)
362 {
363  dpServEvtVars.nOfDetectedEvts_3 = nOfDetectedEvts_3;
364 }
365 
370 static inline CrPsNumberU4_t getDpnOfDetectedEvts_4()
371 {
372  return dpServEvtVars.nOfDetectedEvts_4;
373 }
374 
380 static inline void setDpnOfDetectedEvts_4(CrPsNumberU4_t nOfDetectedEvts_4)
381 {
382  dpServEvtVars.nOfDetectedEvts_4 = nOfDetectedEvts_4;
383 }
384 
389 static inline CrPsNumberU2_t getDpnOfDisabledEid_1()
390 {
391  return dpServEvtVars.nOfDisabledEid_1;
392 }
393 
399 static inline void setDpnOfDisabledEid_1(CrPsNumberU2_t nOfDisabledEid_1)
400 {
401  dpServEvtVars.nOfDisabledEid_1 = nOfDisabledEid_1;
402 }
403 
408 static inline CrPsNumberU2_t getDpnOfDisabledEid_2()
409 {
410  return dpServEvtVars.nOfDisabledEid_2;
411 }
412 
418 static inline void setDpnOfDisabledEid_2(CrPsNumberU2_t nOfDisabledEid_2)
419 {
420  dpServEvtVars.nOfDisabledEid_2 = nOfDisabledEid_2;
421 }
422 
427 static inline CrPsNumberU2_t getDpnOfDisabledEid_3()
428 {
429  return dpServEvtVars.nOfDisabledEid_3;
430 }
431 
437 static inline void setDpnOfDisabledEid_3(CrPsNumberU2_t nOfDisabledEid_3)
438 {
439  dpServEvtVars.nOfDisabledEid_3 = nOfDisabledEid_3;
440 }
441 
446 static inline CrPsNumberU2_t getDpnOfDisabledEid_4()
447 {
448  return dpServEvtVars.nOfDisabledEid_4;
449 }
450 
456 static inline void setDpnOfDisabledEid_4(CrPsNumberU2_t nOfDisabledEid_4)
457 {
458  dpServEvtVars.nOfDisabledEid_4 = nOfDisabledEid_4;
459 }
460 
465 static inline CrPsNumberU4_t getDpnOfGenEvtRep_1()
466 {
467  return dpServEvtVars.nOfGenEvtRep_1;
468 }
469 
475 static inline void setDpnOfGenEvtRep_1(CrPsNumberU4_t nOfGenEvtRep_1)
476 {
477  dpServEvtVars.nOfGenEvtRep_1 = nOfGenEvtRep_1;
478 }
479 
484 static inline CrPsNumberU4_t getDpnOfGenEvtRep_2()
485 {
486  return dpServEvtVars.nOfGenEvtRep_2;
487 }
488 
494 static inline void setDpnOfGenEvtRep_2(CrPsNumberU4_t nOfGenEvtRep_2)
495 {
496  dpServEvtVars.nOfGenEvtRep_2 = nOfGenEvtRep_2;
497 }
498 
503 static inline CrPsNumberU4_t getDpnOfGenEvtRep_3()
504 {
505  return dpServEvtVars.nOfGenEvtRep_3;
506 }
507 
513 static inline void setDpnOfGenEvtRep_3(CrPsNumberU4_t nOfGenEvtRep_3)
514 {
515  dpServEvtVars.nOfGenEvtRep_3 = nOfGenEvtRep_3;
516 }
517 
522 static inline CrPsNumberU4_t getDpnOfGenEvtRep_4()
523 {
524  return dpServEvtVars.nOfGenEvtRep_4;
525 }
526 
532 static inline void setDpnOfGenEvtRep_4(CrPsNumberU4_t nOfGenEvtRep_4)
533 {
534  dpServEvtVars.nOfGenEvtRep_4 = nOfGenEvtRep_4;
535 }
536 
537 
538 /*----------------------------------------------------------------------------*/
539 #endif /* CRPSDPSERVEVT_H */
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
#define EVT_N_EID
Number of event identifiers supported by the application.
static CrPsNumberU4_t getDpnOfGenEvtRep_4()
Gets the value of the datapool item nOfGenEvtRep_4.
static CrPsEid_t getDplastEvtEid_3()
Gets the value of the datapool item lastEvtEid_3.
Header file to define all user-configurable constants and types for the IASW Application.
static CrPsEid_t getDplastEvtEid_4()
Gets the value of the datapool item lastEvtEid_4.
CrPsNumberU2_t nOfDisabledEid_4
Number of event identifiers of level 4 which are disabled.
static void setDpnOfDetectedEvts_3(CrPsNumberU4_t nOfDetectedEvts_3)
Sets the value of the datapool item nOfDetectedEvts_3.
static void setDpnOfDisabledEid_3(CrPsNumberU2_t nOfDisabledEid_3)
Sets the value of the datapool item nOfDisabledEid_3.
CrPsNumberU4_t nOfGenEvtRep_4
Number of generated level 4 event reports.
CrFwTimeStamp_t lastEvtTime_2
Time when the last level 2 event report was generated.
Definition: CrPsDpServEvt.h:61
CrPsEid_t lastEvtEid_3
Event identifier of the last generated level 3 event report.
Definition: CrPsDpServEvt.h:49
static void setDpnOfGenEvtRep_2(CrPsNumberU4_t nOfGenEvtRep_2)
Sets the value of the datapool item nOfGenEvtRep_2.
static void setDpnOfDetectedEvts_1(CrPsNumberU4_t nOfDetectedEvts_1)
Sets the value of the datapool item nOfDetectedEvts_1.
CrPsNumberU4_t nOfGenEvtRep_2
Number of generated level 2 event reports.
static CrPsEid_t getDplastEvtEid_1()
Gets the value of the datapool item lastEvtEid_1.
CrPsEid_t lastEvtEid_4
Event identifier of the last generated level 4event report.
Definition: CrPsDpServEvt.h:53
CrPsNumberU4_t nOfGenEvtRep_3
Number of generated level 3 event reports.
static CrPsNumberU4_t getDpnOfGenEvtRep_1()
Gets the value of the datapool item nOfGenEvtRep_1.
void initDpServEvt(void)
Initialises ServEvt.
Definition: CrPsDpServEvt.c:30
static CrPsNumberU4_t getDpnOfDetectedEvts_3()
Gets the value of the datapool item nOfDetectedEvts_3.
static CrPsNumberU2_t getDpnOfDisabledEid_1()
Gets the value of the datapool item nOfDisabledEid_1.
static CrPsNumberU4_t getDpnOfDetectedEvts_1()
Gets the value of the datapool item nOfDetectedEvts_1.
static CrPsEid_t getDplastEvtEid_2()
Gets the value of the datapool item lastEvtEid_2.
static CrFwTimeStamp_t getDplastEvtTime_4()
Gets the value of the datapool item lastEvtTime_4.
uint16_t CrPsEid_t
Type used for Event Id of a Packet.
CrPsNumberU2_t nOfDisabledEid_1
Number of event identifiers of level 1 which are disabled.
Definition: CrPsDpServEvt.h:89
static void setDpnOfDisabledEid_1(CrPsNumberU2_t nOfDisabledEid_1)
Sets the value of the datapool item nOfDisabledEid_1.
static void setDplastEvtEid_1(CrPsEid_t lastEvtEid_1)
Sets the value of the datapool item lastEvtEid_1.
CrPsNumberU2_t nOfDisabledEid_2
Number of event identifiers of level 2 which are disabled.
Definition: CrPsDpServEvt.h:93
static CrFwTimeStamp_t getDplastEvtTime_3()
Gets the value of the datapool item lastEvtTime_3.
CrPsNumberU4_t nOfGenEvtRep_1
Number of generated level 1 event reports.
static CrFwTimeStamp_t getDplastEvtTime_1()
Gets the value of the datapool item lastEvtTime_1.
static void setDpisEidEnabledItem(int i, CrPsFlag_t isEidEnabled)
Sets the value of the i-th element in the datapool array isEidEnabled.
static CrPsNumberU4_t getDpnOfDetectedEvts_2()
Gets the value of the datapool item nOfDetectedEvts_2.
CrPsEid_t lastEvtEid_2
Event identifier of the last generated level 2 event report.
Definition: CrPsDpServEvt.h:45
static void setDpnOfGenEvtRep_1(CrPsNumberU4_t nOfGenEvtRep_1)
Sets the value of the datapool item nOfGenEvtRep_1.
static void setDplastEvtEid_3(CrPsEid_t lastEvtEid_3)
Sets the value of the datapool item lastEvtEid_3.
static CrPsNumberU4_t getDpnOfDetectedEvts_4()
Gets the value of the datapool item nOfDetectedEvts_4.
static CrPsNumberU2_t getDpnOfDisabledEid_3()
Gets the value of the datapool item nOfDisabledEid_3.
static void setDplastEvtTime_2(CrFwTimeStamp_t lastEvtTime_2)
Sets the value of the datapool item lastEvtTime_2.
static CrPsNumberU4_t getDpnOfGenEvtRep_3()
Gets the value of the datapool item nOfGenEvtRep_3.
static void setDpnOfDisabledEid_4(CrPsNumberU2_t nOfDisabledEid_4)
Sets the value of the datapool item nOfDisabledEid_4.
static void setDplastEvtEid_4(CrPsEid_t lastEvtEid_4)
Sets the value of the datapool item lastEvtEid_4.
static CrPsNumberU2_t getDpnOfDisabledEid_2()
Gets the value of the datapool item nOfDisabledEid_2.
static void setDpnOfDetectedEvts_4(CrPsNumberU4_t nOfDetectedEvts_4)
Sets the value of the datapool item nOfDetectedEvts_4.
CrFwTimeStamp_t lastEvtTime_3
Time when the last level 3 event report was generated.
Definition: CrPsDpServEvt.h:65
static void setDplastEvtEid_2(CrPsEid_t lastEvtEid_2)
Sets the value of the datapool item lastEvtEid_2.
static void setDplastEvtTime_4(CrFwTimeStamp_t lastEvtTime_4)
Sets the value of the datapool item lastEvtTime_4.
static CrFwTimeStamp_t getDplastEvtTime_2()
Gets the value of the datapool item lastEvtTime_2.
CrFwTimeStamp_t lastEvtTime_4
Time when the last level 4 event report was generated.
Definition: CrPsDpServEvt.h:69
CrPsEid_t lastEvtEid_1
Event identifier of the last generated level 1 event report.
Definition: CrPsDpServEvt.h:41
CrPsNumberU4_t nOfDetectedEvts_3
Number of detected occurrences of level 3 events.
Definition: CrPsDpServEvt.h:81
static CrPsNumberU4_t getDpnOfGenEvtRep_2()
Gets the value of the datapool item nOfGenEvtRep_2.
CrPsFlag_t isEidEnabled[EVT_N_EID]
Array of EVT_N_EID elements holding the enable status of the event identifiers.
Definition: CrPsDpServEvt.h:37
static void setDpnOfDisabledEid_2(CrPsNumberU2_t nOfDisabledEid_2)
Sets the value of the datapool item nOfDisabledEid_2.
static CrPsNumberU2_t getDpnOfDisabledEid_4()
Gets the value of the datapool item nOfDisabledEid_4.
CrFwTimeStamp_t lastEvtTime_1
Time when the last level 1 event report was generated.
Definition: CrPsDpServEvt.h:57
Type description.
Definition: CrPsDpServEvt.h:32
static void setDpnOfGenEvtRep_4(CrPsNumberU4_t nOfGenEvtRep_4)
Sets the value of the datapool item nOfGenEvtRep_4.
CrPsNumberU4_t nOfDetectedEvts_2
Number of detected occurrences of level 2 events.
Definition: CrPsDpServEvt.h:77
static void setDpnOfDetectedEvts_2(CrPsNumberU4_t nOfDetectedEvts_2)
Sets the value of the datapool item nOfDetectedEvts_2.
static void setDplastEvtTime_1(CrFwTimeStamp_t lastEvtTime_1)
Sets the value of the datapool item lastEvtTime_1.
CrPsNumberU2_t nOfDisabledEid_3
Number of event identifiers of level 3 which are disabled.
Definition: CrPsDpServEvt.h:97
static CrPsFlag_t * getDpisEidEnabledArray()
Gets the datapool array isEidEnabled.
CrPsNumberU4_t nOfDetectedEvts_1
Number of detected occurrences of level 1 events.
Definition: CrPsDpServEvt.h:73
static void setDpnOfGenEvtRep_3(CrPsNumberU4_t nOfGenEvtRep_3)
Sets the value of the datapool item nOfGenEvtRep_3.
static CrPsFlag_t getDpisEidEnabledItem(int i)
Gets the value of the i-th element in the datapool array isEidEnabled.
static void setDplastEvtTime_3(CrFwTimeStamp_t lastEvtTime_3)
Sets the value of the datapool item lastEvtTime_3.
CrPsNumberU4_t nOfDetectedEvts_4
Number of detected occurrences of level 4 events.
Definition: CrPsDpServEvt.h:85
unsigned int CrFwTimeStamp_t
Type used for the time stamp of a command or report.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved