crc32 (Follows IEEE Standard of Ethernet in Section 3.2.9 )

バージョン 1.0.0 (1.25 KB) 作成者: WARRIOR24
CR32 calculate - With Directions on how to run/execute file.
ダウンロード: 101
更新 2020/12/22

ライセンスの表示

I used the built in Matlab CRC Generator "comm.CRCGenerator" because it references the IEEE Standard of Ethernet in Section 3.2.9 page 57 from "https://ecfsapi.fcc.gov/file/1050839507018/IEEE%20Standard%20for%20Ethernet.pdf"

comm.CRCGenerator follows steps a-e of Section 3.2.9 - Frame Check Sequence (FCS) Field.

Under the original "crcGen = comm.CRCGenerator" I had to change some true and false and add a few lines of code to make it return the correct CRC. I added lines (1) and (2) and set their values to true. (NOTE: from comm.CRCGenerator Document, the original CRC32 will show 2 examples for computing 2 different ways on how to compute the same CRC. A "Direct" way and "NonDirect" way)

comm.CRCGenerator
'Polynomial', poly, ...
'InitialConditions', 0, ...
'ReflectInputBytes', true, ... % This (1) line was added and set to 'true'
'ReflectChecksums', true, ... % This (1) line was added and set to 'true'
'DirectMethod', false, ...
'FinalXOR', 1);

How to input:
Input 8 bit HEX string the command window by
>> crc32('12345678')

Or you can create a new scrip to call this function

To check: http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
*** Make sure you change the input would be byte and enter as '12345678'

引用

WARRIOR24 (2024). crc32 (Follows IEEE Standard of Ethernet in Section 3.2.9 ) (https://www.mathworks.com/matlabcentral/fileexchange/84667-crc32-follows-ieee-standard-of-ethernet-in-section-3-2-9), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2020a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0