Documentation
¶
Index ¶
- Constants
- Variables
- func Decode(value string, js Message, errorGauge *metrics.Gauge) error
- type ControllerStatusUpdate
- type ControllerStatusUpdateParams
- type GpsLocation
- type Heartbeat
- type HeartbeatParams
- type InventoryData
- type InventoryDataParams
- type InventoryEvent
- type InventoryEventParams
- type Message
- type Notification
- type Request
- type SchedulerRunState
- type SchedulerRunStateParams
- type SensorBasicInfo
- type SensorConfigNotification
- type SensorConfigNotificationParams
- type SensorDeviceIdsResponse
- type TagEvent
- type TagRead
Constants ¶
View Source
const (
NoPersonality = "NONE"
)
View Source
const (
RpcVersion = "2.0"
)
Variables ¶
View Source
var ( //ErrInvalidVersion error returned when JsonRpc version is not 2.0 ErrInvalidVersion = errors.New("invalid jsonrpc version") //ErrMissingMethod error returned when method field is missing or empty ErrMissingMethod = errors.New("missing or empty method field") //ErrMissingId error returned when id field is missing or empty ErrMissingId = errors.New("missing or empty id field") )
Functions ¶
Types ¶
type ControllerStatusUpdate ¶
type ControllerStatusUpdate struct { Notification Params ControllerStatusUpdateParams `json:"params"` }
func (*ControllerStatusUpdate) Validate ¶
func (notif *ControllerStatusUpdate) Validate() error
type GpsLocation ¶
type Heartbeat ¶
type Heartbeat struct { Notification // embed Params HeartbeatParams `json:"params"` }
type HeartbeatParams ¶
type InventoryData ¶
type InventoryData struct { Notification // embed Params InventoryDataParams `json:"params"` }
func (*InventoryData) Validate ¶
func (data *InventoryData) Validate() error
type InventoryDataParams ¶
type InventoryEvent ¶
type InventoryEvent struct { Notification // embed Params InventoryEventParams `json:"params"` }
func NewInventoryEvent ¶
func NewInventoryEvent() *InventoryEvent
func (*InventoryEvent) AddTagEvent ¶
func (invEvent *InventoryEvent) AddTagEvent(event TagEvent)
func (*InventoryEvent) IsEmpty ¶
func (invEvent *InventoryEvent) IsEmpty() bool
func (*InventoryEvent) Validate ¶
func (invEvent *InventoryEvent) Validate() error
type InventoryEventParams ¶
type Notification ¶
type Notification struct { Version string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params"` }
func (*Notification) Validate ¶
func (js *Notification) Validate() error
type Request ¶
type Request struct { Notification // embed Id string `json:"id"` }
type SchedulerRunState ¶
type SchedulerRunState struct { Notification Params SchedulerRunStateParams `json:"params"` }
func (*SchedulerRunState) Validate ¶
func (notif *SchedulerRunState) Validate() error
type SchedulerRunStateParams ¶
type SchedulerRunStateParams struct {
RunState string `json:"run_state"`
}
type SensorBasicInfo ¶
type SensorBasicInfo struct { DeviceId string `json:"device_id"` ConnectionState string `json:"connection_state"` ReadState string `json:"read_state"` BehaviorId string `json:"behavior_id"` FacilityId string `json:"facility_id"` Personality string `json:"personality"` Aliases []string `json:"aliases"` Alerts json.RawMessage `json:"alerts"` }
func (*SensorBasicInfo) Validate ¶
func (info *SensorBasicInfo) Validate() error
type SensorConfigNotification ¶
type SensorConfigNotification struct { Notification Params SensorConfigNotificationParams `json:"params"` }
func (*SensorConfigNotification) Validate ¶
func (notif *SensorConfigNotification) Validate() error
type SensorDeviceIdsResponse ¶
type SensorDeviceIdsResponse []string
func (*SensorDeviceIdsResponse) Validate ¶
func (info *SensorDeviceIdsResponse) Validate() error
implement the jsonrpc.Message interface
type TagEvent ¶
type TagEvent struct { EpcCode string `json:"epc_code"` Tid string `json:"tid"` EpcEncodeFormat string `json:"epc_encode_format"` FacilityID string `json:"facility_id"` Location string `json:"location"` EventType string `json:"event_type,omitempty"` Timestamp int64 `json:"timestamp"` }
TagEvent is the model of the tag event received from RSP Controller
Click to show internal directories.
Click to hide internal directories.