at.jku.fim.datalinksimulation.layer2.protocols
Class EasyL2Utils

java.lang.Object
  extended by at.jku.fim.datalinksimulation.layer2.protocols.EasyL2Utils

public class EasyL2Utils
extends java.lang.Object

Title: OSI Simulation Framework

Copyright: (c) 2004-05

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

Version:
$Id: EasyL2Utils.java,v 1.1 2005/10/27 13:10:11 aputzinger Exp $
Author:
Andreas Putzinger

Constructor Summary
EasyL2Utils()
           
 
Method Summary
static RawData createFrame(EasyL2FrameData content, Logger logger)
          "Serialize" an EasyL2 object so that it can be transferred over network
static EasyL2FrameData interpretRawData(RawData data, Logger logger)
          Interpret raw data as EasyL2 frame; if not successful, null is returned
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EasyL2Utils

public EasyL2Utils()
Method Detail

interpretRawData

public static EasyL2FrameData interpretRawData(RawData data,
                                               Logger logger)
Interpret raw data as EasyL2 frame; if not successful, null is returned

Parameters:
data - Data to interpret
logger - logger instance; may not be null
Returns:
Returns the interpreted EasyL2 frame or null

createFrame

public static RawData createFrame(EasyL2FrameData content,
                                  Logger logger)
"Serialize" an EasyL2 object so that it can be transferred over network

Parameters:
content - EasyL2 data
logger - logger instance, which may NOT be null
Returns:
Returns raw data of frame