Documentation ¶
Index ¶
- Constants
- Variables
- type Camera
- func (c *Camera) MemoryRecall(ctx context.Context, channel byte) error
- func (c *Camera) MemorySet(ctx context.Context, channel byte) error
- func (c *Camera) PanLeft(ctx context.Context, speed byte) error
- func (c *Camera) PanRight(ctx context.Context, speed byte) error
- func (c *Camera) PanTiltDrive(ctx context.Context, panDir, tiltDir, panSpeed, tiltSpeed byte) error
- func (c *Camera) PanTiltStop(ctx context.Context) error
- func (c *Camera) TiltDown(ctx context.Context, speed byte) error
- func (c *Camera) TiltUp(ctx context.Context, speed byte) error
- func (c *Camera) ZoomStop(ctx context.Context) error
- func (c *Camera) ZoomTele(ctx context.Context) error
- func (c *Camera) ZoomWide(ctx context.Context) error
- type Logger
- type Option
Constants ¶
View Source
const ( TiltDirectionUp = 0x01 TiltDirectionDown = 0x02 TiltDirectionStop = 0x03 PanDirectionLeft = 0x01 PanDirectionRight = 0x02 PanDirectionStop = 0x03 PanTiltSpeedMin = 0x00 PanTiltSpeedMax = 0x18 )
Variables ¶
View Source
var ( ErrInvalidPanTiltSpeed = errors.New("speed out of range") ErrInvalidPanTiltDirection = errors.New("invalid pan/tilt direction") )
View Source
var ( ErrArgsTooLong = errors.New("payload arguments length must not exceed 0xffff") ErrMissingTerminator = errors.New("payload missing terminator") )
View Source
var ( ErrSyntaxError = errors.New("command format valid or illegal command parameters") ErrCommandBufferFull = errors.New("unable to accept a command because 2 commands are currently being executed") )
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
func (*Camera) MemoryRecall ¶
func (*Camera) PanTiltDrive ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures how we create the Camera.
func WithDelay ¶
WithDelay changes the delay between sending commands to the Camera. The default value is 250 milliseconds. See more details about delay at https://github.com/byuoitav/connpool.
func WithDialer ¶
WithDialer sets the dialer to use when opening connections with the Camera. The default value is net.Dialer{}. See more details at https://golang.org/pkg/net/#Dialer
func WithLogger ¶
WithLogger adds a logger to Camera. Camera will log appropriate information about the underlying connection and the commands being sent. The default value is nil, meaning that no logs are written.
Click to show internal directories.
Click to hide internal directories.