events_stream

package
v0.0.0-...-ff3c323 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsStream

type EventsStream struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewEventsStream

func NewEventsStream(s *session.Session) *EventsStream

func (*EventsStream) Author

func (mod *EventsStream) Author() string

func (*EventsStream) Configure

func (mod *EventsStream) Configure() (err error)

func (*EventsStream) Description

func (mod *EventsStream) Description() string

func (*EventsStream) Name

func (mod *EventsStream) Name() string

func (*EventsStream) Render

func (mod *EventsStream) Render(output io.Writer, e session.Event)

func (*EventsStream) Show

func (mod *EventsStream) Show(limit int) error

func (*EventsStream) Start

func (mod *EventsStream) Start() error

func (*EventsStream) Stop

func (mod *EventsStream) Stop() error

func (*EventsStream) View

func (mod *EventsStream) View(e session.Event, refresh bool)

type List

type List struct {
	// contains filtered or unexported fields
}

Chain definition

type ModbusTCP

type ModbusTCP struct {
	TID    uint16 `json:"TID"`
	PID    uint16 `json:"PID"`
	Lenght uint16 `json:"Lenght"`
	UID    uint8  `json:"UID"`
}

type ModbusTCP_struct

type ModbusTCP_struct struct {
	TID    uint16 `json:"TID"`
	PID    uint16 `json:"PID"`
	Lenght uint16 `json:"Lenght"`
	UID    uint8  `json:"UID"`
}

type Node

type Node struct {
	// contains filtered or unexported fields
}

Due to the fact that there may be overlapping packets in the order of arrival. We need to create a paradigm where queries are stored while waiting for their response.

We do this via a chained list, stopping the source port and TCP payload of the query then place it in a list.

When we receive a response, we retrieve its destination port, go through the list and if its port matches, we retrieve the value, and delete its node from the list

Node definition

type Trigger

type Trigger struct {
	For    string
	Action string
}

type TriggerList

type TriggerList struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTriggerList

func NewTriggerList() *TriggerList

func (*TriggerList) Add

func (l *TriggerList) Add(tag string, command string) (error, string)

func (*TriggerList) Completer

func (l *TriggerList) Completer(prefix string) []string

func (*TriggerList) Del

func (l *TriggerList) Del(id string) (err error)

func (*TriggerList) Dispatch

func (l *TriggerList) Dispatch(e session.Event) (ident string, cmd string, err error, found bool)

func (*TriggerList) Each

func (l *TriggerList) Each(cb func(id string, t Trigger))

Jump to

Keyboard shortcuts

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