go-llrp: github.com/iomz/go-llrp Index | Files | Directories

package llrp

import "github.com/iomz/go-llrp"


Package Files

llrp.go message.go parameter.go ro_access_report.go tag.go tag_record.go tag_report_data.go tag_report_data_stack.go tags.go


const (
    GetReaderCapabilityHeader         = 1025 // type 1
    GetReaderConfigHeader             = 1026 // type 2
    SetReaderConfigHeader             = 1027 // type 3
    GetReaderCapabilityResponseHeader = 1035 // type 11
    GetReaderConfigResponseHeader     = 1036 // type 12
    SetReaderConfigResponseHeader     = 1037 // type 13
    AddRospecHeader                   = 1044 // type 20
    DeleteRospecHeader                = 1045 // type 21
    EnableRospecHeader                = 1048 // type 24
    AddRospecResponseHeader           = 1054 // type 30
    DeleteRospecResponseHeader        = 1055 // type 31
    EnableRospecResponseHeader        = 1058 // type 34
    DeleteAccessSpecHeader            = 1065 // type 41
    DeleteAccessSpecResponseHeader    = 1075 // type 51
    ROAccessReportHeader              = 1085 // type 61
    KeepaliveHeader                   = 1086 // type 62
    ReaderEventNotificationHeader     = 1087 // type 63
    EventsAndReportsHeader            = 1088 // type 64
    KeepaliveAckHeader                = 1096 // type 72
    ImpinjEnableCutomMessageHeader    = 2047 // type 1023

LLRP header values, the header is composed of 2 bytes where the first is set to 0x40 or 1024, so 1025 would be 0x0401

func AddRospecResponse Uses

func AddRospecResponse(messageID uint32) []byte

AddRospecResponse : Add ROSpec Response

func AntennaAirPort Uses

func AntennaAirPort(id uint16) []byte

AntennaAirPort :

func AntennaAirPortList Uses

func AntennaAirPortList(numOfAntennas int) []interface{}

AntennaAirPortList :

func AntennaConfiguration Uses

func AntennaConfiguration(id uint16) []byte

func AntennaProperties Uses

func AntennaProperties(id uint16) []byte

AntennaProperties :

func C1G2InventoryCommand Uses

func C1G2InventoryCommand() []byte

func C1G2PC Uses

func C1G2PC(pc uint16) []byte

C1G2PC generates C1G2PC parameter from hexpc string.

func C1G2RFControl Uses

func C1G2RFControl() []byte

func C1G2ReadOpSpecResult Uses

func C1G2ReadOpSpecResult(readData []byte) []byte

C1G2ReadOpSpecResult generates C1G2ReadOpSpecResult parameter from readData.

func C1G2SingulationControl Uses

func C1G2SingulationControl() []byte

func C1G2UHFModeRFTable Uses

func C1G2UHFModeRFTable() []byte

C1G2UHFModeRFTable :

func C1G2UHFModeRFTableEntry Uses

func C1G2UHFModeRFTableEntry(mode int) []byte

C1G2UHFModeRFTableEntry :

func C1G2llrpCapabilities Uses

func C1G2llrpCapabilities() []byte

C1G2llrpCapabilities : Generates C1G2llrpCapabilities

func ChannelIndex Uses

func ChannelIndex() []byte

ChannelIndex : Generates channelIndex for EPC tag

func ConnectionAttemptEvent Uses

func ConnectionAttemptEvent() []byte

ConnectionAttemptEvent generates ConnectionAttemptEvent parameter.

func DeleteAccessSpecResponse Uses

func DeleteAccessSpecResponse(messageID uint32) []byte

DeleteAccessSpecResponse : Delete Access Spec Response

func DeleteRospecResponse Uses

func DeleteRospecResponse(messageID uint32) []byte

DeleteRospecResponse : Delete RoSpec Response

func EPCData Uses

func EPCData(length uint16, epcLengthBits uint16, epc []byte) []byte

EPCData generates EPCData parameter from its length and epcLength, and epc.

func EnableRospecResponse Uses

func EnableRospecResponse(messageID uint32) []byte

EnableRospecResponse : Enabled Rospec Response

func FrequencyHopTable Uses

func FrequencyHopTable() []byte

FrequencyHopTable :

func FrequencyInformation Uses

func FrequencyInformation() []byte

FrequencyInformation :

func GPIOCapabilities Uses

func GPIOCapabilities() []byte

GPIOCapabilities : Generates GPIO capabilities proeprty

func GeneralDeviceCapabilities Uses

func GeneralDeviceCapabilities() []byte

GeneralDeviceCapabilities : Generates General Device Capabilities

func GetReaderCapability Uses

func GetReaderCapability(messageID uint32) []byte

GetReaderCapability :

func GetReaderCapabilityResponse Uses

func GetReaderCapabilityResponse(messageID uint32) []byte

GetReaderCapabilityResponse :

func GetReaderConfigResponse Uses

func GetReaderConfigResponse(messageID uint32) []byte

GetReaderConfigResponse :

func GetReaderConfigResponseIdentification Uses

func GetReaderConfigResponseIdentification() []byte

GetReaderConfigResponseIdentification : Generate Identification

func ImpinjEnableCutomMessage Uses

func ImpinjEnableCutomMessage(id uint32) []byte

func Keepalive Uses

func Keepalive(messageID uint32) []byte

Keepalive generates Keepalive message.

func KeepaliveAck Uses

func KeepaliveAck(messageID uint32) []byte

KeepaliveAck generates KeepaliveAck message.

func KeepaliveSpec Uses

func KeepaliveSpec() []byte

KeepaliveSpec generates KeepaliveSpec parameter.

func LastSeenTimestampUTC Uses

func LastSeenTimestampUTC() []byte

LastSeenTimestampUTC : Returns the a UNIX timestamp in microseconds

func LlrpCapabilities Uses

func LlrpCapabilities() []byte

LlrpCapabilities : generates LLRP_CAPABILITIES

func NewTagReportDataParam Uses

func NewTagReportDataParam(tag *Tag) []byte

BuildTagReportDataParameter takes one Tag struct and build TagReportData parameter payload in []byte FIXME: Take SetReaderConfig or ROSpec configuration parameters

func Pack Uses

func Pack(data []interface{}) []byte

Pack the data into (partial) LLRP packet payload. TODO: count the data size and return resulting length ?

func PeakRSSI Uses

func PeakRSSI() []byte

PeakRSSI generates PeakRSSI parameter.

func RFReceiver Uses

func RFReceiver() []byte

func RFTransmitter Uses

func RFTransmitter() []byte

func ReaderEventNotification Uses

func ReaderEventNotification(messageID uint32, currentTime uint64) []byte

ReaderEventNotification generates ReaderEventNotification message.

func ReaderEventNotificationData Uses

func ReaderEventNotificationData(currentTime uint64) []byte

ReaderEventNotificationData generates ReaderEventNotification parameter.

func ReceiveSensitivityEntries Uses

func ReceiveSensitivityEntries(numOfAntennas int) []interface{}

ReceiveSensitivityEntries : Generates ReceiveSensitivityEntries used in General capabilities

func ReceiveSensitivityEntry Uses

func ReceiveSensitivityEntry(id uint16) []byte

ReceiveSensitivityEntry :

func ReguCapabilities Uses

func ReguCapabilities() []byte

ReguCapabilities : generates Regulatory Capabilities

func SetReaderConfig Uses

func SetReaderConfig(messageID uint32) []byte

SetReaderConfig generates SetReaderConfig message.

func SetReaderConfigResponse Uses

func SetReaderConfigResponse(messageID uint32) []byte

SetReaderConfigResponse generates SetReaderConfigResponse message.

func Status Uses

func Status() []byte

Status generates LLRPStatus parameter.

func TagSeenCount Uses

func TagSeenCount() []byte

TagSeenCount :

func TransmitPowerLevelEntry Uses

func TransmitPowerLevelEntry(id uint16, powerLevel uint16) []byte

TransmitPowerLevelEntry :

func UHFCapabilities Uses

func UHFCapabilities(numOfAntennas int) []byte

UHFCapabilities :

func UTCTimeStamp Uses

func UTCTimeStamp(currentTime uint64) []byte

UTCTimeStamp generates UTCTimeStamp parameter at the current time.

type ROAccessReport Uses

type ROAccessReport struct {
    // contains filtered or unexported fields

ROAccessReport is a struct for ROAR message

func NewROAccessReport Uses

func NewROAccessReport(tagReportData []byte, messageID uint32) *ROAccessReport

NewROAccessReport returns a pointer to a new ROAccessReport message.

func (*ROAccessReport) Send Uses

func (roar *ROAccessReport) Send(conn net.Conn) error

Send the ROAR throgh the conn

type ReadEvent Uses

type ReadEvent struct {
    ID  []byte
    PC  []byte

ReadEvent is the struct to hold data on RFTags

func UnmarshalROAccessReportBody Uses

func UnmarshalROAccessReportBody(roarBody []byte) []*ReadEvent

UnmarshalROAccessReportBody extract ReadEvent from the message value in the ROAccessReport

type Tag Uses

type Tag struct {
    PCBits uint16
    EPC    []byte

Tag holds a single virtual tag content

func NewTag Uses

func NewTag(tagRecord *TagRecord) (*Tag, error)

NewTag onstructs a Tag struct from a TagRecord

func (*Tag) IsDuplicate Uses

func (tag *Tag) IsDuplicate(tt *Tag) bool

IsDuplicate to test another Tag by comparing only EPC return true if the EPCs are the same

func (*Tag) IsEqual Uses

func (tag *Tag) IsEqual(tt *Tag) bool

IsEqual to another Tag by taking one as its argument return true if they are the same

func (*Tag) MarshalBinary Uses

func (tag *Tag) MarshalBinary() (_ []byte, err error)

MarshalBinary overwrites the marshaller in gob encoding *Tag

func (*Tag) UnmarshalBinary Uses

func (tag *Tag) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary overwrites the unmarshaller in gob decoding *Tag

type TagRecord Uses

type TagRecord struct {
    PCBits string `json:"PCBits"`
    EPC    string `json:"EPC"`

TagRecord stors the Tags contents in string with json tags

func NewTagRecord Uses

func NewTagRecord(tag Tag) *TagRecord

type TagReportData Uses

type TagReportData struct {
    Data     []byte
    TagCount uint

TagReportData holds an actual parameter in byte and how many tags are included in the parameter

type TagReportDataStack Uses

type TagReportDataStack []*TagReportData

TagReportDataStack is a stack of TagReportData

func (TagReportDataStack) TotalTagCounts Uses

func (trds TagReportDataStack) TotalTagCounts() uint

TotalTagCounts returns how many tags are included in the TagReportDataStack

type Tags Uses

type Tags []*Tag

Tags holds a slice of pointers to Tag

func LoadTagsFromCSV Uses

func LoadTagsFromCSV(inputFile string) Tags

LoadTagsFromCSV reads Tag data from the CSV strings and returns a slice of Tag struct pointers

func (Tags) BuildTagReportDataStack Uses

func (tags Tags) BuildTagReportDataStack(pdu int) TagReportDataStack

BuildTagReportDataStack takes []*Tag and PDU value to build a new trds

func (Tags) GetIndexOf Uses

func (tags Tags) GetIndexOf(t *Tag) int

GetIndexOf finds the index in []*Tag

func (*Tags) MarshalBinary Uses

func (tags *Tags) MarshalBinary() (_ []byte, err error)

MarshalBinary overwrites the marshaller in gob encoding Tags

func (*Tags) UnmarshalBinary Uses

func (tags *Tags) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary overwrites the unmarshaller in gob decoding Tags



Package llrp imports 11 packages (graph) and is imported by 3 packages. Updated 2020-05-01. Refresh now. Tools for package owners.