Documentation ¶
Index ¶
- Constants
- func DistBea(lat1, lon1, lat2, lon2 float64) (float64, float64)
- func GetClass(msg *cot.CotMessage) string
- func MakeChatMessage(c *ChatMessage) *cotproto.TakMessage
- type Chat
- type ChatMessage
- type ChatMessages
- type Contact
- type DigitalPointer
- type Feed
- type Feed2
- type Item
- func (i *Item) GetCallsign() string
- func (i *Item) GetClass() string
- func (i *Item) GetLanLon() (float64, float64)
- func (i *Item) GetLastSeen() time.Time
- func (i *Item) GetMsg() *cot.CotMessage
- func (i *Item) GetScope() string
- func (i *Item) GetTrack() []*Pos
- func (i *Item) GetType() string
- func (i *Item) GetUID() string
- func (i *Item) HasMission(name string) bool
- func (i *Item) IsOld() bool
- func (i *Item) IsOnline() bool
- func (i *Item) IsSend() bool
- func (i *Item) SetLocal(local bool)
- func (i *Item) SetOffline()
- func (i *Item) SetOnline()
- func (i *Item) SetSend(send bool)
- func (i *Item) String() string
- func (i *Item) ToWeb() *WebUnit
- func (i *Item) Update(msg *cot.CotMessage)
- type Pos
- type VideoConnections
- type VideoConnections2
- type WebUnit
Constants ¶
View Source
const ( StaleContactDelete = time.Hour * 12 POINT = "point" UNIT = "unit" CONTACT = "contact" MaxTrackPoints = 5000 )
Variables ¶
This section is empty.
Functions ¶
func GetClass ¶
func GetClass(msg *cot.CotMessage) string
func MakeChatMessage ¶
func MakeChatMessage(c *ChatMessage) *cotproto.TakMessage
Types ¶
type Chat ¶
type Chat struct { From string `json:"from"` UID string `json:"uid"` Messages []*ChatMessage `json:"messages"` }
type ChatMessage ¶
type ChatMessage struct { ID string `json:"message_id"` Time time.Time `json:"time"` Parent string `json:"parent"` Chatroom string `json:"chatroom"` From string `json:"from"` FromUID string `json:"from_uid"` ToUID string `json:"to_uid"` Direct bool `json:"direct"` Text string `json:"text"` }
func MsgToChat ¶
func MsgToChat(m *cot.CotMessage) *ChatMessage
func (*ChatMessage) String ¶
func (m *ChatMessage) String() string
type ChatMessages ¶ added in v0.18.0
type ChatMessages struct { Chats map[string]*Chat Contacts sync.Map // contains filtered or unexported fields }
func NewChatMessages ¶ added in v0.18.0
func NewChatMessages(myUID string) *ChatMessages
func (*ChatMessages) Add ¶ added in v0.18.0
func (m *ChatMessages) Add(msg *ChatMessage)
type DigitalPointer ¶
type Feed ¶ added in v0.12.3
type Feed struct { UID string `xml:"uid" yaml:"uid"` Active bool `xml:"active" yaml:"active,omitempty"` Alias string `xml:"alias" yaml:"alias"` Typ string `xml:"type" yaml:"type,omitempty"` Address string `xml:"address" yaml:"address,omitempty"` Path string `xml:"path" yaml:"path,omitempty"` PreferredMacAddress string `xml:"preferredMacAddress" yaml:"preferredMacAddress,omitempty"` Port int `xml:"port" yaml:"port,omitempty"` RoverPort int `xml:"roverPort" yaml:"roverPort,omitempty"` IgnoreEmbeddedKLV bool `xml:"ignoreEmbeddedKLV" yaml:"ignoreEmbeddedKLV,omitempty"` Protocol string `xml:"protocol" yaml:"protocol,omitempty"` Source string `xml:"source" yaml:"source,omitempty"` Timeout int `xml:"timeout" yaml:"timeout,omitempty"` Buffer int `xml:"buffer" yaml:"buffer,omitempty"` RtspReliable string `xml:"rtspReliable" yaml:"rtspReliable,omitempty"` Thumbnail string `xml:"thumbnail" yaml:"thumbnail,omitempty"` Classification string `xml:"classification" yaml:"classification,omitempty"` Latitude float64 `xml:"latitude" yaml:"latitude,omitempty"` Longitude float64 `xml:"longitude" yaml:"longitude,omitempty"` Fov string `xml:"fov" yaml:"fov,omitempty"` Heading string `xml:"heading" yaml:"heading,omitempty"` Range string `xml:"range" yaml:"range,omitempty"` User string `yaml:"user"` Scope string `yaml:"scope"` }
type Feed2 ¶ added in v0.12.3
type Feed2 struct { UID string `json:"uid,omitempty" yaml:"uid"` Active bool `json:"active" yaml:"active"` Alias string `json:"alias,omitempty" yaml:"alias"` URL string `json:"url,omitempty" yaml:"url"` Latitude float64 `json:"lat,omitempty" yaml:"lat,omitempty"` Longitude float64 `json:"lon,omitempty" yaml:"lon,omitempty"` Fov string `json:"fov,omitempty" yaml:"fov,omitempty"` Heading string `json:"heading,omitempty" yaml:"heading,omitempty"` Range string `json:"range,omitempty" yaml:"range,omitempty"` User string `json:"-" yaml:"user"` Scope string `yaml:"scope"` }
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func FromMsg ¶
func FromMsg(msg *cot.CotMessage) *Item
func (*Item) GetCallsign ¶
func (*Item) GetLastSeen ¶
func (*Item) GetMsg ¶
func (i *Item) GetMsg() *cot.CotMessage
func (*Item) HasMission ¶ added in v0.15.0
func (*Item) SetOffline ¶
func (i *Item) SetOffline()
func (*Item) Update ¶
func (i *Item) Update(msg *cot.CotMessage)
type Pos ¶
type Pos struct { Time time.Time Lat float64 Lon float64 Alt float64 Speed float64 Track float64 Ce float64 }
func NewPosFull ¶ added in v0.17.0
type VideoConnections ¶ added in v0.12.3
type VideoConnections2 ¶ added in v0.14.0
type WebUnit ¶
type WebUnit struct { UID string `json:"uid"` Callsign string `json:"callsign"` Category string `json:"category"` Scope string `json:"scope"` Team string `json:"team"` Role string `json:"role"` Time time.Time `json:"time"` LastSeen time.Time `json:"last_seen"` StaleTime time.Time `json:"stale_time"` StartTime time.Time `json:"start_time"` SendTime time.Time `json:"send_time"` Type string `json:"type"` Lat float64 `json:"lat"` Lon float64 `json:"lon"` Hae float64 `json:"hae"` Speed float64 `json:"speed"` Course float64 `json:"course"` Sidc string `json:"sidc"` TakVersion string `json:"tak_version"` Device string `json:"device"` Status string `json:"status"` Battery uint32 `json:"battery"` Text string `json:"text"` Color string `json:"color"` Icon string `json:"icon"` ParentCallsign string `json:"parent_callsign"` ParentUID string `json:"parent_uid"` Local bool `json:"local"` Send bool `json:"send"` Missions []string `json:"missions"` }
func (*WebUnit) ToMsg ¶
func (w *WebUnit) ToMsg() *cot.CotMessage
Click to show internal directories.
Click to hide internal directories.