czsoft

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//用于获取当前车牌号
	Onplate = make(chan string)
)

Functions

This section is empty.

Types

type AnNiuModel

type AnNiuModel struct {
	BaseTxModel
	//控制时长
	WdLen int `json:"wd_len"`
}

按钮对象

type BaseModel

type BaseModel struct {
	//品牌
	Brand string `json:"brand"`
	//型号
	TypeName string `json:"type_name"`
	//自定义名称
	NickName string `json:"nick_name"`
}

硬件基础对象

type BaseTxModel

type BaseTxModel struct {
	BaseModel
	//串口信息
	SerialInfo Serial `json:"serial_info"`
	//Tcp信息
	TcpInfo Tcp `json:"tcp_info"`
	//websocket信息
	WsInfo Ws `json:"ws_info"`
	//通讯方式 [com,tcp,ws]
	Method string `json:"method"`
}

通讯基础对象

type ChePaiModel

type ChePaiModel struct {
	BaseModel
	//流媒体信息
	MediaInfo Media `json:"media_info"`
	//信令端口
	TcpPort int `json:"port"`
}

车牌识别对象

func (*ChePaiModel) GetPlate

func (c *ChePaiModel) GetPlate()

--------------------------车牌识别方法------------------------------//

func (c *ChePaiModel) GetPlate1() {
	for {
		c.OnPlate <- "测试" + gtime.Now().Format("Y-m-d H:i:s")
		time.Sleep(time.Millisecond * 200)
	}
}

获取车牌号 @摄像机序列号

func (*ChePaiModel) SendCmd

func (c *ChePaiModel) SendCmd(conn net.Conn, cmd string)

发送指令

type CzSoftDevice

type CzSoftDevice struct {
	//仪表(读取地磅数据)
	YiBiao []YiBiaoModel `json:"yi_biao"`
	//道闸(控制抬杆)
	DaoZha []DaoZhaModel `json:"dao_zha"`
	//红外光栅(防作弊提醒)
	GuangShan []GuangShanModel `json:"guang_shan"`
	//手动按钮(不保存手动干预)
	AnNiu []AnNiuModel `json:"an_niu"`
	//车牌识别(识别车牌自动抬杆)
	ChePai []ChePaiModel `json:"che_pai"`
	//全景摄像头(保存时截图或截取视频)
	QuanJing []QuanJingModel `json:"quan_jing"`
	//红绿灯(规范车辆调度)
	HongLvDeng []any `json:"hong_lv_deng"`
	//Led屏幕(可视化提醒)
	Led []any `json:"led"`

	//读卡器
	DukaQi []DukaQiModel `json:"duka_qi"`
	//雷达(控制落杆)
	LeiDa []any `json:"lei_da"`
	//地感线圈(控制落杆功能与雷达可选其一)
	DiGan []any `json:"di_gan"`
}

称重软件硬件设备对象

type DaoZhaModel

type DaoZhaModel struct {
	BaseTxModel
	//控制时长
	WdLen int `json:"wd_len"`
}

道闸对象

type DukaQiModel

type DukaQiModel struct {
	BaseTxModel
	//控制时长
	WdLen int `json:"wd_len"`
}

读卡器对象

type GuangShanModel

type GuangShanModel struct {
	BaseTxModel
	//控制时长
	WdLen int `json:"wd_len"`
}

光栅对象

type Media

type Media struct {
	//视频流id
	Uuid string `json:"uuid"`
	//视频流单元
	ChannelID string `json:"channel_id"`
	//摄像头IP地址
	Ip string `json:"ip"`
	//摄像头端口号
	Port int `json:"port"`
	//摄像头账号
	Uid string `json:"uid"`
	//摄像头密码
	Pwd string `json:"pwd"`
}

直播流对象

func (*Media) GetImg

func (m *Media) GetImg(ctx g.Ctx)

截取图片

func (*Media) GetVideo

func (m *Media) GetVideo(ctx g.Ctx)

截取小视频

func (*Media) GetWsFlvUrl

func (m *Media) GetWsFlvUrl(ctx g.Ctx) (_url string)

获取直播流地址

type QuanJingModel

type QuanJingModel struct {
	BaseModel
	//流媒体信息
	MediaInfo Media `json:"media_info"`
}

全景摄像头对象

type Serial

type Serial struct {
	//串口号
	PortName string
	//波特率
	BaudRate int
	//数据位
	DataBits int
	//停止位 0 1 2
	StopBits int
	//校验位 0 1 2 3 4
	Parity int
}

串口对象

func (*Serial) ComList

func (s *Serial) ComList() (_list []string)

获取串口列表

func (*Serial) GetConn

func (s *Serial) GetConn() (conn serial.Port, err error)

串口打开通讯连接

func (*Serial) Read

func (s *Serial) Read(_conn serial.Port) (data []byte)

串口读数

func (*Serial) Write

func (s *Serial) Write(_conn serial.Port, buffer []byte) (n int, err error)

串口写数

type Tcp

type Tcp struct {
	//ip地址
	Ip string `json:"ip"`
	//端口号
	Port int `json:"port"`
}

tcp通讯对象

func (*Tcp) GetConn

func (t *Tcp) GetConn() (conn net.Conn, err error)

tcp打开通讯连接

func (*Tcp) Read

func (t *Tcp) Read(_conn net.Conn) (data []byte)

tcp读数

func (*Tcp) Write

func (t *Tcp) Write(_conn net.Conn, buffer []byte) (n int, err error)

tcp写数

type Ws

type Ws struct {
	//ip地址
	Ip string `json:"ip"`
	//端口号
	Port int `json:"port"`
}

websocket对象

func (*Ws) GetConn

func (t *Ws) GetConn(_ctx g.Ctx) (conn *websocket.Conn, err error)

Ws打开通讯连接

func (*Ws) Read

func (t *Ws) Read(_conn *websocket.Conn) (data []byte)

Ws读数

func (*Ws) Write

func (t *Ws) Write(_conn *websocket.Conn, buffer []byte) (err error)

Ws写数

type YiBiaoModel

type YiBiaoModel struct {
	BaseTxModel
	//稳定时长
	WdLen int `json:"wd_len"`
	//稳定次数
	WdNum int `json:"wd_num"`
}

仪表对象

Jump to

Keyboard shortcuts

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