示例#1
0
 public SimulatorPacket(SimulatorPacket pack)
 {
     Type t = typeof(SimulatorPacket);
     PropertyInfo[] properties = t.GetProperties();
     foreach (PropertyInfo pi in properties)
     {
         pi.SetValue(this, pi.GetValue(pack, null), null);
     }
 }
示例#2
0
        // TODO check if this work corectlly
        public KeepAlive(SimulatorPacket pack)
        {
            Type t = typeof(SimulatorPacket);

            PropertyInfo[] properties = t.GetProperties();
            foreach (PropertyInfo pi in properties)
            {
                pi.SetValue(this, pi.GetValue(pack, null), null);
            }
        }
示例#3
0
 //=====================================================================
 public virtual void ParseReceivedPacket(SimulatorPacket pack)
 {
 }
示例#4
0
 public NullDataAck(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#5
0
 public Connect(SimulatorPacket pack) : base(pack)
 {
 }
 public TDLSTearDown(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#7
0
 public ConnectionACK(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#8
0
 public ConnectionACK(SimulatorPacket pack)
     : base(pack)
 {
 }
 // TODO check if this work corectlly
 public KeepAlive(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#10
0
 public TDLSSetupConfirm(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#11
0
 public Beacon(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#12
0
 public Beacon(SimulatorPacket pack) : base(pack)
 {
 }
 public TDLSChannelSwitchRequest(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#14
0
 public TDLSSetupRequest(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#15
0
        //*********************************************************************
        public void SendData(SimulatorPacket pack)
        {
            CheckScanConditionOnSend();
            int Rate = pack.getTransmitRate();
            int sleep = (int)(600 / Rate);
            lock (RfSync)
            {
                try{
                    RF_STATUS = RFStatus.Tx;
                    short OperateChannel = this.getOperateChannel();
                    int try_counter = 0;
                    while (!Medium.Registration(this.Freq, OperateChannel, this.x, this.y, sleep))
                    {
                        Thread.Sleep(new TimeSpan(randomWait.Next(20, 50)));
                        if (try_counter++ > 200)
                            return;
                    }
                    this.MACLastTrnsmitRate = pack.getTransmitRate();
                    Medium.SendData(pack);
                }
                catch(Exception ex){
                    AddToLog("SendData:[" + this.GetType() + "] " + ex.Message);
                    MessageBox.Show("SendData :" + ex.Message);
                }

                RF_STATUS = RFStatus.None;
            }
            if (pack.GetType() == typeof(Data)){
                _DataSent++;
            }
        }
示例#16
0
 public TDLSChannelSwitchResponse(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#17
0
文件: AP.cs 项目: AndreyShamis/sls
        //=====================================================================
        //[MethodImpl(MethodImplOptions.Synchronized)]
        /// <summary>
        /// Function for parse received packet
        /// </summary>
        /// <param name="pack">SimulatorPacket</param>
        public override void ParseReceivedPacket(SimulatorPacket pack)
        {
            Type pt = pack.GetType();

            if (pt == typeof(Connect))
                ConnectRoutine(pack.Source);
            else if (pt == typeof(Disconnect))
                DisonnectRoutine(pack.Source);
            else if (pt == typeof(KeepAlive))
            {
                var newThread = new Thread(() => UpdateSTAKeepAliveInfoOnReceive(pack.Source));
                newThread.Start();
            }
            else if (pt == typeof(Data))
                DataRoutine((Data) pack);
            else if (pt == typeof(DataAck))
                DataAckRoutine((DataAck)pack);
            else
                OtherPacketsRoutine(pack);
        }
示例#18
0
 public TDLSSetupRequest(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#19
0
文件: AP.cs 项目: AndreyShamis/sls
 //=====================================================================
 /// <summary>
 /// This function work with all others packets which don't have special Routines
 /// </summary>
 /// <param name="pack">Simulator Packet </param>
 private void OtherPacketsRoutine(SimulatorPacket pack)
 {
     //  Generic Packet retransmitter
     //  This code will create new packet by him type
     var instance = (SimulatorPacket)Activator.CreateInstance(pack.GetType(), pack);
     instance.X              = this.x;
     instance.Y              = this.y;
     instance.Destination    = pack.Reciver;
     SendData(instance);
 }
示例#20
0
 public Disconnect(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#21
0
 public TDLSSetupConfirm(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#22
0
 public NullData(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#23
0
 public TDLSSetupResponse(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#24
0
 public Data(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#25
0
 // TODO check if this work corectlly
 public KeepAlive(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#26
0
 public TDLSSetupResponse(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#27
0
 public TDLSTearDown(SimulatorPacket pack)
     : base(pack)
 {
 }
 public TDLSChannelSwitchResponse(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#29
0
 public SimulatorPacket CreatePacket(bool inTDLS)
 {
     SimulatorPacket pack = new SimulatorPacket(this.getOperateChannel())
     {
         SSID                = this.SSID,
         Source              = getMACAddress(),
         X                   = this.x,
         Y                   = this.y,
         PacketFrequency     = this.Freq,
         PacketStandart      = this.Stand80211,
         PacketBandWith      = this.BandWidth,
     };
     return (pack);
 }
示例#30
0
 public TDLSChannelSwitchRequest(SimulatorPacket pack)
     : base(pack)
 {
 }
示例#31
0
 public DataAck(SimulatorPacket pack)
     : base(pack)
 {
 }