/*
* lifi-mac-pib-attributes.h
*
* Created on: 2014年3月30日
* Author: will
*/
#ifndef LIFI_MAC_PIB_ATTRIBUTES_H_
#define LIFI_MAC_PIB_ATTRIBUTES_H_
#include <map>
#include "ns3/core-module.h"
#include "lifi-pib-attributes.h"
#include "lifi-mac-general.h"
//#include "lifi-mac-coord-impl.h"
//#include "lifi-mac-dev-impl.h"
namespace ns3 {
/**
* This is the base class of medium access control entity of both coordinator and
* device.
*/
class LifiMacPibAttribute : public LifiPIBAttribute
{
friend class LifiMacImpl;
friend class LifiMacCoordImpl;
friend class LifiMacDevImpl;
friend class LifiChannelScanHandler;
friend class LifiAssocHandler;
friend class LifiDevAssocHandler;
friend class LifiTrxHandler;
friend class LifiCoordTrxHandler;
friend class LifiDevTrxHandler;
friend class LifiTransactionHandler;
public:
LifiMacPibAttribute();
virtual ~LifiMacPibAttribute();
void* GetAttributes (MacPIBAttributeId id)
{
std::map<uint8_t, void*>::iterator it = m_attributes.find((uint8_t)id);
NS_ASSERT (it != m_attributes.end());
return it->second;
}
void SetAttributes (MacPIBAttributeId id, void* value);
void Reset ();
private:
/**
* The maximum number of optical clocks to wait for an acknowledgment frame to
* arrive following a transmitted data frame. This value is dependent on the
* supported PHY, which determines both the selected logical channel. The calculated
* value is the time to commence transmitting the ACK plus the length of the ACK frame.
* The commencement time is described in 5.1.7.4.2.
*/
uint32_t macAckWaitDuration;
/**
* Indication of whether the device is associated to the VPAN through the coordinator.
* A value of TRUE indicates the device has associated through the coordinator. Otherwise,
* the value is set to FALSE.
*/
bool macAssociatedVPANCoord;
/**
* Indication of whether a coordinator is currently allowing association. A value of TRUE
* indicates that association is permitted.
*/
bool macAssociationPermit;
/**
* Indication of whether a device automatically sends a data request command if its address
* is listed in the beacon frame. A value of TRUE indicates that the data request command
* is automatically sent. This attribute also affects the generation of the
* MLME-BEACON-NOTIFY.indication primitive (see 6.3.3.1.1).
*/
bool macAutoRequest;
/**
* Specification of how often the coordinator transmits its beacon. If BO= 15, the coordinator
* will not transmit a periodic beacon. Refer to 5.1.1.1 for an explanation of the relationship
* between the beacon order and the beacon interval. Range:0–15
*/
uint32_t macBeaconOrder;
/**
* The contents of the beacon payload.
*/
Buffer macBeaconPayload;
/**
* The length, in octets, of the beacon payload.Range:0 –aMaxBeaconPayloadLength
*/
uint32_t macBeaconPayloadLength;
/**
* The time that the device transmitted its last beacon frame, in symbol periods. The
* measurement shall be taken at the same symbol boundary within every transmitted
* beacon frame, the location of which is implementation specific. This is a 24-bit value,
* and the precision of this value shall be a minimum of 20 bits, with the lowest four bits
* being the least significant. Range:0x000000–0xffffff
*/
uint32_t macBeaconTxTime;
/**
* The sequence number added to the transmitted beacon frame.
*/
uint8_t macBSN;
/*
* The 64-bit address of the coordinator through which the device is associated.
* */
Mac64Address macCoordExtendedAddress;
/**
* The 16-bit short address assigned to the coordinator through which the device is
* associated. A value of 0xfffe indicates that the coordinator is only using its
* 64-bit extended address. A value of 0xffff indicates that this value is unknown.
* Range:0x0000–0xffff
*/
Mac16Address macCoordShortAddress;
/**
* The sequence number added to the transmitted data or MAC command frame.
*/
uint32_t macDSN;
/**
* TRUE if the coordinator is to accept GTS requests. FALSE otherwise.
*/
bool macGTSPermit;
/**
* A timer initiated when the link recovery procedure is triggered. If the timer expires
* while the device has not received any fast link recovery response (FLR RSP) signal since
* the fast link recovery procedure is triggered, the device assumes that the link is broken
* and cannot be recovered. The range for macLinkTimeOut is defined in terms of the number
* of superframes.Range:0-255
*/
uint32_t macLinkTimeOut;
/**
* The maximum value of the backoff exponent, BE, in the unslotted random access algorithm.
* Refer to 5.1.1.3 for a detailed explanation of the backoff exponent.Range:3–15
*/
uint32_t macMaxBE;
/**
* The maximum number of backoffs the unslotted random access algorithm will attempt before
* declaring a channel access failure.Range:0-5
*/
uint32_t macMaxCSMABackoffs;
/**
* The maximum number of retries allowed after a transmission failure.Range:0–7
*/
uint32_t macMaxFrameRetries;
/**
* The maximum number of optical clocks in a beacon-enabled VPAN, or in a non-beacon-enabled
* VPAN, to wait either for a frame intended as a response to a data request frame or for a
* broadcast frame following a beacon with the frame pending subfield set to one. This attribute,
* which shall only be set by the next higher layer, is dependent upon macMinBE, macMaxBE,
* macMaxCSMABackoffs and the number of optical clocks per octet. Refer to 6.4.2 for the formula
* relating the attributes.Range:Refer to Equation (2)
*/
uint32_t macMaxFrameTotalWaitTime;
/**
* The minimum value of the backoff exponent (BE) in the unslotted random access algorithm. Refer
* to 5.1.1.3 for a detailed explanation of the backoff exponent. Range: 0–macMaxBE
*/
uint32_t macMinBE;
/**
* The minimum number of optical clocks forming a LIFS period.Range:As defined in Table 77 in
* 8.3.4
*/
uint32_t macMinLIFSPeriod;
/**
* The minimum number of optical clocks forming a SIFS period. Range: As defined in Table 77 in
* 8.3.4
*/
uint32_t macMinSIFSPeriod;
/**
* Maximum number of times not receiving ACKs to trigger fast link recovery procedure. Range: 0–15
*/
uint32_t macNumAcks;
/**
* The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response
* command frame to be available following a request command frame.
*/
uint32_t macResponseWaitTime;
/**
* Indication of whether the MAC sublayer is to enable its receiver during idle periods. For a
* beacon-enabled VPAN, this attribute is relevant only during the CAP of the incoming superframe.
* For a non-beacon-enabled VPAN, this attribute is relevant at all times.
*/
bool macRxOnWhenIdle;
/**
* The 16-bit address that the device uses to communicate in the VPAN. If the device is the coordinator,
* this value shall be chosen before a VPAN is started. Otherwise, the address is allocated by a coordinator
* during association. A value of 0xfffe indicates that the device has associated but has not been
* allocated an address. A value of 0xffff indicates that the device does not have a short address.
* Range: 0x0000–0xffff
*/
uint16_t macShortAddress;
/**
* The length of the active portion of the outgoing superframe, including the beacon frame. If superframe
* order, SO, = 15, the superframe will not be active following the beacon. Refer to 5.1.1.1 for
* an explanation of the relationship between the superframe order and the superframe duration.
* Range: 0–15
*/
uint32_t macSuperframeOrder;
/**
* The location of the time stamp after the end of the preamble in optical clocks.
*/
unsigned char macTimeStampOffset;
/**
* Indication of whether the MAC sublayer supports the optional time stamping feature for
* incoming and outgoing data frames.
*/
bool macTimestampSupported;
/**
* The maximum time (in unit periods) that a transaction is
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
model.rar (96个子文件)
model
lifi-gts-handler.h 850B
lifi-data-handler.cc 604B
lifi-mac-dev-impl.cc 4KB
lifi-mac.cc 7KB
lifi-mac.h 4KB
mcps-sap-user.cc 299B
op-status-callback.h 438B
plme-sap-provider.cc 323B
lifi-phy-pib-attributes.h 1KB
lifi-phy-general.cc 156B
mlme-sap-provider.cc 321B
lifi-cell.cc 1KB
mlme-sap-user.h 5KB
lifi-interference.h 3KB
lifi.h 175B
lifi-gts-handler.cc 739B
lifi-coord-assoc-handler.h 2KB
lifi-phy.cc 22KB
lifi-mac-pib-attributes.cc 4KB
lifi-disassoc-handler.h 665B
lifi-spectrum-signal-parameters.h 804B
mcps-sap-user.h 2KB
lifi-pib-attributes.cc 329B
lifi-spectrum-phy.cc 11KB
lifi-trx-handler.cc 19KB
pd-sap-user.cc 287B
lifi-phy-header.h 2KB
mlme-sap-provider.h 4KB
lifi-mac-header.h 1KB
plme-sap-user.cc 299B
lifi-net-device.h 2KB
lifi-coord-trx-handler.cc 4KB
lifi-mac-general.h 7KB
lifi-net-device.cc 3KB
lifi-mac-dev-impl.h 2KB
lifi-spectrum-channel.cc 15KB
lifi-assoc-handler.cc 2KB
lifi-beacon-handler.cc 802B
lifi-spectrum-error-model.cc 1KB
lifi-mac-coord-impl.h 3KB
lifi-dev-assoc-handler.h 2KB
pd-sap-provider.h 790B
lifi-mac-coord-impl.cc 5KB
lifi-mac-pib-attributes.h 8KB
data-service.cc 285B
lifi-mac-comm.h 6KB
lifi-beacon-handler.h 802B
lifi-transaction-handler.h 2KB
lifi-spectrum-loss-model.h 3KB
lifi-coord-trx-handler.h 711B
lifi-mac-impl.cc 3KB
lifi-trx-handler.h 5KB
lifi-mac-header.cc 5KB
lifi-spectrum-channel.h 4KB
lifi-transaction-handler.cc 10KB
mcps-sap-provider.cc 322B
lifi-interference.cc 13KB
lifi-mac-handler.cc 616B
plme-sap-provider.h 2KB
lifi-spectrum-signal-parameters.cc 1KB
lifi-dev-trx-handler.h 594B
lifi-channel-scan-handler.h 2KB
lifi-data-handler.h 643B
lifi-phy-general.h 2KB
mcps-sap-provider.h 1KB
lifi-disassoc-handler.cc 652B
lifi-channel-scan-handler.cc 6KB
lifi-mac-ack.cc 2KB
lifi-mac-ack.h 630B
lifi-phy-header.cc 3KB
lifi.cc 133B
lifi-mac-impl.h 7KB
lifi-pib-attributes.h 749B
data-service.h 3KB
pd-sap-provider.cc 311B
lifi-assoc-handler.h 1KB
lifi-mac-beacon.cc 11KB
lifi-coord-assoc-handler.cc 9KB
lifi-indoor-propagation-loss-model.cc 3KB
lifi-dev-trx-handler.cc 3KB
op-status-callback.cc 329B
lifi-indoor-propagation-loss-model.h 1KB
lifi-phy-pib-attributes.cc 1KB
plme-sap-user.h 1KB
lifi-spectrum-loss-model.cc 6KB
lifi-cell.h 855B
lifi-mac-general.cc 1KB
lifi-spectrum-phy.h 3KB
pd-sap-user.h 958B
lifi-mac-handler.h 3KB
mlme-sap-user.cc 297B
lifi-mac-beacon.h 3KB
lifi-mac-comm.cc 16KB
lifi-spectrum-error-model.h 727B
lifi-phy.h 5KB
lifi-dev-assoc-handler.cc 11KB
共 96 条
- 1
资源评论
APei
- 粉丝: 63
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功