Configurator
|
Public Member Functions | |
def | __init__ |
Module constructor. | |
def | __format__ |
Return formatted version of self using fmt for format control. | |
def | cpp_header_write |
Write C++ header file for self out to file_name. | |
def | cpp_local_header_write |
Write a local C++ header file for self to file_name | |
def | cpp_local_source_write |
Write local C++ code for self into file_name | |
def | cpp_remote_header_write |
Write a C++ header for remote access to self out to file-name | |
def | cpp_remote_source_write |
Write C++ source file for RPC access to self to *file_name. | |
def | cpp_slave_write |
Write "slave" C++ to support RPC's for self out to file_name. | |
def | fences_read |
Read in the fenced code for file_name into a table of self | |
def | fence_write |
Write fenced code for fence_name from self to out_stream | |
def | python_write |
Write out Python RPC access code for self to file_name | |
Public Member Functions inherited from data_structures.Node | |
def | __init__ |
Node Constructor | |
def | parent_index_find |
Recursively find parent of self starting from root_node. | |
def | show |
Method print self indented by indent. | |
def | sub_node_append |
Append sub_node to the children sub nodes of self. | |
def | xml_write |
Method writes self to out_stream indented by indent. | |
One Module device.
A Module corresponds to an electronic device that can be plugged together. The overall structure of a Module corresponds to an <Module ...> tag in an XML file:
<Module Name="..." Vendor="..." Brief="..."> <Overview> Module overview text goes here. </Overview> <Classification /> ... <Register /> ... <Function /> ... </Module>
def data_structures.Module.__init__ | ( | self, | |
module_element, | |||
style | |||
) |
def data_structures.Module.__format__ | ( | self, | |
fmt | |||
) |
Return formatted version of self using fmt for format control.
self | Module to format |
fmt | A str that controls formatting |
This mehod will return a formated version of self using fmt to control the formatting. fmt must be one of:
def data_structures.Module.cpp_header_write | ( | self, | |
file_name, | |||
with_fences | |||
) |
Write C++ header file for self out to file_name.
self | Module to generate C++ for |
file_name | str File name to open and write C++ into |
with_fences | bool if True, causes fences to be written as well |
This method will write out a C++ header file that contains declarations for all the functions and registers associated with module.
def data_structures.Module.cpp_local_header_write | ( | self, | |
file_name | |||
) |
Write a local C++ header file for self to file_name
self | Module to write C++ header for |
file_name | str File name to open and write C++ into |
This method will write a local C++ header file for self into the file name file_name. If file_name does not exist, it will be created. If file_name does exist, it is replaced such that all the code in the fenced off area inside the source code is retained.
def data_structures.Module.cpp_local_source_write | ( | self, | |
file_name | |||
) |
Write local C++ code for self into file_name
self | Module to geneate C++ code for |
file_name | file_name file name to open and pour C++ code into |
This method will write out local C++ code for self into file_name. This basically consists of of some include files, a class constructor for self, and each of the register and function methods.
def data_structures.Module.cpp_remote_header_write | ( | self, | |
file_name | |||
) |
Write a C++ header for remote access to self out to file-name
self | Module to write C++ header information for. |
file_name |
def data_structures.Module.cpp_remote_source_write | ( | self, | |
file_name | |||
) |
Write C++ source file for RPC access to self to *file_name.
self | Module to write C++ source code for |
file_name | str Name of file to write C++ code to |
This routine will write out a C++ source file that contains access methods to use RPC to access remote functions and registers on the remote module self. The code is written out to the file name file_name.
def data_structures.Module.cpp_slave_write | ( | self, | |
file_name | |||
) |
Write "slave" C++ to support RPC's for self out to file_name.
self | Module for write C++ code for |
file_name | str Name of file to write C++ code to |
This method will write out a C++ framework to support remote procedure calls for self. This frame work will have places where user supplied code is provided (called a fence.) The code is written out to file_name.
def data_structures.Module.fence_write | ( | self, | |
fence_name, | |||
out_stream | |||
) |
Write fenced code for fence_name from self to out_stream
self | Module object that contains fenced code table |
fence_name | str Name of fence to write out |
out_stream | File file output stream that is open for writing |
A this method will write out the fenced code for fence_name out to out_stream using the fences table in self. A fence is user supplied code that is spliced into a file of computer generated code. A fence looks as follows:
//////// Edit begins here: {FENCE_NAME} ... //////// Edit ends here: {FENCE_NAME}
where "..." is zero, one or more lines of user supplied code. This code is read from *file_name prior to overwriting the file with newly generated code.
def data_structures.Module.fences_read | ( | self, | |
file_name | |||
) |
Read in the fenced code for file_name into a table of self
self | Module that contains the fences table |
file_name | str file name of the file to be read |
A this method will read in all of the fenced code for the file named file_name into a fences table for self. A fence is user supplied code that is spliced into a file of computer generated code. A fence looks as follows:
//////// Edit begins here: {FENCE_NAME} ... //////// Edit ends here: {FENCE_NAME}
where "..." is zero, one or more lines of user supplied code. This code reads in the "..." for each fence and hangs onto it for subsequent out during code generation.
def data_structures.Module.python_write | ( | self, | |
file_name | |||
) |
Write out Python RPC access code for self to file_name
self | Module to write Python code for |
file_name | str file name to write Python code into |
This method will write out Python access code for self out to the file named file_name.