fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef struct{
  5. int d;
  6. int e;
  7. int f;
  8. }DEF;
  9.  
  10. typedef struct {
  11. int a;
  12. int b;
  13. DEF c[];
  14. }ABC;
  15.  
  16. struct NrDlRetrieveJobCfg
  17. {
  18. uint8_t frame;
  19. uint8_t subframe;
  20. uint8_t slot;
  21. uint8_t symbol;
  22. uint8_t isWord0BlockSize;
  23. uint8_t isMbtCurrentIndexValid;
  24. uint8_t padding[10];//16
  25.  
  26. uint64_t mbtSmemPnbAddr; // MBT buffer start address
  27. uint64_t sizeOfBufEntry; // Size of single MBT ring buffer entry in bytes // 16
  28. uint64_t ecpriPayloadOffset; // Offset of E-CPRI payload start from start of each entry in bytes
  29. uint32_t numOfBufEntry; // Total number of entries in MBT ring buffer //12
  30.  
  31. uint8_t numRntis;
  32. uint8_t subseqNum[24];
  33. uint16_t rnti[24];
  34. } ;
  35.  
  36. const uint8_t maxNumOfUnknown = 4;
  37.  
  38. struct NrDlUnknownSubseq
  39. {
  40. uint8_t num;
  41. uint8_t dspHackFlag;
  42. uint8_t padding[14];
  43. uint16_t rnti[maxNumOfUnknown];
  44. uint8_t subseqId[maxNumOfUnknown];
  45. } ;
  46.  
  47. // One Ue max payload consist of 9 subseqs
  48. const uint8_t maxNumOfSubseqPerUe = 9;
  49.  
  50. struct NrDlUeTbSubseqInf
  51. {
  52. uint64_t subseqAddr[maxNumOfSubseqPerUe]; // need the rnti and subseq num
  53. } ;
  54.  
  55. struct NrDlRetrieveJobRst
  56. {
  57. NrDlUnknownSubseq nrDlUnknownSubseq;
  58. NrDlUeTbSubseqInf nrDlUeTbSubseqInf[16];
  59.  
  60. bool isVaild;
  61. uint32_t corruptedPacket;
  62. uint32_t receivedPacket;
  63. uint8_t frame;
  64. uint8_t subframe;
  65. uint8_t slot;
  66. uint8_t symbol;
  67. uint8_t numRntis;
  68. uint8_t subseqNum[24];
  69. uint16_t rnti[24];
  70. } ALIGNED16;
  71.  
  72. int main() {
  73. ABC abc;
  74. // your code goes here
  75. cout << sizeof(abc) << endl << &abc.b<<endl<<abc.c <<endl;
  76.  
  77. cout << "NrDlRetrieveJobRst = " << sizeof(NrDlRetrieveJobRst) << endl;
  78.  
  79. return 0;
  80. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
8
0x7ffcc5ccfad4
0x7ffcc5ccfad8
NrDlRetrieveJobRst = 1280