Hi fellows,
I have made a workaround in order to properly execute the
aforementioned example. I just changed the headerLenght and bitrate
from double to int as the the patch presented below. Could someone
confirm if this is the correct approach to follow?
Kind regards,
Ivo
diff --git a/src/veins/base/modules/BaseMacLayer.ned
b/src/veins/base/modules/BaseMacLayer.ned
index a639f4c..aad7caa 100644
--- a/src/veins/base/modules/BaseMacLayer.ned
+++ b/src/veins/base/modules/BaseMacLayer.ned
@@ -6,7 +6,7 @@ simple BaseMacLayer extends BaseLayer like IWirelessMac
parameters:
@class(BaseMacLayer);
bool coreDebug = default(false); // debug switch
- double headerLength @unit(bit); // length of the
MAC packet header (in bits)
+ int headerLength @unit(bit); // length of the MAC
packet header (in bits)
string address = default("auto"); // MAC address as
hex string (12 hex digits), or
// "auto". "auto"
values will be replaced by
// a generated MAC
address in init stage 1.
diff --git a/src/veins/base/modules/IWirelessMac.ned
b/src/veins/base/modules/IWirelessMac.ned
index 054c1e0..a6e6f76 100644
--- a/src/veins/base/modules/IWirelessMac.ned
+++ b/src/veins/base/modules/IWirelessMac.ned
@@ -5,7 +5,7 @@ moduleinterface IWirelessMac
{
parameters:
@class(BaseMacLayer);
- double headerLength @unit(bit); // length of the
MAC packet header (in bits)
+ int headerLength @unit(bit); // length of the MAC
packet header (in bits)
string address; // MAC address as
hex string (12 hex digits), or
// "auto". "auto"
values will be replaced by
// a generated MAC
address in init stage 1.
diff --git a/src/veins/modules/mac/ieee80211p/Mac1609_4.ned
b/src/veins/modules/mac/ieee80211p/Mac1609_4.ned
index 1200f56..2d36fc5 100755
--- a/src/veins/modules/mac/ieee80211p/Mac1609_4.ned
+++ b/src/veins/modules/mac/ieee80211p/Mac1609_4.ned
@@ -50,7 +50,7 @@ simple Mac1609_4 extends BaseMacLayer
headerLength @unit(bit) = default(0 bit);
// bit rate
- double bitrate @unit(bps) = default(6 Mbps);
+ int bitrate @unit(bps) = default(6 Mbps);
// maximum artificial asynchronization between cars to avoid
synchronization effects
double syncOffset @unit(s) = default(0.0003s);
~
On Sun, Apr 22, 2018 at 7:42 PM, Ivo Calado <
ivo.c...@ifal.edu.br> wrote:
> Hi fellows,
> I'm trying to execute the basic "hello world" example of Veins Framework.
> I followed all the instructions to build veins
> (
http://veins.car2x.org/tutorial/). Nevertheless, it fails in the
> initialization step due to a cast problem, as shown below. Any tip on how to
> proceed?
>
>
>
>