Exemple #1
0
 public AppLayer(PhysicalLayer physicalLayer, string nickname)
 {
     this.messageQueue = new ConcurrentQueue<Msg>();
     this.systemQueue = new ConcurrentQueue<Msg>();
     input = new Thread(ReadFromDLL);
     outputInfo = new Thread(SendToDLL);
     outputSystem = new Thread(SendManageToDLL);
     input.Start();
     outputInfo.Start();
     outputSystem.Start();
     this.nickname = nickname;
 }
Exemple #2
0
 public DLL(PhysicalLayer physicalLayer)
 {
     this.physicalLayer = physicalLayer;
     frameWasSended = false;
     linkStatus = true;
     linkFramesSended = 0;
     canSend = true;
     countToSend = Data.DLLSendTimeout;    //5 циклов по 200мс
     framesToSend = new ConcurrentQueue<Frame>();
     stringsBuffer = new ConcurrentQueue<string>();
     threadFromPhysicalLayer = new Thread(readFromPhLayer);
     threadFromPhysicalLayer.Start();
     threadSendFrames = new Thread(sendFrames);
     threadSendFrames.Start();
     threadSendLinkFrame = new Thread(sendLinkFrame);
     threadSendLinkFrame.Start();
 }
Exemple #3
0
 public static void makePhysicalLayer(string _portName, int _speed, int _parity, int what, double _stopBits)
 {
     physicalLayer = new PhysicalLayer(_portName, _speed, _parity, what, _stopBits);
 }