Giter VIP home page Giter VIP logo

ns-3-ptp's People

Contributors

tinghuiwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ns-3-ptp's Issues

Issues with Compiling

Hi, thanks for the work.

So far, did the following steps. I cloned your repository into src. However, i get an error while compiling the code.

I am not sure how to fix it. I am using NS-3.35.

../src/ptp/model/ptp-network.cc: In member function ‘void PTPNetwork::receivePacket(ns3::Ptr<ns3::Socket>)’:
../src/ptp/model/ptp-network.cc:79:46: error: no matching function for call to ‘NanoSeconds(ns3::Time)’
   79 |   m_globalTime = NanoSeconds(Simulator::Now());
      |                                              ^
In file included from ./ns3/command-line.h:28,
                 from ./ns3/core-module.h:25,
                 from ../src/ptp/model/ptp-network.cc:21:
./ns3/nstime.h:1313:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(uint64_t)’
 1313 | inline Time NanoSeconds (uint64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1313:35: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘uint64_t’ {aka ‘long unsigned int’}
 1313 | inline Time NanoSeconds (uint64_t value)
      |                          ~~~~~~~~~^~~~~
./ns3/nstime.h:1317:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(ns3::int64x64_t)’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1317:37: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘ns3::int64x64_t’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |                          ~~~~~~~~~~~^~~~~
../src/ptp/model/ptp-network.cc: In member function ‘void PTPNetwork::sendSyncFollowPacket(SocketLink*, int)’:
../src/ptp/model/ptp-network.cc:249:46: error: no matching function for call to ‘NanoSeconds(ns3::Time)’
  249 |   m_globalTime = NanoSeconds(Simulator::Now());
      |                                              ^
In file included from ./ns3/command-line.h:28,
                 from ./ns3/core-module.h:25,
                 from ../src/ptp/model/ptp-network.cc:21:
./ns3/nstime.h:1313:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(uint64_t)’
 1313 | inline Time NanoSeconds (uint64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1313:35: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘uint64_t’ {aka ‘long unsigned int’}
 1313 | inline Time NanoSeconds (uint64_t value)
      |                          ~~~~~~~~~^~~~~
./ns3/nstime.h:1317:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(ns3::int64x64_t)’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1317:37: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘ns3::int64x64_t’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |                          ~~~~~~~~~~~^~~~~
../src/ptp/model/ptp-network.cc:269:46: error: no matching function for call to ‘NanoSeconds(ns3::Time)’
  269 |   m_globalTime = NanoSeconds(Simulator::Now());
      |                                              ^
In file included from ./ns3/command-line.h:28,
                 from ./ns3/core-module.h:25,
                 from ../src/ptp/model/ptp-network.cc:21:
./ns3/nstime.h:1313:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(uint64_t)’
 1313 | inline Time NanoSeconds (uint64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1313:35: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘uint64_t’ {aka ‘long unsigned int’}
 1313 | inline Time NanoSeconds (uint64_t value)
      |                          ~~~~~~~~~^~~~~
./ns3/nstime.h:1317:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(ns3::int64x64_t)’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1317:37: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘ns3::int64x64_t’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |                          ~~~~~~~~~~~^~~~~
../src/ptp/model/ptp-network.cc: In member function ‘void PTPNetwork::sendDreqPacket(SocketLink*, int)’:
../src/ptp/model/ptp-network.cc:294:46: error: no matching function for call to ‘NanoSeconds(ns3::Time)’
  294 |   m_globalTime = NanoSeconds(Simulator::Now());
      |                                              ^
In file included from ./ns3/command-line.h:28,
                 from ./ns3/core-module.h:25,
                 from ../src/ptp/model/ptp-network.cc:21:
./ns3/nstime.h:1313:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(uint64_t)’
 1313 | inline Time NanoSeconds (uint64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1313:35: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘uint64_t’ {aka ‘long unsigned int’}
 1313 | inline Time NanoSeconds (uint64_t value)
      |                          ~~~~~~~~~^~~~~
./ns3/nstime.h:1317:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(ns3::int64x64_t)’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1317:37: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘ns3::int64x64_t’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |                          ~~~~~~~~~~~^~~~~
../src/ptp/model/ptp-network.cc: In member function ‘void PTPNetwork::sendDrplyPacket(SocketLink*, int)’:
../src/ptp/model/ptp-network.cc:319:46: error: no matching function for call to ‘NanoSeconds(ns3::Time)’
  319 |   m_globalTime = NanoSeconds(Simulator::Now());
      |                                              ^
In file included from ./ns3/command-line.h:28,
                 from ./ns3/core-module.h:25,
                 from ../src/ptp/model/ptp-network.cc:21:
./ns3/nstime.h:1313:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(uint64_t)’
 1313 | inline Time NanoSeconds (uint64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1313:35: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘uint64_t’ {aka ‘long unsigned int’}
 1313 | inline Time NanoSeconds (uint64_t value)
      |                          ~~~~~~~~~^~~~~
./ns3/nstime.h:1317:13: note: candidate: ‘ns3::Time ns3::NanoSeconds(ns3::int64x64_t)’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |             ^~~~~~~~~~~
./ns3/nstime.h:1317:37: note:   no known conversion for argument 1 from ‘ns3::Time’ to ‘ns3::int64x64_t’
 1317 | inline Time NanoSeconds (int64x64_t value)
      |                          ~~~~~~~~~~~^~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.