malcolm.modules.builtin.defines¶
-
malcolm.modules.builtin.defines.string(name: Anno(name='AName', typ=<class 'str'>, description='The name of the defined parameter'), value: Anno(name='AStringValue', typ=<class 'str'>, description='The value of the defined parameter')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Define a string parameter to be used within this YAML file
Parameters: Returns: The Define that has been created
Return type:
-
malcolm.modules.builtin.defines.float64(name: Anno(name='AName', typ=<class 'str'>, description='The name of the defined parameter'), value: Anno(name='AFloat64Value', typ=<class 'numpy.float64'>, description='The value of the defined parameter')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Define a float64 parameter to be used within this YAML file
Parameters: - name (str) – The name of the defined parameter
- value (float64) – The value of the defined parameter
Returns: The Define that has been created
Return type:
-
malcolm.modules.builtin.defines.int32(name: Anno(name='AName', typ=<class 'str'>, description='The name of the defined parameter'), value: Anno(name='AInt32Value', typ=<class 'numpy.int32'>, description='The value of the defined parameter')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Define an int32 parameter to be used within this YAML file
Parameters: - name (str) – The name of the defined parameter
- value (int32) – The value of the defined parameter
Returns: The Define that has been created
Return type:
-
malcolm.modules.builtin.defines.docstring(value: Anno(name='AStringValue', typ=<class 'str'>, description='The value of the defined parameter')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Define the docstring for the YAML file
Parameters: value (str) – The value of the defined parameter Returns: The Define that has been created Return type: Define
-
malcolm.modules.builtin.defines.env_string(name: Anno(name='AName', typ=<class 'str'>, description='The name of the defined parameter'), env: Anno(name='AEnvSource', typ=<class 'str'>, description='The environment variable name to get the value from')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Define a string parameter coming from the environment to be used within this YAML file
Parameters: Returns: The Define that has been created
Return type:
-
malcolm.modules.builtin.defines.tmp_dir(name: Anno(name='AName', typ=<class 'str'>, description='The name of the defined parameter')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Make a temporary directory, and define a string parameter containing its path on disk
Parameters: name (str) – The name of the defined parameter Returns: The Define that has been created Return type: Define
-
malcolm.modules.builtin.defines.cmd_string(name: Anno(name='AName', typ=<class 'str'>, description='The name of the defined parameter'), cmd: Anno(name='ACmd', typ=<class 'str'>, description='The shell command to run to get the value from')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Define a string parameter coming from a shell command to be used within this YAML file. Trailing newlines will be stripped.
Parameters: Returns: The Define that has been created
Return type:
-
malcolm.modules.builtin.defines.export_env_string(name: Anno(name='AEnvName', typ=<class 'str'>, description='The environment variable name to set'), value: Anno(name='AEnvValue', typ=<class 'str'>, description='The value of the exported environment variable')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Exports an environment variable with the given value
Parameters: Returns: The Define that has been created
Return type:
-
malcolm.modules.builtin.defines.module_path(name: Anno(name='AModuleName', typ=<class 'str'>, description='The name of the exported module'), path: Anno(name='AModulePath', typ=<class 'str'>, description='The path of a python package dir to insert as malcolm.modules.<name>')) -> Anno(name='ADefine', typ=<class 'malcolm.core.define.Define'>, description='The Define that has been created')[source]¶ Load an external malcolm module (e.g. ADCore/etc/malcolm)
Parameters: Returns: The Define that has been created
Return type: