there's a function (on php) to convert symbolic link filename to real file
name, i don't remember now, i will try to find it and send again

2009/4/9 Paul Alfille <[email protected]>

> By: charly86
>
>
> Hi all,
>
> I would like to know if there is a specific configuration or possibility to
> replace the 1W device-ID by an alias in the owfs system
>
> Here is my problem, I'm human and it's very difficult to me to remember
> wich
> device as this or this ID
> owfs is mounted in /mnt/owfs
> So I created a new folder /mnt/hcontrol and made some sym links. This is
> working
> fine. like the structure below (when ls -al /mnt/hcontrol)
>
> office -> /mnt/owfs/12.0AB668000000/PIO.B
> bedroom -> /mnt/owfs/12.A97F68000000/PIO.B
> living -> /mnt/owfs/12.FEB568000000/PIO.A
>
> But now I'm coding C code using owcapi and when I want to ask for data I
> need
> to refer to owfs main mount folder. So I can't talk owfs using my sym
> links.
> Of course I could create my sym links in /mnt/owfs folder but they will be
> gone
> after a reboot or restart owfs.
>
> One way could be (I think) is to add in the config file the possibility to
> make
> symbolic links at mount time such as
> office=/12.0AB668000000/PIO.B
> and then owfs could directly mount owfs file system with name "office"
>
> Any magic idea to solve my problem ?
>
> ---------- Forwarded message ----------
> By: alfille
>
> Well, your basic problem, readable device names, is easy in C.
>
> Use macros:
>
> #define OfficeSwitch 12.0AB668000000
>
> This isn't as usefule if you use several of the programs at the same time.
> (owget
> and owcapi).
>
> I've thought of adding aliases to the underlying configuration.
> 1. They would probably be listed in a configuration file
> 2. We would have to decide if they are persistent, or can be changed on the
> fly.
> 3. We'd have to decide on handling of ambiguous names: deadbeeffeed,
> interface,
> uncached
> 4. Would directory listings show the native names, or the aliases?
> 5. Are aliases for devices that are not currently on the bus shown?
> 6. Are aliases unique? How is this enforced?
> 7. For a program linked to an owserver over the network, where is the alias
> kept? In the owserver directly connecting to the device, or the calling
> program?
>
>
> My first pass at an implementation:
>
> A property of "alias" for every device, with a default of empty. A
> non-empty
> alias is used in preference to the native device name.
>
> No enforcing of uniqueness is made, and which duplicate name is matched
> is undefined.
>
> Alias can be set on the fly by writing to an alias property, even if the
> device
> doesn't exist.
>
> There is a property under settings that shows all the current aliases,
> suitable
> for populating a configuration file.
>
> Clearly the implementation becomes messy, which is why I haven't
> implemented
> in in the absence of a strong demand.
>
> Paul Alfille
>
>  ------------------------------
>  Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Atualizado em 09/04/2009
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>


-- 
Roberto Spadim
Spadim Technology / SPAEmpresarial
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to