Commit Graph

139 Commits

Author SHA1 Message Date
Ferdi Franceschini
a802f98a24 Remove unavailable implementations from the impelementation list when an option is selected. 2014-07-04 13:46:47 +10:00
Ferdi Franceschini
abcf19553b Copy original file in backup_files method instead of renaming it in case write_config_file fails.
Add a 'none' entry to the implementation list.
2014-07-03 23:36:43 +10:00
Ferdi Franceschini
294b6fa776 Make config_edit.py easier to browse by grouping order of class declarations. 2014-07-03 18:29:39 +10:00
Ferdi Franceschini
7a4ce1f234 Write option id into driver implementation section when saving the sics_config.ini 2014-07-03 16:04:00 +10:00
Ferdi Franceschini
87bf34c7b1 Renamed type to optype in sics_config.ini so devices
like multimeters can set a data type parameter eg datype
config_edit.py uses optype instead of type
Also the listwalker is now being generated dynamically so that in the
future unavailable drivers can be moved from the list of radiobuttons.
2014-07-02 08:50:17 +10:00
Douglas Clowes
202004766a Check for existence of config dict fields before using them in generated drivers 2014-06-30 12:49:22 +10:00
Douglas Clowes
62f1170a6d Restore sorted ini files on output 2014-06-30 12:47:21 +10:00
Ferdi Franceschini
bd93c34875 copy.copy() doesn't work with urwid on the SL6 VMs.
Explicitly make a new listwalker imp_lw to avoid overwriting the first entry in self.imp_lw_dict[opt]
Python 2.6 requires field numbers for format strings.
2014-06-30 10:09:34 +10:00
Ferdi Franceschini
e971cd8b64 New sicsconfig.ini file configuration editor.
Updated wombat sics_config.ini and gen_sct.py
Generated new tcl files from sct templates and
modified some old sct_*.tcl drivers.

TODO
sct_keithley_2700.tcl
magneticField/sct_oxford_labview.tcl
magneticField/sct_bruker_BEC1.tcl
temperature/sct_watlow_st4.tcl
temperature/sct_oxford_mercury.tcl
temperature/sct_mercury_pres.tcl
temperature/sct_julabo_lh45.tcl
temperature/sct_lakeshore_340.tcl
temperature/sct_julabo_lh45_gen.tcl
temperature/sct_watlow_rm.tcl
temperature/sct_eurotherm_2000.tcl
temperature/sct_lakeshore_336.tcl
temperature/sct_watlow_pm.tcl
temperature/sct_oxford_itc.tcl
temperature/sct_lakeshore_370.tcl
temperature/west400.tcl
2014-06-30 09:08:19 +10:00
Ferdi Franceschini
a363bc3c2c Fix bug introduced when AttrWrap was replaced by AttrMap.
AttrWrap transparently passes method calls through to the widget
but you need to use the original_widget attribute with AttrMap to
access methods on the underlying widget.
2014-06-27 15:05:07 +10:00
Ferdi Franceschini
bd97a75e9d Replace deprecated urwid AttrWrap() with AttrMap() 2014-06-27 15:05:05 +10:00
Douglas Clowes
fe3489b61f SICS-754 Use "clientput" instead of "puts stdout" in generated drivers 2014-06-26 13:48:44 +10:00
Ferdi Franceschini
35c5ccbb19 Added command to make virtual motor which hdbchains to a real motor. 2014-06-23 10:29:17 +10:00
Douglas Clowes
27ed29aea5 Allow SCT files to have numbers with a leading minus 2014-06-17 14:53:48 +10:00
Douglas Clowes
18d40f69d9 Make generated drivers log to "../log" instead of "/tmp" 2014-06-16 10:30:19 +10:00
Ferdi Franceschini
ea7f7b8b9d Generate posit_n parameters from posn attributes in the motor configuration CSV files. 2014-06-10 19:23:29 +10:00
Ferdi Franceschini
cb1652835a Added 'unpad' command to remove leading zeros from base 10 numbers. 2014-06-10 19:20:41 +10:00
Ferdi Franceschini
96526c7866 Trim whitespace from description when generating motor configuration. 2014-06-10 19:16:53 +10:00
Douglas Clowes
21c9193a4b Minor fixes to compareSICS, gitrefer and gitloader 2014-06-05 16:35:49 +10:00
Douglas Clowes
1f3aa6676e Create the gitloader and gitrefer progs and tie in with compareSICS 2014-06-05 11:36:29 +10:00
Douglas Clowes
2517f71c67 Improve handling and logging for xxx_simulation case 2014-05-28 12:24:20 +10:00
Douglas Clowes
28ea3befb6 Allow setting driver debug_threshold in SCT file 2014-05-28 11:59:30 +10:00
Douglas Clowes
92d3acb5d5 Remove superfluous trailing white space from TCL files 2014-05-16 17:23:58 +10:00
Douglas Clowes
89e4e37f9e Remove superfluous trailing white space from Python files 2014-05-16 17:23:54 +10:00
Douglas Clowes
86673f6a8f Only require the IP and PORT in the config.ini if we will use them 2014-05-16 15:39:58 +10:00
Douglas Clowes
4e17c8b001 Fix string range arguments for removing quotes 2014-05-13 17:41:32 +10:00
Douglas Clowes
5da017b633 Clean and comment the code, strip quotes 2014-05-13 17:04:48 +10:00
Douglas Clowes
bf84f65e5a Changes to generated driver logging 2014-05-01 10:54:09 +10:00
Douglas Clowes
46599051d9 Add find_sicsdev and find_myobject functions 2014-05-01 10:54:09 +10:00
Douglas Clowes
fd23ee2443 TCL mode, async{queue,protocol}, and reset line number
The TCL mode allows a begin/end construct and TCL code without the
    leading '@' characters.

    Add the function name to the hook code comments that are generated.

    Reset the line counter to 1 between driver modules for error reporting.
