Documentation ¶
Index ¶
- Constants
- Variables
- func DenormalizeAddr(addr string) string
- func NormalizeAddr(addr string) (string, error)
- type Listener
- type ListenerKey
- type ListenerMap
- func (lm *ListenerMap) AddListener(key ListenerKey, listener *Listener) error
- func (lm *ListenerMap) Dump()
- func (lm *ListenerMap) FindListener(tgt string, port uint8, msgType string) (ListenerKey, *Listener)
- func (lm *ListenerMap) RemoveKey(key ListenerKey) *Listener
- func (lm *ListenerMap) RemoveListener(listener *Listener) *ListenerKey
- type ListenerSlice
- type LoraConfig
- type LoraData
- type LoraJoinedCb
- type LoraPacketSent
- type LoraSesn
- func (s *LoraSesn) AbortRx(seq uint8) error
- func (s *LoraSesn) Close() error
- func (s *LoraSesn) CoapIsTcp() bool
- func (s *LoraSesn) Filters() (nmcoap.TxMsgFilter, nmcoap.RxMsgFilter)
- func (s *LoraSesn) IsOpen() bool
- func (s *LoraSesn) ListenCoap(mc nmcoap.MsgCriteria) (*nmcoap.Listener, error)
- func (s *LoraSesn) MgmtProto() sesn.MgmtProto
- func (s *LoraSesn) Mtu() int
- func (s *LoraSesn) MtuIn() int
- func (s *LoraSesn) MtuOut() int
- func (s *LoraSesn) Open() error
- func (s *LoraSesn) RxAccept() (sesn.Sesn, *sesn.SesnCfg, error)
- func (s *LoraSesn) RxCoap(opt sesn.TxOptions) (coap.Message, error)
- func (s *LoraSesn) SetFilters(txFilter nmcoap.TxMsgFilter, rxFilter nmcoap.RxMsgFilter)
- func (s *LoraSesn) StopListenCoap(mc nmcoap.MsgCriteria)
- func (s *LoraSesn) TxCoap(m coap.Message) error
- func (s *LoraSesn) TxRxMgmt(m *nmp.NmpMsg, timeout time.Duration) (nmp.NmpRsp, error)
- func (s *LoraSesn) TxRxMgmtAsync(m *nmp.NmpMsg, timeout time.Duration, ch chan nmp.NmpRsp, errc chan error) error
- type LoraXport
- type LoraXportCfg
Constants ¶
View Source
const MAX_PACKET_SIZE_IN = 2048
View Source
const MAX_PACKET_SIZE_OUT = 256
View Source
const UDP_RX_PORT = 1784
View Source
const UDP_TX_PORT = 1786
Variables ¶
View Source
var LoraDataRateMapUS = map[string]int{
"SF12BW500": 33,
"SF11BW500": 109,
"SF10BW500": 222,
"SF9BW500": 222,
"SF8BW500": 222,
"SF7BW500": 222,
}
* This maps datarate string into a max mtu we can use
Functions ¶
func DenormalizeAddr ¶
func NormalizeAddr ¶
Types ¶
type Listener ¶
type Listener struct { MsgChan chan []byte MtuChan chan int ConnChan chan *LoraSesn RefCnt int Data *bytes.Buffer NextFrag uint8 Crc uint16 }
func NewListener ¶
func NewListener() *Listener
type ListenerKey ¶
func TgtKey ¶
func TgtKey(tgt string, msgType string) ListenerKey
func TgtPortKey ¶
func TgtPortKey(tgt string, port uint8, msgType string) ListenerKey
func TypeKey ¶
func TypeKey(msgType string) ListenerKey
type ListenerMap ¶
type ListenerMap struct {
// contains filtered or unexported fields
}
Not thread safe.
func NewListenerMap ¶
func NewListenerMap() *ListenerMap
func (*ListenerMap) AddListener ¶
func (lm *ListenerMap) AddListener(key ListenerKey, listener *Listener) error
func (*ListenerMap) Dump ¶
func (lm *ListenerMap) Dump()
func (*ListenerMap) FindListener ¶
func (lm *ListenerMap) FindListener(tgt string, port uint8, msgType string) ( ListenerKey, *Listener)
func (*ListenerMap) RemoveKey ¶
func (lm *ListenerMap) RemoveKey(key ListenerKey) *Listener
func (*ListenerMap) RemoveListener ¶
func (lm *ListenerMap) RemoveListener(listener *Listener) *ListenerKey
type ListenerSlice ¶
type ListenerSlice struct {
// contains filtered or unexported fields
}
not thread safe
func NewListenerSlice ¶
func NewListenerSlice() *ListenerSlice
func (*ListenerSlice) AddListener ¶
func (lm *ListenerSlice) AddListener(key ListenerKey, listener *Listener) error
func (*ListenerSlice) Dump ¶
func (ls *ListenerSlice) Dump()
func (*ListenerSlice) FindListener ¶
func (lm *ListenerSlice) FindListener(tgt string, msgType string) ( ListenerKey, []*Listener)
func (*ListenerSlice) RemoveListener ¶
func (lm *ListenerSlice) RemoveListener(listener *Listener) *ListenerKey
type LoraJoinedCb ¶
type LoraJoinedCb func(dev LoraConfig)
type LoraPacketSent ¶
type LoraPacketSent struct {
DataRate string `codec:"datr"`
}
type LoraSesn ¶
type LoraSesn struct {
// contains filtered or unexported fields
}
func (*LoraSesn) Filters ¶
func (s *LoraSesn) Filters() (nmcoap.TxMsgFilter, nmcoap.RxMsgFilter)
func (*LoraSesn) ListenCoap ¶
func (*LoraSesn) SetFilters ¶
func (s *LoraSesn) SetFilters(txFilter nmcoap.TxMsgFilter, rxFilter nmcoap.RxMsgFilter)
func (*LoraSesn) StopListenCoap ¶
func (s *LoraSesn) StopListenCoap(mc nmcoap.MsgCriteria)
type LoraXport ¶
func NewLoraXport ¶
func NewLoraXport(cfg *LoraXportCfg) *LoraXport
func (*LoraXport) DumpListeners ¶
func (lx *LoraXport) DumpListeners()
func (*LoraXport) SetJoinCb ¶
func (lx *LoraXport) SetJoinCb(joinCb LoraJoinedCb)
type LoraXportCfg ¶
func NewXportCfg ¶
func NewXportCfg() *LoraXportCfg
Click to show internal directories.
Click to hide internal directories.