dronesevents

package
v0.0.0-...-af6f484 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer() *negroni.Negroni

NewServer configures a new server with event-consumers and event-processors

Types

type Alert

type Alert struct {
	DroneID     string `json:"drone_id"`
	FaultCode   int    `json:"fault_code"`
	Description string `json:"description"`
}

Alert raw alert data

type AlertEvent

type AlertEvent struct {
	ReceivedOn int64 `json:"received_on"`
	Alert      Alert `json:"alert"`
}

AlertEvent for receiving drone failure alert data

type AlertRecord

type AlertRecord struct {
	RecordID    primitive.ObjectID `bson:"_id,omitempty"`
	DroneID     string             `bson:"drone_id"`
	FaultCode   int                `bson:"fault_code"`
	Description string             `bson:"description"`
	ReceivedOn  string             `bson:"received_on"`
}

AlertRecord for storing drone failure alert data

type Position

type Position struct {
	DroneID         string  `json:"drone_id"`
	Latitude        float32 `json:"latitude"`
	Longitude       float32 `json:"longitude"`
	Altitude        float32 `json:"altitude"`
	CurrentSpeed    float32 `json:"current_speed"`
	HeadingCardinal int     `json:"heading_cardinal"`
}

Position raw position data

type PositionEvent

type PositionEvent struct {
	Position   Position `json:"position"`
	ReceivedOn int64    `json:"received_on"`
}

PositionEvent for submitting drone position updates data

type PositionRecord

type PositionRecord struct {
	RecordID        primitive.ObjectID `bson:"_id,omitempty"`
	DroneID         string             `bson:"drone_id"`
	Latitude        float32            `bson:"latitude"`
	Longitude       float32            `bson:"longitude"`
	Altitude        float32            `bson:"altitude"`
	CurrentSpeed    float32            `bson:"current_speed"`
	HeadingCardinal int                `bson:"heading_cardinal"`
	ReceivedOn      string             `bson:"received_on"`
}

PositionRecord for submitting drone position updates data

type Telemetry

type Telemetry struct {
	DroneID          string `json:"drone_id"`
	RemainingBattery int    `json:"battery"`
	Uptime           int    `json:"uptime"`
	CoreTemp         int    `json:"core_temp"`
}

Telemetry raw telemetry data

type TelemetryEvent

type TelemetryEvent struct {
	Telemetry  Telemetry `json:"telemetry"`
	ReceivedOn int64     `json:"received_on"`
}

TelemetryEvent for storing drone telemetry data

type TelemetryRecord

type TelemetryRecord struct {
	RecordID         primitive.ObjectID `bson:"_id,omitempty"`
	DroneID          string             `bson:"drone_id"`
	RemainingBattery int                `bson:"battery"`
	Uptime           int                `bson:"uptime"`
	CoreTemp         int                `bson:"core_temp"`
	ReceivedOn       string             `bson:"received_on"`
}

TelemetryRecord for receiving drone telemetry data

Jump to

Keyboard shortcuts

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