remote

package
v0.0.0-...-60b8695 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteStore

func NewRemoteStore(fetcher fetch.Interface) store.Store

NewRemoteStore initializes a new Store using a fetcher. Avoid using directly, use bleve.NewIndexedStore instead. Searching and ordering are not supported, and some operations can be very slow.

Types

type EndDeviceCodec

type EndDeviceCodec struct {
	UplinkDecoder struct {
		FileName string `yaml:"fileName"`
	} `yaml:"uplinkDecoder"`
	DownlinkEncoder struct {
		FileName string `yaml:"fileName"`
	} `yaml:"downlinkEncoder"`
	DownlinkDecoder struct {
		FileName string `yaml:"fileName"`
	} `yaml:"downlinkDecoder"`
}

EndDeviceCodec is the format of the `vendor/<vendor>/<codec-id>.yaml` files.

type EndDeviceModel

type EndDeviceModel struct {
	Name             string `yaml:"name"`
	Description      string `yaml:"description"`
	HardwareVersions []struct {
		Version    string `yaml:"version"`
		Numeric    uint32 `yaml:"numeric"`
		PartNumber string `yaml:"partNumber"`
	} `yaml:"hardwareVersions"`
	FirmwareVersions []struct {
		Version          string   `yaml:"version"`
		Numeric          uint32   `yaml:"numeric"`
		HardwareVersions []string `yaml:"hardwareVersions"`
		Profiles         map[string]struct {
			ID               string `yaml:"id"`
			Codec            string `yaml:"codec"`
			LoRaWANCertified bool   `yaml:"lorawanCertified"`
		} `yaml:"profiles"`
	} `yaml:"firmwareVersions"`
	Sensors    []string `yaml:"sensors"`
	Dimensions *struct {
		Width    float32 `yaml:"width"`
		Height   float32 `yaml:"height"`
		Diameter float32 `yaml:"diameter"`
		Length   float32 `yaml:"length"`
	} `yaml:"dimensions"`
	Weight  float32 `yaml:"weight"`
	Battery *struct {
		Replaceable bool   `yaml:"replaceable"`
		Type        string `yaml:"type"`
	} `yaml:"battery"`
	OperatingConditions *struct {
		Temperature *struct {
			Min float32 `yaml:"min"`
			Max float32 `yaml:"max"`
		} `yaml:"temperature"`
		RelativeHumidity *struct {
			Min float32 `yaml:"min"`
			Max float32 `yaml:"max"`
		} `yaml:"relativeHumidity"`
	} `yaml:"operatingConditions"`
	IPCode          string                  `yaml:"ipCode"`
	KeyProvisioning []ttnpb.KeyProvisioning `yaml:"keyProvisioning"`
	KeySecurity     ttnpb.KeySecurity       `yaml:"keySecurity"`
	Photos          *struct {
		Main  string   `yaml:"main"`
		Other []string `yaml:"other"`
	} `yaml:"photos"`
	Videos *struct {
		Main  string   `yaml:"main"`
		Other []string `yaml:"other"`
	} `yaml:"videos"`
	ProductURL   string `yaml:"productURL"`
	DatasheetURL string `yaml:"datasheetURL"`
	ResellerURLs []struct {
		Name   string   `yaml:"name"`
		Region []string `yaml:"region"`
		URL    string   `yaml:"url"`
	} `yaml:"resellerURLs"`
	Compliances *struct {
		Safety []struct {
			Body     string `yaml:"body"`
			Norm     string `yaml:"norm"`
			Standard string `yaml:"standard"`
			Version  string `yaml:"version"`
		} `yaml:"safety"`
		RadioEquipment []struct {
			Body     string `yaml:"body"`
			Norm     string `yaml:"norm"`
			Standard string `yaml:"standard"`
			Version  string `yaml:"version"`
		} `yaml:"radioEquipment"`
	} `yaml:"compliances"`
	AdditionalRadios []string `yaml:"additionalRadios"`
}

EndDeviceModel is the format of the `vendor/<vendor-id>/<model-id>.yaml` file.

func (EndDeviceModel) ToPB

func (d EndDeviceModel) ToPB(brandID, modelID string, paths ...string) (*ttnpb.EndDeviceModel, error)

ToPB converts an EndDefinitionDefinition to a Protocol Buffer.

type EndDeviceProfile

type EndDeviceProfile struct {
	VendorProfileID uint32 `yaml:"vendorProfileID"`
	SupportsClassB  bool   `yaml:"supportsClassB"`
	ClassBTimeout   uint32 `yaml:"classBTimeout"`
	PingSlotPeriod  uint32 `yaml:"pingSlotPeriod"`

	PingSlotDataRateIndex     *ttnpb.DataRateIndex  `yaml:"pingSlotDataRateIndex"`
	PingSlotFrequency         float64               `yaml:"pingSlotFrequency"`
	SupportsClassC            bool                  `yaml:"supportsClassC"`
	ClassCTimeout             uint32                `yaml:"classCTimeout"`
	MACVersion                ttnpb.MACVersion      `yaml:"macVersion"`
	RegionalParametersVersion string                `yaml:"regionalParametersVersion"`
	SupportsJoin              bool                  `yaml:"supportsJoin"`
	Rx1Delay                  *ttnpb.RxDelay        `yaml:"rx1Delay"`
	Rx1DataRateOffset         *ttnpb.DataRateOffset `yaml:"rx1DataRateOffset"`
	Rx2DataRateIndex          *ttnpb.DataRateIndex  `yaml:"rx2DataRateIndex"`
	Rx2Frequency              float64               `yaml:"rx2Frequency"`
	FactoryPresetFrequencies  []float64             `yaml:"factoryPresetFrequencies"`
	MaxEIRP                   float32               `yaml:"maxEIRP"`
	MaxDutyCycle              float64               `yaml:"maxDutyCycle"`
	Supports32BitFCnt         bool                  `yaml:"supports32bitFCnt"`
}

EndDeviceProfile is the format of the `vendor/<vendor-id>/<profile-id>.yaml` file.

func (EndDeviceProfile) ToTemplatePB

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

type Vendor

type Vendor struct {
	ID       string   `yaml:"id"`
	Name     string   `yaml:"name"`
	VendorID uint32   `yaml:"vendorID"`
	Draft    bool     `yaml:"draft,omitempty"`
	Email    string   `yaml:"email"`
	Website  string   `yaml:"website"`
	PEN      uint32   `yaml:"pen"`
	OUIs     []string `yaml:"ouis"`
}

Vendor is an end device vendor.

func (Vendor) ToPB

func (v Vendor) ToPB(paths ...string) (*ttnpb.EndDeviceBrand, error)

ToPB creates a ttnpb.EndDeviceBrand protocol buffer from a Vendor.

type VendorEndDevicesIndex

type VendorEndDevicesIndex struct {
	EndDevices []string `yaml:"endDevices"`
}

VendorEndDevicesIndex is the format of the `vendor/<vendor-id>/index.yaml` file.

type VendorsIndex

type VendorsIndex struct {
	Vendors []Vendor `yaml:"vendors"`
}

VendorsIndex is the format for the vendor/index.yaml file.

Jump to

Keyboard shortcuts

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