Commands

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.)

commands Module

class decocare.commands.BaseCommand(code, descr, *args)[source]

Bases: object

bytesPerRecord = 0
code = 0
descr = '(error)'
done()[source]
effectTime = 0
format()[source]
hexdump()[source]
maxRecords = 0
params = []
respond(data)[source]
responded = False
retries = 2
timeout = 3
class decocare.commands.KeypadPush(**kwds)[source]

Bases: decocare.commands.PumpCommand

classmethod ACT(klass, **kwds)[source]
classmethod DOWN(klass, **kwds)[source]
classmethod EASY(klass, **kwds)[source]
classmethod ESC(klass, **kwds)[source]
classmethod UP(klass, **kwds)[source]
code = 91
descr = 'Press buttons on the keypad'
maxRecords = 0
params = []
retries = 1
class decocare.commands.PowerControl(minutes=None, **kwds)[source]

Bases: decocare.commands.PumpCommand

>>> PowerControl(serial='665455').format() == PowerControl._test_ok
True
code = 93
descr = 'RF Power On'
effectTime = 17
maxRecords = 0
params = [1, 10]
retries = 0
class decocare.commands.PowerControlOff(minutes=None, **kwds)[source]

Bases: decocare.commands.PowerControl

Here’s an example where arguments clearly modify behavior.

params = [0, 0]
class decocare.commands.PumpCommand(**kwds)[source]

Bases: decocare.commands.BaseCommand

allocateRawData()[source]
bytesPerRecord = 64
calcRecordsRequired()[source]
data = bytearray(b'')
effectTime = 0.5
format()[source]
getData()[source]
log_name(prefix='')[source]
maxRecords = 1
params = []
retries = 2
save(prefix='')[source]
serial = '208850'
class decocare.commands.PumpResume(**kwds)[source]

Bases: decocare.commands.SetSuspend

descr = 'Resume pump (cancel suspend)'
params = [0]
class decocare.commands.PumpSuspend(**kwds)[source]

Bases: decocare.commands.SetSuspend

descr = 'Suspend pump'
params = [1]
class decocare.commands.ReadBasalTemp(**kwds)[source]

Bases: decocare.commands.PumpCommand

MM511 - 120 MM512 and up - opcode 152 # strokes per basalunit = 40 - mm12, 10 in mm11

