store

package
v3.32.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Store Store `name:"-"`
}

Config is configuration for the Device Repository store.

type EndDeviceProfile added in v3.19.0

type EndDeviceProfile struct {
	VendorProfileID uint32 `yaml:"vendorProfileID" json:"vendor_profile_id"`
	SupportsClassB  bool   `yaml:"supportsClassB" json:"supports_class_b"`
	ClassBTimeout   uint32 `yaml:"classBTimeout" json:"class_b_timeout"`
	PingSlotPeriod  uint32 `yaml:"pingSlotPeriod" json:"ping_slot_period"`

	PingSlotDataRateIndex     *ttnpb.DataRateIndex  `yaml:"pingSlotDataRateIndex" json:"ping_slot_data_rate_index"`
	PingSlotFrequency         float64               `yaml:"pingSlotFrequency" json:"ping_slot_frequency"`
	SupportsClassC            bool                  `yaml:"supportsClassC" json:"supports_class_c"`
	ClassCTimeout             uint32                `yaml:"classCTimeout" json:"class_c_timeout"`
	MACVersion                ttnpb.MACVersion      `yaml:"macVersion" json:"mac_version"`
	RegionalParametersVersion string                `yaml:"regionalParametersVersion" json:"regional_parameters_version"`
	SupportsJoin              bool                  `yaml:"supportsJoin" json:"supports_join"`
	Rx1Delay                  *ttnpb.RxDelay        `yaml:"rx1Delay" json:"rx1_delay"`
	Rx1DataRateOffset         *ttnpb.DataRateOffset `yaml:"rx1DataRateOffset" json:"rx1_data_rate_offset"`
	Rx2DataRateIndex          *ttnpb.DataRateIndex  `yaml:"rx2DataRateIndex" json:"rx2_data_rate_index"`
	Rx2Frequency              float64               `yaml:"rx2Frequency" json:"rx2_frequency"`
	FactoryPresetFrequencies  []float64             `yaml:"factoryPresetFrequencies" json:"factory_preset_frequencies"`
	MaxEIRP                   float32               `yaml:"maxEIRP" json:"max_eirp"`
	MaxDutyCycle              float64               `yaml:"maxDutyCycle" json:"max_duty_cycle"`
	Supports32BitFCnt         bool                  `yaml:"supports32bitFCnt" json:"supports_32_bit_f_cnt"`
}

EndDeviceProfile is the profile of a LoRaWAN end device as defined in the LoRaWAN backend interfaces.

func (EndDeviceProfile) ToTemplatePB added in v3.19.0

ToTemplatePB returns a ttnpb.EndDeviceTemplate from an end device profile.

type EndDeviceProfileIdentifiers added in v3.32.1

type EndDeviceProfileIdentifiers struct {
	VendorProfileID string `yaml:"vendorProfileID"`
	// First profile format.
	EndDeviceID     string `yaml:"endDeviceID"`
	FirmwareVersion string `yaml:"firmwareVersion"`
	HardwareVersion string `yaml:"hardwareVersion"`
	Region          string `yaml:"region"`
	// Second profile format.
	ProfileID string `yaml:"id"`
	Codec     string `yaml:"codec"`
}

EndDeviceProfileIdentifiers contains the profile identifiers of a LoRaWAN end device that is mentioned in the vendor index file (not embedded in the device model).

type GetBrandsRequest

type GetBrandsRequest struct {
	BrandID string
	Limit,
	Page uint32
	OrderBy string
	Paths   []string
	Search  string
}

GetBrandsRequest is a request to list available end device vendors, with pagination and sorting.

type GetBrandsResponse

type GetBrandsResponse struct {
	Count,
	Offset,
	Total uint32
	Brands []*ttnpb.EndDeviceBrand
}

GetBrandsResponse is a list of brands, along with pagination information.

type GetCodecRequest added in v3.12.2

type GetCodecRequest interface {
	GetVersionIds() *ttnpb.EndDeviceVersionIdentifiers
	GetFieldMask() *fieldmaskpb.FieldMask
}

GetCodecRequest is a request to retrieve the codec of

type GetEndDeviceProfileIdentifiersRequest added in v3.32.1

type GetEndDeviceProfileIdentifiersRequest struct {
	BrandID string
}

GetEndDeviceProfileIdentifiersRequest is used to retrieve end device profile identifiers.

type GetEndDeviceProfileIdentifiersResponse added in v3.32.1

type GetEndDeviceProfileIdentifiersResponse struct {
	EndDeviceProfileIdentifiers []*EndDeviceProfileIdentifiers
}

GetEndDeviceProfileIdentifiersResponse contains the end device profile identifiers.

type GetEndDeviceProfilesRequest added in v3.19.0

type GetEndDeviceProfilesRequest struct {
	BrandID,
	ModelID string
	Limit,
	Page uint32
	OrderBy string
	Paths   []string
	Search  string
}

GetEndDeviceProfilesRequest is a request to list available LoRaWAN end device profile definitions.

type GetEndDeviceProfilesResponse added in v3.19.0

type GetEndDeviceProfilesResponse struct {
	Count,
	Offset,
	Total uint32
	Profiles []*EndDeviceProfile
}

GetEndDeviceProfilesResponse returns available LoRaWAN end device profile definitions.

type GetModelsRequest

type GetModelsRequest struct {
	BrandID,
	ModelID string
	Limit,
	Page uint32
	OrderBy string
	Paths   []string
	Search  string
}

GetModelsRequest is a request to list available end device model definitions.

type GetModelsResponse

type GetModelsResponse struct {
	Count,
	Offset,
	Total uint32
	Models []*ttnpb.EndDeviceModel
}

GetModelsResponse is a list of models, along with model information

type Store

type Store interface {
	// GetBrands lists available end device vendors.
	GetBrands(GetBrandsRequest) (*GetBrandsResponse, error)
	// GetModels lists available end device definitions.
	GetModels(GetModelsRequest) (*GetModelsResponse, error)
	// GetEndDeviceProfileIdentifiers retrieves end device profile identifiers from the vendor index file.
	GetEndDeviceProfileIdentifiers(GetEndDeviceProfileIdentifiersRequest) (*GetEndDeviceProfileIdentifiersResponse, error)
	// GetEndDeviceProfiles lists available LoRaWAN end device profile definitions.
	GetEndDeviceProfiles(GetEndDeviceProfilesRequest) (*GetEndDeviceProfilesResponse, error)
	// GetTemplate retrieves an end device template for an end device definition.
	GetTemplate(*ttnpb.GetTemplateRequest) (*ttnpb.EndDeviceTemplate, error)
	// GetUplinkDecoder retrieves the codec for decoding uplink messages.
	GetUplinkDecoder(GetCodecRequest) (*ttnpb.MessagePayloadDecoder, error)
	// GetDownlinkDecoder retrieves the codec for decoding downlink messages.
	GetDownlinkDecoder(GetCodecRequest) (*ttnpb.MessagePayloadDecoder, error)
	// GetDownlinkEncoder retrieves the codec for encoding downlink messages.
	GetDownlinkEncoder(GetCodecRequest) (*ttnpb.MessagePayloadEncoder, error)
	// Close closes the store.
	Close() error
}

Store contains end device definitions.

Directories

Path Synopsis
Package bleve implements a Device Repository store with indexing capabilities using the bleve library.
Package bleve implements a Device Repository store with indexing capabilities using the bleve library.
Package remote implements a remote store for the Device Repository.
Package remote implements a remote store for the Device Repository.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL