Index: DialysateGenerator.py =================================================================== diff -u -r6f07015d84f80bbaca2960ea8e5ef8dd4b4541c6 -r342921a02e3ecd79431da50ca8adecac150a74fc --- DialysateGenerator.py (.../DialysateGenerator.py) (revision 6f07015d84f80bbaca2960ea8e5ef8dd4b4541c6) +++ DialysateGenerator.py (.../DialysateGenerator.py) (revision 342921a02e3ecd79431da50ca8adecac150a74fc) @@ -17,12 +17,12 @@ from DialityCoreCanProtocol import * from time import sleep -""" :mainpage Dialin API +""" \mainpage Dialin API Dialin API is comprised primarily by 3 classes: - - :ref DialysateGenerator.DG - - :ref HemodialysisDevice.HD + - \ref DialysateGenerator.DG + - \ref HemodialysisDevice.HD """ @@ -32,7 +32,7 @@ class DG: """ - :class DG + \class DG Dialysate Generator (DG) Dialin object API. It provides the basic interface to communicate with the DG board @@ -43,14 +43,14 @@ """ DG constructor using can bus - :param can__interface: can bus, e.g. "can0" + \param can__interface: string with can bus name, e.g. "can0" - :returns DG object that allows communication with board via port + \returns DG object that allows communication with board via port - :details For example: + \details For example: - dg_object = DG(can__interface='can0') or - dg_object = DG('can0') + dg_object = DG(can__interface='can0') or + dg_object = DG('can0') """ # Create listener self.__can_interface = DenaliCanMessenger(can_interface=can__interface) @@ -61,9 +61,11 @@ def fill(self, start_or_stop='start'): """ - request the DG board to fill + request the DG board to 'start' or to 'stop' fill - :returns True if ran the command, False otherwise, returns None if timeout + \param start_or_stop is a string indicating which action to take, e.g., 'start' or 'stop' + + \returns True if ran the command, False otherwise, returns None if timeout """ payload = [1] if start_or_stop == 'start' else [0] @@ -82,7 +84,14 @@ return returnValue def __del__(self): + """ + Destructor method when "del" function is used. e.g. + dg = DG() + + del dg + """ + self.__can_interface.stop()