CORDET Framework - C2 Implementation
CrPsPktServLpt.h
Go to the documentation of this file.
1 
23 #ifndef CRPSPKTSERVLPT_H_
24 #define CRPSPKTSERVLPT_H_
25 
26 #include <CrPsUserConstants.h>
27 #include "CrPsPkt.h"
28 
32 typedef struct __attribute__((packed)) _LptDownFirstRep_t {
36  TmHeader_t Header;
37 
41  CrPsTid_t Tid;
42 
46  CrPsNumberU4_t PartSeqNmb;
47 
51  CrPsPart_t Part;
52 
53 } LptDownFirstRep_t ;
54 
58 typedef struct __attribute__((packed)) _LptDownInterRep_t {
62  TmHeader_t Header;
63 
67  CrPsTid_t Tid;
68 
72  CrPsNumberU4_t PartSeqNmb;
73 
77  CrPsPart_t Part;
78 
79 } LptDownInterRep_t ;
80 
84 typedef struct __attribute__((packed)) _LptDownLastRep_t {
88  TmHeader_t Header;
89 
93  CrPsTid_t Tid;
94 
98  CrPsNumberU4_t PartSeqNmb;
99 
103  CrPsPart_t Part;
104 
105 } LptDownLastRep_t ;
106 
110 typedef struct __attribute__((packed)) _LptUpFirstCmd_t {
114  TcHeader_t Header;
115 
119  CrPsTid_t Tid;
120 
124  CrPsNumberU4_t PartSeqNmb;
125 
129  CrPsPart_t Part;
130 
131 } LptUpFirstCmd_t ;
132 
136 typedef struct __attribute__((packed)) _LptUpInterCmd_t {
140  TcHeader_t Header;
141 
145  CrPsTid_t Tid;
146 
150  CrPsNumberU4_t PartSeqNmb;
151 
155  CrPsPart_t Part;
156 
157 } LptUpInterCmd_t ;
158 
162 typedef struct __attribute__((packed)) _LptUpLastCmd_t {
166  TcHeader_t Header;
167 
171  CrPsTid_t Tid;
172 
176  CrPsNumberU4_t PartSeqNmb;
177 
181  CrPsPart_t Part;
182 
183 } LptUpLastCmd_t ;
184 
188 typedef struct __attribute__((packed)) _LptUpAbortRep_t {
192  TmHeader_t Header;
193 
197  CrPsTid_t Tid;
198 
202  CrPsFailReason_t FailReason;
203 
204 } LptUpAbortRep_t ;
205 
209 typedef struct __attribute__((packed)) _LptStartDownCmd_t {
213  TcHeader_t Header;
214 
218  CrPsTid_t Tid;
219 
220 } LptStartDownCmd_t ;
221 
225 typedef struct __attribute__((packed)) _LptAbortDownCmd_t {
229  TcHeader_t Header;
230 
234  CrPsTid_t Tid;
235 
236 } LptAbortDownCmd_t ;
237 
243 static inline CrPsTid_t getLptDownFirstRepTid(void* p)
244 {
245  LptDownFirstRep_t* t;
246  t = (LptDownFirstRep_t*)p;
247  return __builtin_bswap32(t->Tid);
248 }
249 
255 static inline void setLptDownFirstRepTid(void* p, CrPsTid_t Tid)
256 {
257  LptDownFirstRep_t* t;
258  t = (LptDownFirstRep_t*)p;
259  t->Tid = __builtin_bswap32(Tid);
260 }
261 
267 static inline CrPsNumberU4_t getLptDownFirstRepPartSeqNmb(void* p)
268 {
269  LptDownFirstRep_t* t;
270  t = (LptDownFirstRep_t*)p;
271  return __builtin_bswap32(t->PartSeqNmb);
272 }
273 
279 static inline void setLptDownFirstRepPartSeqNmb(void* p, CrPsNumberU4_t PartSeqNmb)
280 {
281  LptDownFirstRep_t* t;
282  t = (LptDownFirstRep_t*)p;
283  t->PartSeqNmb = __builtin_bswap32(PartSeqNmb);
284 }
285 
291 static inline CrPsTid_t getLptDownInterRepTid(void* p)
292 {
293  LptDownInterRep_t* t;
294  t = (LptDownInterRep_t*)p;
295  return __builtin_bswap32(t->Tid);
296 }
297 
303 static inline void setLptDownInterRepTid(void* p, CrPsTid_t Tid)
304 {
305  LptDownInterRep_t* t;
306  t = (LptDownInterRep_t*)p;
307  t->Tid = __builtin_bswap32(Tid);
308 }
309 
315 static inline CrPsNumberU4_t getLptDownInterRepPartSeqNmb(void* p)
316 {
317  LptDownInterRep_t* t;
318  t = (LptDownInterRep_t*)p;
319  return __builtin_bswap32(t->PartSeqNmb);
320 }
321 
327 static inline void setLptDownInterRepPartSeqNmb(void* p, CrPsNumberU4_t PartSeqNmb)
328 {
329  LptDownInterRep_t* t;
330  t = (LptDownInterRep_t*)p;
331  t->PartSeqNmb = __builtin_bswap32(PartSeqNmb);
332 }
333 
339 static inline CrPsTid_t getLptDownLastRepTid(void* p)
340 {
341  LptDownLastRep_t* t;
342  t = (LptDownLastRep_t*)p;
343  return __builtin_bswap32(t->Tid);
344 }
345 
351 static inline void setLptDownLastRepTid(void* p, CrPsTid_t Tid)
352 {
353  LptDownLastRep_t* t;
354  t = (LptDownLastRep_t*)p;
355  t->Tid = __builtin_bswap32(Tid);
356 }
357 
363 static inline CrPsNumberU4_t getLptDownLastRepPartSeqNmb(void* p)
364 {
365  LptDownLastRep_t* t;
366  t = (LptDownLastRep_t*)p;
367  return __builtin_bswap32(t->PartSeqNmb);
368 }
369 
375 static inline void setLptDownLastRepPartSeqNmb(void* p, CrPsNumberU4_t PartSeqNmb)
376 {
377  LptDownLastRep_t* t;
378  t = (LptDownLastRep_t*)p;
379  t->PartSeqNmb = __builtin_bswap32(PartSeqNmb);
380 }
381 
387 static inline CrPsTid_t getLptUpFirstCmdTid(void* p)
388 {
389  LptUpFirstCmd_t* t;
390  t = (LptUpFirstCmd_t*)p;
391  return __builtin_bswap32(t->Tid);
392 }
393 
399 static inline void setLptUpFirstCmdTid(void* p, CrPsTid_t Tid)
400 {
401  LptUpFirstCmd_t* t;
402  t = (LptUpFirstCmd_t*)p;
403  t->Tid = __builtin_bswap32(Tid);
404 }
405 
411 static inline CrPsNumberU4_t getLptUpFirstCmdPartSeqNmb(void* p)
412 {
413  LptUpFirstCmd_t* t;
414  t = (LptUpFirstCmd_t*)p;
415  return __builtin_bswap32(t->PartSeqNmb);
416 }
417 
423 static inline void setLptUpFirstCmdPartSeqNmb(void* p, CrPsNumberU4_t PartSeqNmb)
424 {
425  LptUpFirstCmd_t* t;
426  t = (LptUpFirstCmd_t*)p;
427  t->PartSeqNmb = __builtin_bswap32(PartSeqNmb);
428 }
429 
435 static inline CrPsTid_t getLptUpInterCmdTid(void* p)
436 {
437  LptUpInterCmd_t* t;
438  t = (LptUpInterCmd_t*)p;
439  return __builtin_bswap32(t->Tid);
440 }
441 
447 static inline void setLptUpInterCmdTid(void* p, CrPsTid_t Tid)
448 {
449  LptUpInterCmd_t* t;
450  t = (LptUpInterCmd_t*)p;
451  t->Tid = __builtin_bswap32(Tid);
452 }
453 
459 static inline CrPsNumberU4_t getLptUpInterCmdPartSeqNmb(void* p)
460 {
461  LptUpInterCmd_t* t;
462  t = (LptUpInterCmd_t*)p;
463  return __builtin_bswap32(t->PartSeqNmb);
464 }
465 
471 static inline void setLptUpInterCmdPartSeqNmb(void* p, CrPsNumberU4_t PartSeqNmb)
472 {
473  LptUpInterCmd_t* t;
474  t = (LptUpInterCmd_t*)p;
475  t->PartSeqNmb = __builtin_bswap32(PartSeqNmb);
476 }
477 
483 static inline CrPsTid_t getLptUpLastCmdTid(void* p)
484 {
485  LptUpLastCmd_t* t;
486  t = (LptUpLastCmd_t*)p;
487  return __builtin_bswap32(t->Tid);
488 }
489 
495 static inline void setLptUpLastCmdTid(void* p, CrPsTid_t Tid)
496 {
497  LptUpLastCmd_t* t;
498  t = (LptUpLastCmd_t*)p;
499  t->Tid = __builtin_bswap32(Tid);
500 }
501 
507 static inline CrPsNumberU4_t getLptUpLastCmdPartSeqNmb(void* p)
508 {
509  LptUpLastCmd_t* t;
510  t = (LptUpLastCmd_t*)p;
511  return __builtin_bswap32(t->PartSeqNmb);
512 }
513 
519 static inline void setLptUpLastCmdPartSeqNmb(void* p, CrPsNumberU4_t PartSeqNmb)
520 {
521  LptUpLastCmd_t* t;
522  t = (LptUpLastCmd_t*)p;
523  t->PartSeqNmb = __builtin_bswap32(PartSeqNmb);
524 }
525 
531 static inline CrPsTid_t getLptUpAbortRepTid(void* p)
532 {
533  LptUpAbortRep_t* t;
534  t = (LptUpAbortRep_t*)p;
535  return __builtin_bswap32(t->Tid);
536 }
537 
543 static inline void setLptUpAbortRepTid(void* p, CrPsTid_t Tid)
544 {
545  LptUpAbortRep_t* t;
546  t = (LptUpAbortRep_t*)p;
547  t->Tid = __builtin_bswap32(Tid);
548 }
549 
555 static inline CrPsFailReason_t getLptUpAbortRepFailReason(void* p)
556 {
557  LptUpAbortRep_t* t;
558  t = (LptUpAbortRep_t*)p;
559  return __builtin_bswap32(t->FailReason);
560 }
561 
567 static inline void setLptUpAbortRepFailReason(void* p, CrPsFailReason_t FailReason)
568 {
569  LptUpAbortRep_t* t;
570  t = (LptUpAbortRep_t*)p;
571  t->FailReason = __builtin_bswap32(FailReason);
572 }
573 
579 static inline CrPsTid_t getLptStartDownCmdTid(void* p)
580 {
581  LptStartDownCmd_t* t;
582  t = (LptStartDownCmd_t*)p;
583  return __builtin_bswap32(t->Tid);
584 }
585 
591 static inline void setLptStartDownCmdTid(void* p, CrPsTid_t Tid)
592 {
593  LptStartDownCmd_t* t;
594  t = (LptStartDownCmd_t*)p;
595  t->Tid = __builtin_bswap32(Tid);
596 }
597 
603 static inline CrPsTid_t getLptAbortDownCmdTid(void* p)
604 {
605  LptAbortDownCmd_t* t;
606  t = (LptAbortDownCmd_t*)p;
607  return __builtin_bswap32(t->Tid);
608 }
609 
615 static inline void setLptAbortDownCmdTid(void* p, CrPsTid_t Tid)
616 {
617  LptAbortDownCmd_t* t;
618  t = (LptAbortDownCmd_t*)p;
619  t->Tid = __builtin_bswap32(Tid);
620 }
621 
622 
623 /*----------------------------------------------------------------------------*/
624 #endif /* CRPSPKTSERVLPT_H */
static CrPsTid_t getLptUpLastCmdTid(void *p)
Get "Tid" from "LptUpLastCmd" packet.
static CrPsTid_t getLptUpAbortRepTid(void *p)
Get "Tid" from "LptUpAbortRep" packet.
static CrPsNumberU4_t getLptDownFirstRepPartSeqNmb(void *p)
Get "PartSeqNmb" from "LptDownFirstRep" packet.
static CrPsNumberU4_t getLptUpFirstCmdPartSeqNmb(void *p)
Get "PartSeqNmb" from "LptUpFirstCmd" packet.
Header file to define all user-configurable constants and types for the IASW Application.
static void setLptUpFirstCmdPartSeqNmb(void *p, CrPsNumberU4_t PartSeqNmb)
Set "PartSeqNmb" in "LptUpFirstCmd" packet.
static CrPsFailReason_t getLptUpAbortRepFailReason(void *p)
Get "FailReason" from "LptUpAbortRep" packet.
static void setLptDownFirstRepPartSeqNmb(void *p, CrPsNumberU4_t PartSeqNmb)
Set "PartSeqNmb" in "LptDownFirstRep" packet.
static void setLptDownInterRepPartSeqNmb(void *p, CrPsNumberU4_t PartSeqNmb)
Set "PartSeqNmb" in "LptDownInterRep" packet.
static CrPsNumberU4_t getLptDownInterRepPartSeqNmb(void *p)
Get "PartSeqNmb" from "LptDownInterRep" packet.
static CrPsTid_t getLptUpFirstCmdTid(void *p)
Get "Tid" from "LptUpFirstCmd" packet.
static CrPsNumberU4_t getLptUpLastCmdPartSeqNmb(void *p)
Get "PartSeqNmb" from "LptUpLastCmd" packet.
static void setLptUpLastCmdTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptUpLastCmd" packet.
static void setLptDownFirstRepTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptDownFirstRep" packet.
static CrPsTid_t getLptDownLastRepTid(void *p)
Get "Tid" from "LptDownLastRep" packet.
CrPsTid_t Tid
CrPsLptUpCmdStart function definitions.
static void setLptDownLastRepPartSeqNmb(void *p, CrPsNumberU4_t PartSeqNmb)
Set "PartSeqNmb" in "LptDownLastRep" packet.
static CrPsTid_t getLptDownFirstRepTid(void *p)
Get "Tid" from "LptDownFirstRep" packet.
static CrPsTid_t getLptDownInterRepTid(void *p)
Get "Tid" from "LptDownInterRep" packet.
static CrPsTid_t getLptAbortDownCmdTid(void *p)
Get "Tid" from "LptAbortDownCmd" packet.
static CrPsNumberU4_t getLptDownLastRepPartSeqNmb(void *p)
Get "PartSeqNmb" from "LptDownLastRep" packet.
Packet header definitions.
static void setLptUpFirstCmdTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptUpFirstCmd" packet.
static void setLptStartDownCmdTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptStartDownCmd" packet.
struct __attribute__((packed)) _LptDownFirstRep_t
Structure for LptDownFirstRep.
static void setLptUpAbortRepTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptUpAbortRep" packet.
static void setLptUpInterCmdTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptUpInterCmd" packet.
static CrPsNumberU4_t getLptUpInterCmdPartSeqNmb(void *p)
Get "PartSeqNmb" from "LptUpInterCmd" packet.
static void setLptDownLastRepTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptDownLastRep" packet.
static void setLptDownInterRepTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptDownInterRep" packet.
static void setLptUpInterCmdPartSeqNmb(void *p, CrPsNumberU4_t PartSeqNmb)
Set "PartSeqNmb" in "LptUpInterCmd" packet.
static void setLptAbortDownCmdTid(void *p, CrPsTid_t Tid)
Set "Tid" in "LptAbortDownCmd" packet.
static CrPsTid_t getLptUpInterCmdTid(void *p)
Get "Tid" from "LptUpInterCmd" packet.
static void setLptUpAbortRepFailReason(void *p, CrPsFailReason_t FailReason)
Set "FailReason" in "LptUpAbortRep" packet.
static CrPsTid_t getLptStartDownCmdTid(void *p)
Get "Tid" from "LptStartDownCmd" packet.
static void setLptUpLastCmdPartSeqNmb(void *p, CrPsNumberU4_t PartSeqNmb)
Set "PartSeqNmb" in "LptUpLastCmd" packet.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved