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

📄 aqueduct_shell.h

📁 MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis的0.9.5版本的源码。
💻 H
字号:
/*  This file is part of MANTIS OS, Operating System for Nymph.  See http://mantis.cs.colorado.edu/  Copyright (C) 2005 University of Colorado, Boulder  This program is free software; you can redistribute it and/or  modify it under the terms of the GNU General Public License  as published by the Free Software Foundation; either version 2  of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  (See http://www.gnu.org/copyleft/gpl.html)  along with this program; if not, write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,  USA, or send email to mantis-users@cs.colorado.edu.*//**************************************************************************//* File:       aqueduct_shell.h                                           *//* Author:     Lane Phillips  :  lane.phillips@colorado.edu               *//*   Date:                                                                *//**************************************************************************//** @file aqueduct_shell.h * @brief Aqueduct shell implementation *  * This header contains declarations that are used by the code that implements * a special shell for running Aqueduct experiments.  This file is included by * both src/mos/net/aqueduct_shell.c, which is MOS code, and src/apps/deluge_test/aqshell.c, * which is XMOS code.  The constants defined in this header are duplicated in * src/apps/deluge_test/ExperServer.java. *  * @author Lane Phillips * @date Created:           */#ifndef _AQUEDUCT_SHELL_H_#define _AQUEDUCT_SHELL_H_#define AQUEDUCT_SHELL#include "com.h"// Packet types#define AQSHELL_MESSAGE '#'#define AQSHELL_START '0'#define AQSHELL_NEWVERSION '1'#define AQSHELL_COMPLETEPAGE '2'#define AQSHELL_COMPLETEPROG '3'#define AQSHELL_CLEARSTATS '4'#define AQSHELL_STARTSTATS '5'#define AQSHELL_STOPSTATS '6'#define AQSHELL_SAVESTATS '7'#define AQSHELL_GETSTATS '8'#define AQSHELL_GETSTATS_REPLY '9'#define AQSHELL_SETVERSION 'A'#define AQSHELL_SETVERSION_REPLY 'B'#define AQSHELL_SUMMARY 'C'#define AQSHELL_PROFILE 'D'#define AQSHELL_REQUEST 'E'#define AQSHELL_DATA 'F'#define AQSHELL_GETID 'G'#define AQSHELL_GETID_REPLY 'H'#define AQSHELL_SUMMARY_SEND 'I'#define AQSHELL_PROFILE_SEND 'J'#define AQSHELL_REQUEST_SEND 'K'#define AQSHELL_DATA_SEND 'L'#define AQSHELL_CLOSE 'M'#define AQSHELL_SETLOG 'N'#define AQSHELL_NOOP 'O'#define AQSHELL_GETVERSION 'P'#define AQSHELL_SETIMAGESIZE 'Q'#define AQSHELL_SETCACHESIZE 'R'#define AQSHELL_ALLQUIET 'S'#define AQSHELL_NOTQUIET 'T'#define AQSHELL_HEARTBEAT 'U'#define AQSHELL_DEADNODE 'V'#define AQSHELL_STOPUPDATE 'W'#define AQSHELL_CACHEHIT 'X'#define AQSHELL_CACHEMISS 'Y'#define AQSHELL_CACHEHITFORWARD 'Z'#define AQSHELL_CACHEHITOLDFORWARD 'a'// Flags to tell how this packet should be handled#define AQSHELL_F_ACK 0x01				// Acknowledging a command#define AQSHELL_F_PLEASEACK 0x02		// Receiver of command should ACK#define AQSHELL_F_RESEND 0x04			// Unused#define AQSHELL_F_FORWARDREPLY 0x08		// XMOS shell should forward reply to Java server#define AQSHELL_F_SHELLCTL 0x10			// Command intended for XMOS shell#define AQSHELL_F_NODECTL 0x20			// Command intended for node, XMOS shell will forwardstruct aqshell_header {	uint8_t command;	uint8_t flags;	uint16_t id;	uint8_t seq;	uint8_t length;} __attribute__ ((packed));#define AQSHELL_DATA_SIZE (COM_DATA_SIZE - sizeof(struct aqshell_header))struct aqshell_pkt {	struct aqshell_header head;	uint8_t data[AQSHELL_DATA_SIZE];} __attribute__ ((packed));#ifndef PLATFORM_LINUX#ifdef AQUEDUCT_SHELLvoid aqshell_init();void aqshell_send(uint8_t type, uint8_t* data, uint8_t len);#else// compile to nothingstatic inline void aqshell_init() {}static inline void aqshell_send(uint8_t type, uint8_t* data, uint8_t len) {}#endif /*AQUEDUCT_SHELL*/#endif /*PLATFORM_LINUX*/#endif /*_AQUEDUCT_SHELL_H_*/

⌨️ 快捷键说明

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