Exemplo n.º 1
0
 internal void TransmitPermanentAppearance(ITransmitter <IEnumerable <Packet> > transmitter, long oldPAVersion)
 {
     if (Station.paEnumerable == null)
     {
         Station.paEnumerable = new Station.PAEnumerable();
     }
     Station.paEnumerable.Reset(this.paHistory, oldPAVersion);
     transmitter.Transmit(Station.paEnumerable);
 }
Exemplo n.º 2
0
 private void BeginTransmit()
 {
     if (!_transmitting && _transmissionQueue.Count > 0)
     {
         _transmitting = true;
         var next = _transmissionQueue.Dequeue();
         _transmitter.Transmit(next, this.OnTransmitComplete);
     }
 }
Exemplo n.º 3
0
 internal void TransmitInstantDisappearance(ITransmitter <IEnumerable <Packet> > transmitter)
 {
     if (Station.paListEnumerable == null)
     {
         Station.paListEnumerable = new Station.PAListEnumerable();
     }
     Station.paListEnumerable.Reset(this.firstElement, false);
     transmitter.Transmit(Station.paListEnumerable);
 }
Exemplo n.º 4
0
        protected ITransmissionResponse PerformTransmission(
            DirectoryInfo evidencePath,
            ITransmitter transmitter,
            ITransmissionRequest transmissionRequest,
            Trace root)
        {
            Trace span = root.Child();

            span.Record(Annotations.ServiceName("transmission"));
            span.Record(Annotations.ClientSend());
            try
            {
                // ... and performs the transmission
                Stopwatch watch = new Stopwatch();
                watch.Start();
                // long start = System.DateTime.Now;
                ITransmissionResponse transmissionResponse = transmitter.Transmit(transmissionRequest, span);
                watch.Stop();

                long durationInMs = watch.ElapsedMilliseconds; // System.DateTime.Now - start;

                Log.Debug(
                    String.Format(
                        "Message using messageId {0} sent to {1} using {2} was assigned transmissionId {3} took {4}ms\n",
                        transmissionResponse.GetHeader().Identifier.Identifier,
                        transmissionResponse.GetEndpoint().Address,
                        transmissionResponse.GetProtocol().Identifier,
                        transmissionResponse.GetTransmissionIdentifier(),
                        durationInMs));

                this.SaveEvidence(transmissionResponse, evidencePath, span);

                return(transmissionResponse);
            }
            finally
            {
                span.Record(Annotations.ClientRecv());
            }
        }
Exemplo n.º 5
0
        protected void TransmitEvent(MidiMessage message)
        {
            var evt = new MidiEvent(CurrentTick, message);

            transmitter.Transmit(evt);
        }