[jpos-users] HEX Packager

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jpos-users] HEX Packager

Meldri Asan
Hi All,

I need a packager that show message length + data (in Hex) and have capacity 999. I have try LLLNUM , LLLCHAR and LLHEX. But i didnt get the answer.
This is RAW data message from POS Unit,
018008080998000010FFFF0021

What i need:
0013    + 018008080998000010FFFF0021
Length                    Data (in Hex)

The closest answer was LLLNUM and the result was 0026001301800808099800001076760021
What i get:
26       + 01800808099800001076760021
Length                   Data           

Hope you guys can give some advice to determine what packager i should use.


Thanks.
Meldri     

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/42b0e683-e558-459d-ac96-48c36915b758%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [jpos-users] HEX Packager

chhil
import org.jpos.iso.IFB_LLBINARY;
import org.jpos.iso.ISOBinaryField;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOUtil;

public class Test {

    public static void main(String[] args) throws ISOException {

        byte[] origin = ISOUtil.hex2byte("018008080998000010FFFF0021");
        ISOBinaryField f = new ISOBinaryField(12, origin);
        IFB_LLBINARY packager = new IFB_LLBINARY(10,
                "Should be 0000  13 01 80 08 08 09 98 00  00 10 FF FF 00 21        .............!");
        byte[] x = packager.pack(f);
        System.out.println(ISOUtil.hexdump(x));

    }
}

On Tue, May 30, 2017 at 9:51 AM, Meldri Asan <[hidden email]> wrote:
Hi All,

I need a packager that show message length + data (in Hex) and have capacity 999. I have try LLLNUM , LLLCHAR and LLHEX. But i didnt get the answer.
This is RAW data message from POS Unit,
018008080998000010FFFF0021

What i need:
0013    + 018008080998000010FFFF0021
Length                    Data (in Hex)

The closest answer was LLLNUM and the result was 0026001301800808099800001076760021
What i get:
26       + 01800808099800001076760021
Length                   Data           

Hope you guys can give some advice to determine what packager i should use.


Thanks.
Meldri     

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/42b0e683-e558-459d-ac96-48c36915b758%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefBjDHaEnfMH1gPwKAesqLW8jV6f66xFECKvoTakZjs%3DJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [jpos-users] HEX Packager

Meldri Asan
Hi Chhil,

Thanks for save my day. 
But if i want use that data again, i must convert back to Hex again right?

Meldri

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/1c6de0e0-29a1-4d8c-8c1e-70bbbdb231ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [jpos-users] HEX Packager

chhil
My example may be incorrect.
Should the length be as ascii 4 as in 00 13 which would go on the wire as hex 30 30 31 33
or go on the wire as hex 00 13.

Usually binary is used you need to translate that data according to your needs. You get bytes and what you do with your bytes is upto you.

-chhil

On Wed, May 31, 2017 at 6:55 AM, Meldri Asan <[hidden email]> wrote:
Hi Chhil,

Thanks for save my day. 
But if i want use that data again, i must convert back to Hex again right?

Meldri

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/1c6de0e0-29a1-4d8c-8c1e-70bbbdb231ab%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefBBXjCDh-sy349tuV2fop94rWkjMfxq04hLSjWnni9CmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [jpos-users] HEX Packager

Meldri Asan
Hi Chill,

Thanks..I got it now.

Meldri

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/0547958c-c7c0-4c21-a39b-ebbb13d7e0ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...