PSG14a emulator V1.00
PSG14a emulator for stating GTD350 engine
cycle2uml Namespace Reference

This module converts .c cyclogram format to uml diagrams using COG. More...

Functions

 check_cyclogram (split)
 Checks if the split line is a first cyclogram line.
 
 line2dict (line)
 Converts a cyclogram line to a dictionary line format is a designated initializers format of c struct.
 
 parsed_to_uml (parsed, name, xscale, yscale)
 Converts the parsed structure to a UML.
 
 convert_to_uml (instance_no, xscale=None, yscale=None)
 The main function.
 

Detailed Description

This module converts .c cyclogram format to uml diagrams using COG.

Function Documentation

◆ check_cyclogram()

cycle2uml.check_cyclogram ( split)

Checks if the split line is a first cyclogram line.

Parameters
split(list): is a split line
Returns
Boolean: True if line is the first cyclo line

Referenced by convert_to_uml().

◆ convert_to_uml()

cycle2uml.convert_to_uml ( instance_no,
xscale = None,
yscale = None )

The main function.

Converts the cyclofram to UML timing diagram

Parameters
instance_no(int): The number of the cyclogram in the code, enumerated from zero
xscale(int): [optional] width of the img in pixels.
yscale(int): [optional] height of the img in pixels.

References check_cyclogram(), line2dict(), and parsed_to_uml().

Here is the call graph for this function:

◆ line2dict()

cycle2uml.line2dict ( line)

Converts a cyclogram line to a dictionary line format is a designated initializers format of c struct.

It's like .Param = value, .... dictionary is line "Param":"value" from the line

Parameters
line(string): cyclogram line from the C struct
Returns
dictionary: the dictionary containing the line converted to "Param":"value" format

Referenced by convert_to_uml().

◆ parsed_to_uml()

cycle2uml.parsed_to_uml ( parsed,
name,
xscale,
yscale )

Converts the parsed structure to a UML.

Parameters
parsed(dict): A parsed line from line2dict
name(string): A name of the diagram
xscale(int): [optional] width of the img in pixels.
yscale(int): [optional] height of the img in pixels.

Referenced by convert_to_uml().