Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateDevAddr() string
- func GenerateDevEUI() string
- func GenerateGWID() string
- type API
- func (a API) Activate(devEUI, devAddr, applicationSKey, networkSKey string) error
- func (a API) CreateApplication(name, description, orgID, spID string) error
- func (a API) CreateDevice(devEUI string, name string, applicationID int64, description string, ...) error
- func (a API) CreateDeviceProfile(name, orgID, nsID string) (string, error)
- func (a API) CreateGateway(id, name, description, orgID, nsID, spID string) error
- func (a API) CreateNetworkServer(id, name, server string) error
- func (a API) CreateServiceProfile(name, orgID, nsID string) (string, error)
- func (a API) GetOrCreateDeviceProfile(name, orgID, nsID string) (string, error)
- func (a API) GetOrCreateServiceProfile(name, orgID, nsID string) (string, error)
- func (a *API) Login()
- type ActivationDeviceRequest
- type Application
- type Config
- type CreateApplicationRequest
- type CreateDeviceProfileRequest
- type CreateDeviceProfileResponse
- type CreateDeviceRequest
- type CreateGatewayRequest
- type CreateNetworkServerRequest
- type CreateServiceProfileRequest
- type CreateServiceProfileResponse
- type Device
- type DeviceActivation
- type DeviceProfile
- type Gateway
- type ListDeviceProfileResponse
- type ListServiceProfileResponse
- type Location
- type LoginRequest
- type LoginResponse
- type NetworkServer
- type ServiceProfile
Constants ¶
View Source
const ( DevEUILen = 8 GWIDLen = 8 DevAddrLen = 4 )
Variables ¶
View Source
var ErrDuplicateApp = errors.New("duplicate application")
View Source
var ErrDuplicateDevice = errors.New("duplicate device")
View Source
var ErrDuplicateGateway = errors.New("duplicate gateway")
View Source
var ErrDuplicateNS = errors.New("duplicate network-server")
Functions ¶
func GenerateDevAddr ¶
func GenerateDevAddr() string
func GenerateDevEUI ¶
func GenerateDevEUI() string
func GenerateGWID ¶
func GenerateGWID() string
Types ¶
type API ¶
API for accessing chirpstack.
func (API) CreateApplication ¶
func (API) CreateDevice ¶
func (API) CreateDeviceProfile ¶
func (API) CreateGateway ¶
func (API) CreateNetworkServer ¶
func (API) CreateServiceProfile ¶
func (API) GetOrCreateDeviceProfile ¶
func (API) GetOrCreateServiceProfile ¶
type ActivationDeviceRequest ¶
type ActivationDeviceRequest struct {
DeviceActivation `json:"deviceActivation"`
}
type Application ¶
type CreateApplicationRequest ¶
type CreateApplicationRequest struct {
Application `json:"application"`
}
type CreateDeviceProfileRequest ¶
type CreateDeviceProfileRequest struct {
DeviceProfile `json:"deviceProfile"`
}
type CreateDeviceProfileResponse ¶
type CreateDeviceProfileResponse struct {
ID string `json:"id"`
}
type CreateDeviceRequest ¶
type CreateDeviceRequest struct {
Device `json:"device"`
}
type CreateGatewayRequest ¶
type CreateGatewayRequest struct {
Gateway `json:"gateway"`
}
type CreateNetworkServerRequest ¶
type CreateNetworkServerRequest struct {
NetworkServer `json:"networkServer"`
}
type CreateServiceProfileRequest ¶
type CreateServiceProfileRequest struct {
ServiceProfile `json:"serviceProfile"`
}
type CreateServiceProfileResponse ¶
type CreateServiceProfileResponse struct {
ID string `json:"id"`
}
type Device ¶
type Device struct { DevEUI string `json:"devEUI"` // nolint: tagliatelle Name string `json:"name"` ApplicationID int64 `json:"applicationID"` // nolint: tagliatelle Description string `json:"description"` DeviceProfileID string `json:"deviceProfileID"` // nolint: tagliatelle SkipFCntCheck bool `json:"skipFCntCheck"` ReferenceAltitude float64 `json:"referenceAltitude"` Variables map[string]string `json:"variables"` Tags map[string]string `json:"tags"` IsDisabled bool `json:"isDisabled"` }
type DeviceActivation ¶
type DeviceActivation struct { DevEUI string `json:"devEUI"` // nolint: tagliatelle DevAddr string `json:"devAddr"` ApplicationSKey string `json:"appSKey"` NetworkSEncKey string `json:"nwkSEncKey"` ServingNetworkSIntKey string `json:"sNwkSIntKey"` ForwardingNetworkSIntKey string `json:"fNwkSIntKey"` UplinkFrameCounter int `json:"fCntUp"` DownlinkNetworkFrameCounter int `json:"nFCntDown"` DownlinkAppFrameCounter int `json:"aFCntDown"` }
type DeviceProfile ¶
type DeviceProfile struct { ID string `json:"id"` Name string `json:"name"` OrganizationID string `json:"organizationID"` // nolint: tagliatelle NetworkServerID string `json:"networkServerID"` // nolint: tagliatelle MACVersion string `json:"macVersion"` RegionalParametersRevision string `json:"regParamsRevision"` ADRAlgorithmID string `json:"adrAlgorithmID"` // nolint: tagliatelle MaxEIRP int64 `json:"maxEIRP"` // nolint: tagliatelle UplinekInterval string `json:"uplinkInterval"` }
type Gateway ¶
type Gateway struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` OrganizationID string `json:"organizationID"` // nolint: tagliatelle DiscoveryEnabled bool `json:"discoveryEnabled"` NetworkServerID string `json:"networkServerID"` // nolint: tagliatelle ServiceProfileID string `json:"serviceProfileID"` // nolint: tagliatelle Location Location `json:"location"` }
type ListDeviceProfileResponse ¶
type ListDeviceProfileResponse struct {
Result []DeviceProfile `json:"result"`
}
type ListServiceProfileResponse ¶
type ListServiceProfileResponse struct {
Result []ServiceProfile `json:"result"`
}
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
JWT string `json:"jwt"`
}
type NetworkServer ¶
type NetworkServer struct { ID string `json:"id"` Name string `json:"name"` Server string `json:"server"` GatewayDiscoveryEnabled bool `json:"gatewayDiscoveryEnabled"` GatewayDiscoveryInterval int64 `json:"gatewayDiscoveryInterval"` GatewayDiscoveryTXFrequency int64 `json:"gatewayDiscoveryTXFrequency"` // nolint: tagliatelle GatewayDiscoveryDR int64 `json:"gatewayDiscoveryDR"` // nolint: tagliatelle }
type ServiceProfile ¶
type ServiceProfile struct { ID string `json:"id"` Name string `json:"name"` OrganizationID string `json:"organizationID"` // nolint: tagliatelle NetworkServerID string `json:"networkServerID"` // nolint: tagliatelle ULRate int64 `json:"ulRate"` ULBucketSize int64 `json:"ulBucketSize"` DLRate int64 `json:"dlRate"` DLBucketSize int64 `json:"dlBucketSize"` AddGatewayMetaData bool `json:"addGWMetaData"` // nolint: tagliatelle }
Click to show internal directories.
Click to hide internal directories.