Documentation ¶
Index ¶
Constants ¶
const ( Algorithm_TDOA = "Tdoa" Algorithm_RSSI = "Rssi" Algorithm_RSSITDOA = "RssiTdoaCombined" )
Variables ¶
var (
DefaultServerURL *url.URL
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an API client for the LoRa Cloud Device Management v1 service.
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, method, category, operation string, body io.Reader) (*http.Response, error)
Do executes a new HTTP request with the given parameters and body and returns the response.
func (*Client) SolveSingleFrame ¶
func (c *Client) SolveSingleFrame(ctx context.Context, request *SingleFrameRequest) (*ExtendedSingleFrameResponse, error)
SolveSingleFrame attempts to solve the location of the end-device using the provided request.
type ExtendedSingleFrameResponse ¶
type ExtendedSingleFrameResponse struct { SingleFrameResponse Raw *json.RawMessage }
ExtendedSingleFrameResponse extends SingleFrameResponse with the raw JSON representation.
func (ExtendedSingleFrameResponse) MarshalJSON ¶
func (r ExtendedSingleFrameResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. Note that the Raw representation takes precedence in the marshaling process, if it is available.
func (*ExtendedSingleFrameResponse) UnmarshalJSON ¶
func (r *ExtendedSingleFrameResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Marshaler.
type Frame ¶
type Frame []Uplink
Frame contains the uplink metadata for each reception. https://www.loracloud.com/documentation/geolocation?url=v3.html#frame
type Gateway ¶
type Gateway struct { GatewayID string `json:"gatewayId"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude float64 `json:"altitude"` }
Gateway contains the description of a LoRaWAN gateway. https://www.loracloud.com/documentation/geolocation?url=v3.html#gateway
type Location ¶
type Location struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Tolerance uint64 `json:"toleranceHoriz"` }
Location contains the coordinates contained in a location query result.
type LocationSolverResult ¶
type LocationSolverResult struct { UsedGateways uint8 `json:"numUsedGateways"` HDOP *float64 `json:"HDOP"` Algorithm string `json:"algorithmType"` Location Location `json:"locationEst"` }
LocationSolverResult contains the result of a location query. https://www.loracloud.com/documentation/geolocation?url=v3.html#locationsolverresult
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an option for the API client.
func WithBaseURL ¶
WithBaseURL uses the given base URL for the requests of the client.
type SingleFrameRequest ¶
SingleFrameRequest contains the location query request for a single LoRaWAN frame. https://www.loracloud.com/documentation/geolocation?url=v3.html#singleframe-http-request
func BuildSingleFrameRequest ¶
func BuildSingleFrameRequest(metadata []*ttnpb.RxMetadata) *SingleFrameRequest
BuildSingelFrameRequest builds a SingleFrameRequest from the provided metadata.
type SingleFrameResponse ¶
type SingleFrameResponse struct { Result *LocationSolverResult `json:"result"` Errors []string `json:"errors"` Warnings []string `json:"warnings"` }
SingleFrameResponse contains the location query response for a single LoRaWAN frame. https://www.loracloud.com/documentation/geolocation?url=v3.html#singleframe-http-request
type Uplink ¶
Uplink contains the metadata of a LoRaWAN uplink. https://www.loracloud.com/documentation/geolocation?url=v3.html#uplink
func (*Uplink) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Uplink) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.