mbgtools-lx  4.2.8
Definitions used with VLAN configuration

Macros

#define _mbg_swab_mbg_vlan_cfg(_p)   _mbg_swab16( _p )
 
#define VLAN_ID_BITS   12
 number of bits to hold the ID More...
 
#define N_VLAN_ID   ( 1 << VLAN_ID_BITS )
 number of ID values More...
 
#define MIN_VLAN_ID   0
 minimum ID value More...
 
#define MAX_VLAN_ID   ( N_VLAN_ID - 1 )
 maximum ID value More...
 
#define VLAN_ID_SHIFT   0
 
#define VLAN_ID_MSK   ( ( 1 << VLAN_ID_BITS ) - 1 )
 
#define VLAN_PRIORITY_BITS   3
 number of bits to hold priority More...
 
#define N_VLAN_PRIORITY   ( 1 << VLAN_PRIORITY_BITS )
 number of priority values More...
 
#define MIN_VLAN_PRIORITY   0
 minimum priority More...
 
#define MAX_VLAN_PRIORITY   ( N_VLAN_PRIORITY - 1 )
 maximum priority More...
 
#define VLAN_PRIORITY_SHIFT   ( ( 8 * sizeof( MBG_VLAN_CFG ) ) - VLAN_PRIORITY_BITS )
 
#define VLAN_PRIORITY_MSK   ( ( 1 << VLAN_PRIORITY_BITS ) - 1 )
 
#define _decode_vlan_id(_cfg)   ( ( (_cfg) >> VLAN_ID_SHIFT ) & VLAN_ID_MSK )
 Macros used to encode/decode packed vlan_cfg variables. More...
 
#define _decode_vlan_priority(_cfg)   ( ( (_cfg) >> VLAN_PRIORITY_SHIFT ) & VLAN_PRIORITY_MSK )
 
#define _encode_vlan_cfg(_id, _prty)   ( ( (_id) << VLAN_ID_SHIFT ) | ( (_prty) << VLAN_PRIORITY_SHIFT ) )
 

Typedefs

typedef uint16_t MBG_VLAN_CFG
 VLAN configuration. More...
 

Detailed Description

Macro Definition Documentation

◆ _decode_vlan_id

#define _decode_vlan_id (   _cfg)    ( ( (_cfg) >> VLAN_ID_SHIFT ) & VLAN_ID_MSK )

Macros used to encode/decode packed vlan_cfg variables.

Definition at line 11219 of file gpsdefs.h.

◆ _decode_vlan_priority

#define _decode_vlan_priority (   _cfg)    ( ( (_cfg) >> VLAN_PRIORITY_SHIFT ) & VLAN_PRIORITY_MSK )

Definition at line 11220 of file gpsdefs.h.

◆ _encode_vlan_cfg

#define _encode_vlan_cfg (   _id,
  _prty 
)    ( ( (_id) << VLAN_ID_SHIFT ) | ( (_prty) << VLAN_PRIORITY_SHIFT ) )

Definition at line 11221 of file gpsdefs.h.

◆ _mbg_swab_mbg_vlan_cfg

#define _mbg_swab_mbg_vlan_cfg (   _p)    _mbg_swab16( _p )

Definition at line 11195 of file gpsdefs.h.

◆ MAX_VLAN_ID

#define MAX_VLAN_ID   ( N_VLAN_ID - 1 )

maximum ID value

Definition at line 11200 of file gpsdefs.h.

◆ MAX_VLAN_PRIORITY

#define MAX_VLAN_PRIORITY   ( N_VLAN_PRIORITY - 1 )

maximum priority

Definition at line 11210 of file gpsdefs.h.

◆ MIN_VLAN_ID

#define MIN_VLAN_ID   0

minimum ID value

Definition at line 11199 of file gpsdefs.h.

◆ MIN_VLAN_PRIORITY

#define MIN_VLAN_PRIORITY   0

minimum priority

Definition at line 11209 of file gpsdefs.h.

◆ N_VLAN_ID

#define N_VLAN_ID   ( 1 << VLAN_ID_BITS )

number of ID values

Definition at line 11198 of file gpsdefs.h.

◆ N_VLAN_PRIORITY

#define N_VLAN_PRIORITY   ( 1 << VLAN_PRIORITY_BITS )

number of priority values

Definition at line 11208 of file gpsdefs.h.

◆ VLAN_ID_BITS

#define VLAN_ID_BITS   12

number of bits to hold the ID

Definition at line 11197 of file gpsdefs.h.

◆ VLAN_ID_MSK

#define VLAN_ID_MSK   ( ( 1 << VLAN_ID_BITS ) - 1 )

Definition at line 11204 of file gpsdefs.h.

◆ VLAN_ID_SHIFT

#define VLAN_ID_SHIFT   0

Definition at line 11203 of file gpsdefs.h.

◆ VLAN_PRIORITY_BITS

#define VLAN_PRIORITY_BITS   3

number of bits to hold priority

Definition at line 11207 of file gpsdefs.h.

◆ VLAN_PRIORITY_MSK

#define VLAN_PRIORITY_MSK   ( ( 1 << VLAN_PRIORITY_BITS ) - 1 )

Definition at line 11214 of file gpsdefs.h.

◆ VLAN_PRIORITY_SHIFT

#define VLAN_PRIORITY_SHIFT   ( ( 8 * sizeof( MBG_VLAN_CFG ) ) - VLAN_PRIORITY_BITS )

Definition at line 11213 of file gpsdefs.h.

Typedef Documentation

◆ MBG_VLAN_CFG

VLAN configuration.

Note
This is a combination of a VLAN ID number plus a VLAN priority code.

Definition at line 11193 of file gpsdefs.h.