Open GoogleCodeExporter opened 9 years ago
It looks like bafprp is having trouble parsing your files.
Did you make any modifications to the program? If so does the program work
without modifications?
And are you sure your input file is in baf format?
Original comment by charless...@gmail.com
on 8 May 2015 at 9:33
Thanku you so much for replying.I need to submit my work in 2 days only.
Ya I made some modifications.I added strructure code 5000 in bafrecord.cpp
and added feilds in ifeilds.cpp.
common feilds like structure code,call typ ,senson type,senson id and two
more feilds of record id it is parsing correctly.
The fields i added like account id provider id code and few more its not
decoding properly.
input i have in .ama file..
Original comment by ankitaga...@gmail.com
on 9 May 2015 at 6:30
You need to add new records in record_defs.cpp, new fields in field_defs.cpp
Your new fields might be causing the issues, if you supply an incorrect field
length then the parser will get thrown off.
For example this line
makeField( "servicefeaturecode", "number", "3", "Service Feature Code" );
defines the field as type "number" with a length of 3.
You'll have to consult with your docs to find the right length of these new
fields. And make sure you subtract 1 if the length is even. Most docs I've
seen include the trailing C as part of the length of a field.
Original comment by charless...@gmail.com
on 9 May 2015 at 7:10
Thank you so much for reply..i will try with subtracting length 1.one more
thing i want to know that while parsing file i incresed its offset with 14
, as 14 bytes is header..is it correct?
Original comment by ankitaga...@gmail.com
on 10 May 2015 at 4:30
Hi,
I have to subtract even length by 1 for every field value,or the only fieds
containing c at their end?
Original comment by ankitaga...@gmail.com
on 11 May 2015 at 4:53
In general the length of fields is always odd, as there is always a trailing C
As for the header, the baf header is pretty standard - depending on the file
type. You shouldn't have to adjust it
Original comment by charless...@gmail.com
on 11 May 2015 at 4:56
I m not clear about length of field .Can u help me in following fields
length?
Account ID : fff9 1929 2929 292d
Provider ID Code : ffff fff1 004d
Class of Service Code : 80 218c
Generation Timestamp : f142 9703 308d --Wed Apr 22 11:48:28
2015
Event Label : f13d
Event Result : ff1d
SCP Number : ffff ffff ffff ffff
Location Info : ffff ffff ffff ffff
IMSI Overflow : ffff ffff ffff ffff
IMSI : f4 0412 345d
Pre Event Primary Balance : fffffff
Original comment by ankitaga...@gmail.com
on 11 May 2015 at 5:04
1. 15
2. 11
3. 5
etc
A field that is all FF means the data does not exist / not used.
Some of these fields seem to be terminated by a D which is odd but shouldn't
affect anything.
Original comment by charless...@gmail.com
on 11 May 2015 at 5:12
thank you so much for your immediate reply.I will try with this
Original comment by ankitaga...@gmail.com
on 11 May 2015 at 5:15
Hi
Decrementing feild length by 1 works.It is now incrementing correct
length.But I ts not printing that
in my_records.log file.only few fields i am able to see in- my record
file.and it is still showing
- 2015-05-11 11:30:05 WARN: Record did not have 0xAA prefix, or we failed
to find it
- 2015-05-11 11:30:05 ERROR: Could not find record of type '8006'
2015-05-11 11:30:05 FATAL: Unexpected end of file at 26638705. Record is
65535 bytes long, but only 29030 bytes are left
Can you please help me on this
Original comment by ankitaga...@gmail.com
on 11 May 2015 at 6:34
Looks like you'll also have to define record type 8006.
When bafprp encounters an unknown record it tries to skip over it but usually
doesn't get the length right and causes the scanning to malfunction.
That would cause the 0xAA prefix error and the unexpected end of file
Original comment by charless...@gmail.com
on 12 May 2015 at 6:56
Original issue reported on code.google.com by
ankitaga...@gmail.com
on 8 May 2015 at 8:56Attachments: