Documentation ¶
Overview ¶
Package tinkerforge implements the tinkerforge protocol Author: Tim Scheuermann (https://github.com/noxer)
Index ¶
- Constants
- Variables
- type ErrorCode
- type Handler
- type Packet
- func (p *Packet) Callback() bool
- func (p *Packet) Decode(vars ...interface{}) error
- func (p *Packet) Error() error
- func (p *Packet) ErrorID() ErrorCode
- func (p *Packet) FunctionID() uint8
- func (p *Packet) Length() uint8
- func (p *Packet) Payload() []byte
- func (p *Packet) ResponseExpected() bool
- func (p *Packet) SequenceNum() uint8
- func (p *Packet) Serialize(wr io.Writer, seqNum byte) error
- func (p *Packet) UID() uint32
- type Tinkerforge
Constants ¶
View Source
const ( // ECOkay says no errors occurred ECOkay ErrorCode = 0 // ECInvalidParam says you sent an invalid parameter in the packet ECInvalidParam = 1 // ECFuncNotSupported says the function number you sent is not available ECFuncNotSupported = 2 )
Variables ¶
View Source
var ( // ErrInvalidParam represents ECInvalidParam in Go ErrInvalidParam = errors.New("Invalid Parameter") // ErrFuncNotSupported represents ECFuncNotSupported in Go ErrFuncNotSupported = errors.New("Function is not supported") )
View Source
var ( // ErrTimeout represents a timeout while waiting for a callback ErrTimeout = errors.New("Timeout while waiting for callback") )
Functions ¶
This section is empty.
Types ¶
type ErrorCode ¶
type ErrorCode uint8
ErrorCode represents the error value returned by the brick(let)s
type Packet ¶
type Packet struct {
// contains filtered or unexported fields
}
Packet holds all information about a sent or received packet
func (*Packet) FunctionID ¶
FunctionID returns the function ID of the packet
func (*Packet) ResponseExpected ¶
ResponseExpected returns wether the caller expects an answer
func (*Packet) SequenceNum ¶
SequenceNum returns the 4-bit sequence number of the packet.
Directories ¶
Path | Synopsis |
---|---|
Package helpers has helper routines for tinkerforge Author: Tim Scheuermann (https://github.com/noxer)
|
Package helpers has helper routines for tinkerforge Author: Tim Scheuermann (https://github.com/noxer) |
Package ledstrip has control routines for LED strips Author: Tim Scheuermann (https://github.com/noxer)
|
Package ledstrip has control routines for LED strips Author: Tim Scheuermann (https://github.com/noxer) |
Click to show internal directories.
Click to hide internal directories.