reader.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package request
  2. // UHFReaderCreate UHF读写器创建请求
  3. type UHFReaderCreate struct {
  4. DeviceCode string `json:"device_code"` // 设备编码
  5. DeviceName string `json:"device_name"` // 设备名称
  6. IPAddress string `json:"ip_address"` // IP地址
  7. Port int `json:"port"` // 端口
  8. ConnectType string `json:"connect_type"` // 明确使用串口连接
  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. IPAddress string `json:"ip_address"` // IP地址
  21. Port int `json:"port"` // 端口
  22. IsActive bool `json:"is_active"` // 是否启用
  23. Description string `json:"description"` // 备注
  24. ParkingLotID uint `json:"parking_lot_id"` // 所属区域ID
  25. }
  26. // UHFReaderQuery UHF读写器查询请求
  27. type UHFReaderQuery struct {
  28. DeviceCode string `form:"device_code"` // 设备编码
  29. DeviceName string `form:"device_name"` // 设备名称
  30. IPAddress string `form:"ip_address"` // IP地址
  31. Status string `form:"status"` // 状态
  32. ParkingLotID uint `form:"parking_lot_id"` // 所属区域ID
  33. Page int `form:"page,default=1"` // 页码
  34. PageSize int `form:"page_size,default=10"` // 每页数量
  35. }
  36. // UHFReaderConnect UHF读写器连接请求
  37. type UHFReaderConnect struct {
  38. ID uint `json:"id"` // 设备ID
  39. }
  40. // UHFReaderDisconnect UHF读写器断开连接请求
  41. type UHFReaderDisconnect struct {
  42. ID uint `json:"id"` // 设备ID
  43. }
  44. // UHFReaderPower UHF读写器功率设置请求
  45. type UHFReaderPower struct {
  46. ID uint `json:"id"` // 设备ID
  47. Power byte `json:"power" binding:"required,min=0,max=26"` // 功率值 0-26dBm
  48. }
  49. // UHFReaderTagReport UHF读写器标签上报请求
  50. type UHFReaderTagReport struct {
  51. DeviceCode string `json:"device_code"` // 设备编码
  52. Tag string `json:"tag"` // 标签UII
  53. }