How to create an environment variable in BSP startup file ?

bridged with qnx.bsp
Post Reply
metais

How to create an environment variable in BSP startup file ?

Post by metais » Mon Jul 17, 2006 1:45 pm

Hi everybody !

I want to create an environment variable in startup in order to retrieve it
in a QNX program.
Startup will read the value in a EEPROM, store it in an environment variable
and so my QNX program will retrieve it.

I saw that function add_typed_string can set predefined variable but I want
to create a new one. The function add_string could be OK but how my QNX
program can retrieve the index returned ?

Thanks for your help !

Alexander Koppel

Re: How to create an environment variable in BSP startup fil

Post by Alexander Koppel » Tue Aug 01, 2006 9:06 pm

You may want to take a look at confstr()in the Library Reference, getconf,
setconf in the Utilities Reference and "Configuration strings" in the
Configuring Your Environment chapter of the Neutrino User's Guide.

"metais" <laurent.metais@cp.com> wrote in message
news:e9g45a$s61$1@inn.qnx.com...
Hi everybody !

I want to create an environment variable in startup in order to retrieve
it in a QNX program.
Startup will read the value in a EEPROM, store it in an environment
variable and so my QNX program will retrieve it.

I saw that function add_typed_string can set predefined variable but I
want to create a new one. The function add_string could be OK but how my
QNX program can retrieve the index returned ?

Thanks for your help !


David Gibbs

Re: How to create an environment variable in BSP startup fil

Post by David Gibbs » Wed Aug 02, 2006 1:46 pm

metais <laurent.metais@cp.com> wrote:
Hi everybody !

I want to create an environment variable in startup in order to retrieve it
in a QNX program.
Startup will read the value in a EEPROM, store it in an environment variable
and so my QNX program will retrieve it.

I saw that function add_typed_string can set predefined variable but I want
to create a new one. The function add_string could be OK but how my QNX
program can retrieve the index returned ?
I think add_typed_string() will stick it in the system page, there may be
some macros or functions in <sys/syspage.h> that will allow you to retrieve
it.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

Post Reply

Return to “qnx.bsp”