Classes | |
class | PortSpec |
Class for managing port specifications. More... | |
Functions | |
def | make_port_specs |
Functions for building port specifications. | |
def | parse_targets |
def | require_all_input |
def | require_all_output |
def rtshell.port_types.make_port_specs | ( | ports, | |
modmgr, | |||
tree | |||
) |
Functions for building port specifications.
Create a list of PortSpec objects matching the ports given. The ports are searched for in the given RTCTree, and PortSpec objects are created matching them. The component holding each port is found, then the port object matching the given port name is found. A PortSpec is given matching its data type and with the reverse direction. If the target port is an InPort, a PortSpec for an OutPort will be created, and vice versa. @param ports The paths to the target ports. Each must be a tuple of (path, port, name, formatter) where path is a list of path components in the format used by rtctree. @param modmgr The ModuleMgr object to use to evaluate the format expression. @param tree An RTCTree to search for the ports in.
Definition at line 105 of file port_types.py.
def rtshell.port_types.parse_targets | ( | targets | ) |
Parse target ports, as specified on the command line. Parses target ports specified onto the command line into a tuple of (path, port, name, formatter, target), where path is in the rtctree format. @param targets A list of target ports, as strings. Each string should be in the format "path:port.name#formatter", e.g. "/localhost/blurg.host_cxt/comp0.rtc:input.stuff#print_stuff". The name component is optional; if it is not present, neither should the '.' character be. The formatter component is optional; if it is not present, neither should the '#' character be. A name is not required to use a formatter.
Definition at line 165 of file port_types.py.
def rtshell.port_types.require_all_input | ( | port_specs | ) |
Checks that all ports in the specification are inputs. Raises a @ref PortNotInputError exception if any ports are output. @param port_specs A list of @ref PortSpec objects.
Definition at line 196 of file port_types.py.
def rtshell.port_types.require_all_output | ( | port_specs | ) |
Checks that all ports in the specification are outputs. Raises a @ref PortNotOutputError exception if any ports are output. @param port_specs A list of @ref PortSpec objects.
Definition at line 209 of file port_types.py.