protocol

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Head   CommandEventHead
	Params []tlv.TLV
}

func (*Command) Marshal

func (c *Command) Marshal() ([]byte, error)

func (*Command) UnMarshal

func (c *Command) UnMarshal(buf []byte) error

type CommandEventHead

type CommandEventHead struct {
	Flag        uint8
	Timestamp   uint64
	Token       [16]byte
	SubDeviceid uint16
	No          uint16
	Priority    uint16
	ParamsCount uint16
}

type Data

type Data struct {
	Head    DataHead
	SubData []SubData
}

func (*Data) Marshal

func (d *Data) Marshal() ([]byte, error)

func (*Data) UnMarshal

func (d *Data) UnMarshal(buf []byte) error

type DataHead

type DataHead struct {
	Flag      uint8
	Timestamp uint64
	Token     [16]byte
}

type Event

type Event struct {
	Head   CommandEventHead
	Params []tlv.TLV
}

func (*Event) Marshal

func (e *Event) Marshal() ([]byte, error)

func (*Event) UnMarshal

func (e *Event) UnMarshal(buf []byte) error

type Payload

type Payload interface {
	Marshal() ([]byte, error)
	UnMarshal([]byte) error
}

type SubData

type SubData struct {
	Head   SubDataHead
	Params []tlv.TLV
}

type SubDataHead

type SubDataHead struct {
	SubDeviceid uint16
	PropertyNum uint16
	ParamsCount uint16
}

Jump to

Keyboard shortcuts

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