Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 14th, 2005, 4:52 PM   #1
JamesLomuscio
Newbie
 
Join Date: Feb 2005
Posts: 8
Rep Power: 0 JamesLomuscio is on a distinguished road
Data Grabbing From File

Hello All, First Post

Im a little frustrated with getting data from a particular file. This is a little like a history file, but its writen out in almost plain english, what I need is to get all of the needed data from this file (it's from a weather station). This section of my code is complete garbage, so I wont bother to post it.

If anyone is interetsed in a mini-project, you can help me get all of the data from this file.

The next line starts line one of currdat.lst:
[header]
programm_name = "heavy weather"
programm_version = "Ver. 2.0 beta release"
file_name = "currdat.lst"
file_format_version = "ver. 1.0"

[time]
start = 3315854779
start_date_string = "Thu Jan 27 17:46:19 2005"
last_actualisation = 3315855694
last_actualisation_date_string = "Thu Jan 27 18:01:34 2005"
next_actualisation = 3315855754
next_actualisation_date_string = "Thu Jan 27 18:02:34 2005"

[weather_picture]
comment = "-1=not valid, 0=rain, 1=cloud, 2=sun"
number = 1

[weather_tendency]
comment_1 = "-1=not valid, 0=no change of air pressure"
comment_2 = " 1=air pressure rising, 2=air pressure falling"
number = 0

[indoor_temperature]
deg_C = "20.2"
deg_F = "68.3"

[outdoor_temperature]
deg_C = "-15.8"
deg_F = "3.5"

[indoor_humidity]
percent = "43"

[outdoor_humidity]
percent = "19"

[dewpoint]
deg_C = "OFL"
deg_F = "OFL"

[windchill]
deg_C = "-15.8"
deg_F = "3.5"

[wind_speed]
mps = "0.0"
kmh = "0.0"
mph = "0.0"
knt = "0.0"
bft = " 0"

[wind_direction]
deg = "22.5"
name = "NNE"

[rain_total]
mm = "0.0"
inch = "0.00"

[rain_24h]
mm = "0.0"
inch = "0.00"

[rain_1h]
mm = "0.0"
inch = "0.00"

[pressure_absolute]
hpa = "1017.5"
inHg = "30.04"

[pressure_relative]
hpa = "2748.1"
inHg = "81.15"

[storm_alarm]
comment = "-1=not valid, 0=storm alarm not activ, 1=storm alarm activ"
number = 0
JamesLomuscio is offline   Reply With Quote
Old Feb 15th, 2005, 11:36 PM   #2
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
James: I will do it for you and post the results when I finish. I'm going to bed soon so you won't get it until tomorrow at the very earliest, sorry. Also, did you want to do this in C++ or straight C?
uman is offline   Reply With Quote
Old Feb 16th, 2005, 3:11 AM   #3
melbolt
Professional Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 253
Rep Power: 4 melbolt is on a distinguished road
allowed xml?

this would be a piece of cake if you could put it in an xml file, have to be plain text?
melbolt is offline   Reply With Quote
Old Feb 21st, 2005, 9:13 AM   #4
JamesLomuscio
Newbie
 
Join Date: Feb 2005
Posts: 8
Rep Power: 0 JamesLomuscio is on a distinguished road
If this thread is still active, thanks alot uman, when do you think it might be completed? An estamate is fine. C++ is preferred
JamesLomuscio is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:14 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC