Index: dialin/squish/denaliMessages.py =================================================================== diff -u -r79bba98a0f081de37d1e9fa4a0b481cf381fffd5 -rd88f91d981584b09e2c7e5d012151c50923fd64a --- dialin/squish/denaliMessages.py (.../denaliMessages.py) (revision 79bba98a0f081de37d1e9fa4a0b481cf381fffd5) +++ dialin/squish/denaliMessages.py (.../denaliMessages.py) (revision d88f91d981584b09e2c7e5d012151c50923fd64a) @@ -138,7 +138,7 @@ def show_PowerOffNotificationDialog(): """ - the message from HD to UI to shew the shutting down notipication box + the message from HD to UI to show the shutting down notification box :return: none """ subprocess.call(['cansend', 'can0', '040#A5.01.00.0E.00.00.24.00']) @@ -585,7 +585,7 @@ def buildTreatmentAdjustUltrafiltrationConfirmResponse(vAccepted, vReason, vVolume, vDuration, vRate): """ - the ultrafiltratin volume Change Confirmation Response message builder method + the ultrafiltration volume Change Confirmation Response message builder method | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | #1:(U32) | #2:(U32) | #3:(F32) | #4:(U32) | #5:(F32) | |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: |:--: |:--: |:--: |:--: |:--: | |0x2E00| 0x020 | 6 | Rsp | Y | HD | UI | UF Vol. Change Confirmation Response | \ref Data::mAccepted | \ref Data::mReason | \ref Data::mVolume | \ref Data::mDuration | \ref Data::mRate | @@ -721,7 +721,7 @@ def buildPressureOcclusionData(vArterialPressure, vVenousPressure, vBloodPumpOcclusion, vDialysateInletPumpOcclusion, vDialysateOutletPumpOcclusion): """ - the Pressure/Occlusion Data messages builder mehtod + the Pressure/Occlusion Data messages builder method | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | #1:(F32) | #2:(F32) | #3:(U32) | #4:(U32) | #5:(U32) | |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: |:--: |:--: |:--: |:--: |:--: | |0x0900| 0x040 | 7 | 1 Hz | N | HD | All | PressureOcclusion Data | \ref Data::mArterialPressure | \ref Data::mVenousPressure | \ref Data::mBloodPumpOcclusion | \ref Data::mDialysateInletPumpOcclusion | \ref Data::mDialysateOutletPumpOcclusion | @@ -743,7 +743,7 @@ def setPressureOcclusionData(vArterialPressure, vVenousPressure, vBloodPumpOcclusion, vDialysateInletPumpOcclusion, vDialysateOutletPumpOcclusion): """ - the Pressure/Occlusion Data messages setter/sender mehtod + the Pressure/Occlusion Data messages setter/sender method :param vArterialPressure: (float) Arterial Pressure :param vVenousPressure: (float) Venous Pressure :param vBloodPumpOcclusion: (uint) Blood Pump Occlusion @@ -1290,7 +1290,7 @@ |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: |:--: |:--: |:--: |:--: |:--: | |0x0200| 0x001 | 1 | 1 Hz | N | HD | All | Alarm Status | \ref Data::mState | \ref Data::mTop | \ref Data::mEscalatesIn | \ref Data::mMuteTimeout | \ref Data::mFlags | :param vState: (int) Alarm State - :param vTop: (int) Top priority Alaram ID + :param vTop: (int) Top priority Alarm ID :param vEscalatesIn: (int) Alarm Escalation :param vMuteTimeout: (int) Mute Timeout :param vFlags: (int16) Alarm Flags @@ -1309,7 +1309,7 @@ """ the Alarm Status message setter/sender method :param vState: (int) Alarm State - :param vTop: (int) Top priority Alaram ID + :param vTop: (int) Top priority Alarm ID :param vEscalatesIn: (int) Alarm Escalation :param vMuteTimeout: (int) Mute Timeout :param vFlags: (int16) Alarm Flags Fisheye: Tag d88f91d981584b09e2c7e5d012151c50923fd64a refers to a dead (removed) revision in file `dialin/squish/globals.py'. Fisheye: No comparison available. Pass `N' to diff? Index: dialin/squish/utils.py =================================================================== diff -u -r91dc90bd009bdbf5621dcaa1bc12ab3d691673f7 -rd88f91d981584b09e2c7e5d012151c50923fd64a --- dialin/squish/utils.py (.../utils.py) (revision 91dc90bd009bdbf5621dcaa1bc12ab3d691673f7) +++ dialin/squish/utils.py (.../utils.py) (revision d88f91d981584b09e2c7e5d012151c50923fd64a) @@ -18,11 +18,39 @@ import struct +def SRSUI(vSRSUI = ""): + """ + for user convenience if wanted to put a note for the SRSUI + it makes sure all the numbers are 3 digit aligned to easily read on test results. + """ + return "SRSUI " + "{}".format(vSRSUI).rjust(3, '0') + + +def isVisible(object, vObject): + """ + checks if the object is visible. + Note: in SquishQt it's a little different + since usual check is wait + Note : object is the squish's builtin variable which should be available within the test + I don't thing importing would be a good idea here since it might be a runtime assigned value + and it may have different/undefined value when imported out of test + """ + if object.exists(vObject): + o_object = findObject(vObject) + if o_object is None: + return False + else: + return o_object.visible + else: + return False + + + def waitForGUI(vDelay = 2): """ - a global 2 seconds default wait mehod which is used to wait for GUI animations mostly - to make sure the object is avaialable. - :param vDelay: (int) amout of second for delay + a global 2 seconds default wait method which is used to wait for GUI animations mostly + to make sure the object is available. + :param vDelay: (int) amount of second for delay :return: none """ time.sleep(vDelay) @@ -95,7 +123,7 @@ def padding(vString, vLen): """ added zero at the right side of the string to be of length of vLen - :param vString: (str) the string to add trainling zero to + :param vString: (str) the string to add trailing zero to :param vLen: (int) the entire length of the string :return: (str) padded string """ @@ -120,16 +148,16 @@ def l2ml(vValue): """ - converts liter to mili liter + converts liter to milli liter :param (int) vValue: the value in liter. - :return: (int) vValue converted to miliiliter. + :return: (int) vValue converted to milliliter. """ return int(round (vValue, 3) * 1000) def ml2l(vValue): """ - converts mili liter to liter - :param (int) vValue: the value in miliiliter. + converts milli liter to liter + :param (int) vValue: the value in milliliter. :return: (int) vValue converted to liter. """ return vValue / 1000