DevCapability Struct Reference

#include <p802_15_4field.h>

Collaboration diagram for DevCapability:

Collaboration graph
[legend]

Detailed Description

Definition at line 408 of file p802_15_4field.h.

Public Member Functions

void parse (void)
void setAlloShortAddr (bool alloc)
void setAlterPANCoor (bool alterPC)
void setFFD (bool ffd)
void setMainPower (bool mp)
void setRecvOnWhenIdle (bool onidle)
void setSecuCapable (bool sc)

Data Fields

bool alloShortAddr
bool alterPANCoor
UINT_8 cap
bool FFD
bool mainsPower
bool recvOnWhenIdle
bool secuCapable


Member Function Documentation

void DevCapability::parse void   )  [inline]
 

Definition at line 426 of file p802_15_4field.h.

References alloShortAddr, alterPANCoor, cap, FFD, mainsPower, recvOnWhenIdle, and secuCapable.

Referenced by Mac802_15_4::Mac802_15_4().

00427     {
00428         alterPANCoor = ((cap & 0x80) != 0)?true:false;
00429         FFD = ((cap & 0x40) != 0)?true:false;
00430         mainsPower = ((cap & 0x20) != 0)?true:false;
00431         recvOnWhenIdle = ((cap & 0x10) != 0)?true:false;
00432         secuCapable = ((cap & 0x02) != 0)?true:false;
00433         alloShortAddr = ((cap & 0x01) != 0)?true:false;
00434     }

void DevCapability::setAlloShortAddr bool  alloc  )  [inline]
 

Definition at line 466 of file p802_15_4field.h.

References alloShortAddr, and cap.

00467     {
00468         alloShortAddr = alloc;
00469         cap = (cap & 0xfe);
00470         if (alloc) cap += 0x01;
00471     }

void DevCapability::setAlterPANCoor bool  alterPC  )  [inline]
 

Definition at line 436 of file p802_15_4field.h.

References alterPANCoor, and cap.

00437     {
00438         alterPANCoor = alterPC;
00439         cap = (cap & 0x7f);
00440         if (alterPC) cap += 0x80;
00441     }

void DevCapability::setFFD bool  ffd  )  [inline]
 

Definition at line 442 of file p802_15_4field.h.

References cap, and FFD.

Referenced by SSCS802_15_4::startDevice(), and SSCS802_15_4::startPANCoord().

00443     {
00444         FFD = ffd;
00445         cap = (cap & 0xbf);
00446         if (ffd) cap += 0x40;
00447     }

void DevCapability::setMainPower bool  mp  )  [inline]
 

Definition at line 448 of file p802_15_4field.h.

References cap, and mainsPower.

00449     {
00450         mainsPower = mp;
00451         cap = (cap & 0xdf);
00452         if (mp) cap += 0x20;
00453     }

void DevCapability::setRecvOnWhenIdle bool  onidle  )  [inline]
 

Definition at line 454 of file p802_15_4field.h.

References cap, and recvOnWhenIdle.

00455     {
00456         recvOnWhenIdle = onidle;
00457         cap = (cap & 0xef);
00458         if (onidle) cap += 0x10;
00459     }

void DevCapability::setSecuCapable bool  sc  )  [inline]
 

Definition at line 460 of file p802_15_4field.h.

References cap, and secuCapable.

00461     {
00462         secuCapable = sc;
00463         cap = (cap & 0xfd);
00464         if (sc) cap += 0x02;
00465     }


Field Documentation

bool DevCapability::alloShortAddr
 

Definition at line 424 of file p802_15_4field.h.

Referenced by parse(), and setAlloShortAddr().

bool DevCapability::alterPANCoor
 

Definition at line 419 of file p802_15_4field.h.

Referenced by parse(), and setAlterPANCoor().

UINT_8 DevCapability::cap
 

Definition at line 410 of file p802_15_4field.h.

Referenced by Mac802_15_4::Mac802_15_4(), Mac802_15_4::mlme_associate_request(), parse(), setAlloShortAddr(), setAlterPANCoor(), setFFD(), setMainPower(), setRecvOnWhenIdle(), and setSecuCapable().

bool DevCapability::FFD
 

Definition at line 420 of file p802_15_4field.h.

Referenced by Mac802_15_4::beaconTxHandler(), Mac802_15_4::dispatch(), Mac802_15_4::mcps_data_request(), SSCS802_15_4::MLME_SCAN_confirm(), Mac802_15_4::mlme_start_request(), parse(), Mac802_15_4::recvCommand(), and setFFD().

bool DevCapability::mainsPower
 

Definition at line 421 of file p802_15_4field.h.

Referenced by parse(), and setMainPower().

bool DevCapability::recvOnWhenIdle
 

Definition at line 422 of file p802_15_4field.h.

Referenced by parse(), and setRecvOnWhenIdle().

bool DevCapability::secuCapable
 

Definition at line 423 of file p802_15_4field.h.

Referenced by parse(), and setSecuCapable().


The documentation for this struct was generated from the following file:
Generated on Tue Mar 6 17:05:32 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6