/************************************************************************ IChannel.h - Copyright buret Here you can write a license for your code, some comments or any other information you want to have in your generated code. To to this simply configure the "headings" directory in uml to point to a directory where you have your heading files. or you can just replace the contents of this file with your own. If you want to do this, this file is located at /usr/share/apps/umbrello/headings/heading.h -->Code Generators searches for heading files based on the file extension i.e. it will look for a file name ending in ".h" to include in C++ header files, and for a file name ending in ".java" to include in all generated java code. If you name the file "heading.", Code Generator will always choose this file even if there are other files with the same extension in the directory. If you name the file something else, it must be the only one with that extension in the directory to guarantee that Code Generator will choose it. you can use variables in your heading files which are replaced at generation time. possible variables are : author, date, time, filename and filepath. just write %variable_name% This file was generated on %date% at %time% The original location of this file is /home/buret/eclipse/maximus/channel/inc/IChannel.h **************************************************************************/ #ifndef ICHANNEL_H #define ICHANNEL_H #include "sci_types.h" // for 'Sci_Msg_Station_Id' #include "networkclock_types.h" // for 'Network_Clock_Tick' #include "phy_types.h" // for 'MAC_MAX_PB_PER_MPDU' #include // for 'uint8_t' type #include class PhySciMsgNoise; class PhySciMsgMpdu; class ChannelSettings; /** * class IChannel */ class IChannel { public: // Constructors/Destructors // /** * Empty Constructor */ IChannel ( ) { } /** * Empty Destructor */ virtual ~IChannel ( ) { } // public methods // /** * Duplicate the MPDU payload. * @param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload * @return bool */ virtual bool duplicateMpduPayload ( PhySciMsgMpdu & mpdu ) = 0; /** * Compute PB measurement and NOISE. * @param pb_measurement_array the PB measurement to fill in * @param noise the PHY SCI message NOISE to fill in * @param pb_header_array the PB header of each PB composing the MPDU * @param mpdu a PHY SCI message MPDU that contains the duplicated MPDU payload * @param tx_station_id the ID of the transmitting station * @param rx_station_id the ID of the destination station * @param current_tick the current Network Clock tick * @return bool */ virtual bool addPerturbation ( uint32_t * pb_measurement_array, PhySciMsgNoise & noise, const uint32_t * pb_header_array, const PhySciMsgMpdu & mpdu, const Sci_Msg_Station_Id tx_station_id, const Sci_Msg_Station_Id rx_station_id, const Network_Clock_Tick current_tick ) = 0; /** * Add Channel Settings to the list. * Called when a station is created => create its associated Channel Settings. * @return bool */ virtual bool addChannelSettings ( const Sci_Msg_Station_Id created_station_id ) = 0; /** * Find Channel Settings. * @param tx_station_id the ID of the transmitting station * @param rx_station_id the ID of the destination station * @return a list of Channel Settings */ virtual std::vector & findChannelSettings ( const Sci_Msg_Station_Id tx_station_id, const Sci_Msg_Station_Id rx_station_id, const bool both_directions ) = 0; /** * Called when the PHY processor receives a preamble. * @param tx_station_id the ID of the transmitting station * @param current_tick the current Network Clock tick * @return bool */ virtual bool receivePre ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick ) = 0; /** * Called when the PHY processor receives a frame control. * @param tx_station_id the ID of the transmitting station * @param current_tick the current Network Clock tick * @return bool */ virtual bool receiveFc ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick ) = 0; /** * Sets the tonemask. * @param p_tonemask the new value of mpTonemask * @return bool */ virtual bool setTonemask ( const uint8_t * p_tonemask ) = 0; /** * Sets the tonemap of the current transmission. * @return bool * @param tx_station_id the ID of the transmitting station * @param length the tonemap length in octets * @param p_tonemap the tonemap */ virtual bool setTonemap ( const Sci_Msg_Station_Id tx_station_id, const unsigned long length, const unsigned char * p_tonemap ) = 0; /** * Sets the beacon period in ticks 25 MHz. * @return bool * @param frequency the power-line frequency */ virtual bool setBeaconPeriod ( const float frequency ) = 0; /** * Gets the beacon period in ticks 25 MHz. * @return mBeaconPeriod */ virtual const unsigned int getBeaconPeriod ( ) const = 0; }; #endif /* ICHANNEL_H */