Skip to content

Instantly share code, notes, and snippets.

@hungtatai
Created May 17, 2015 02:19
Show Gist options
  • Save hungtatai/4b20499283edae592f49 to your computer and use it in GitHub Desktop.
Save hungtatai/4b20499283edae592f49 to your computer and use it in GitHub Desktop.
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
em->SetAttribute ("ErrorUnit", EnumValue (RateErrorModel::ERROR_UNIT_PACKET));
em->SetAttribute ("ErrorRate", DoubleValue (errorRate));
NetDeviceContainer proxyRouterDevice = ...;
proxyRouterDevice.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment