public Beacon (string _uuid, int _major, int _minor, int _range, int _strength, double _accuracy) { UUID = _uuid; major = _major; minor = _minor; range = (BeaconRange)_range; strength = _strength; accuracy = _accuracy; }
public Beacon(string _uuid, int _major, int _minor, int _range, int _strength, double _accuracy) { UUID = _uuid; major = _major; minor = _minor; range = (BeaconRange)_range; strength = _strength; accuracy = _accuracy; }
private Beacon(BeaconType _type, string _uuid, int _major, int _minor, string _instance, BeaconRange _range, int _strength, double _accuracy, int _rssi) { this._type = _type; this._UUID = _uuid; this._major = _major; this._minor = _minor; this._instance = _instance; this._range = _range; this._strength = _strength; this._accuracy = _accuracy; this._lastSeen = DateTime.Now; this._rssi = _rssi; if (_type == BeaconType.EddystoneUID) { Match namespaceMatch = EddystoneNamespaceRegex.Match(this._UUID); if (!namespaceMatch.Success) { throw new ArgumentException("Value does not fit to the Eddystone UID Namespace format.", "_namespace"); } this._UUID = new StringBuilder("0x", 22).Append('0', 20 - namespaceMatch.Groups[1].Value.Length).Append(namespaceMatch.Groups[1].Value).ToString(); if (!String.IsNullOrEmpty(this._instance)) { Match instanceMatch = EddystoneInstanceRegex.Match(this._instance); if (!instanceMatch.Success) { throw new ArgumentException("Value does not fit to the Eddystone UID Instance format.", "_instance"); } this._instance = new StringBuilder("0x", 14).Append('0', 12 - instanceMatch.Groups[1].Value.Length).Append(instanceMatch.Groups[1].Value).ToString(); if (this._instance == "0x000000000000") { this._instance = ""; } } } else if (_type == BeaconType.iBeacon) { if (!iBeaconUUIDRegex.IsMatch(this._UUID)) { throw new ArgumentException("Value does not fit to the iBeacon UUID format.", "_namespace"); } } if (this._UUID != null) { this._UUID = this._UUID.ToLower(); } if (this._instance != null) { this._instance = this._instance.ToLower(); } }
private Beacon(BeaconType _type, string _uuid, int _major, int _minor, string _instance, BeaconRange _range, int _strength, double _accuracy, int _rssi) { this._type = _type; this._UUID = _uuid; this._major = _major; this._minor = _minor; this._instance = _instance; this._range = _range; this._strength = _strength; this._accuracy = _accuracy; this._lastSeen = DateTime.Now; this._rssi = _rssi; }
public Beacon(string _uuid, int _major, int _minor, int _range, int _strength, double _accuracy) { UUID = _uuid; major = _major; minor = _minor; range = (BeaconRange)_range; strength = _strength; accuracy = _accuracy; /// maxSmoothLength = 10; rssiHistory = null; accHistory = null; BSObject = null; bsScript = null; }
private Beacon(string _url, BeaconRange _range, int _strength, double _accuracy, int _rssi) : this(BeaconType.EddystoneURL, _url, 0, 0, "", _range, _strength, _accuracy, _rssi) { }
private Beacon(string _namespace, string _instance, BeaconRange _range, int _strength, double _accuracy, int _rssi) : this(BeaconType.EddystoneUID, _namespace, 0, 0, _instance, _range, _strength, _accuracy, _rssi) { }
private Beacon(string _uuid, int _major, int _minor, BeaconRange _range, int _strength, double _accuracy, int _rssi) : this(BeaconType.iBeacon, _uuid, _major, _minor, "", _range, _strength, _accuracy, _rssi) { }