Added ManufacturerData

This commit is contained in:
Henry Seurer 2024-11-18 13:46:24 -08:00
parent 2c9add9c8e
commit c7e4bfa581
1 changed files with 16 additions and 3 deletions

View File

@ -966,10 +966,23 @@ type StatusMessage struct {
States map[string]bool `json:"states,omitempty"`
}
type ManufacturerDataElement struct {
// The company ID, which must be one of the assigned company IDs.
// The full list is in here:
// https://www.bluetooth.com/specifications/assigned-numbers/
// The list can also be viewed here:
// https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml
// The value 0xffff can also be used for testing.
CompanyID uint16 `json:"company-id,omitempty"`
// The value, which can be any value but can't be very large.
Data []byte `json:"data,omitempty"`
}
type BleAdvertisementPayload struct {
LocalName string `json:"localName,omitempty"`
Bytes []byte `json:"bytes,omitempty"`
ManufacturerData map[uint16][]byte `json:"manufacturerData,omitempty"`
LocalName string `json:"localName,omitempty"`
Bytes []byte `json:"bytes,omitempty"`
ManufacturerData []ManufacturerDataElement `json:"manufacturerData,omitempty"`
}
type BleDevice struct {