Documentation ¶
Index ¶
- Constants
- func AddLocationIfNew(locationHistory []tag.LocationHistory, locationToAdd tag.LocationHistory) []tag.LocationHistory
- func GetEpcState(currentEpcState string, newState tag.Tag) string
- func GetNewTagEvent(eventType string) string
- func GetUpdatedEvent(currentEpcState string, currentEvent string, newEvent string) string
- func IsTagWhitelisted(epc string, whiteList []string) bool
- func UpdateTag(currentState tag.Tag, newTagEvent jsonrpc.TagEvent, source string) tag.Tag
Constants ¶
const ( //MovedEvent is the constant for the moved event MovedEvent = "moved" //CycleCountEvent is the constant for the cyclecount event CycleCountEvent = "cycle_count" //ArrivalEvent is the constant for the arrival event from the RSP Controller ArrivalEvent = "arrival" //DepartedEvent is the constant for the departed event DepartedEvent = "departed" //ReturnedEvent is the constant for the returned event ReturnedEvent = "returned" //UnknownQualifiedState is the constant for the qualified state to be set initially UnknownQualifiedState = "unknown" //PresentEpcState is the constant for epc state of present PresentEpcState = "present" //DepartedEpcState is the constant for epc state of present DepartedEpcState = "departed" //MaxLocationHistory is the constant for max number of location history entries MaxLocationHistory = 10 )
Variables ¶
This section is empty.
Functions ¶
func AddLocationIfNew ¶
func AddLocationIfNew(locationHistory []tag.LocationHistory, locationToAdd tag.LocationHistory) []tag.LocationHistory
AddLocationIfNew adds the location history to the array if that location history was not the last one added or updates the timestamp of the location if it was just added. Maintains only a certain max number of items (MaxLocationHistory)
func GetEpcState ¶
GetEpcState determines the epc state value based on the event received from the RSP Controller
func GetNewTagEvent ¶
GetNewTagEvent determines the event based on the event received from RSP Controller. Arrival and Departed are the only return value options
func GetUpdatedEvent ¶
GetUpdatedEvent determines event based on the current tag's even and what event was received from the RSP Controller
func IsTagWhitelisted ¶
IsTagWhitelisted determines if the tag received from RSP Controller belongs to the list of whitelisted epcs and returns true or false
Types ¶
This section is empty.