Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gnucap:manual:tech:plugins:devices:parameters [2015/12/11 15:39]
127.0.0.1 external edit
gnucap:manual:tech:plugins:devices:parameters [2025/01/16 23:32] (current)
aldavis [Parameters]
Line 5: Line 5:
 These methods provide all access to parameters.  Parameters are seen as strings in this context, because it is more flexible.  Usually parameters are accessed by index, as if in an array.  It is up to the implementer to decide what type of storage to actually use. These methods provide all access to parameters.  Parameters are seen as strings in this context, because it is more flexible.  Usually parameters are accessed by index, as if in an array.  It is up to the implementer to decide what type of storage to actually use.
  
-Indexing starts at 0 in CARD, and counts up from there.  The indexing of parameters should be consecutive.  For example, if the base class has parameters numbered up to 16, you should start at 17.  The appropriate starting number can be obtained by calling BASE::param_count().  The preferred internal index method is to start at 0, and index from the value BASE::param_count-1-i where i is the external index.  If the result of BASE::param_count-1-i is out of range, call the matching BASE method, passing i through.  In this section BASE:: refers to the most immediate base class.  All of these methods are required, and will march through the class hierarchy until the request is satisfied.+For versions 2024 and earlier, indexing is right to left.  Indexing starts at 0 in CARD, and counts up from there.  The indexing of parameters should be consecutive.  For example, if the base class has parameters numbered up to 16, you should start at 17.  The appropriate starting number can be obtained by calling BASE::param_count().  The preferred internal index method is to start at 0, and index from the value BASE::param_count-1-i where i is the external index.  If the result of BASE::param_count-1-i is out of range, call the matching BASE method, passing i through.  In this section BASE:: refers to the most immediate base class.  All of these methods are required, and will march through the class hierarchy until the request is satisfied. 
 + 
 +For 2025 and later, indexing is left to right, with the base class (CKT_BASE) called last.  As you descend through the hierarchy, at each level subtract off the local count and pass that number down as the index, so each level starts at 0.  All of these methods are required, and will march through the class hierarchy until the request is satisfied.
  
 Some devices use another set of methods, "obsolete_callback".  This is not documented here and not recommended for any new work.  Support for "obsolete_callback" will be dropped at some time in the future. Some devices use another set of methods, "obsolete_callback".  This is not documented here and not recommended for any new work.  Support for "obsolete_callback" will be dropped at some time in the future.
gnucap/manual/tech/plugins/devices/parameters.txt · Last modified: 2025/01/16 23:32 by aldavis
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki