Coder Social home page Coder Social logo

zainmo11 / lab-5 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 28 KB

This program is designed to read an Autosar ARXML file containing a list of containers, each with a unique ID, and reorder the containers alphabetically by their name sub-container "SHORT-NAME". The program will then write the reordered containers to a new ARXML file.

Java 91.23% Batchfile 8.77%

lab-5's Introduction

Program to reorder Autosar ARXML containers alphabetically by their name sub-container "SHORT-NAME"

  • This program is designed to read an Autosar ARXML file containing a list of containers, each with a unique ID, and reorder the containers alphabetically by their name sub-container "SHORT-NAME". The program will then write the reordered containers to a new ARXML file.

Requirements

  • The name of the arxml file shall be an argument which needs to be passed through the command line.
  • If the file is not having .arxml extension then the program will trigger a user-defined handled exception “NotValidAutosarFileException”.
  • If the file is empty, then the program will trigger a user-defined unhandled exception “EmptyAutosarFileException”.
  • The output file shall be named the same as the input file concatenated with “_mod.arxml”. For example, if the input file is named "Rte_Ecuc.arxml", the output file should be "Rte_Ecuc_mod.arxml".
  • Usage -The program is written in Java and can be compiled using a Java compiler. The compiled Java file should be run with the input ARXML file passed as an argument through the command line. The output file will be created in the same directory as the input file.

Batch File

  • To make running the program easier, a batch file has been provided that allows you to test three different scenarios:

Normal case:

provide the input file and specify its name inside the batch script.

Not valid Autosar file case:

provide the file that is not valid Autosar file.

Empty file case:

provide the empty file.

To use the batch file

  • simply run the command below in the command line:
 sh run_autosar_reorder.sh

Exceptions

  • NotValidAutosarFileException: This exception is thrown when the input file does not have the .arxml extension.
  • EmptyAutosarFileException: This exception is thrown when the input file is empty.

lab-5's People

Contributors

zainmo11 avatar

Stargazers

 avatar

Watchers

 avatar

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.