AHF_Reader

AHF_Reader.AHF_Reader module

class AHF_Reader.AHF_Reader(taskP, settingsDictP)

Bases: AHF_Base.AHF_Base

abstract readTag()
abstract startLogging()

starts using data logger to start logging entries/exits

abstract stopLogging()

stops data logger from logging entries/exits

AHF_Reader.AHF_Reader_ID module

class AHF_Reader_ID.AHF_Reader_ID(taskP, settingsDictP)

Bases: AHF_Reader.AHF_Reader

DO_CHECK_SUM = True
TIME_OUT_SECS = 0.05
static about()

Returns a brief message describing your sub-class, used when asking user to pick a sub-class of this class

clearResultsDict(resultsDict)
static config_user_get(starterDict={})

static method that querries user for settings, with default responses from starterDict, and returns starterDict with settings as edited by the user.

constantCheck(channel)
static customCallback(channel)

callback sets tag value in global reference to task object. DO NOT START CALLBACK BEFORE TASK IS INITED also logs entries in TagReader results dict for the mouse the tag corresponds to

defaultChamberTimeLimit = 600
defaultPin = 7
defaultPort = '/dev/tty0'
gInChamberTimeLimit = 0.0
gStillThere = False
graceTime = 5
hardwareTest()

Tests functionality, gives user a chance to change settings. :Returns: bool – True if any settings have changed

isChecking = True
newResultsDict(starterDict={})
readTag()
setdown()

oppposite of setup. Releases any hardware resouces. can be run before editing settings so GPIO pins can be reused, for example. This strategy should be used in hardwareTest method.

setup()

does hardware initialization with(possibly updated) info in self.settingsDict Run by __init__, or can be run separately after editing the settingsDict

Returns

code

bool whether setup completed without errors

startLogging()

starts using data logger to start logging entries/exits

stopLogging()

stops data logger from logging entries/exits

static timeInChamberThread(sleepEndTime)