12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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
- }
- type DeviceAddParam struct {
- Type string `json:"type" binding:"required" `
- Mac string `json:"mac" binding:"required" `
- }
- 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 地址'"`
- }
- 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
- }
- type DeviceDataReceived struct {
- Value string `json:"value"`
- Handle int64 `json:"handle"`
- Mac string `json:"id"`
- DataType string `json:"dataType"`
- }
|