123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package HikNetSDK
- import "encoding/json"
- type HikCfg struct {
- Nvr map[string]Nvr `json:"Nvr"`
- BallCamera map[string]BallCamera `json:"BallCamera"`
- }
- type Nvr struct {
- Name string `json:"Name"`
- Ip string `json:"Ip"`
- Port string `json:"Port"`
- User string `json:"User"`
- Password string `json:"Password"`
- Channel int `json:"Channel"`
- }
- type BallCamera struct {
- Type string `json:"Type"`
- Name string `json:"Name"`
- Ip string `json:"Ip"`
- Port string `json:"Port"`
- User string `json:"User"`
- Password string `json:"Password"`
- RtspUrl string `json:"RtspUrl"`
- Matrix Matrix `json:"Matrix"`
- Channel int `json:"Channel"`
- }
- type Matrix struct {
- PStart float64 `json:"P_Start"`
- PMax float64 `json:"P_Max"`
- PPositiveDirection string `json:"p_Positive_Direction"`
- TStart float64 `json:"T_Start"`
- TMax float64 `json:"T_Max"`
- TPositiveDirection string `json:"T_Positive_Direction"`
- Matrix []float64 `json:"Matrix"`
- InvMatrix []float64 `json:"InvMatrix"`
- PointSet map[string]PointPair `json:"PointSet"`
- }
- type PointPair struct {
- X float64 `json:"X"`
- Y float64 `json:"Y"`
- P float64 `json:"P"`
- T float64 `json:"T"`
- }
- type PTZ struct {
- P float32 `json:"P"`
- T float32 `json:"T"`
- Z float32 `json:"Z"`
- }
- type MoveCfg struct {
- Speed int `json:"Speed"`
- Direction int `json:"Direction"`
- }
- type Point struct {
- X float64 `json:"X"`
- Y float64 `json:"Y"`
- }
- func (h *HikCfg) Json() []byte {
- marshal, err := json.Marshal(h)
- if err != nil {
- return nil
- }
- return marshal
- }
|