Exemplo n.º 1
0
 public static string GetDeviceIp(DacDto dac)
 {
     unsafe
     {
         return(dac.Ip);
     }
 }
Exemplo n.º 2
0
 public static string GetDeviceName(DacDto dac)
 {
     unsafe
     {
         var    identity = dac.Identity;
         string dacName  = String.Format("Ether Dream {0:X2}{1:X2}{2:X2}", identity.MacAddress[3], identity.MacAddress[4], identity.MacAddress[5]);
         return(dacName);
     }
 }
Exemplo n.º 3
0
        public DacDto FindFirstDevice()
        {
            // TODO Handle socket no connection

            var remoteEP = new IPEndPoint(IPAddress.Any, Broadcast_Port);

            byte[] bytesReceived = _discoveryClient.Receive(ref remoteEP);

            var    identity   = Deserialize(bytesReceived);
            DacDto etherDream = new DacDto();

            etherDream.Identity = identity;
            etherDream.Ip       = remoteEP.Address.ToString();

            DiscoveredDevices.TryAdd(etherDream.Ip, etherDream);

            return(etherDream);
        }
Exemplo n.º 4
0
 public static uint GetMaxPointRate(DacDto dac)
 {
     return(dac.Identity.MaxPointRate);
 }
Exemplo n.º 5
0
 public static ushort GetSwVersion(DacDto dac)
 {
     return(dac.Identity.SwVersion);
 }
Exemplo n.º 6
0
 public static ushort GetBufferCapacity(DacDto dac)
 {
     return(dac.Identity.BufferCapacity);
 }