reader.go 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package request
  2. // UHFReaderCreate UHF读写器创建请求
  3. type UHFReaderCreate struct {
  4. DeviceCode string `json:"device_code"` // 设备编码
  5. DeviceName string `json:"device_name"` // 设备名称
  6. ConnectType string `json:"connect_type"` // 连接类型 tcp/serial
  7. IPAddress string `json:"ip_address"` // IP地址
  8. Port int `json:"port"` // 端口
  9. COMPort string `json:"com_port"` // 串口名称
  10. BaudRate int `json:"baud_rate"` // 串口波特率
  11. IsActive bool `json:"is_active"` // 是否启用
  12. Description string `json:"description"` // 备注
  13. ParkingLotID uint `json:"parking_lot_id"` // 所属区域ID
  14. }
  15. // UHFReaderUpdate UHF读写器更新请求
  16. type UHFReaderUpdate struct {
  17. ID uint `json:"id"` // 设备ID
  18. DeviceCode string `json:"device_code"` // 设备编码
  19. DeviceName string `json:"device_name"` // 设备名称
  20. ConnectType string `json:"connect_type"` // 连接类型 tcp/serial
  21. IPAddress string `json:"ip_address"` // IP地址
  22. Port int `json:"port"` // 端口
  23. COMPort string `json:"com_port"` // 串口名称
  24. BaudRate int `json:"baud_rate"` // 串口波特率
  25. IsActive bool `json:"is_active"` // 是否启用
  26. Description string `json:"description"` // 备注
  27. ParkingLotID uint `json:"parking_lot_id"` // 所属区域ID
  28. }
  29. // UHFReaderQuery UHF读写器查询请求
  30. type UHFReaderQuery struct {
  31. DeviceCode string `form:"device_code"` // 设备编码
  32. DeviceName string `form:"device_name"` // 设备名称
  33. ConnectType string `form:"connect_type"` // 连接类型
  34. IPAddress string `form:"ip_address"` // IP地址
  35. Status string `form:"status"` // 状态
  36. ParkingLotID uint `form:"parking_lot_id"` // 所属区域ID
  37. Page int `form:"page,default=1"` // 页码
  38. PageSize int `form:"page_size,default=10"` // 每页数量
  39. }
  40. // UHFReaderConnect UHF读写器连接请求
  41. type UHFReaderConnect struct {
  42. ID uint `json:"id"` // 设备ID
  43. }
  44. // UHFReaderDisconnect UHF读写器断开连接请求
  45. type UHFReaderDisconnect struct {
  46. ID uint `json:"id"` // 设备ID
  47. }
  48. // UHFReaderPower UHF读写器功率设置请求
  49. type UHFReaderPower struct {
  50. ID uint `json:"id"` // 设备ID
  51. Power byte `json:"power" binding:"required,min=0,max=26"` // 功率值 0-26dBm
  52. }
  53. // UHFReaderTagReport UHF读写器标签上报请求
  54. type UHFReaderTagReport struct {
  55. DeviceCode string `json:"device_code" binding:"required"` // 设备编码
  56. Tag string `json:"tag" binding:"required"` // 标签UII
  57. }