UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C
  • » Dynamic array of structures containing yet another dynamic array of structures

#1 2008-07-11 03:08 AM

innqubus
Member
Registered: 2007-11-22
Posts: 29

Re: Dynamic array of structures containing yet another dynamic array of structures

typedef struct
{
        uint8_t dlmAcid;
        uint8_t dlmHarqEBCount;
        uint8_t dlmAisn;
} STRUCTPAD DlmAcidInfo_t;

typedef struct
{
        uint8_t cidInMap;
        uint8_t mapharqFlag;
        uint8_t noOfEBs;
        uint8_t mcsNo;
        uint8_t mapharqMode;
        uint8_t ackchAlloc;
        uint8_t mapAcidCount;
        DlmAcidInfo_t DlmAcid;
} STRUCTPAD CidInfoInMap_t;

typedef struct
{
        uint8_t noOfCids;
        CidInfoInMap_t cidInfoInMap;
} STRUCTPAD ZoneInfoInMap_t;

typedef struct
{
        uint8_t dlFrameNo;
        ZoneInfoInMap_t zoneInfoInMap;
} STRUCTPAD HARQAckInfo_t;

Offline

#2 2008-07-11 08:53 AM

yurec
Member
From: Singapore
Registered: 2006-11-16
Posts: 134

Re: Dynamic array of structures containing yet another dynamic array of structures

hardly readable code.
You may consider to rewrite it using stl.

Offline

#3 2008-07-11 10:17 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Dynamic array of structures containing yet another dynamic array of structures

struct HARQAckInfo_t
{
   uint8_t dlFrameNo;
   struct ZoneInfoInMap_t
   {
      uint8_t noOfCids;
      struct CidInfoInMap_t
      {
         uint8_t cidInMap;
         uint8_t mapharqFlag;
         uint8_t noOfEBs;
         uint8_t mcsNo;
         uint8_t mapharqMode;
         uint8_t ackchAlloc;
         uint8_t mapAcidCount;
         struct DlmAcidInfo_t
         {
            uint8_t dlmAcid;
            uint8_t dlmHarqEBCount;
            uint8_t dlmAisn;
         } DlmAcid;
      } cidInfoInMap;
   } zoneInfoInMap;
};

Offline

  • Index
  • » C
  • » Dynamic array of structures containing yet another dynamic array of structures

Board footer

Powered by FluxBB