Rev | Line | |
---|
[31] | 1 | /************************************************************************************ |
---|
| 2 | * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University |
---|
| 3 | * All rights reserved. |
---|
| 4 | * Refer to LICENSE for terms and conditions of use. |
---|
| 5 | ***********************************************************************************/ |
---|
| 6 | //Petroaca - a data frame at the Mac level |
---|
| 7 | package vnsim.network.dsrc; |
---|
| 8 | |
---|
| 9 | import vnsim.map.object.Globals; |
---|
| 10 | |
---|
| 11 | public class DsrcFrame |
---|
| 12 | { |
---|
| 13 | private byte[] macHeader; |
---|
| 14 | private byte[] data; |
---|
| 15 | |
---|
| 16 | public DsrcFrame() |
---|
| 17 | { |
---|
| 18 | this.macHeader=new byte[Globals.DSRC_MACHEADER_LENGHT]; |
---|
| 19 | this.data=new byte[10]; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | public DsrcFrame(byte[] macHeader,byte[] data) |
---|
| 23 | { |
---|
| 24 | this.macHeader=macHeader; |
---|
| 25 | this.data=data; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | public byte[] getMacHeader() |
---|
| 29 | { |
---|
| 30 | return this.macHeader; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | public void setMacHeader(byte[] set) |
---|
| 34 | { |
---|
| 35 | this.macHeader=set; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | public byte[] getData() |
---|
| 39 | { |
---|
| 40 | return this.data; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | public void setData(byte[] set) |
---|
| 44 | { |
---|
| 45 | this.data=set; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | public String toString() |
---|
| 49 | { |
---|
| 50 | return "Mac Header:"+this.macHeader+" Data:"+this.data; |
---|
| 51 | } |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.