C++ XML File Generation -- Very Easy
$30-50 USD
货到付款
This? application will form a string that will contain a well formed xml file. (specification for the xml file is specified in documentation).
The application will retrieve data to put into the xml file from that array of function pointers that is retrieved by calling a function.
A timestamp will also need to be generated and placed into the file as specified.?
Note:
All data will be constants in this coder's implementation of this application/executable. The function that returns the appropriate array of functions pointers will also be needed to be written by the coder. The actual data returning and function array pointer generation will be done in house when the system is put into place.
Timestamp generation, however, needs to be accurate.
## Deliverables
# Web Data Collection Script/Application
?
The project will be a C++ executable that generates an xmlfile. It must conform to the following specifications/requirements.
*Note: All ‘provided’sections of the program should be filled in by the author with stub [url removed, login to view] can simply be functions that only return constants or random values fortesting purposes.*
The program will iterate through an array of functionpointers provided. Each of these functions will return a struct called“SensorData??. It is defined below.
Typedefstruct
{
? ? ? ? ? String sensorName;
? ? ? ? ? Float sensorData;
}SensorData;
The program willthen output a properly formed XML based file to STDOUT. ? The definition of the xml filed is included inthe end of this document. This XML file is written to STDOUT.
?
### “Snapshot?? Time Determination
### ?
The author should, upon each execution of the application,retrieve the current time of the system using standard C++ functions. The finalresult of the time “stamp?? should be in the following syntax. Each piece ofdata has no spaces between them. See the xml file included for an example.
Year<nospace>month<nospace>day<nospace>hour<nospace>minute<nospace>second
?
## Example XML Data
?
<?xmlversion="1.0" encoding="UTF-8" ?>
<drive id="0">
<snapshottimestamp="20090408155439">
<dRPMtype="float">48.74393</dRPM>
<eRPMtype="float">32.47631</eRPM>
<DieselTemptype="float">32.27321</DieselTemp>
<ElectricTemptype="float">0.2270953</ElectricTemp>
<ThrottlePositiontype="float">26.21629</ThrottlePosition>
<BatteryVoltage type="float">6.441534</BatteryVoltage>
<FuelLeveltype="float">22.56278</FuelLevel>
<FuelFlowtype="float">44.95784</FuelFlow>
<Axeltype="float">23.51309</Axel>
<eClutchtype="float">37.67055</eClutch>
<dClutchtype="float">42.12255</dClutch>
<Shunt type="float">24.82385</Shunt>
</snapshot>
</drive>
?
## XML Syntax
## ?
<?xmlversion="1.0" encoding="UTF-8" ?>
<drive id="0">
<snapshottimestamp="20090408155439">
<SENSORNAMEtype=??float??>SENSORDATA</SENSORNAME>
</snapshot>
</drive>
项目ID: #3821526