Documentation
¶
Index ¶
- Constants
- Variables
- func ChooseDefaultError(cmd *ExecutingCommand) error
- func ChooseWorkingCounterError(ec *ExecutingCommand, expwc uint16) error
- func ExecuteRead(c Commander, addr ecfr.DatagramAddress, n int, expwc uint16) (d []byte, err error)
- func ExecuteRead16(c Commander, addr ecfr.DatagramAddress, expwc uint16) (d uint16, err error)
- func ExecuteRead16Options(c Commander, addr ecfr.DatagramAddress, expwc uint16, opt Options) (d uint16, err error)
- func ExecuteRead32(c Commander, addr ecfr.DatagramAddress, expwc uint16) (d uint32, err error)
- func ExecuteRead32Options(c Commander, addr ecfr.DatagramAddress, expwc uint16, opt Options) (d uint32, err error)
- func ExecuteRead8(c Commander, addr ecfr.DatagramAddress, expwc uint16) (d uint8, err error)
- func ExecuteRead8Options(c Commander, addr ecfr.DatagramAddress, expwc uint16, opts Options) (d uint8, err error)
- func ExecuteReadOptions(c Commander, addr ecfr.DatagramAddress, n int, expwc uint16, opts Options) (d []byte, err error)
- func ExecuteWrite(c Commander, addr ecfr.DatagramAddress, w []byte, expwc uint16) (err error)
- func ExecuteWrite16(c Commander, addr ecfr.DatagramAddress, w uint16, expwc uint16) (err error)
- func ExecuteWrite16Options(c Commander, addr ecfr.DatagramAddress, w uint16, expwc uint16, opts Options) (err error)
- func ExecuteWrite32(c Commander, addr ecfr.DatagramAddress, w uint32, expwc uint16) (err error)
- func ExecuteWrite32Options(c Commander, addr ecfr.DatagramAddress, w uint32, expwc uint16, opts Options) (err error)
- func ExecuteWrite8(c Commander, addr ecfr.DatagramAddress, w uint8, expwc uint16) (err error)
- func ExecuteWrite8Options(c Commander, addr ecfr.DatagramAddress, w uint8, expwc uint16, opts Options) (err error)
- func ExecuteWriteOptions(c Commander, addr ecfr.DatagramAddress, w []byte, expwc uint16, opts Options) (err error)
- func IsNoFrame(err error) bool
- func IsWorkingCounterError(err error) bool
- type CommandFramer
- type Commander
- type ExecutingCommand
- type Framer
- type Multiplexer
- type Options
- type WorkingCounterError
Constants ¶
View Source
const (
CommandFramerMaxDatagramsLen = 1470
)
View Source
const (
DefaultFramelossTries = 3
)
Variables ¶
View Source
var NoFrame = errors.New("frame did not arrive")
View Source
var NoOverlay = errors.New("failed to overlay")
Functions ¶
func ChooseDefaultError ¶
func ChooseDefaultError(cmd *ExecutingCommand) error
func ChooseWorkingCounterError ¶
func ChooseWorkingCounterError(ec *ExecutingCommand, expwc uint16) error
func ExecuteRead ¶
func ExecuteRead16 ¶
func ExecuteRead16Options ¶
func ExecuteRead32 ¶
func ExecuteRead32Options ¶
func ExecuteRead8 ¶
func ExecuteRead8Options ¶
func ExecuteReadOptions ¶
func ExecuteWrite ¶
func ExecuteWrite16 ¶
func ExecuteWrite16Options ¶
func ExecuteWrite32 ¶
func ExecuteWrite32Options ¶
func ExecuteWrite8 ¶
func ExecuteWrite8Options ¶
func ExecuteWriteOptions ¶
func IsWorkingCounterError ¶
Types ¶
type CommandFramer ¶
type CommandFramer struct {
// contains filtered or unexported fields
}
func NewCommandFramer ¶
func NewCommandFramer(framer Framer) *CommandFramer
func (*CommandFramer) Close ¶
func (cf *CommandFramer) Close() error
func (*CommandFramer) Cycle ¶
func (cf *CommandFramer) Cycle() error
func (*CommandFramer) DebugMessage ¶
func (cf *CommandFramer) DebugMessage(m string)
func (*CommandFramer) New ¶
func (cf *CommandFramer) New(datalen int) (*ExecutingCommand, error)
type Commander ¶
type Commander interface { New(datalen int) (*ExecutingCommand, error) Cycle() error Close() error }
type ExecutingCommand ¶
type Multiplexer ¶
type Multiplexer struct {
// contains filtered or unexported fields
}
func NewMultiplexer ¶
func NewMultiplexer(c Commander) (m *Multiplexer, err error)
func (*Multiplexer) Cycle ¶
func (c *Multiplexer) Cycle() error
func (*Multiplexer) OpenCommander ¶
func (m *Multiplexer) OpenCommander() (Commander, error)
type WorkingCounterError ¶
type WorkingCounterError struct { Command ecfr.CommandType Addr32 uint32 Want, Have uint16 }
func (WorkingCounterError) Error ¶
func (e WorkingCounterError) Error() string
Click to show internal directories.
Click to hide internal directories.