Comments (3)
Hello prlwtz!
I fixed the compilation problem. Please test and report.
Soon, I will study the SGCN specification and implement it
from epctagcoder.
Hi José,
I replaced the whole 'org' source folder in my project and it compiled without any issues. Thanks.
With regards to SGCN, I don't have an immediate need for it at the moment, I just noticed the missing APIs while implementing the library into my RFID parser.
With regards to that parsing, I now have an iterating loop trying parse through the various objects.
private enum EPC {
SGTIN,
SSCC,
SGLN,
GRAI,
GIAI,
GSRN,
GSRNP,
GDTI,
CPI
};
String data = "";
for (int i = 0 ; i<EPC.values().length && data.length()==0 ; i++) {
EPC epc = EPC.values()[i];
switch (epc) {
case SGTIN:
// SGTIN - Serialized Global Trade Item Number
// urn:epc:id:sgtin:CompanyPrefix.ItemRefAndIndicator.SerialNumber
try {
ParseSGTIN parseSGTIN = ParseSGTIN.Builder().withRFIDTag(hex_data).build();
SGTIN sgtin = parseSGTIN.getSGTIN();
data = sgtin.getEpcPureIdentityURI();
} catch (Exception parse_e) {
}
break;
case SSCC:
// SSCC - Serial Shipping Container Code
// urn:epc:id:sscc:CompanyPrefix.SerialReference
try {
ParseSSCC parseSSCC = ParseSSCC.Builder().withRFIDTag(hex_data).build();
SSCC sscc = parseSSCC.getSSCC();
data = sscc.getEpcPureIdentityURI();
} catch (Exception parse_e) {
}
break;
etc etc
Is there an better way of simply parsing the hex data and just get an object with the appropriate contents? Or is this just the way it currently is?
Kind regards,
Eize
from epctagcoder.
I'm glad it worked.
There is no other way to parse hexadecimal data. Each class is specific to resolve certain hexadecimal. Your loop is perfect and I don't see any other way.
from epctagcoder.
Related Issues (11)
- SGTIN - java.lang.StringIndexOutOfBoundsException: String index out of range: 12 HOT 1
- GIAI Builder returns null when input RFID tag is not valid HOT 1
- Unexpected IllegalArgumentException HOT 2
- TID and User memory bank encoder/decoder HOT 1
- Decode EPC sem a necessidade de saber qual o padrão GS1 foi gerado HOT 1
- SGTIN - add a catch when an invalid EPC tag is sent such as not being 96 bits or 128 bits
- Possible wrong with the generation values HOT 2
- GIAI implementation HOT 4
- String parameter for withTagSize HOT 4
- Problems with certain chip formats HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epctagcoder.