2014-05-01 10:54:09 +10:00
Douglas Clowes
a43ca1cf94 writetree - sorted items and continue on error for more resiliency 2014-04-23 16:27:43 +10:00
Douglas Clowes
6bca9566e3 Fix Double underscore bug in generated code
061f19a52e3c40e30add262db95cea57655b893b introduced an extra underscore
in the make_path function for un-named groups.
2014-04-17 13:43:57 +10:00
Douglas Clowes
6f0e0b80f8 Handle terminator and timeout attributes in sics_config.ini files 2014-04-16 09:44:20 +10:00
Douglas Clowes
53d6274e7d Add 'permlink' code to generated drivers 2014-04-14 14:25:11 +10:00
Douglas Clowes
76baa21f64 Generate code to auto-create devices based on the config file 2014-04-14 10:19:35 +10:00
Douglas Clowes
419da766c5 driveable=nxalias, add make_args to debug_log, don't suppress unreferenced
we might want to use unreferenced functions in hook code
2014-04-14 10:19:23 +10:00
Douglas Clowes
d9dad4dd88 Allow single and double quotes, expressions for values, @@NOSEND@@ 2014-04-14 10:19:06 +10:00
Douglas Clowes
f2c5f515c4 Add radio buttons to ini files (radio = radio_group_name) 2014-03-28 10:57:13 +11:00
Douglas Clowes
8964750835 Implement "settle_time" in generated drivers 2014-03-24 10:21:28 +11:00
Douglas Clowes
0581b2b8e1 Allow for nested groups in gen_sct 2014-03-24 10:21:22 +11:00
Douglas Clowes
f257de6c34 Add implicit sdsinfo and nxalias properties. 2014-03-24 10:20:54 +11:00
Douglas Clowes
f44dc410cf Remove spurious file close from generated drivers 2014-03-24 10:13:19 +11:00
Douglas Clowes
9f8eabd3ec Implicit setting type to part/drivable if not set explicitly 2014-03-18 15:02:39 +11:00
Douglas Clowes
94e2e06f22 Wrap generated driver code in 'catch' and handle_exception blocks 2014-03-18 12:42:56 +11:00
Douglas Clowes
7269776484 Remove obsolete function no longer used 2014-03-18 10:17:29 +11:00
Douglas Clowes
ad06ef1711 Remove 'create_node' from driver generator and '*.sct' files
It wasn't in working condition nor was it being used in any drivers
2014-03-18 09:29:30 +11:00
Douglas Clowes
de575757e4 Implement "@@NOSEND@@" in generated drivers 2014-02-28 13:31:45 +11:00
Douglas Clowes
c0f4805a6c Add a PID function for each variable 2014-02-28 11:15:03 +11:00
Douglas Clowes
23c7b0f000 Fix for driveable/driving generated code 2014-02-28 09:04:39 +11:00
Douglas Clowes
3abc6c9e60 Move pathname and basename utility functions to extra_utility
This makes them generally available to SICS (and it's early)
2014-02-27 12:28:21 +11:00