- class state.StateManager(api: <ctypes.LibraryLoader object at 0x7fdac3d05d10>)
This API class enables a client to create and manage state instances for using EnergyPlus API methods. Nearly all EnergyPlus API methods require a state object to be passed in, and when callbacks are made, the current state is passed as the only argument. This allows client code to close the loop and pass the current state when making API calls inside callbacks.
The state object is at the heart of accessing EnergyPlus via API, however, the client code should simply be a courier of this object, and never attempt to manipulate the object. State manipulation occurs inside EnergyPlus, and attempting to modify it manually will likely not end well for the workflow.
This class allows a client to create a new state, reset it, and free the object when finished with it.
- delete_state(state: c_void_p) None
This function deletes an existing state instance, freeing the memory.
- new_state() c_void_p
This function creates a new state object that is required to pass into EnergyPlus Runtime API function calls
A pointer to a new state object in memory
- reset_state(state: c_void_p) None
This function resets an existing state instance, thus resetting the simulation, including any registered callback functions.