Mark Salter | 24 Feb 15:42

Re: using jPOS to parse messages of serial port

tasbihmr wrote:
> How can we pass the data read from serial port in hexadecimal format,
> and parse this via jPOS? As you know, the ISO message has many parts,
> there is also the header or TPDU, and there is bitmap which itself
> has a lot of meaning and each it signifies something, a component for
> example.
I think you are thinking at too low a level.

Let's assume you build a piece of code (Channel) for talking and 
listening to your serial connection.  This jPOS Channel will use a 
packager to interpret the bits and bytes arriving on the Channel.

The result of a call to receive is an ISOMsg, the parameter into send is 
also an ISOMsg.

Field 7 in an ISOMsg (msg) can be examined :-

	String dateTime = msg.getString(7);

And field 39 could be set thus:-

	msg.set(39,"00");

Thus the hard work (ignoring - for now - the serial port handling) is 
getting the packager to match the structure of your messages.

Do you have a technical specification of the messages you are wanting to 
send and receive that goes down the the level of each field?

Andy provided an excellent post in jpos-users (on google groups) in 
response to a (I think) similar question:-

	http://tinyurl.com/37vmtb

Join and search jpos-users and I think you will find questions and 
answers more relevant to your handling needs.

--

-- 
Mark

 

Gmane