package gb28181api
|
|
//GbServerInfo 国标平台信息
|
type GbServerInfo struct {
|
Name string `json:"name"` //国标平台的名称
|
PublicID string `json:"publicid"` //国标平台的20位ID (200类型)
|
GbServerPort int `json:"gbserverport"` //国标平台监听的端口
|
RtspServrPort int `json:"rtspservrport"` //RTSP服务的端口
|
HTTPClientIP string `json:"httpclientip"` //HTTP客户端的ip(用于报警通知,一般不设置)
|
HTTPClientPort int `json:"httpclientport"` //HTTP客户端的端口(用于报警通知,一般不设置)
|
}
|
|
//GbResult 返回值信息
|
type GbResult struct {
|
ErrCode int `json:"errcode"`
|
ErrDesc string `json:"errdesc"`
|
}
|
|
//DeviceInfo 下级设备信息
|
type DeviceInfo struct {
|
PublicID string `json:"publicid"` //(字符串) 国标设备20位id
|
Name string `json:"name"` //(字符串) 资源名称
|
Alive int `json:"alive"` //(数字) 状态 0:不在线 1:在线
|
Corp string `json:"corp"` //(字符串) 厂商
|
Parentid string `json:"parentid"` //(字符串) 父节点id
|
IP string `json:"ip"` //(字符串) ip地址
|
Port int `json:"port"` //(数字) 端口
|
Username string `json:"username"` //(字符串) 设备注册用户名
|
Passwd string `json:"passwd"` //(字符串) 设备注册密码
|
Devmode string `json:"devmode"` //(字符串) 设备类型
|
}
|
|
//DevicesInOnePage 一页的下级设备信息
|
type DevicesInOnePage struct {
|
GbResult
|
TotalSize int `json:"totalsize"` //(数字) 设备总数 (下同)
|
OnePageSize int `json:"onepagesize"` //(数字) 每页大小 (下同)
|
TotalPage int `json:"totalpage"` //(数字) 总分页数 (下同)
|
PageNO int `json:"pageno"` //(数字) 当前第几页(下同)
|
Count int `json:"count"` //(数字) 当前有几条数据(下同)
|
Data []DeviceInfo `json:"data"` //设备信息,参照“1.设备管理”定义
|
}
|
|
//CameraInfo 摄像机信息
|
type CameraInfo struct {
|
ResType int `json:"restype"` //(数字) 1-通道资源 2-资源组
|
PublicID string `json:"publicid"` //(字符串) 国标资源通道20位id (用于请求视频、控制等操作)
|
Name string `json:"name"` //(字符串) 资源名称
|
Alive int `json:"alive"` //(数字) 状态 0:不在线 1:在线
|
Corp string `json:"corp"` //(字符串) 厂商
|
Model string `json:"model"` //(字符串) 设备类型
|
Owner string `json:"owner"` //(字符串) 设备归属
|
CivilCode string `json:"civilcode"` //(字符串) 行政区域 (可以按照行政区域进行划分资源组)
|
Address string `json:"address"` //(字符串) 地址
|
DevPubID string `json:"devpubid"` //(字符串) 通道的设备id
|
ParentID string `json:"parentid"` //(字符串) 父节点id
|
IP string `json:"ip"` //(字符串) ip地址
|
Port int `json:"port"` //(数字) 端口
|
Longitude float64 `json:"longitude"` //(数字) 经度
|
Latitude float64 `json:"latitude"` //(数字) 纬度
|
PtzType int `json:"ptztype"` //(数字) 控制类型 1-球机;2-半球;3-固定枪机;4-遥控枪机;
|
StreamType int `json:"streamtype"` //(数字) 码流类型 0-H264;1-MPEG2;2-MPEG4;3-SVAC;4-3GP;5-H265;
|
RealRtspURL string `json:"realrtspurl"` //(字符串) 实时视频的rtsp地址
|
}
|
|
//CamerasInOnePage 一页的摄像机信息
|
type CamerasInOnePage struct {
|
GbResult
|
TotalSize int `json:"totalsize"` //(数字) 设备总数 (下同)
|
OnePageSize int `json:"onepagesize"` //(数字) 每页大小 (下同)
|
TotalPage int `json:"totalpage"` //(数字) 总分页数 (下同)
|
PageNO int `json:"pageno"` //(数字) 当前第几页(下同)
|
Count int `json:"count"` //(数字) 当前有几条数据(下同)
|
Data []CameraInfo `json:"data"` //设备信息,参照“1.设备管理”定义
|
}
|
|
//DomainUnit 设备的行政区域 (设备是平台才会去获取行政区域-中间三位编码为200)
|
type DomainUnit struct {
|
DevPubID string `json:"devpubid"` //(字符串) 通道的设备id
|
ResType int `json:"restype"` //(数字) 1-通道资源 2-资源组
|
PublicID string `json:"publicid"` //(字符串) 国标资源通道20位id (用于请求视频、控制等操作)
|
Name string `json:"name"` //(字符串) 资源名称
|
ParentID string `json:"parentid"` //(字符串) 父节点id
|
TotalNum int `json:"totalnum"` //(数字) 资源组下总的数量
|
OnlineNum int `json:"onlinenum"` //(数字) 资源组下总的在线数量
|
}
|
|
//DomainUnit 设备的行政区域 (设备是平台才会去获取行政区域-中间三位编码为200)
|
type DomainUnitInfo struct {
|
GbResult
|
Count int `json:"count"` //(数字) 当前有几条数据
|
Data []DomainUnit `json:"data"` //区域信息
|
}
|