Model Railroad System
2.2.2
|
Generate OpenLCB Memory Configuration Window. More...
Public Member Functions | |
ConfigurationEditor (name,...) | |
Constructor: create the configuration editor. More... | |
Private Member Functions | |
putdebug (message) | |
Print message using debug output, if any. More... | |
_processXMLnode (n, frame, space, address_var, prefix="") | |
Process one node in the XML tree. More... | |
_printexport (node, frame, name) | |
Print or export a segment or group. More... | |
_printexport_pdf (node, frame, name, outfile) | |
Export a segment or group to a printable PDF file. More... | |
_printexport_xml (node, frame, name, outfile) | |
Export a segment or group to an XML file. More... | |
_printexport_csv (node, frame, name, outfile) | |
Export a segment or group to a CSV file (can be imported into Excel). More... | |
_printexport_txt (node, frame, name, outfile) | |
Export a segment or group to a text file. More... | |
_close () | |
Close the window. More... | |
_datagramhandler (command, sourcenid,...) | |
Datagram handler. More... | |
_readmemory (space, address, length, status_var) | |
Read memory from a space. More... | |
_writememory (space, address, databuffer) | |
Write to configuration memory. More... | |
_intComboRead (widget, space, address, size) | |
Read an integer value and map it to a ComboBox widget. More... | |
_intComboWrite (widget, space, address, size, min, max) | |
Write an integer value maped from a ComboBox widget. More... | |
_intRBRead (widget, space, address, size) | |
Read an integer value and stash it in a Radiobutton group. More... | |
_intRBWrite (widget, space, address, size, min, max) | |
Write an integer value maped from a Radiobutton group. More... | |
_intCBRead (widget, space, address, size) | |
Read an integer value and stash it in a Checkbutton widget. More... | |
_intCBWrite (widget, space, address, size, min, max) | |
Write an integer value maped from a Checkbutton widget. More... | |
_intScaleRead (widget, space, address, size) | |
Read an integer value and stash it in a Scale widget. More... | |
_intScaleWrite (widget, space, address, size, min, max) | |
Write an integer value maped from a Scale widget. More... | |
_intSpinRead (widget, space, address, size) | |
Read an integer value and stash it in a SpinBox widget. More... | |
_intSpinWrite (widget, space, address, size, min, max) | |
Write an integer value maped from a SpinBox widget. More... | |
_actionWrite (widget, space, address, size, value, dislogText) | |
Write an integer value from an Action button. More... | |
_stringComboRead (widget, space, address, size) | |
Read a string value and map it to a ComboBox widget. More... | |
_stringComboWrite (widget, space, address, size) | |
Write a string value maped from a ComboBox widget. More... | |
_stringEntryRead (widget, space, address, size) | |
Read a string value and stash it in an Entry widget. More... | |
_stringEntryWrite (widget, space, address, size) | |
Write a string value from an Entry widget. More... | |
_eventidComboRead (widget, space, address, size) | |
Read an event id value and map it to a ComboBox widget. More... | |
_eventidComboWrite (widget, space, address, size) | |
Write an event id value maped from a ComboBox widget. More... | |
_eventidEntryRead (widget, space, address, size) | |
Read an event id value and stash it in an Entry widget as an event id string. More... | |
_eventidEntryWrite (widget, space, address, size) | |
Write an event id value from an Entry widget. More... | |
_readall (space) | |
Read all parameters stored in a specified space. More... | |
Static Private Member Functions | |
static | _printexport_pdf_frame (n, indent, pdfobj, frame, curyVar, curpageVar, pageheader) |
Export a node frame to a PDF file. More... | |
static | _printexport_pdf_vframe (n, indent, pdfobj, frame, curyVar, curpageVar, pageheader) |
Export a node scaler value frame to a PDF file. More... | |
static | _printexport_pdf_newpage (pdfobj, pageheader, pageno) |
Print a new PDF page. More... | |
static | _printexport_xml_frame (n, frame) |
Export a node frame as an XML tree. More... | |
static | _printexport_xml_vframe (n, frame) |
Export a scaler node's value frame as an XML tree. More... | |
static | _printexport_csv_frame (n, matrix, frame) |
Add a node's GUI frame values to a matrix (to be exported as a CSV file). More... | |
static | _printexport_csv_vframe (n, matrix, frame) |
Add a scaler node's GUI value frame values to a matrix (to be exported as a CSV file). More... | |
static | _printexport_csv_framesAcross (n, tabnb, tabs, matrix) |
Add a replicated group to a matrix as a single row. More... | |
static | _printexport_csv_frameAcross (n, rowVar, frame) |
Add a group to a matrix as elements to a single row. More... | |
static | _printexport_csv_vframeAcross (n, rowVar, frame) |
Add a scaler node's value frame to a matrix as elements to a single row. More... | |
static | _printexport_txt_frame (n, indent, outfp, frame) |
Export a segment or group frame to a text file. More... | |
static | _printexport_txt_vframe (n, indent, outfp, frame) |
Export a node scaler value frame to a text file. More... | |
Private Attributes | |
main | |
Main Frame. More... | |
scroll | |
Scrolled Window. More... | |
editframe | |
Scrollable Frame. More... | |
buttons | |
Button box. More... | |
cdi | |
CDI XML Object. More... | |
_ioComplete | |
I/O Completion Flag. More... | |
statusline | |
Status variable. More... | |
_readall | |
Holds all of the Read buttons for each segment. More... | |
_segmentnumber | |
Segement number, used to insure unique widget names. More... | |
_groupnumber | |
Group number, used to insure unique widget names. More... | |
_intnumber | |
Integer number, used to insure unique widget names. More... | |
_stringnumber | |
String number, used to insure unique widget names. More... | |
_eventidnumber | |
Eventid number, used to insure unique widget names. More... | |
_mkbuttons | |
Flag for Make Sensor / Make Turnout etc. More... | |
olddatagramhandler | |
Variable holding the old Datagram handler. More... | |
datagrambuffer | |
Datagram buffer. More... | |
_datagramrejecterror | |
Datagram reject error flag. More... | |
writeReplyCheck | |
Datagram write trply check flag. More... | |
Static Private Attributes | |
static | _menu |
Generic menu. More... | |
static | idheaders |
Locale versions of the identification headers. More... | |
static | printexportfiletypes |
Print and Export file types. More... | |
Generate OpenLCB Memory Configuration Window.
Create a toplevel to configure a node's Memory using that node's (parsed) CDI. This GUI uses tabbed notebook widgets for segments and replicated groups to reduce the amount of scrolling (and because a ginormous scrollable frame dies with a X11 Pixmap allocation error).
Options |
|
lcc::ConfigurationEditor::ConfigurationEditor | ( | name | , |
... | |||
) |
Constructor: create the configuration editor.
Construct a memory configuration window to edit the configuration memory of an OpenLCB node. The window is created from the toplevel up.
name | Widget path. |
... | Options:
|
|
private |
Write an integer value from an Action button.
widget | A ttk::button widget |
space | The space to write to. |
address | The address of the integer. |
size | The size of the integer. |
value | The value to write |
dislogText | The dialog text to display after writing |
|
private |
Close the window.
The window is destroyed
|
private |
Datagram handler.
command | Type of Datagram handling. |
sourcenid | Source NID of the datagram. |
... | The datagram data stream. |
|
private |
Read an event id value and map it to a ComboBox widget.
widget | A ttk::combobox widget to update. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the event id. |
size | The size of the event id (should always be 8). |
|
private |
Write an event id value maped from a ComboBox widget.
widget | A ttk::combobox widget to get the value from. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the event id. |
size | The size of the event id (should always be 8). |
|
private |
Read an event id value and stash it in an Entry widget as an event id string.
widget | A ttk::entry widget to update. |
space | The space to read from. |
address | The address of the event id. |
size | The size of the event id (should always be 8). |
|
private |
Write an event id value from an Entry widget.
widget | A ttk::entry widget to get the value from. |
space | The space to read from. |
address | The address of the event id. |
size | The size of the event id (should always be 8). |
|
private |
Read an integer value and stash it in a Checkbutton widget.
widget | A ttk::checkbutton widget. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
|
private |
Write an integer value maped from a Checkbutton widget.
widget | A ttk::combobox widget to get the value from. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
min | The minimum allowed value of the integer. |
max | The maximum allowed value of the integer. |
|
private |
Read an integer value and map it to a ComboBox widget.
widget | A ttk::combobox widget to update. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
|
private |
Write an integer value maped from a ComboBox widget.
widget | A ttk::combobox widget to get the value from. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
min | The minimum allowed value of the integer. |
max | The maximum allowed value of the integer. |
|
private |
Read an integer value and stash it in a Radiobutton group.
widget | A ttk::frame widget containing ttk::radiobuttons. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
|
private |
Write an integer value maped from a Radiobutton group.
widget | A ttk::combobox widget to get the value from. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
min | The minimum allowed value of the integer. |
max | The maximum allowed value of the integer. |
|
private |
Read an integer value and stash it in a Scale widget.
widget | A ttk::scale widget. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
|
private |
Write an integer value maped from a Scale widget.
widget | A ttk::combobox widget to get the value from. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
min | The minimum allowed value of the integer. |
max | The maximum allowed value of the integer. |
|
private |
Read an integer value and stash it in a SpinBox widget.
widget | A spinbox widget to update. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
|
private |
Write an integer value maped from a SpinBox widget.
widget | A spinbox widget to get the value from. |
space | The space to read from. |
address | The address of the integer. |
size | The size of the integer. |
min | The minimum allowed value of the integer. |
max | The maximum allowed value of the integer. |
|
private |
Print or export a segment or group.
The current contents of the specified segment or group GUI frame are exported to a data file for use in another program or printed.
node | The XML node in the CDI for the segment or group to export or print. |
frame | The GUI frame containing the values to be exported or printed. |
name | The name of the segment or group to be exported or printed. |
|
private |
Export a segment or group to a CSV file (can be imported into Excel).
node | The XML node in the CDI for the segment or group to export or print. |
frame | The GUI frame containing the values to be exported or printed. |
name | The name of the segment or group to be exported or printed. |
outfile | The file to export to. |
|
staticprivate |
Add a node's GUI frame values to a matrix (to be exported as a CSV file).
n | The node in the CDI XML tree. |
matrix | The matrix to populate. |
frame | The GUI frame to extract values from. |
|
staticprivate |
Add a group to a matrix as elements to a single row.
n | The node in the CDI XML tree. |
rowVar | The name of the variable containing the row to add to. |
frame | The GUI frame. |
|
staticprivate |
Add a replicated group to a matrix as a single row.
n | The node in the CDI XML tree. |
tabnb | Tabbed notebook containing the replicated group. |
tabs | The tabs in the tabbed notebook (the replications). |
matrix | The matrix to populate. |
|
staticprivate |
Add a scaler node's GUI value frame values to a matrix (to be exported as a CSV file).
n | The node in the CDI XML tree. |
matrix | The matrix to populate |
frame | The GUI frame to extract values from. |
|
staticprivate |
Add a scaler node's value frame to a matrix as elements to a single row.
n | The node in the CDI XML tree. |
rowVar | The name of the variable containing the row to add to. |
frame | The GUI frame. |
|
private |
Export a segment or group to a printable PDF file.
node | The XML node in the CDI for the segment or group to export or print. |
frame | The GUI frame containing the values to be exported or printed. |
name | The name of the segment or group to be exported or printed. |
outfile | The file to export to. |
|
staticprivate |
Export a node frame to a PDF file.
n | The node. |
indent | The indentation string. |
pdfobj | The PDF file object. |
frame | The GUI frame. |
curyVar | The name of the variable containing the current y location. |
curpageVar | The name of the variable containing the current page number. |
pageheader | The running page header text. |
|
staticprivate |
Print a new PDF page.
pdfobj | The PDF file object |
pageheader | The running page header text. |
pageno | The new page's number. |
|
staticprivate |
Export a node scaler value frame to a PDF file.
n | The node. |
indent | The indentation string. |
pdfobj | The PDF file object. |
frame | The GUI frame. |
curyVar | The name of the variable containing the current y location. |
curpageVar | The name of the variable containing the current page number. |
pageheader | The running page header text. |
|
private |
Export a segment or group to a text file.
node | The XML node in the CDI for the segment or group to export or print. |
frame | The GUI frame containing the values to be exported or printed. |
name | The name of the segment or group to be exported or printed. |
outfile | The file to export to. |
|
staticprivate |
Export a segment or group frame to a text file.
n | The node. |
indent | The indentation string. |
outfp | The output file channel. |
frame | The GUI frame. |
|
staticprivate |
Export a node scaler value frame to a text file.
n | The node. |
indent | The indentation string. |
outfp | The output channel. |
frame | The GUI frame. |
|
private |
Export a segment or group to an XML file.
node | The XML node in the CDI for the segment or group to export or print. |
frame | The GUI frame containing the values to be exported or printed. |
name | The name of the segment or group to be exported or printed. |
outfile | The file to export to. |
|
staticprivate |
Export a node frame as an XML tree.
n | The XML node in the CDI. |
frame | The GUI frame for the node in the CDI. |
|
staticprivate |
Export a scaler node's value frame as an XML tree.
n | The XML node in the CDI. |
frame | The GUI frame for the node in the CDI. |
|
private |
Process one node in the XML tree.
Process a single node in the XML tree. Will recurse to process Children nodes.
Ttk::labelframes are used for variables with names. Ttk::notebooks, except segments and groups. A ttk::labelframe is also used for the information block.
n | The node. |
frame | The parent frame. |
space | The current space. |
address_var | The name of the address variable. |
|
private |
Read all parameters stored in a specified space.
Reads each parameter one at a time by invoking the parameter's Read
button.
space | The parameter space to read from. |
References gettext::_m(), FileEntry::bind(), and FileEntry::configure().
|
private |
Read memory from a space.
space | The space to read from. |
address | The start address to read. |
length | Number of bytes to read. |
status_var | The name of a variable to receive the status code. |
|
private |
Read a string value and map it to a ComboBox widget.
widget | A ttk::combobox widget to update. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the string. |
size | The size of the string. |
|
private |
Write a string value maped from a ComboBox widget.
widget | A ttk::combobox widget to get the value from. This is also used to map to the value map. |
space | The space to read from. |
address | The address of the string. |
size | The size of the string. |
|
private |
Read a string value and stash it in an Entry widget.
widget | A ttk::entry widget to update. |
space | The space to read from. |
address | The address of the string. |
size | The size of the string. |
|
private |
Write a string value from an Entry widget.
widget | A ttk::entry widget to get the value from. |
space | The space to read from. |
address | The address of the string. |
size | The size of the string. |
|
private |
Write to configuration memory.
space | The space to write to. |
address | The address to write to. |
databuffer | The data to write. |
|
private |
Print message using debug output, if any.
message | The message to print. |
|
private |
Datagram reject error flag.
|
private |
Eventid number, used to insure unique widget names.
|
private |
Group number, used to insure unique widget names.
|
private |
Integer number, used to insure unique widget names.
|
private |
I/O Completion Flag.
|
staticprivate |
Generic menu.
|
private |
Flag for Make Sensor / Make Turnout etc.
buttons
|
private |
Holds all of the Read buttons for each segment.
This allows for Reading all of the variables in a segment.
|
private |
Segement number, used to insure unique widget names.
|
private |
String number, used to insure unique widget names.
|
private |
Button box.
|
private |
CDI XML Object.
|
private |
Datagram buffer.
|
private |
Scrollable Frame.
|
staticprivate |
Locale versions of the identification headers.
|
private |
Main Frame.
|
private |
Variable holding the old Datagram handler.
|
staticprivate |
Print and Export file types.
|
private |
Scrolled Window.
|
private |
Status variable.
|
private |
Datagram write trply check flag.