コード例 #1
0
        private IGattAttribute Add(GattAttributeType type, Guid id, String name)
        {
            var item = new KnownAttribute(id, name, type);

            Add(item);
            return(item);
        }
コード例 #2
0
 /// <summary>
 /// Convert to tuple
 /// </summary>
 public static void Deconstruct(IGattAttribute att, out Guid id, out GattAttributeType type,
                                out String description)
 {
     description = att.Description;
     id          = att.Id;
     type        = att.Type;
 }
コード例 #3
0
 private IGattAttribute Add(GattAttributeType type, UInt16 reservedKey, String name)
 {
     return(Add(type, reservedKey.CreateGuidFromAdoptedKey(), name));
 }
コード例 #4
0
 private IGattAttribute Add(GattAttributeType type, String id, String name)
 {
     return(Add(type, Guid.Parse(id), name));
 }
コード例 #5
0
 /// <summary>
 /// </summary>
 public KnownAttribute(Guid id, String description, GattAttributeType type)
 {
     Id          = id;
     Description = description;
     Type        = type;
 }
コード例 #6
0
 /// <summary>
 /// Add information for a known GATT attribute so it can be looked up later
 /// </summary>
 public IGattAttribute Add(GattAttributeType type, Guid id, String name)
 {
     return(Add(new GattAttribute(type, id, name)));
 }
コード例 #7
0
 /// <summary>
 /// </summary>
 public GattAttribute(GattAttributeType type, Guid id, String description)
 {
     Id          = id;
     Description = description;
     Type        = type;
 }