?? radiostate.h
字號:
/* -*- mode:c++ -*- ********************************************************
* file: RadioState.h
*
* author: Andreas Koepke
*
* copyright: (C) 2004 Telecommunication Networks Group (TKN) at
* Technische Universitaet Berlin, Germany.
*
* 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.
* For further information see file COPYING
* in the top level directory
***************************************************************************
* part of: framework implementation developed by tkn
* description: Blackboard Parameter that reflects the current state of
* the radio
***************************************************************************
* changelog: $Revision$
* last modified: $Date: 2004-07-20 22:11:00 +0200 (Tue, 20 Jul 2004) $
* by: $Author: omfw-willkomm $
**************************************************************************/
#ifndef RADIOSTATE_H
#define RADIOSTATE_H
#include <omnetpp.h>
/**
* @brief Class to hold the radio state of the host
*
* This Blackboard parameter holds the actual state of the
* radio. Possible states are : IDLE, RECV, SEND and SLEEP
*
* IDLE: the radio is idle
*
* RECV: the radio is receiving a message
*
* SEND: the radio is sending a message
*
* SLEEP: the radio is sleeping
*
* @ingroup utils
* @author Andreas K鰌ke
* @sa Blackboard
**/
class RadioState : public cPolymorphic
{
public:
/** @brief possible states of the radio*/
enum States
{
IDLE,
RECV,
SEND,
SLEEP
};
private:
/** @brief Variable that hold the actaul state*/
States state;
public:
/** @brief function to get the state*/
States getState() const { return state; }
/** @brief set the state of the radio*/
void setState(States s) { state = s; }
/** @brief Constructor*/
RadioState(States s=IDLE) : cPolymorphic(), state(s) {};
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -