nopasaran.primitives.action_primitives.io_primitives.IOPrimitives

class nopasaran.primitives.action_primitives.io_primitives.IOPrimitives

Bases: object

Class containing IO primitives for the state machine.

__init__()

Methods

__init__()

get_from_file(inputs, outputs, state_machine)

Load variables from a file and store them in the machine's state.

write_to_file(inputs, outputs, state_machine)

Write the provided data to a file.

static get_from_file(inputs, outputs, state_machine)

Load variables from a file and store them in the machine’s state.

Number of input arguments: 2

Number of output arguments: 1

Optional input arguments: No

Optional output arguments: No

Args:

inputs (List[str]): The list of input variable names. It contains two mandatory input arguments, which are the file path and the name of the variable to store the loaded variables.

outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable where the loaded variables will be stored.

state_machine: The state machine object.

Returns:

None

static write_to_file(inputs, outputs, state_machine)

Write the provided data to a file.

Number of input arguments: 2

Number of output arguments: 0

Optional input arguments: No

Optional output arguments: No

Args:
inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
  • The name of the variable containing the data to be written.

  • The name of the variable containing the file path.

outputs (List[str]): The list of output variable names.

state_machine: The state machine object.

Returns:

None