remote

package
v3.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 9 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 DecodedCodecData added in v3.12.2

type DecodedCodecData struct {
	Data     map[string]interface{} `yaml:"data"`
	Warnings []string               `yaml:"warnings"`
	Errors   []string               `yaml:"errors"`
}

type DecoderCodecExample added in v3.12.2

type DecoderCodecExample struct {
	Description string           `yaml:"description"`
	Input       EncodedCodecData `yaml:"input"`
	Output      DecodedCodecData `yaml:"output"`
}

type EncodedCodecData added in v3.12.2

type EncodedCodecData struct {
	FPort    uint32   `yaml:"fPort"`
	Bytes    []byte   `yaml:"bytes"`
	Warnings []string `yaml:"warnings"`
	Errors   []string `yaml:"errors"`
}

type EncoderCodecExample added in v3.12.2

type EncoderCodecExample struct {
	Description string           `yaml:"description"`
	Input       DecodedCodecData `yaml:"input"`
	Output      EncodedCodecData `yaml:"output"`
}

type EndDeviceCodecs added in v3.12.2

type EndDeviceCodecs struct {
	CodecID         string
	UplinkDecoder   EndDeviceDecoderCodec `yaml:"uplinkDecoder"`
	DownlinkDecoder EndDeviceDecoderCodec `yaml:"downlinkDecoder"`
	DownlinkEncoder EndDeviceEncoderCodec `yaml:"downlinkEncoder"`
}

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

type EndDeviceDecoderCodec added in v3.12.2

type EndDeviceDecoderCodec struct {
	FileName string                `yaml:"fileName"`
	Examples []DecoderCodecExample `yaml:"examples"`
}

type EndDeviceEncoderCodec added in v3.12.2

type EndDeviceEncoderCodec struct {
	FileName string                `yaml:"fileName"`
	Examples []EncoderCodecExample `yaml:"examples"`
}

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 {
			VendorID         string `yaml:"vendorID"`
			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