package gateway import "gorm.io/gorm" type DeviceScanParam struct { Chip string `json:"chip"` //芯片 0和1 FilterName string `json:"filterName"` // 0 脑电 1 心电 FilterRssi string `json:"filterRssi"` //信号强度 FilterMac string `json:"filterMac"` //过滤Mac地址,以","分割,如 61-Dg-89-22-39-3b,80-kD-0E-40-57-8A FilterType string `json:"filterType"` //1表示扫描数据库中已存在的设备 } type DeviceAddParam struct { Type string `json:"type" binding:"required" ` Mac string `json:"mac" binding:"required" ` AliasName string `json:"aliasName"` } type DeviceInfo struct { gorm.Model Type string `gorm:"type type:varchar(2) not null comment '分类:0脑电;1心电'"` Mac string `gorm:"mac type:varchar(20) not null comment 'Mac 地址'"` Name string `gorm:"name type:varchar(50) not null comment '名称'"` AliasName string `gorm:"aliasName type:varchar(50) comment '别名'"` } type DeviceConnParam struct { Chip string `json:"chip" binding:"required" ` //芯片 0/1 AddrType string `json:"addrType" binding:"required"` //地址类型 public/random Mac string `json:"mac" binding:"required"` //设备Mac地址 FilterName string `json:"filterName" binding:"required"` // 0 脑电 1 心电 } type DeviceScannedFromGateway struct { Bdaddrs []Bdaddrs ChipId int64 EvtType int64 Name string Rssi int64 adData string } type Bdaddrs struct { Bdaddr string `json:"bdaddr"` BdaddrType string `json:"bdaddrType"` } type DeviceScanned struct { MAC string Name string Rssi int64 BdadrType string //地址类型 Chip int64 DeviceType string } type DeviceDataReceived struct { Value string `json:"value"` Handle int64 `json:"handle"` Mac string `json:"id"` DataType string `json:"dataType"` AliasName string `json:"aliasName"` } type ConnectedDevice struct { MAC string Name string DeviceType string State string } type ConnectDevice struct { Mac string `json:"mac"` Ai string `json:"ai"` At string `json:"at"` }