Documentation ¶
Index ¶
- Constants
- type Proto1
- func (p *Proto1) Action() error
- func (p *Proto1) Ping(ident int) error
- func (p *Proto1) ReadData(ident int, addr int, count int) ([]byte, error)
- func (p *Proto1) RegWrite(ident int, address int, data []byte, expectResponse bool) error
- func (p *Proto1) SetBuffered(buffered bool)
- func (p *Proto1) WriteData(ident int, address int, data []byte, expectResponse bool) error
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proto1 ¶
type Proto1 struct {
Network io.ReadWriter
}
func New ¶
func New(network io.ReadWriter) *Proto1
func (*Proto1) Action ¶
Action broadcasts the ACTION instruction, which initiates any previously bufferred instructions. Doesn't wait for a status packet in response, because they are not sent in response to broadcast instructions.
func (*Proto1) Ping ¶
Ping sends the PING instruction to the given Servo ID, and waits for the response. Returns an error if the ping fails, or nil if it succeeds.
func (*Proto1) ReadData ¶
ReadData reads a slice of count bytes from the control table of the given servo ID. Use the bytesToInt function to convert the output to something more useful.
func (*Proto1) SetBuffered ¶
Click to show internal directories.
Click to hide internal directories.