Giter VIP home page Giter VIP logo

boda-measdatacollectionparser's People

Contributors

erssebaggala avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

boda-measdatacollectionparser's Issues

fileFormatVersion and vendorName tags not being captured from XML

Hi,
I have started to use measdatacollectionparser and I have noticed that the resulting CSV file is not including fileFormatVersion and vendorName tags (those columns are empty). After taking a look to the source code and comparing with the 3GPP XML Specification, in my opinion those tags are located at fileHeader area, however the code is trying to find them at fileSender area and is not being success and it is the reason.

localDN attribute is just the opposite (it belongs to fileSender), but because fileSender is a subset of fileHeader, it still works.

Best regards, Jose

if (tag == "fileHeader") {
            for (m <- attrs) {
              if (m.key == "localDn") fileSenderLocalDn = m.value.toString()
              if (m.key == "elementType") elementType = m.value.toString()
              if (m.key == "dnPrefix") fileHeaderDnPrefix = m.value.toString()
            }
          }

          if (tag == "fileSender") {
            for (m <- attrs) {
              if (m.key == "fileFormatVersion") fileFormatVersion = m.value.toString()
              if (m.key == "vendorName") vendorName = m.value.toString()
            }
          }

Create csv file for parsed output

As of version 0.0.1, the parser outputs the generated csv to stdout. As flag for the output folder should be added to specify where to place the generated csv file. Otherwise, the parsed output should be shown be send to stdout.

Parsing failure when "r" type of variable (measType) has no value (measValue)

Hi,
I have realized that in this latest parser version, when I introduce a XML file that declares (measType tag) for example 5 available counters names but in one of the included devices, only 3 of those counters reports values, then the parsing process is stopped because source code tries to find (one to one) declared variable with reported counter value.

XML Schema supports the values as optional for a given device. So it is a valid situation.

So, in my opinion, the number of elements in the measTypesList array could be equal but also greater than the number of elements in the measResultsList array.
Let me put an example: 13 declared counters but for this network element only 8 values are received. Parser reports en error ("key not found: 6") and execution is interrupted because variable number 6 is not reporting any counter value.

	<measData>
		<managedElement localDn="ManagedElement=Network/Switch"/>
		<measInfo>
		<granPeriod duration="PT900S" endTime="2019-07-23T15:35:00+00:00"/>
			<measType p="1">ifHCInOctets_ifHCInOctets</measType>
			<measType p="2">ifHCInUcastPkts_ifHCInUcastPkts</measType>
			<measType p="3">ifHCOutOctets_ifHCOutOctets</measType>
			<measType p="4">ifHCOutUcastPkts_ifHCOutUcastPkts</measType>
			<measType p="5">ifInErrors_ifInErrors</measType>
			<measType p="6">ifInOctets_ifInOctets</measType>
			<measType p="7">ifInUcastPackets_ifInUcastPackets</measType>
			<measType p="8">ifOperStatusPolled_ifOperStatusPolled</measType>
			<measType p="9">ifOperStatus_ifOperStatus</measType>
			<measType p="10">ifOutErrors_ifOutErrors</measType>
			<measType p="11">ifOutOctets_ifOutOctets</measType>
			<measType p="12">ifOutUcastPackets_ifOutUcastPackets</measType>
			<measType p="13">sysUpTime_sysUpTime</measType>
			<measValue measObjLdn="UPTB-ES00M-NO-0001/os/interfaces/iface29">
				<r p="4">206483017.0</r>
				<r p="5">0.0</r>
				<r p="3">43876537023.0</r>
				<r p="9">1.0</r>
				<r p="10">0.0</r>
				<r p="1">181234731528.0</r>
				<r p="8">1.0</r>
				<r p="2">436283885.0</r>
			</measValue>
		</measInfo>
	</measData>

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.