Documentation
¶
Index ¶
- Constants
- func DecodeOmp(m coap.Message) (nmp.NmpRsp, error)
- func EncodeOmpDgram(nmr *nmp.NmpMsg) ([]byte, error)
- func EncodeOmpTcp(nmr *nmp.NmpMsg) ([]byte, error)
- type Dispatcher
- func (d *Dispatcher) AddNmpListener(seq uint8) (*nmp.Listener, error)
- func (d *Dispatcher) AddOicListener(token []byte) (*oic.Listener, error)
- func (d *Dispatcher) Dispatch(data []byte) bool
- func (d *Dispatcher) ErrorAll(err error)
- func (d *Dispatcher) ErrorOneNmp(seq uint8, err error) error
- func (d *Dispatcher) RemoveNmpListener(seq uint8) *nmp.Listener
- func (d *Dispatcher) RemoveOicListener(token []byte) *oic.Listener
- func (d *Dispatcher) Stop()
- type OicMsg
Constants ¶
View Source
const OMP_MSG_OVERHEAD = 13
OIC wrapping adds this many bytes to an NMP message. Calculated by comparing an OMP message with its NMP equivalent.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
The dispatcher is the owner of the listeners it points to. Only the dispatcher writes to these listeners.
func NewDispatcher ¶
func NewDispatcher(isTcp bool, logDepth int) (*Dispatcher, error)
func (*Dispatcher) AddNmpListener ¶
func (d *Dispatcher) AddNmpListener(seq uint8) (*nmp.Listener, error)
func (*Dispatcher) AddOicListener ¶
func (d *Dispatcher) AddOicListener(token []byte) (*oic.Listener, error)
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch(data []byte) bool
func (*Dispatcher) ErrorAll ¶
func (d *Dispatcher) ErrorAll(err error)
func (*Dispatcher) ErrorOneNmp ¶
func (d *Dispatcher) ErrorOneNmp(seq uint8, err error) error
func (*Dispatcher) RemoveNmpListener ¶
func (d *Dispatcher) RemoveNmpListener(seq uint8) *nmp.Listener
func (*Dispatcher) RemoveOicListener ¶
func (d *Dispatcher) RemoveOicListener(token []byte) *oic.Listener
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
Click to show internal directories.
Click to hide internal directories.