Documentation
¶
Index ¶
- Constants
- type DB
- type Database
- type HeaderInfo
- type Packet
- type PacketHeader
- type Prompt
- type Receiver
- type Setup
- type Tower
- func (tower *Tower) ActivatePrompt(v bool)
- func (tower *Tower) Connect(ts []Transmitter)
- func (tower *Tower) Disconnected(t string) bool
- func (tower *Tower) Ready() (err error)
- func (tower *Tower) RunCmd(t string) (cntinue bool, err error)
- func (tower *Tower) SetStatus(s string, towers []string) error
- func (tower *Tower) Transmit(t string, p interface{}) error
- type Transmitter
Constants ¶
View Source
const ( CONNECTWITH = "/connectwith" DISCONNECT = "/disconnect" )
View Source
const (
BADGER = "BADGER"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeaderInfo ¶
type HeaderInfo struct{}
type PacketHeader ¶
type PacketHeader struct {
ID string
Timestamp int64
Ping bool
Info *HeaderInfo
}
type Receiver ¶
type Setup ¶
type Setup struct {
Name string
ID string
Addr string
PacketSize int
AsGate bool
Callback func(t *Tower, v []byte, transAddr net.Addr) error
}
Setup bts tower
type Tower ¶
type Tower struct {
ID string
Name string
Status string
Transmitters map[string]*Transmitter
Receiver *Receiver
MaxBufferSize int64
Address string
EnablePrompt bool
Prompt *Prompt
// contains filtered or unexported fields
}
func (*Tower) ActivatePrompt ¶
func (*Tower) Connect ¶
func (tower *Tower) Connect(ts []Transmitter)
func (*Tower) Disconnected ¶
type Transmitter ¶
type Transmitter struct {
ID string
Addr string
PingInterval time.Duration
EnablePrompt bool
Active bool
Receiver func(t *Tower, v []byte, trans *Transmitter) error
Conn net.Conn
MaxBufferSize int64
}
func (*Transmitter) Transmit ¶
func (transmitter *Transmitter) Transmit(v interface{}) (err error)
transmit to transmitter
Click to show internal directories.
Click to hide internal directories.

