Documentation ¶
Index ¶
- Constants
- func DecodeOmp(m coap.Message, rxFilter nmcoap.RxMsgFilter) (nmp.NmpRsp, error)
- func EncodeOmpDgram(txFilter nmcoap.TxMsgFilter, nmr *nmp.NmpMsg) ([]byte, error)
- func EncodeOmpTcp(txFilter nmcoap.TxMsgFilter, nmr *nmp.NmpMsg) ([]byte, error)
- type Dispatcher
- func (d *Dispatcher) AddCoapListener(mc nmcoap.MsgCriteria) (*nmcoap.Listener, error)
- func (d *Dispatcher) AddNmpListener(seq uint8) (*nmp.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) ProcessCoapReq(data []byte) (coap.Message, error)
- func (d *Dispatcher) RemoveCoapListener(mc nmcoap.MsgCriteria) *nmcoap.Listener
- func (d *Dispatcher) RemoveNmpListener(seq uint8) *nmp.Listener
- func (d *Dispatcher) RxFilter() nmcoap.RxMsgFilter
- func (d *Dispatcher) SetRxFilter(rxFilter nmcoap.RxMsgFilter)
- func (d *Dispatcher) Stop()
- type Listener
- 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 ¶
func DecodeOmp ¶
func DecodeOmp(m coap.Message, rxFilter nmcoap.RxMsgFilter) (nmp.NmpRsp, error)
* Not able to install custom decoder for indefinite length objects with the * codec. So we need to decode the whole response, and then re-encode the * newtmgr response part.
func EncodeOmpDgram ¶
func EncodeOmpTcp ¶
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(rxFilter nmcoap.RxMsgFilter, isTcp bool, logDepth int) (*Dispatcher, error)
func (*Dispatcher) AddCoapListener ¶
func (d *Dispatcher) AddCoapListener( mc nmcoap.MsgCriteria) (*nmcoap.Listener, error)
func (*Dispatcher) AddNmpListener ¶
func (d *Dispatcher) AddNmpListener(seq uint8) (*nmp.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) ProcessCoapReq ¶
func (d *Dispatcher) ProcessCoapReq(data []byte) (coap.Message, error)
func (*Dispatcher) RemoveCoapListener ¶
func (d *Dispatcher) RemoveCoapListener( mc nmcoap.MsgCriteria) *nmcoap.Listener
func (*Dispatcher) RemoveNmpListener ¶
func (d *Dispatcher) RemoveNmpListener(seq uint8) *nmp.Listener
func (*Dispatcher) RxFilter ¶
func (d *Dispatcher) RxFilter() nmcoap.RxMsgFilter
func (*Dispatcher) SetRxFilter ¶
func (d *Dispatcher) SetRxFilter(rxFilter nmcoap.RxMsgFilter)
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
Click to show internal directories.
Click to hide internal directories.