Yodi Suhasta @yosuhasta ?

active 5 years, 12 months ago
  • Ke Xu posted an update in the group iTetris Custom Application Development:   6 years, 4 months ago · View

    Hello,

    First thank the developers for providing version 0.2.0 and this time the app can be run without any error.

    After reading guideline0.2.0 and running the demo app, I am still struggling to figure out how to modify the demo app. For example, the easiest test is to change the advised speed sending from RSU to vehicles. I can’t find where this value is set(or generated) at the very beginning, even if I know it is saved in ResultContainer and can find the info in the log file.

    I just wonder if there is any documentation, except the guideline, which teaches users and gives examples of how to modify and write your own app on iTETRIS. Do you guys have any similar experience? I appreciate it if someone could share any helpful hints and suggestions.

    Thanks,
    Ke

    • Avatar Image
      Xin Wei · 6 years, 3 months ago

      Maybe you can see code in file folder” applications_manager”.

    • Avatar Image
      Raik-Aissaoui · 6 years, 2 months ago

      I am trying to customize itetris example.

      For example to change the advised speed sending from RSU to vehicles, you will find it in community-demo-app/src/application-logic.cpp
      vector
      ApplicationLogic::SendBackExecutionResults(int senderId, int timestep)
      {
      vector results;

      if (timestep >= m_appStartTimeStep && senderId == 5000) {
      // Loop vehicles in the area, one message per vehicle
      for (vector::const_iterator it = m_vehiclesInArea.begin() ; it != m_vehiclesInArea.end() ; it++) {
      AppMessage message;
      message.messageId = ++m_messageCounter;
      message.status = kToBeScheduled;
      message.senderId = senderId;
      message.destinationId = (*it).id;
      message.createdTimeStep = timestep;
      //message.payloadValue = (*it).speed + 10;
      message.payloadValue = 0; //here you can change the advised speed
      m_messages.push_back(message);
      }

      // Keep in safe place all the results to send back to the iCS
      results = m_messages;

      // Loop current messages to find those to be applied and erase from the result record
      for (vector::iterator it = m_messages.begin() ; it != m_messages.end() ; it++) {
      if ((*it).status == kToBeApplied) {
      m_messages.erase(it); // The value will be applied so there is no need to have it registered any longer
      }
      }
      }

      return results;
      }

      • Avatar Image
        Raik-Aissaoui · 6 years, 2 months ago

        message.payloadValue = 0; //here you can change the advised speed

  • Ke Xu joined the group Bug reports   6 years, 7 months ago · View

  • Ke Xu joined the group iTetris Custom Application Development   6 years, 7 months ago · View

  • Ke Xu joined the group Setup Support   6 years, 7 months ago · View