OpenQNX :: The QNX Community Portal

Aug 21, 2008 - 06:33 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 48 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
metais
Post subject: How to create an environment variable in BSP startup file ?  PostPosted: Jul 17, 2006 - 01:45 PM
Active Member


Joined: Mar 02, 2006
Posts: 13

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 !
 
 View user's profile Send private message  
Reply with quote Back to top
Alexander Koppel
Post subject: Re: How to create an environment variable in BSP startup fil  PostPosted: Aug 01, 2006 - 09:06 PM
Guest





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...
Quote:
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 !


 
   
Reply with quote Back to top
David Gibbs
Post subject: Re: How to create an environment variable in BSP startup fil  PostPosted: Aug 02, 2006 - 01:46 PM
Guest





metais <laurent.metais@cp.com> wrote:
Quote:
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
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.