Jim
> What if the user is creating 300 instances of a ".db" file at boot
> time and each instantiation required 6 variable changes? With your
> format, there would be 300*6 "set" statements and 300 include statements.
> The format implies that the ".db" file will be opened 300 times. As
> we all know, there is significant overhead when openning a file under
> vxWorks with ftp. The current format of dbLoadTemplates() does not
> imply an implementation, so the file could be openned once and parsed
> 300 times. The current dbLoadTemplates() format also allows the
> instances to be named - a feature that currently is not used by any tools
> but might be useful in the future. I think that the current dbLoadTemplates()
> format is more readable in the case where there are many
> instantiations and many variables. At APS there are many cases where there
> are 20+ variable that need to be set for an instantiation of a template.
... point taken, I now accept that the templates file will not go away.
However, to sustain our thought processes for just a little more, I
might add:
1. I don't think the current syntax precludes the ommission of a
reserved word such as `set' or `define' - just an embedded equals sign
may be sufficient. Then the amount you type must be about the same.
2. I believe the current dbLoadTemplate is really just a host side tool
since it writes to stdout. Am I correct? Thus you don't really have to
worry about the number of file opens if you are just wanting to provide
the same functionality. Basically, I thought the conclusion was that if
you have many files and use ftp you would always use dbAsciiExpand on
the host for efficiency reasons.
3. dbLoadAscii could always buffer its file handles... (No, I don't think
I like this either - it isn't really realistic if you are using ftp on
VxWorks).
4. I agree to supporting both formats. However, I think the syntax that is
chosen should be consistent, and the semantics such that:
file gizmo_database.db
{
i1{ pre=part1,parm=big, alarm_limit=20 }
i2{ pre=part2,parm=medium,alarm_limit=30 }
}
is identical to (changing my syntax to match yours):
pre=part1
parm=big
alarm_limit=20
include "gizmo_database.db"
pre=part2
parm=medium
alarm_limit=30
include "gizmo_database.db"
i.e. the `file' statement is sort of an implied for loop.
> Now the user needs to maintain 300 files. Tell me if there is something
> I am misunderstanding.
No, I think you had it absolutely right.
Nick
- Navigate by Date:
- Prev:
Re: macro substitution Jim B. Kowalkowski
- Next:
Re: macro substitution William Lupton
- Index:
1994
1995
<1996>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: macro substitution Jim B. Kowalkowski
- Next:
Re: macro substitution William Lupton
- Index:
1994
1995
<1996>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|