code = 152
descr = 'Read Temp Basal'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadBatteryStatus(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 114
descr = 'Read Battery Status'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadContrast(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 195
descr = 'Read Contrast'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadCurPageNumber(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 157
descr = 'Read Cur Page Number'
getData()[source]
maxRecords = 1
pages = 'unknown'
params = []
respond(data)[source]
retries = 2
class decocare.commands.ReadErrorStatus(**kwds)[source]

Bases: decocare.commands.PumpCommand

>>> ReadErrorStatus(serial='665455').format() == ReadErrorStatus._test_ok
True
code = 117
descr = 'Read Error Status any current alarms set?'
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadFirmwareVersion(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 116
descr = 'Read Firmware Version'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadGlucoseHistory(page=None, **kwds)[source]

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]
code = 154
descr = 'read glucose history'
params = []
class decocare.commands.ReadHistoryData(page=None, **kwds)[source]

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]
code = 128
data = bytearray(b'')
descr = 'Read History Data'
done()[source]
effectTime = 0.1
getData()[source]
log_name(prefix='')[source]
maxRecords = 16
page = None
params = []
respond(raw)[source]
retries = 2
class decocare.commands.ReadPumpID(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 113
descr = 'Read Pump ID'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadPumpModel(**kwds)[source]

Bases: decocare.commands.PumpCommand

>>> ReadPumpModel(serial='665455').format() == ReadPumpModel._test_ok
True
code = 141
descr = 'Read Pump Model Number'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadPumpState(**kwds)[source]

Bases: decocare.commands.PumpCommand

>>> ReadPumpState(serial='665455').format() == ReadPumpState._test_ok
True
code = 131
descr = 'Read Pump State'
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadPumpStatus(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 206
descr = 'Read Pump Status'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadRTC(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 112
descr = 'Read RTC'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadRadioCtrlACL(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 118
descr = 'Read Radio ACL'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadRemainingInsulin(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 115
descr = 'Read Remaining Insulin'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadSettings(**kwds)[source]

Bases: decocare.commands.PumpCommand

XXX: changed in MM512 to 192

alarm(alarm)[source]
byte_map = {}
code = 192
descr = 'Read Settings'
getData()[source]
maxRecords = 1
params = []
retries = 2
temp_basal_type(data)[source]
class decocare.commands.ReadTotalsToday(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 121
descr = 'Read Totals Today'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.SetSuspend(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 77
descr = 'Set Pump Suspend/Resume status'
maxRecords = 1
params = []
retries = 2
decocare.commands.PushEASY(**kwds)[source]
decocare.commands.PushUP(**kwds)[source]
decocare.commands.PushDOWN(**kwds)[source]
decocare.commands.PushACT(**kwds)[source]
decocare.commands.PushESC(**kwds)[source]
class decocare.commands.TempBasal(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 76
descr = 'Set temp basal'
params = [0, 0, 0]
retries = 0
class decocare.commands.ManualCommand(**kwds)[source]

Bases: decocare.commands.PumpCommand

getData()[source]
log_name(prefix='')[source]
class decocare.commands.ReadCurGlucosePageNumber(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 205
descr = 'Read Cur Glucose Page Number'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.Bolus(**kwds)[source]

Bases: decocare.commands.PumpCommand

Bolus some insulin.

XXX: Be careful please. Best trying this not connected to the pump until you trust it.

code = 66
descr = 'Bolus'
params = []
class decocare.commands.ReadErrorStatus508(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 38
descr = 'error status'
params = []
class decocare.commands.ReadBolusHistory(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 39
descr = 'bolus history'
params = []
class decocare.commands.ReadDailyTotals(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 40
descr = '...'
params = []
class decocare.commands.ReadPrimeBoluses(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 41
descr = '...'
params = []
class decocare.commands.ReadAlarms(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 42
descr = '...'
params = []
class decocare.commands.ReadProfileSets(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 43
descr = '...'
params = []
class decocare.commands.ReadUserEvents(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 44
descr = '...'
params = []
class decocare.commands.ReadRemoteControlID(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 46
descr = '...'
params = []
class decocare.commands.Read128KMem(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 55
descr = '...'
params = []
class decocare.commands.Read256KMem(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 56
descr = '...'
params = []
class decocare.commands.ReadBasalTemp508(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 64
descr = 'Read Temp Basal 508 (old)'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadTodayTotals508(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 65
descr = 'Read Totals Today'
getData()[source]
maxRecords = 1
params = []
retries = 2
class decocare.commands.ReadSensorSettings(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 153
descr = 'Read sensor settings'
params = []
retries = 2
class decocare.commands.ReadSensorHistoryData(page=None, **kwds)[source]

Bases: decocare.commands.ReadHistoryData

class decocare.commands.ReadISIGHistory(page=None, **kwds)[source]

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]
code = 155
descr = 'read ISIG history'
maxRecords = 32
params = []
class decocare.commands.FilterHistory(begin=None, end=None, **kwds)[source]

Bases: decocare.commands.PumpCommand

classmethod ISO(klass, begin=None, end=None, **kwds)[source]
begin = None
code = None
end = None
getData()[source]
class decocare.commands.FilterGlucoseHistory(begin=None, end=None, **kwds)[source]

Bases: decocare.commands.FilterHistory

>>> FilterGlucoseHistory.ISO(begin='2014-04-13', end='2014-04-14').params
[7, 222, 4, 13, 7, 222, 4, 14]
code = 168
class decocare.commands.FilterISIGHistory(begin=None, end=None, **kwds)[source]

Bases: decocare.commands.FilterHistory

>>> FilterISIGHistory.ISO(begin='2014-04-13', end='2014-04-14').params
[7, 222, 4, 13, 7, 222, 4, 14]
code = 169
class decocare.commands.ReadProfiles511_STD(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 122
class decocare.commands.ReadProfiles511_A(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 123
class decocare.commands.ReadProfiles511_B(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 124
class decocare.commands.Model511_ExperimentOP125(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 125
class decocare.commands.Model511_ExperimentOP126(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 126
class decocare.commands.ReadSettings511(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 127
class decocare.commands.ReadPumpTrace(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 163
maxRecords = 16
class decocare.commands.ReadDetailTrace(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 164
maxRecords = 16
class decocare.commands.Model511_Experiment_OP165(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 165
class decocare.commands.ReadNewTraceAlarm(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 166
maxRecords = 16
class decocare.commands.ReadOldTraceAlarm(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 167
maxRecords = 16
class decocare.commands.WriteGlucoseHistoryTimestamp(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 40
class decocare.commands.ReadLanguage(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 134
class decocare.commands.ReadBolusWizardSetupStatus(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 135
class decocare.commands.ReadCarbUnits(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 136
class decocare.commands.ReadBGUnits(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 137
class decocare.commands.ReadCarbRatios(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 138
class decocare.commands.ReadInsulinSensitivities(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 139
getData()[source]
resp_1 = bytearray(b'\x01\x00-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
class decocare.commands.ReadBGTargets(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 140
class decocare.commands.ReadBGAlarmCLocks(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 142
class decocare.commands.ReadReservoirWarning(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 143
class decocare.commands.ReadBGReminderEnable(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 144
class decocare.commands.ReadSettings512(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 145
class decocare.commands.ReadProfile_STD512(**kwds)[source]

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}
code = 146
static decode(data)[source]
getData()[source]
class decocare.commands.ReadProfile_A512(**kwds)[source]

Bases: decocare.commands.ReadProfile_STD512

code = 147
class decocare.commands.ReadProfile_B512(**kwds)[source]

Bases: decocare.commands.ReadProfile_STD512

code = 148
class decocare.commands.ReadLogicLinkIDS(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 149
class decocare.commands.Model512Experiment_OP150(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 150
class decocare.commands.ReadBGAlarmEnable(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 151
class decocare.commands.GuardianSensorSettings(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 209
class decocare.commands.GuardianSensorSettings(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 209
class decocare.commands.GuardianSensorDemoGraphTimeout(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 210
class decocare.commands.GuardianSensorAlarmSilence(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 211
class decocare.commands.GuardianSensorRateChangeAlerts(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 212
class decocare.commands.ReadSavedSettingsDate(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 193
class decocare.commands.ReadBolusReminderEnable(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 197
class decocare.commands.ReadBolusReminders(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 198
class decocare.commands.ReadFactoryParameters(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 199
class decocare.commands.ReadCalibrationFactor(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 156
class decocare.commands.ReadVCNTRHistory(page=None, **kwds)[source]

Bases: decocare.commands.ReadSensorHistoryData

code = 213
class decocare.commands.ReadOtherDevicesIDS(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 240
class decocare.commands.PumpTraceSelect(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 160
class decocare.commands.PumpEnableDetailTrace(**kwds)[source]

Bases: decocare.commands.PumpTraceSelect

params = [1]
class decocare.commands.PumpDisableDetailTrace(**kwds)[source]

Bases: decocare.commands.PumpTraceSelect

params = [0]
class decocare.commands.Experiment_OP161(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 161
class decocare.commands.Experiment_OP162(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 162
class decocare.commands.Model511_Experiment_OP119(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 119
class decocare.commands.Model511_Experiment_OP120(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 120
class decocare.commands.Model511_Experiment_OP121(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 121
class decocare.commands.Model511_Experiment_OP122(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 122
class decocare.commands.Model511_Experiment_OP123(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 123
class decocare.commands.Model511_Experiment_OP124(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 124
class decocare.commands.Model511_Experiment_OP125(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 125
class decocare.commands.Model511_Experiment_OP126(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 126
class decocare.commands.Model511_Experiment_OP127(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 127
class decocare.commands.Model511_Experiment_OP128(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 128
class decocare.commands.Model511_Experiment_OP129(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 129
class decocare.commands.Model511_Experiment_OP130(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 130
class decocare.commands.SelectBasalProfile(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 74
class decocare.commands.SelectBasalProfileSTD(**kwds)[source]

Bases: decocare.commands.SelectBasalProfile

params = [0]
class decocare.commands.SelectBasalProfileA(**kwds)[source]

Bases: decocare.commands.SelectBasalProfile

params = [1]
class decocare.commands.SelectBasalProfileB(**kwds)[source]

Bases: decocare.commands.SelectBasalProfile

params = [2]
class decocare.commands.PumpExperiment_OP69(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 69
class decocare.commands.PumpExperiment_OP70(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 70
class decocare.commands.PumpExperiment_OP71(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 71
class decocare.commands.PumpExperiment_OP72(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 72
class decocare.commands.PumpExperiment_OP73(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 73
class decocare.commands.PumpExperiment_OP75(**kwds)[source]

Bases: decocare.commands.PumpCommand

code = 75

Table Of Contents

Previous topic

Session

Next topic

Download

This Page