module

package
v0.0.0-...-f1cbfea Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODULE_CORE = 0x1000 + iota
	MODULE_SYS
	MODULE_LOG
	MODULE_TEST
	MODULE_QT
	MODULE_LED
	MODULE_RTSP
	MODULE_AUDIO
	MODULE_FIFO
	MODULE_CLIENT
	MODULE_FACE
	MODULE_WEB
	MODULE_WEBSERVER
	MODULE_FTP
	MODULE_LOGGRE
	MODULE_DISCOVER
	MODULE_GO
	MODULE_ONVIF
	MODULE_MEGVII
	MODULE_WEBSOCKET
	MODULE_CONFIG
	MODULE_UPGRADE
	MODULE_CUSTOM
)
View Source
const (
	CMD_REGISTER = (MODULE_CORE << 16) + iota + 1
	CMD_UNREGISTER
	CMD_REQUEST_JSON
	CMD_REQUEST_FAILED
	CMD_RESPOND_JSON
)
View Source
const (
	CMD_MEGVII_RESPOND = (MODULE_MEGVII << 16) + iota + 1
	CMD_MEGVII_GETMODE
	CMD_MEGVII_SETMODE
	CMD_MEGVII_HELLO
	CMD_MEGVII_AXDEC_START
	CMD_MEGVII_AXDEC_STOP
	CMD_MEGVII_GET_RTSP_URL
	CMD_MEGVII_SET_RTSP_URL
)
View Source
const (
	CMD_AUDIO_PLAYER_ADD = (MODULE_AUDIO << 16) + iota + 1
	CMD_AUDIO_PLAYER_DEL
	CMD_AUDIO_PLAYER_FIN
	CMD_AUDIO_PLAYER_SET_VOLUME
)
View Source
const (
	CMD_CONFIG_QUERY = (MODULE_CONFIG << 16) + iota + 1
	CMD_CONFIG_SET
	CMD_CONFIG_CHANGE
	CMD_CONFIG_SET_NETWORK
)
View Source
const (
	CMD_UPGRADE_WEB_UPDATE = (MODULE_UPGRADE << 16) + iota + 1
	CMD_UPGRADE_WEB_UPDATE_DONE
	CMD_UPGRADE_CLIENT_UPDATE
	CMD_UPGRADE_CLIENT_UPDATE_DONE
)
View Source
const (
	CMD_GO_HELLO = (MODULE_GO << 16) + iota + 1
)
View Source
const (
	CMD_WEBSOCKET_JSON = (MODULE_WEBSOCKET << 16) + iota + 1
)
View Source
const MAGIC_NUM = 0x0D3C6A20
View Source
const MAGIC_PORT = 0x3c6a << 2
View Source
const REMOTE_IP = "127.0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type GoModule

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

GoModule 模块

func NewGoModule

func NewGoModule(ip string, id uint16) *GoModule

func (*GoModule) AddCmd

func (m *GoModule) AddCmd(cmd uint32, f func([]byte))

func (*GoModule) SendMsg

func (m *GoModule) SendMsg(mod uint16, cmd uint32, b []byte)

func (*GoModule) Start

func (m *GoModule) Start(f func()) error

func (*GoModule) Stop

func (m *GoModule) Stop()

type GoModuleRouter

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

func NewGoModuleRouter

func NewGoModuleRouter() *GoModuleRouter

func (*GoModuleRouter) AddCmd

func (r *GoModuleRouter) AddCmd(cmd uint32, f func([]byte))

func (*GoModuleRouter) Connection

func (r *GoModuleRouter) Connection()

func (*GoModuleRouter) Disconnection

func (r *GoModuleRouter) Disconnection()

func (*GoModuleRouter) Read

func (r *GoModuleRouter) Read(i []byte)

type Msg_Info_St

type Msg_Info_St struct {
	MagicNum       uint32
	ModuleSrcId    uint16
	ModuleSrcChnId uint16
	ModuleDevId    uint16
	ModuleDevChnId uint16
	MsgType        uint32
	MsgLen         uint32
}

type Register

type Register struct {
	Status string `json:"status"`
	Chn    uint16 `json:"chn"`
}

Jump to

Keyboard shortcuts

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