ususual colon use - meaning?

Here is a segment of code used to store information related to the BLAST sites on a device communicating with the CPU over a PCI bus. (BLAST stands for Board Level Advanced Scalable Technology, and is particular to the company that manufactured the device. Basically, the BLAST sites are areas of RAM.)

My question is, what is the colon doing in the following code? It does not appear to be initializing values.

///////////////////////////////////////////////////////////////
// Mapping of the additional register containing the BLAST info.
//
// this is mapped to register 0x1E
// BLASTIDn : ID of the BLAST module populated on the BLAST site <n>
// BID_VAL : BLAST ID Values are valid when set to <1>
// BID_EXT : More than 4 BLAST sites are available and some additional reading
// at another address is required. The address is then board specific.

class BLASTReg
{
public:
unsigned long BLASTID0 : 7; // BIT 0 to 6
unsigned long BLASTID1 : 7; // BIT 7 to 13
unsigned long BLASTID2 : 7; // BIT 14 to 20
unsigned long BLASTID3 : 7; // BIT 21 to 27
unsigned long BID_VAL : 1; // BIT 28
unsigned long : 2; // BIT 29 to 30 (padding)
unsigned long BID_EXT : 1; // BIT 28
};

Thanks!
bitfields. It specifies the width of the variable in bits.

IE: BLASTID0 is 7 bits wide (possible values 0-127)
Topic archived. No new replies allowed.