Could you explain me how implement the FCS in Java? I do not understand this field and I have tried it with online calculators for CRC16 but I do not got the correct FCS.
I have seen your GXFCS16.java but I do not understand this code. I would like use it in my own program. Could you help me?
You can create static fcs16 table or count values to that table in run time.
We are using static table because it's faster to create.
Then you loop data and count frame check sequence for data.
In last we are changing byte order from Big Endian (Motorola byte order) to Little Endian (Intel byte order).
In the GXFCS16.java code, what are the input parameters buff, offset and count?
I would like use this class to implement it in my own program, and thus, I could calculate my fcs calling the method of your class from my class. Could I do it?
buffer is data where FCS is counted. offset is index. That can be used if you want to skip few bytes from the begin. Count is amount of bytes to count.
Calculate FCS
Hi,
You can create static fcs16 table or count values to that table in run time.
We are using static table because it's faster to create.
Then you loop data and count frame check sequence for data.
In last we are changing byte order from Big Endian (Motorola byte order) to Little Endian (Intel byte order).
I hope this helps.
BR,
Mikko
Hi!
Hi!
In the GXFCS16.java code, what are the input parameters buff, offset and count?
I would like use this class to implement it in my own program, and thus, I could calculate my fcs calling the method of your class from my class. Could I do it?
Thanks!
Calculate FCS
Hi,
buffer is data where FCS is counted. offset is index. That can be used if you want to skip few bytes from the begin. Count is amount of bytes to count.
This code is licensed under the GNU General Public License v2.
Full text may be retrieved at http://www.gnu.org/licenses/gpl-2.0.txt
BR,
Mikko
I have already understood it.
I have already understood it. Thank you very much!