Documentation ¶
Index ¶
- Constants
- func ExecuteSensorCommand(deviceId string, commandName string) (*models.Reading, error)
- func ForceRefreshSensorInfo(deviceId string)
- func QueryBasicInfo(deviceId string) (*jsonrpc.SensorBasicInfo, error)
- func QueryBasicInfoAllSensors() error
- func UpdateRSP(rsp *RSP)
- type Personality
- type RSP
Constants ¶
const ( GetBasicInfo = "sensor_get_basic_info" GetDeviceIds = "sensor_get_device_ids" RspController = "rsp-controller" )
const (
DefaultFacility = "DEFAULT_FACILITY"
)
Variables ¶
This section is empty.
Functions ¶
func ExecuteSensorCommand ¶
ExecuteSensorCommand makes an HTTP GET call to the EdgeX core command service to execute a specified command on a given RSP sensor
func ForceRefreshSensorInfo ¶
func ForceRefreshSensorInfo(deviceId string)
func QueryBasicInfo ¶
func QueryBasicInfo(deviceId string) (*jsonrpc.SensorBasicInfo, error)
QueryBasicInfo makes a call to the EdgeX command service to request the RSP-Controller to return us more information about a given RSP sensor
func QueryBasicInfoAllSensors ¶
func QueryBasicInfoAllSensors() error
QueryBasicInfoAllSensors retrieves the list of deviceIds from the RSP Controller and then queries the basic info for each one
Types ¶
type Personality ¶
type Personality string
const ( NoPersonality Personality = "NONE" Exit Personality = "EXIT" POS Personality = "POS" FittingRoom Personality = "FITTING_ROOM" )
type RSP ¶
type RSP struct { DeviceId string `json:"device_id" bson:"device_id"` FacilityId string `json:"facility_id" bson:"facility_id"` Personality Personality `json:"personality" bson:"personality"` Aliases []string `json:"aliases" bson:"aliases"` IsInDeepScan bool `json:"-" bson:"-"` }
func FindByAntennaAlias ¶
FindByAntennaAlias is a backwards lookup of an alias to the sensor (RSP) it belongs to Note that if more than one sensor has the same alias, it will just return the first match
func GetOrQueryRSPInfo ¶
GetOrQueryRSPInfo returns a pointer to an RSP if found in memory, otherwise will query the command service for that info
func NewRSPFromConfigNotification ¶
func NewRSPFromConfigNotification(notification *jsonrpc.SensorConfigNotification) *RSP
func (*RSP) AntennaAlias ¶
AntennaAlias gets the string alias of an RSP based on the antenna port format is DeviceId-AntennaId, ie. RSP-150009-0 If there is an alias defined for that antenna port, use that instead Note that each antenna port is supposed to refer to that index in the rsp.Aliases slice
func (*RSP) IsExitSensor ¶
IsExitSensor returns true if this RSP has the EXIT personality
func (*RSP) IsPOSSensor ¶
IsPOSSensor returns true if this RSP has the POS personality