blp

package
v0.0.0-...-50a2d83 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ability

type Ability int

Ability 云台支持能力

const (
	None       Ability = iota //
	Cruise                    // 巡航
	Trace                     // 巡迹
	LineScan                  // 线性扫描
	RegionScan                // 区域扫描
	PanMove                   // 水平旋转
	Preset                    // 预置点
	ManualFunc                // 手动转动云台
)

type BasicRepo

type BasicRepo interface {
	Version() string
	Model() string
	Restart()
	Goto(pos *dsd.Position) error
}

type Blp

type Blp struct {
	// contains filtered or unexported fields
}

func (*Blp) Basic

func (b *Blp) Basic() BasicRepo

func (*Blp) Cron

func (b *Blp) Cron() CronRepo

func (*Blp) Cruise

func (b *Blp) Cruise() CruiseRepo

func (*Blp) Idle

func (b *Blp) Idle() IdleRepo

func (*Blp) Line

func (b *Blp) Line() LineRepo

func (*Blp) Manager

func (b *Blp) Manager() ManagerRepo

func (*Blp) Power

func (b *Blp) Power() PowerRepo

func (*Blp) Preset

func (b *Blp) Preset() PresetRepo

func (*Blp) Quit

func (b *Blp) Quit()

func (*Blp) Run

func (b *Blp) Run()

func (*Blp) Start

func (b *Blp) Start(req *Request) error

func (*Blp) State

func (b *Blp) State() *dsd.Status

func (*Blp) Stop

func (b *Blp) Stop(req *Request) error

func (*Blp) Trace

func (b *Blp) Trace() TraceRepo

type CronRepo

type CronRepo interface {
	List() dsd.AutoMovementSlice
	Set(movement *dsd.PtzAutoMovement) error
	Default() error
}

type CruiseRepo

type CruiseRepo interface {
	List() dsd.CruiseSlice
	Default() error
	Update(id dsd.CruiseID, name string) error
	Set(cr *dsd.TourPreset) error
	Delete(id dsd.CruiseID) error
}

type IdleRepo

type IdleRepo interface {
	Get() *dsd.IdleMotion
	Set(motion *dsd.IdleMotion) error
	Default() error
}

type LineRepo

type LineRepo interface {
	List() dsd.LineSlice
	Default() error
	Set(scan *dsd.LineScan) error
	SetMargin(id dsd.LineScanID, op dsd.LineMarginOp) error
}

type ManagerRepo

type ManagerRepo interface {
	Run()
	Start(req *Request) error
	Stop(req *Request) error
	Quit()
	State() *dsd.Status
}

type PTZRepo

type PTZRepo interface {
	Basic() BasicRepo
	Preset() PresetRepo
	Line() LineRepo
	Cruise() CruiseRepo
	Power() PowerRepo
	Idle() IdleRepo
	Cron() CronRepo
	Trace() TraceRepo
	Manager() ManagerRepo
}

func New

func New(basic *basic.Basic, preset *preset.Preset, line *line.Line, cruise *cruise.Cruise, trace *trace.Trace,
	up *powerUp.PowerUp, i *idle.Idle, c *cron.Cron) PTZRepo

type PowerRepo

type PowerRepo interface {
	Get() *dsd.PowerUps
	Set(ups *dsd.PowerUps) error
	Default() error
}

type PresetRepo

type PresetRepo interface {
	List() dsd.PresetSlice
	Update(id dsd.PresetID, name string) error
	Delete(id dsd.PresetID) error
	DeleteAll() error
	Set(id dsd.PresetID, name string) error
}

type Request

type Request struct {
	Trigger Trigger `json:"Trigger" validate:"gte=0,lte=4"`
	Ability Ability `json:"Ability" validate:"gte=0,lte=7"`
	ID      int     `json:"ID"`
	Speed   int     `json:"Speed" validate:"gte=1,lte=8"`
}

func (*Request) Validate

func (r *Request) Validate() error

type TraceRepo

type TraceRepo interface {
	List() []dsd.Record
	StartRecord(id dsd.TraceID) error
	StopRecord(id dsd.TraceID)
}

type Trigger

type Trigger int

Trigger 云台运动状态变更的触发者

const (
	ManualTrigger  Trigger = iota // 手动
	AlarmTrigger                  // 报警联动
	CronTrigger                   // 定时任务
	PowerUpTrigger                // 开机动作
	IdleTrigger                   // 空闲动作
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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