⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mh.h

📁 Tinyos LEACH protocol modify
💻 H
字号:
/*
* MH.h - A header file containing structures for multihop messaging
*
* @author Geoff Martin
* @date 18th April 2004
* @version 1.0
*/
#ifndef _TOS_MH_H
#define _TOS_MH_H
#include "AM.h"
// Default probability of 25%
#ifndef LEACH_PROBABILITY
#define LEACH_PROBABILITY 25
#endif
enum
{
AM_MHMESSAGE = 250,
AM_TIMESYNC = 100,
BASE_STATION_ADDRESS = 0,
FLOODING_MAX_HOP_COUNT = 100,
FLOODING_LOG_LENGTH = 250,
GOSSIPING_MAX_HOP_COUNT = 250,
GOSSIPING_NEIGHBOUR_TABLE_SIZE = 32,
GOSSIPING_ROUTE_UPDATE_RATE = 10000, // 10 seconds
LEACH_ROUTE_UPDATE_RATE = 10000, // 10 seconds
LEACH_ROUND_LENGTH = 600000, // 10 minutes
LEACH_NEIGHBOUR_TABLE_SIZE = 32
};
typedef struct MHMessage
{
uint16_t sendingNode;
uint16_t originNode;
uint16_t seqNo;
uint16_t hopCount;
uint8_t data[(TOSH_DATA_LENGTH - 8)];
} __attribute__ ((packed)) MHMessage;
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -