protected virtual void OnStreamACKDataReceived(StreamAckDataModel e) { if (StreamACKDataReceived != null) { StreamACKDataReceived(this, e); } }
private void PortSerieService_StreamACKDataReceived(object sender, StreamAckDataModel e) { switch (e.Address) { case FrameHeaders.ACK_StreamingInit: streamingTimer.Stop(); // l'init du streaming est ok on envoie le premier segment SendTrameSegment(); break; case FrameHeaders.ACK_StreamingSeg: streamingTimer.Stop(); if (currentSeg == e.Data1) { SendPoint(); } else { SendTrameSegment(); } break; case FrameHeaders.ACK_StreamingPoint: streamingTimer.Stop(); if (currentPoint == e.Data4) { currentPoint++; } SendPoint(); break; case FrameHeaders.ACK_StreamingError: break; case FrameHeaders.ACK_StreamingMod: break; default: break; } }