bmgen.targets.python package#

Subpackages#

Submodules#

bmgen.targets.python.ast module#

class bmgen.targets.python.ast.BinaryOperation(operator: str, left: bmgen.targets.python.ast.Expression, right: bmgen.targets.python.ast.Expression)#

Bases: Expression

left: Expression#
operator: str#
right: Expression#
toText() str#
class bmgen.targets.python.ast.Expression#

Bases: Statement, ABC

class bmgen.targets.python.ast.FunctionCall(function: str, args: List[bmgen.targets.python.ast.Expression] = <factory>, kwargs: Dict[str, bmgen.targets.python.ast.Expression] = <factory>)#

Bases: Expression

args: List[Expression]#
function: str#
kwargs: Dict[str, Expression]#
toText() str#
class bmgen.targets.python.ast.Import(module: str, symbols: List[str] | None = None, alias: str | None = None)#

Bases: object

alias: str | None = None#
module: str#
symbols: List[str] | None = None#
toText() str#
class bmgen.targets.python.ast.ListLiteral(items: List[bmgen.targets.python.ast.Expression])#

Bases: Expression

items: List[Expression]#
toText() str#
class bmgen.targets.python.ast.NumberLiteral(value: float)#

Bases: NumericExpression

toText() str#
value: float#
class bmgen.targets.python.ast.NumericExpression#

Bases: Expression

class bmgen.targets.python.ast.Program(statements: List[bmgen.targets.python.ast.Statement] = <factory>)#

Bases: object

statements: List[Statement]#
toText() str#
class bmgen.targets.python.ast.Statement#

Bases: ABC

abstract toText() str#
class bmgen.targets.python.ast.TimeExpression(hours: bmgen.targets.python.ast.NumericExpression, minutes: bmgen.targets.python.ast.NumericExpression, seconds: bmgen.targets.python.ast.NumericExpression)#

Bases: Expression

hours: NumericExpression#
minutes: NumericExpression#
seconds: NumericExpression#
class bmgen.targets.python.ast.UnaryOperation(operator: str, value: bmgen.targets.python.ast.Expression)#

Bases: Expression

operator: str#
toText() str#
value: Expression#
class bmgen.targets.python.ast.Variable(name: str)#

Bases: NumericExpression

name: str#
toText() str#
bmgen.targets.python.ast.toText(value)#

bmgen.targets.python.battery module#

bmgen.targets.python.channel module#

bmgen.targets.python.constants module#

bmgen.targets.python.function module#

bmgen.targets.python.function.charge(*args, **kwargs)#
bmgen.targets.python.function.constant(value)#
bmgen.targets.python.function.discharge(*args, **kwargs)#
bmgen.targets.python.function.error(*args, **kwargs)#
bmgen.targets.python.function.hours(value: float) time#
bmgen.targets.python.function.limit(*args, **kwargs)#
bmgen.targets.python.function.limit_global(*args, **kwargs)#
bmgen.targets.python.function.minutes(value: float) time#
bmgen.targets.python.function.pause(*args, **kwargs)#
bmgen.targets.python.function.register(*args, **kwargs)#
bmgen.targets.python.function.register_global(*args, **kwargs)#
bmgen.targets.python.function.seconds(value: float)#
bmgen.targets.python.function.time(hours: NumericExpression | None = None, minutes: NumericExpression | None = None, seconds: NumericExpression | None = None)#

bmgen.targets.python.program module#

bmgen.targets.python.program.variable(name: str, value: float | None = None)#

bmgen.targets.python.stepinfo module#

class bmgen.targets.python.stepinfo.BCLStepInfo(step: bmgen.targets.bcl.ast.BCLStep, varname: str)#

Bases: object

property charge#
step: BCLStep#
varname: str#

bmgen.targets.python.transformer module#

class bmgen.targets.python.transformer.Transformer(*args, **kwargs)#

Bases: Transformer

visit_Constant(node)#
visit_For(node)#

Module contents#

bmgen.targets.python.generator: PythonGenerator#