📄 phy_802_15_4.h
字号:
// FUNCTION :: Phy802_15_4SignalArrivalFromChannel// LAYER :: PHY// PURPOSE :: Handle signal arrival from the channel// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : int : Index of the PHY// + channelIndex : int : Index of the channel receiving signal from// + propRxInfo : PropRxInfo* : Propagation information// RETURN :: void : NULL// **/void Phy802_15_4SignalArrivalFromChannel( Node* node, int phyIndex, int channelIndex, PropRxInfo *propRxInfo);// /**// FUNCTION :: Phy802_15_4SignalEndFromChannel// LAYER :: PHY// PURPOSE :: Handle signal end from a channel// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : int : Index of the PHY// + channelIndex : int : Index of the channel receiving signal from// + propRxInfo : PropRxInfo* : Propagation information// RETURN :: void : NULL// **/void Phy802_15_4SignalEndFromChannel( Node* node, int phyIndex, int channelIndex, PropRxInfo *propRxInfo);// /**// FUNCTION :: Phy802_15_4Finalize// LAYER :: PHY// PURPOSE :: Finalize the 802.15.4 PHY, print out statistics// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : const int : Index of the PHY// RETURN :: void : NULL// **/void Phy802_15_4Finalize(Node *node, const int phyIndex);// /**// FUNCTION :: Phy802_15_4TerminateCurrentReceive// LAYER :: PHY// PURPOSE :: Terminate all signals current under receiving.// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : int : Index of the PHY// + terminateOnlyOnReceiveError : const BOOL : Only terminate if in error// + frameError : BOOL* : For returning if frame is in error// + endSignalTime: clocktype* : For returning expected signal end time// RETURN :: void : NULL// **/void Phy802_15_4TerminateCurrentReceive( Node *node, int phyIndex, BOOL terminateOnlyOnReceiveError, BOOL *receiveError, clocktype *endSignalTime);//**// FUNCTION :: Phy802_15_4TransmissionEnd// LAYER :: PHY// PURPOSE :: End of the transmission// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : int : Index of the PHY// RETURN :: void : NULL// **/void Phy802_15_4TransmissionEnd(Node *node, int phyIndex);//**// FUNCTION :: Phy802_15_4StartTransmittingSignal// LAYER :: PHY// PURPOSE :: Start transmitting a frame// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : int : Index of the PHY// + packet : Message* : Frame to be transmitted// + useMacLayerSpecifiedDelay : Use MAC specified delay or calculate it// + initDelayUntilAirborne : clocktype : The MAC specified delay// RETURN :: void : NULL// **/void Phy802_15_4StartTransmittingSignal( Node* node, int phyIndex, Message* packet, BOOL useMacLayerSpecifiedDelay, clocktype initDelayUntilAirborne);// /**// API :: Phy802_15_4StartTransmittingSignal// LAYER :: Physical// PURPOSE :: Used by the MAC layer to start transmitting// a packet.Accepts a parameter called// duration which specifies transmission delay.// Function is being overloaded// PARAMETERS ::// + node : Node * : node pointer to node// + phyIndex : int : index// + packet : Message* : packet to be sent// + duration : clocktype : packet transmission delay// + useMacLayerSpecifiedDelay : BOOL : use delay specified by MAC// + initDelayUntilAirborne : clocktype : delay until airborne// RETURN :: void// **/void Phy802_15_4StartTransmittingSignal( Node* node, int phyIndex, Message* packet, clocktype duration, BOOL useMacLayerSpecifiedDelay, clocktype initDelayUntilAirborne);// /**// FUNCTION :: Phy802_15_4StartTransmittingSignal// LAYER :: PHY// PURPOSE :: Start transmitting a frame// PARAMETERS ::// + node : Node* : Pointer to node.// + phyIndex : int : Index of the PHY// + packet : Message* : Frame to be transmitted// + bitSize : int : Packet size in bits// + useMacLayerSpecifiedDelay : Use MAC specified delay or calculate it// + initDelayUntilAirborne : clocktype : The MAC specified delay// RETURN :: void : NULL// **/void Phy802_15_4StartTransmittingSignal( Node* node, int phyIndex, Message* packet, int bitSize, BOOL useMacLayerSpecifiedDelay, clocktype initDelayUntilAirborne);// /**// FUNCTION :: Phy802_15_4GetFrameDuration// LAYER :: PHY// PURPOSE :: Obtain the duration of frame// PARAMETERS ::// + thisPhy : PhyData* : Pointer to PhyData// + size : int : Packet size in Bytes// + dataRate : int : Data rate in bits/s// RETURN :: clocktype : Duration of the frame// **/clocktype Phy802_15_4GetFrameDuration( PhyData* thisPhy, int size, int dataRate);// /**// FUNCTION :: Phy802_15_4GetFrameDurationFromBits// LAYER :: PHY// PURPOSE :: Obtain the duration of frame// PARAMETERS ::// + thisPhy : PhyData* : Pointer to PhyData// + bitSize : int : Packet size in Bits// + dataRate : int : Data rate in bits/s// RETURN :: clocktype : Duration of the frame// **///computes frame duration using specified bit sizeclocktype Phy802_15_4GetFrameDurationFromBits(PhyData* thisPhy, int bitSize, int dataRate);// /**// FUNCTION :: Phy802_15_4SetTransmitPower// LAYER :: PHY// PURPOSE :: Set the transmit power of the PHY// PARAMETERS ::// + thisPhy : PhyData* : Pointer to PHY data// + newTxPower_mW : double : Transmit power in mW// RETURN :: void : NULL// **/void Phy802_15_4SetTransmitPower( PhyData *thisPhy, double newTxPower_mW);// /**// FUNCTION :: Phy802_15_4GetTransmitPower// LAYER :: PHY// PURPOSE :: Retrieve the transmit power of the PHY in mW// PARAMETERS ::// + thisPhy : PhyData* : Pointer to PHY data// + txPower_mW : double* : For returning the transmit power// RETURN :: void : NULL// **/void Phy802_15_4GetTransmitPower(PhyData *thisPhy, double *txPower_mW);int Phy802_15_4GetDataRate(PhyData *thisPhy);void Phy802_15_4SetHeaderSize(PhyData *thisPhy, int headerSize);void Phy802_15_4SetDataRate(Node* node, int phyIndex, int dataRate);void Phy802_15_4RunTimeStat(Node* node, PhyData *thisPhy);BOOL Phy802_15_4MediumIsIdle(Node *node, int phyIndex);void Phy802_15_4GetLinkQuality( Node* node, int phyIndex, double *sinr, double* signalPower_mW);void Phy802_15_4TerminateCurrentTransmission( Node *node, int phyIndex);int Phy802_15_4getChannelNumber( Node* node, int phyIndex);void Phy802_15_4PlmeSetTRX_StateRequest( Node* node, int phyIndex, PLMEsetTrxState state);void Phy802_15_4PLMECCArequest( Node* node, int phyIndex, BOOL* channelIsFree );void Phy802_15_4GetNodeStatus( Node* node, int phyIndex, PhyStatusType status);void Phy802_15_4DeactivationNode( Node* node, int phyIndex);void Phy802_15_4ActivationNode( Node* node, int phyIndex);#endif /* PHY_802_15_4_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -