Each kind of medical device responds to different commands, but some of them respond to a suite of overlapping commands. Here’s a discussion of some of the commands available.
(There are many more.)
Bases: object
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
>>> PowerControl(serial='665455').format() == PowerControl._test_ok
True
Bases: decocare.commands.PowerControl
Here’s an example where arguments clearly modify behavior.
Bases: decocare.commands.BaseCommand
Bases: decocare.commands.SetSuspend
Bases: decocare.commands.SetSuspend
Bases: decocare.commands.PumpCommand
MM511 - 120 MM512 and up - opcode 152 # strokes per basalunit = 40 - mm12, 10 in mm11
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
>>> ReadErrorStatus(serial='665455').format() == ReadErrorStatus._test_ok
True
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.ReadSensorHistoryData
>>> ReadGlucoseHistory(page=1).params
[0, 0, 0, 1]
>>> list(ReadGlucoseHistory(page=1).format( ))
[1, 0, 167, 1, 32, 136, 80, 128, 4, 0, 2, 2, 0, 154, 34, 0, 0, 0, 1, 155]
>>> ReadGlucoseHistory(page=2).params
[0, 0, 0, 2]
>>> ReadGlucoseHistory(page=3)
<ReadGlucoseHistory:size[1024]:[page][3]:data[0]:>
>>> list(ReadGlucoseHistory(page=3).format( ))
[1, 0, 167, 1, 32, 136, 80, 128, 4, 0, 2, 2, 0, 154, 34, 0, 0, 0, 3, 54]
>>> ReadGlucoseHistory(page=3).params
[0, 0, 0, 3]
>>> ReadGlucoseHistory(params=[1]).params
[1]
>>> ReadGlucoseHistory(params=[2]).params
[2]
>>> ReadGlucoseHistory(params=[3]).params
[3]
Bases: decocare.commands.PumpCommand
>>> ReadHistoryData(serial='208850', params=[ 0x03 ]).format() == ReadHistoryData._test_ok
True
>>> ReadHistoryData(params=[ 0x01 ]).params
[1]
>>> ReadHistoryData(params=[ 0x02 ]).params
[2]
>>> ReadHistoryData(params=[ 0x03 ]).params
[3]
>>> ReadHistoryData(page=0x01).params
[1]
>>> ReadHistoryData(page=0x02).params
[2]
>>> ReadHistoryData(page=0x03).params
[3]
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
>>> ReadPumpModel(serial='665455').format() == ReadPumpModel._test_ok
True
Bases: decocare.commands.PumpCommand
>>> ReadPumpState(serial='665455').format() == ReadPumpState._test_ok
True
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
XXX: changed in MM512 to 192
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bolus some insulin.
XXX: Be careful please. Best trying this not connected to the pump until you trust it.
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.ReadSensorHistoryData
>>> ReadISIGHistory(page=0).params
[0, 0, 0, 0]
>>> ReadISIGHistory(page=1).params
[0, 0, 0, 1]
>>> ReadISIGHistory(page=2).params
[0, 0, 0, 2]
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.FilterHistory
>>> FilterGlucoseHistory.ISO(begin='2014-04-13', end='2014-04-14').params
[7, 222, 4, 13, 7, 222, 4, 14]
Bases: decocare.commands.FilterHistory
>>> FilterISIGHistory.ISO(begin='2014-04-13', end='2014-04-14').params
[7, 222, 4, 13, 7, 222, 4, 14]
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
>>> import json
>>> schedule = ReadProfile_STD512.decode(ReadProfile_STD512._test_result_1)
>>> len(schedule)
4
>>> print json.dumps(schedule[0])
{"start": "00:00:00", "rate": 0.8}
>>> print json.dumps(schedule[1])
{"start": "06:30:00", "rate": 0.9500000000000001}
>>> print json.dumps(schedule[2])
{"start": "09:30:00", "rate": 1.1}
>>> print json.dumps(schedule[3])
{"start": "14:00:00", "rate": 0.9500000000000001}
Bases: decocare.commands.ReadProfile_STD512
Bases: decocare.commands.ReadProfile_STD512
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.ReadSensorHistoryData
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpTraceSelect
Bases: decocare.commands.PumpTraceSelect
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.SelectBasalProfile
Bases: decocare.commands.SelectBasalProfile
Bases: decocare.commands.SelectBasalProfile
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand
Bases: decocare.commands.PumpCommand