analysis

package
v0.0.0-...-1bf3308 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdleState processingState = iota
	ProcessingState
)
View Source
const ADDRESS_DATA_DIRECTORY = "./__input/addr-data"
View Source
const DURATION_MINUTE_DELAY_THRESHOLD = 10.0

const DURATION_MINUTE_DELAY_THRESHOLD = 10

View Source
const MINIMUM_DURATION_LOGGING_THRESHOLD = 0.1

In minutes

View Source
const MINIMUM_PROCESSING_COUNT_LOGGING_THRESHOLD = 2

Minimum number on records which consider a valid item

View Source
const MINIMUM_SPEED_LOGGING_THRESHOLD = 0.0001

In miles

View Source
const OUTPUT_DATA_FILE = "./__output/"

Variables

This section is empty.

Functions

func ListProcessFilePaths

func ListProcessFilePaths() (paths []fs.DirEntry, err error)

func ProcessedItemToString

func ProcessedItemToString(p ProcessedItem) string

Types

type AddrData

type AddrData struct {
	//** Ip Address of RSU */
	Ip string `json:"ip"`
	//** Longitude */
	Lng float64 `json:"lon"`
	//** Latitude */
	Lat float64 `json:"lat"`
	//** Mac address */
	Addr  string `json:"addr"`
	Flags int    `json:"flags"`
	//** Strength of signal */
	Rssi int `json:"rssi"`
	//** Distance from RSU */
	Seen int `json:"seen"`
	//** Timestamp of entry */
	Time string `json:"time"`
	//** Capture of entry (e.g., 'wifi', 'bluetooth', etc.) */
	CaptureType string `json:"type"`
}

type AddrResponse

type AddrResponse []AddrData

type Model

type Model struct {
	Cursor int

	Disabled bool

	StatusMessage         string
	StatusMessageLifetime time.Duration

	State processingState
	// contains filtered or unexported fields
}

func New

func New() Model

func (Model) GetSelectedItem

func (m Model) GetSelectedItem() ProcessedItem

GetSelectedItem returns the currently selected file/dir.

func (Model) GetTotalItems

func (m Model) GetTotalItems() int

GetTotalItems returns total number of tree items.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) ListenForProcessedItem

func (m Model) ListenForProcessedItem() tea.Cmd

func (*Model) NewStatusMessageCmd

func (m *Model) NewStatusMessageCmd(s string) tea.Cmd

NewStatusMessageCmd sets a new status message, which will show for a limited amount of time. Note that this also returns a command.

func (*Model) SetDebugging

func (m *Model) SetDebugging(debugging bool)

func (*Model) SetDisabled

func (m *Model) SetDisabled(disabled bool)

SetDisabled sets if the bubble is currently active.

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize Sets the size of the filetree.

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type ProcessedItem

type ProcessedItem struct {
	Name  string
	Addr  string
	Speed string
	Lat   string
	Lng   string
}

func ProcessFilePath

func ProcessFilePath(file fs.DirEntry) (item []ProcessedItem, err error)

Jump to

Keyboard shortcuts

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