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 Contact
- type DigitalPointer
- type Feed
- type Feed2
- type Item
- func (i *Item) GetCallsign() string
- func (i *Item) GetClass() string
- func (i *Item) GetCotType() string
- func (i *Item) GetLanLon() (float64, float64)
- func (i *Item) GetLastSeen() time.Time
- func (i *Item) GetMsg() *cot.CotMessage
- func (i *Item) GetStartTime() time.Time
- func (i *Item) GetUID() string
- func (i *Item) IsOld() bool
- func (i *Item) IsOnline() bool
- func (i *Item) IsSend() bool
- func (i *Item) SetLocal(local, send bool)
- func (i *Item) SetOffline()
- func (i *Item) SetOnline()
- func (i *Item) String() string
- func (i *Item) ToWeb() *WebUnit
- func (i *Item) Update(msg *cot.CotMessage)
- func (i *Item) UpdateFromWeb(w *WebUnit, m *cot.CotMessage)
- type Messages
- type Pos
- type VideoConnections
- type WebUnit
Constants ¶
View Source
const ( POINT = "point" UNIT = "unit" CONTACT = "contact" MAX_TRACK_POINTS = 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 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"` }
type Feed2 ¶ added in v0.12.3
type Feed2 struct { Uid string `yaml:"uid" json:"uid,omitempty"` Alias string `yaml:"alias" json:"alias,omitempty"` Url string `yaml:"url" json:"url,omitempty"` Latitude float64 `yaml:"lat,omitempty" json:"lat,omitempty"` Longitude float64 `yaml:"lon,omitempty" json:"lon,omitempty"` Fov string `yaml:"fov,omitempty" json:"fov,omitempty"` Heading string `yaml:"heading,omitempty" json:"heading,omitempty"` Range string `yaml:"range,omitempty" json:"range,omitempty"` User string `yaml:"user"` }
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func FromMsg ¶
func FromMsg(msg *cot.CotMessage) *Item
func FromMsgLocal ¶
func FromMsgLocal(msg *cot.CotMessage, send bool) *Item
func (*Item) GetCallsign ¶
func (*Item) GetCotType ¶
func (*Item) GetLastSeen ¶
func (*Item) GetMsg ¶
func (i *Item) GetMsg() *cot.CotMessage
func (*Item) GetStartTime ¶
func (*Item) SetOffline ¶
func (i *Item) SetOffline()
func (*Item) Update ¶
func (i *Item) Update(msg *cot.CotMessage)
func (*Item) UpdateFromWeb ¶
func (i *Item) UpdateFromWeb(w *WebUnit, m *cot.CotMessage)
type Messages ¶
type Messages struct { Chats map[string]*Chat Contacts sync.Map // contains filtered or unexported fields }
func NewMessages ¶
func (*Messages) Add ¶
func (m *Messages) Add(msg *ChatMessage)
type VideoConnections ¶ added in v0.12.3
type WebUnit ¶
type WebUnit struct { Uid string `json:"uid"` Callsign string `json:"callsign"` Category string `json:"category"` 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"` Status string `json:"status"` 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"` }
func (*WebUnit) ToMsg ¶
func (w *WebUnit) ToMsg() *cot.CotMessage
Click to show internal directories.
Click to hide internal directories.