public ProjectBindingRegistryCache(DiscoveryStatus status, ProjectBindingRegistry bindingRegistry = null, ProjectSettings projectSettings = null, DateTime?testAssemblyWriteTimeUtc = null)
 {
     Status                   = status;
     BindingRegistry          = bindingRegistry;
     ProjectSettings          = projectSettings;
     TestAssemblyWriteTimeUtc = testAssemblyWriteTimeUtc;
 }
        private void ClientDiscoveryStateChanged(DiscoveryStatus status)
        {
            System.Diagnostics.Debug.WriteLine(status);

            switch (status)
            {
            case DiscoveryStatus.None:
                break;

            case DiscoveryStatus.Online:
                monitor.IsServerOnline = true;
                break;

            case DiscoveryStatus.Pairing:
                monitor.IsParing = true;
                break;

            case DiscoveryStatus.Paired:
                System.Diagnostics.Debug.WriteLine(discoveryService.HostAddress.Address);
                discoveryService.Shutdown();
                clientService.HostAddress = discoveryService.HostAddress;
                clientService.Launch();
                break;
            }
        }
Exemple #3
0
        public void StartDiscovery(bool fullDiscovery)
        {
            if (Status == DiscoveryStatus.Running)
            {
                throw new InvalidOperationException("A previous discovery is still in progress. Please either stop that discovery or wait for it to complete.");
            }

            searchRangeStart = UId.MaxValue;
            searchRangeEnd   = UId.MinValue;

            Status = DiscoveryStatus.Running;

            if (fullDiscovery)
            {
                //Clear all known devices from the device table.
                deviceTable.Clear();
            }
            else
            {
                //Mute any known devices.
                List <UId> knownDevices = new List <UId>(deviceTable);
                deviceTable.Clear();        //Clear the device table as the mute reply will re-add the device if it still exists.

                //Send a mute packet to all known devices.
                foreach (UId id in deviceTable)
                {
                    MuteDevice(id);
                }
            }

            //Broadcast a discovery message to all devices.
            Discover();
        }
 /// <summary>
 /// Method for deserializing the fields for the response </summary>
 public void Deserialize(int[] incomingData)
 {
     InitializeDeserializer(incomingData);
     _frameId            = DeserializeInt8();
     _networkAddress     = DeserializeInt16();
     _transmitRetryCount = DeserializeInt8();
     _deliveryStatus     = DeserializeDeliveryStatus();
     _discoveryStatus    = DeserializeDiscoveryStatus();
 }
Exemple #5
0
        private void DiscoveryStateChanged(DiscoveryStatus status)
        {
            switch (status)
            {
            case DiscoveryStatus.None:
                monitor.IsDiscoveryOnline = false;
                monitor.IsParing          = false;
                break;

            case DiscoveryStatus.Online:
                monitor.IsDiscoveryOnline = true;
                break;

            case DiscoveryStatus.Paired:
                break;

            case DiscoveryStatus.Pairing:
                monitor.IsParing = true;
                break;
            }
        }
 public DiscoveryProgressEventArgs(DiscoveryStatus status)
 {
     Status    = status;
     Timestamp = DateTime.UtcNow;
 }
Exemple #7
0
 public DiscoveryProgressEventArgs(DiscoveryStatus status)
 {
     this.Status = status;
 }
 private void UpdateStatus(DiscoveryStatus newStatus)
 {
     Status = newStatus;
     OnClientDiscoveryStateChanged?.Invoke(Status);
 }
Exemple #9
0
 public DiscoveryProgressEventArgs(DiscoveryStatus status)
 {
     this.Status = status;
 }