Package dics :: Module tc08 :: Class tc08
[hide private]
[frames] | no frames]

Class tc08
source code

Class providing an python interface to a Pico Technology Ltd. TC-08 temperature logger using the tc08lnx Linux driver from Pico Technology.

Requires tc08lnx to be installed in /usr/local/bin. Also requires the non-standard python module shm (System V shared memory).

Instance Methods [hide private]
  __init__(self, channels, channel_names, portname, units='C', interval=60, name='tc08', id=42, master=True)
Arguments: name: A string with which to label this instance.
  __del__(self)
Ensure the tc08lnx driver gets killed.
  getChannels(self)
Returns the channel config string.
  getColdJunction(self)
Returns the current cold junction temperature.
  getID(self)
Returns the unique ID used to identify the shared memory block.
  getName(self, number)
Returns the channel label for a given channel number
  getNames(self)
Returns the list of channel labels
  getNumber(self, name)
Returns the channel number corresponding to a given label
  getTemps(self)
Returns the current temperatures as an list.
  getUnits(self)
Returns the temperature units in use, either 'C' for celsius or 'K' for kelvin.
  isActive(self)
  isInitialised(self)

Class Variables [hide private]
__format  

Method Details [hide private]

__init__(self, channels, channel_names, portname, units='C', interval=60, name='tc08', id=42, master=True)
(Constructor)

source code 

Arguments:

name:     A string with which to label this instance.  Used
          for logging purposes

channels: Type of thermocouple connected to each channel,
          encoded as a string of eight characters, one per
          channel.  Available types are B, E, J, K, R,
          S, T and X (microvolts).  For unused channels enter
          '-'.

channel_names: String containing a comma seperated list of
               labels for the channels.

portname: String containing the device name of the serial port
          that the TC-08 is connected to, e.g. '/dev/ttyS0'

units:    Specifies the units, 'C' for celsius, 'K' for Kelvin.

interval: Interval, in seconds, at which entries are added to the log

name:     String to indentify the particlar instance for logging
          purposes.

id:       Unique ID number used to generate the shared memory key.

master:   True is this instance is the 'master', and should start
          the tc08lnx driver.  False if this is a slave instance,
          which should just connect to a pre-existing shared memory
          area and log file.

__del__(self)
(Destructor)

source code 
Ensure the tc08lnx driver gets killed.

getChannels(self)

source code 
Returns the channel config string.

getColdJunction(self)

source code 
Returns the current cold junction temperature.

getID(self)

source code 
Returns the unique ID used to identify the shared memory block.

getName(self, number)

source code 
Returns the channel label for a given channel number

getNames(self)

source code 
Returns the list of channel labels

getNumber(self, name)

source code 
Returns the channel number corresponding to a given label

getTemps(self)

source code 
Returns the current temperatures as an list.

getUnits(self)

source code 
Returns the temperature units in use, either 'C' for celsius or 'K' for kelvin.

isActive(self)

source code 

isInitialised(self)

source code 

Class Variable Details [hide private]

__format

Value:
'ii8ll'