Bully Task (12.12.2005)

at.jku.fim.datalinksimulation.utils
Class CRCUtils

java.lang.Object
  extended by at.jku.fim.datalinksimulation.utils.CRCUtils

public class CRCUtils
extends java.lang.Object

Title: OSI Simulation Framework

Copyright: (c) 2004-05

Company: FIM@JKU, www.fim.uni-linz.ac.at

Version:
$Id: CRCUtils.java,v 1.2 2005/11/14 17:02:47 aputzinger Exp $
Author:
Students

Constructor Summary
CRCUtils()
           
 
Method Summary
static void insertCrc(java.util.BitSet frame, Logger logger)
          Calculates the CRC of a frame and insert the CRC into the frame.
static boolean validateCRC(java.util.BitSet frame, Logger logger)
          This methods performs the "sanity-check" of a frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRCUtils

public CRCUtils()
Method Detail

validateCRC

public static boolean validateCRC(java.util.BitSet frame,
                                  Logger logger)
This methods performs the "sanity-check" of a frame. It tests if the frame has changed during transmission by evaluating the CRC.

Parameters:
frame - Complete EasyL2 frame data; the last 32 Bits (Bits 0-31) represent the CRC
logger - Logger to use
Returns:
Returns true, if CRC check is ok; false otherwise

insertCrc

public static void insertCrc(java.util.BitSet frame,
                             Logger logger)
Calculates the CRC of a frame and insert the CRC into the frame.

Parameters:
frame - Complete frame data; the last 32 bits (0-31) are unset and have to be filled with the CRC
logger - Logger to use

Bully Task (12.12.2005)

Submit a bug

Copyright 2004, 2005 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.