// Sim.h: interface for the CSim class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_SIM_H__5C549600_9F75_434C_A89C_0C999D0BC527__INCLUDED_) #define AFX_SIM_H__5C549600_9F75_434C_A89C_0C999D0BC527__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /////////////////// /////////////////// //#include "Header.h" //#include "CRC.h" //#include "Frame.h" #include "Medium.h" // include these header files to access to the properties and functions of these object (Cmedium, Ccode,CTx and CRx)mthat is used in this class . #include "Code.h" #include "Tx.h" #include "Rx.h" /////////////////// /////////////////// class CSim // thwe main simulation object that include all the Txs, Rxs, codes,... objects. { public: double calibration;// the calibration of the FIR matrix of the simulation (this object) medium. int MaxFilterDegree;// maximum degree of the FIR matrix of the simulation medium. int GetMaxFilterDegree();// get the maximum degree of the FIR matrix of the simulation medium. void Serialize(CArchive& ar);// to load this object to a Carchieve object or to get this object from a Carchieve object. BYTE CurrentSubChip;// its not necessary to defind . void CoupleData();// this function calculates the data (current subchip)at the entrance of recievers by correlating and adding the signals recieved from Txs (FIR matrix) int stop;// the stop time of simulation in byte unit . int start;// the start time of simulation in byte unit . BYTE SubChipPerChip;// a chip devided by the minimum time unit (sub chip). BOOL InitClock();// executes the Init clock () of all Txs and Rxs. BOOL Clock();// executes the clock() of all Txs and Rxs . int ClockChip;// the chip inex of the simulation. int ClockBit;// the bit index of the simulation. int ClockSubChip;// the subchip index of the simulation. int ClockByte;// the byte index of the simulation. BYTE MaxCodeSetSize; //Maximum CodeSet Size by Johnson Bound Theorem BYTE NumTx; //number of transmitters BYTE NumRx; //number of receivers BYTE acc; //autocorrelation constraint BYTE ccc; //crosscorrelation constraint BYTE k; //=acc=ccc int w; //code weight int F; //code length int MediumDelay; //meduim delay (this variable is not used because it is better to use FIR matrix) CMedium* medium;// the pointer to the medium object of the simulation . CCode* code;// the pointer to the code OOC object of this simulation . CObArray codes;// the array of OOCs. CRx* rx;// the pointer to the reciever object of this simulation . CObArray RXs;// the array of Rxs that every member is a CRx object. CTx* tx;// the pointer to the transmitter object of this simulation. CObArray TXs;// the array of Txs that every member is a CTx object . CSim();// constructor of this object to set some initial values. virtual ~CSim();// deconstructor of this object to delete the stored variables. }; #endif // !defined(AFX_SIM_H__5C549600_9F75_434C_A89C_0C999D0BC527__INCLUDED_)