Documentation
¶
Index ¶
Constants ¶
const ( RspController = "rsp-controller" GetBasicInfo = "sensor_get_basic_info" GetDeviceIds = "sensor_get_device_ids" )
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 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 ¶
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" db:"device_id"` FacilityId string `json:"facility_id" db:"facility_id"` Personality Personality `json:"personality" db:"personality"` Aliases []string `json:"aliases" db:"aliases"` UpdatedOn int64 `json:"updated_on" db:"updated_on"` IsInDeepScan bool `json:"-" db:"-"` }
func FindRSP ¶
FindRSP searches DB for RSP based on the device_id value Returns the RSP if found or empty RSP if it does not exist
func GetOrCreateRSP ¶
GetOrCreateRSP returns a pointer to an RSP if found in the DB, and if not found in the DB, a record will be created and added, then returned to the caller error is only non-nil when there is an issue communicating with the DB
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