コード例 #1
0
ファイル: Advertisement.cs プロジェクト: Wascht0/GattServer
        private IDictionary <string, IDictionary <string, object> > GetProperties()
        {
            Dictionary <string, IDictionary <string, object> > response = new Dictionary <string, IDictionary <string, object> >();
            Dictionary <string, object> inner = new Dictionary <string, object>();

            inner["Type"] = Type;
            if (ServiceUUIDs.Any())
            {
                inner["ServiceUUIDs"] = ServiceUUIDs.ToArray();
            }
            if (SolicitUUIDs.Any())
            {
                inner["SolicitUUIDs"] = SolicitUUIDs.ToArray();
            }
            if (ManufacturerData.Any())
            {
                inner["ManufacturerData"] = ManufacturerData;
            }
            if (ServiceData.Any())
            {
                inner["ServiceData"] = ServiceData;
            }
            inner["IncludeTxPower"] = IncludeTxPower;

            response[typeof(LEAdvertisement1).DBusInterfaceName()] = inner;

            return(response);
        }
コード例 #2
0
ファイル: Advertisement.cs プロジェクト: Wascht0/GattServer
 protected void AddServiceUUID(string uuid)
 {
     ServiceUUIDs.Add(uuid);
 }