Boost logo

Boost Users :

Subject: Re: [Boost-users] Multiple instance of options
From: Kerry, Richard (richard.kerry_at_[hidden])
Date: 2013-09-20 03:34:48

I don't think that can work.

Although I use Windows functions (GetPrivateProfileString etc) to do this I've had a quick look at the Boost documentation and it looks like what I'm about to say is the same for Boost's handing of property maps and ini files.

You can't duplicate the [sensor] section as you then have no way of selecting which one you want.

The functions take section name and key name and return a value, so if a section name is duplicated the system doesn't know which section you want.

Should sensor.SensorName return "Outdoor Temp" or "Indoor Temp" ?

In similar cases we do it like this :


This means you've got unique section names.

"you get a hard limit"

Why do you think that ?

Either hold a separate value for the number of sensors, or attempt to read in order and stop when one is missing (this adds a rule that the ones you're using must be consecutive).



Richard Kerry
BNCS Engineer, SI SOL Telco & Media Vertical Practice
T: +44 (0)20 82259063
M: +44 (0)7812 325518
G300, Stadium House, Wood Lane, London, W12 7TA

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitte
From: Boost-users [boost-users-bounces_at_[hidden]] on behalf of Ulf Samuelsson [boost-user_at_[hidden]]
Sent: 18 September 2013 17:28
To: boost-users_at_[hidden]
Subject: [Boost-users] Multiple instance of options

Need to parse an "ini" file which configures one or more sensors.

The sensors can be of the same type and are identified by
"name", "type" and an "id"

Some configuration items are for all sensors
Other configuration tiems are only for some sensors.

     SensorName="Outdoor Temp"
     SensorType=1 # Temp Sensor

     SensorName="Indoor Temp"
     SensorType=1 # Temp Sensor

     SensorType=2 # Light Sensor

Is having multiple identical section names possible with boost program

It is of course possible to do


but that is not so nice looking,
and you get a hard limit on the number
of sensors you can attach.


Ulf Samuelsson

Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at