upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Types | Public Member Functions | Protected Attributes

UPM API for the Amphenol Telaire Ventostat T8100 Ventilation Controller. More...

Detailed Description

This module implements support for the Amphenol Telaire Ventostat T8100 Ventilation Controller with BACnet interface. It may also support the T8200 and T8300 models, but they have not been tested.

The Telaire Ventostat T8100 reports Temperature, Humidity and CO2 concentrations. It supports an optional relay with a settable trigger point. The unit this driver was tested under did not support the optional relay. The temperature range supported is 0-50C, humidity is 0-100% non-condensing, and CO2 range is appoximately 0-2000 PPM for the T8100. Other sensors in this family support wider ranges.

This module was developed using the upm::BACNETMSTP library, based on libbacnet-stack 0.8.3. Both libbacnet 0.8.3 and the upm::BACNETMSTP libraries must be present in order to build this module.

It was connected using an RS232->RS485 interface. You cannot use the built in MCU TTL UART pins for accessing this device – you must use a full Serial RS232->RS485 or USB-RS485 interface connected via USB.

// You will need to edit this example to conform to your site and your
// devices, specifically the Device Object Instance ID passed to the
// constructor, and the arguments to initMaster() that are
// appropriate for your BACnet network.
string defaultDev = "/dev/ttyUSB0";
// if an argument was specified, use it as the device instead
if (argc > 1)
defaultDev = string(argv[1]);
cout << "Using device " << defaultDev << endl;
cout << "Initializing..." << endl;
// Instantiate an T8100 object for an T8100 device that has 568000
// as it's unique Device Object Instance ID. NOTE: You will
// certainly want to change this to the correct value for your
// device(s).
T8100 sensor(568000);
// Initialize our BACnet master, if it has not already been
// initialized, with the device and baudrate, choosing 1000001 as
// our unique Device Object Instance ID, 2 as our MAC address and
// using default values for maxMaster and maxInfoFrames
sensor.initMaster(defaultDev, 38400, 1000001, 2);
// Uncomment to enable debugging output
// sensor.setDebug(true);
cout << endl;
cout << "Device Description: " << sensor.getDeviceDescription() << endl;
cout << "Device Location: " << sensor.getDeviceLocation() << endl;
cout << endl;
// update and print a few values every 5 seconds
while (shouldRun) {
// update our values
sensor.update();
cout << "CO2 Concentration: " << sensor.getCO2() << " ppm" << endl;
// we show both C and F for temperature
cout << "Temperature: " << sensor.getTemperature() << " C / " << sensor.getTemperature(true)
<< " F" << endl;
cout << "Humidity: " << sensor.getHumidity() << " %RH" << endl;
cout << "Relay State: " << sensor.getRelayState() << endl;
cout << endl;
upm_delay(5);
}
cout << "Exiting..." << endl;

Public Types

enum  ANALOG_VALUES_T : uint32_t {
  AV_Temperature_Offset = 1, AV_RH_Offset = 2, AV_Relay_Set_Point = 3, AV_Relay_Hysteresis = 4,
  AV_Elevation = 5, AV_Calibration_Single_Point = 6, AV_Baud_Rate = 7, AV_MAC_Address = 8
}
 
enum  ANALOG_INPUTS_T : uint32_t { AI_CO2 = 1, AI_Relative_Humidity = 2, AI_Temperature_ChipCap = 3, AI_Temperature_Thermistor = 4 }
 
enum  BINARY_VALUES_T : uint32_t { BV_Temperature_Units = 1, BV_ABC_Logic_State = 2, BV_ABC_Logic_Reset = 3, BV_CO2_Calibration = 4 }
 
enum  BINARY_INPUTS_T : uint32_t { BI_Relay_State = 1 }
 

Public Member Functions

 T8100 (uint32_t targetDeviceObjectID)
 
 ~T8100 ()
 
void update ()
 
float getHumidity ()
 
float getCO2 ()
 
float getTemperature (bool fahrenheit=false)
 
bool getRelayState ()
 
void setTemperatureScale (bool fahrenheit)
 
bool getTemperatureScale ()
 
float getTemperatureOffset ()
 
void setTemperatureOffset (float value)
 
float getHumidityOffset ()
 
void setHumidityOffset (float value)
 
float getRelaySetPoint ()
 
void setRelaySetPoint (float value)
 
float getRelayHysteresis ()
 
void setRelayHysteresis (float value)
 
float getElevation ()
 
void setElevation (float value)
 
float getCalibrationSinglePoint ()
 
void setCalibrationSinglePoint (float value)
 
float getBaudRate ()
 
float getMACAddress ()
 
bool getABCLogicState ()
 
void setABCLogicState (bool value)
 
bool getABCLogicReset ()
 
void setABCLogicReset (bool value)
 
bool getCO2Calibration ()
 
void setCO2Calibration (bool value)
 
- Public Member Functions inherited from BACNETUTIL
 BACNETUTIL (uint32_t targetDeviceObjectID)
 
virtual ~BACNETUTIL ()
 
virtual void initMaster (std::string port, int baudRate, int deviceInstanceNumber, int macAddr, int maxMaster=DEFAULT_MAX_MASTER, int maxInfoFrames=1)
 
virtual void setDebug (bool enable)
 
virtual float getAnalogValue (uint32_t objInstance)
 
virtual void setAnalogValue (uint32_t objInstance, float value)
 
virtual float getAnalogInput (uint32_t objInstance)
 
virtual std::string getAnalogValueUnits (uint32_t objInstance)
 
virtual std::string getAnalogInputUnits (uint32_t objInstance)
 
virtual bool getBinaryInput (uint32_t objInstance)
 
virtual std::string lookupBinaryInputText (uint32_t objInstance, bool value)
 
virtual std::string getBinaryInputText (uint32_t objInstance)
 
virtual bool getBinaryValue (uint32_t objInstance)
 
virtual void setBinaryValue (uint32_t objInstance, bool value)
 
virtual std::string lookupBinaryValueText (uint32_t objInstance, bool value)
 
virtual std::string getBinaryValueText (uint32_t objInstance)
 
virtual unsigned int getMultiStateValue (uint32_t objInstance)
 
virtual std::string lookupMultiStateValueText (uint32_t objInstance, unsigned int value)
 
virtual std::string getMultiStateValueText (uint32_t objInstance)
 
virtual unsigned int getMultiStateValueMaxStates (uint32_t objInstance)
 
virtual void setMultiStateValue (uint32_t objInstance, unsigned int value)
 
virtual void checkReliability (bool enable)
 
virtual std::string getDeviceDescription ()
 
virtual std::string getDeviceLocation ()
 
virtual bool setDeviceLocation (std::string location)
 
virtual std::string getDeviceName ()
 
virtual bool setDeviceName (std::string name)
 
virtual std::string getAllErrorString ()
 
virtual BACNETMSTP::BACERR_TYPE_T getErrorType ()
 
virtual uint8_t getRejectReason ()
 
virtual std::string getRejectString ()
 
virtual uint8_t getAbortReason ()
 
virtual std::string getAbortString ()
 
virtual BACNET_ERROR_CLASS getErrorClass ()
 
virtual BACNET_ERROR_CODE getErrorCode ()
 
virtual std::string getErrorString ()
 
virtual std::string getUPMErrorString ()
 

Protected Attributes

float m_humidity
 
float m_temperature
 
float m_co2
 
bool m_relayState
 
- Protected Attributes inherited from BACNETUTIL
bool m_debugging
 
bool m_checkReliability
 
uint32_t m_targetDeviceObjectID
 
BACNETMSTPm_instance
 
bool m_initialized
 
binaryInfo_t m_bvInfo
 
binaryInfo_t m_biInfo
 
multiStateInfo_t m_msvInfo
 
avCacheMap_t m_avUnitCache
 
aiCacheMap_t m_aiUnitCache
 

Additional Inherited Members

- Protected Types inherited from BACNETUTIL
typedef std::map< uint32_t, binaryData_tbinaryInfo_t
 
typedef std::map< uint32_t, multiStateData_tmultiStateInfo_t
 
typedef std::map< uint32_t, std::string > avCacheMap_t
 
typedef std::map< uint32_t, std::string > aiCacheMap_t
 
- Protected Member Functions inherited from BACNETUTIL
virtual void updateMultiStateValueInfo (uint32_t objInstance)
 
virtual void deleteMultiStateValueInfo (uint32_t objInstance)
 
virtual void updateBinaryValueInfo (uint32_t objInstance)
 
virtual void deleteBinaryValueInfo (uint32_t objInstance)
 
virtual void updateBinaryInputInfo (uint32_t objInstance)
 
virtual void deleteBinaryInputInfo (uint32_t objInstance)
 

Constructor & Destructor Documentation

T8100 ( uint32_t  targetDeviceObjectID)

T8100 constructor

Parameters
targetDeviceObjectIDthe unique Instance ID of the Device Object. This number is used to uniquely identify devices on the BACnet network, and ranges from 1 to 4194302. This is not the device's MAC address, though on some devices, the MAC address may be used as part of this number. On the T8100, this number is 568XXX, where XXX are the 3 digits of the set MAC address. The MAC address is configured via DIP switches within the device.

Here is the call graph for this function:

~T8100 ( )

T8100 Destructor

Member Function Documentation

void update ( void  )

Read current values from the sensor and update internal stored values for temperature, humidity, CO2 concentration and relay state. This method must be called prior to querying any of the aforementioned values.

Here is the call graph for this function:

float getHumidity ( void  )
inline

Get the current relative humidity. update() must have been called prior to calling this method.

Returns
The last humidity reading
float getCO2 ( )
inline

Get the current CO2 concentration in Parts per Million (PPM). update() must have been called prior to calling this method.

Returns
The last CO2 reading

Here is the call graph for this function:

float getTemperature ( bool  fahrenheit = false)

Get the current temperature. update() must have been called prior to calling this method.

Parameters
fahrenheittrue to return the temperature in degrees fahrenheit, false to return the temperature in degrees celsius. The default is false (degrees Celsius).
Returns
The last temperature reading in Celsius or Fahrenheit.

Here is the caller graph for this function:

bool getRelayState ( )
inline

Return the current state of the relay. This function will always return false if the relay option is not installed. update() must have been called prior to calling this method.

Returns
true if the relay is active, false if inactive.

Here is the call graph for this function:

void setTemperatureScale ( bool  fahrenheit)

Set the device temperature scale to Celsius of Fahrenheit. For devices with an LCD display, this will affect which scale is displayed. When changing the scale, it may take several seconds for the setting to take effect.

Parameters
fahrenheittrue to set the scale to fahrenheit, false for celsius.

Here is the call graph for this function:

Here is the caller graph for this function:

bool getTemperatureScale ( )

Get the device temperature scale.

Returns
true if scale is fahrenheit, false for celsius.

Here is the call graph for this function:

Here is the caller graph for this function:

float getTemperatureOffset ( )

Get the current temperature offset.

Returns
The configured temperature offset.

Here is the call graph for this function:

Here is the caller graph for this function:

void setTemperatureOffset ( float  value)

Set the device temperature offset. The offset is applied by the device internally to the temperature reading. The offset must always be specified in degrees Celsius. Valid values must be between -50 and 50.

Parameters
valueThe temperature offset to configure.

Here is the call graph for this function:

Here is the caller graph for this function:

float getHumidityOffset ( )

Get the current humidity offset.

Returns
The configured humidity offset.

Here is the call graph for this function:

Here is the caller graph for this function:

void setHumidityOffset ( float  value)

Set the device humidity offset. The offset is applied by the device internally to the humidity reading. Valid values must be between -100 and 100.

Parameters
valueThe humidity offset to configure.

Here is the call graph for this function:

Here is the caller graph for this function:

float getRelaySetPoint ( )

Return the current relay set point (in PPM). This set point is the CO2 concentration point in PPM that causes the relay to trigger.

Returns
The relay set point value.

Here is the call graph for this function:

Here is the caller graph for this function:

void setRelaySetPoint ( float  value)

Set the relay set point in PPM. This set point is the CO2 concentration point in PPM that causes the relay to trigger. Valid values are between 0-65535.

Parameters
valueThe desired relay set point value.

Here is the call graph for this function:

Here is the caller graph for this function:

float getRelayHysteresis ( )

Return the current relay hysteresis.

Returns
The relay hysteresis value.

Here is the call graph for this function:

Here is the caller graph for this function:

void setRelayHysteresis ( float  value)

Set the relay hysteresis. Valid values are between 0-65535.

Parameters
valueThe desired relay set point value.

Here is the call graph for this function:

Here is the caller graph for this function:

float getElevation ( )

Return the current elevation setting (in meters).

Returns
The current elevation setting.

Here is the call graph for this function:

Here is the caller graph for this function:

void setElevation ( float  value)

Set the elevation setting in meters. Valid values are between 0-65535.

Parameters
valueThe desired elevation setting in meters.

Here is the call graph for this function:

Here is the caller graph for this function:

float getCalibrationSinglePoint ( )

Return the current calibration single point value (in PPM).

Returns
The current calibration single point value.

Here is the call graph for this function:

Here is the caller graph for this function:

void setCalibrationSinglePoint ( float  value)

Set the calibration single point value in PPM. Valid values are between 0-65535.

Parameters
valueThe desired calibration single point value in PPM.

Here is the call graph for this function:

Here is the caller graph for this function:

float getBaudRate ( )

Return the current baud rate.

Returns
The current baud rate.

Here is the call graph for this function:

Here is the caller graph for this function:

float getMACAddress ( )

Return the current MAC address. The MAC address is configured via DIP switches within the device.

Returns
The current MAC address.

Here is the call graph for this function:

Here is the caller graph for this function:

bool getABCLogicState ( )

Return the current ABC (Automatic Background Calibration) logic state. See the datasheet for details.

Returns
The current ABC logic state.

Here is the call graph for this function:

Here is the caller graph for this function:

void setABCLogicState ( bool  value)

Set the ABC (Automatic Background Calibration) logic state. Valid values are true for ON, false for OFF.

Parameters
valueThe desired ABC logic state.

Here is the call graph for this function:

Here is the caller graph for this function:

bool getABCLogicReset ( )

Return the current ABC (Automatic Background Calibration) reset state. See the datasheet for details.

Returns
The current ABC reset state.

Here is the call graph for this function:

Here is the caller graph for this function:

void setABCLogicReset ( bool  value)

Set the ABC (Automatic Background Calibration) reset state. Valid values are true for Reset, false for Normal.

Parameters
valueThe desired ABC reset state.

Here is the call graph for this function:

Here is the caller graph for this function:

bool getCO2Calibration ( )

Return the current CO2 calibration state. See the datasheet for details.

Returns
The current CO2 calibration state.

Here is the call graph for this function:

Here is the caller graph for this function:

void setCO2Calibration ( bool  value)

Set the CO2 calibration state. Valid values are true for Calibrate, false for Normal.

Parameters
valueThe desired ABC reset state.

Here is the call graph for this function:

Here is the caller graph for this function:

Inheritance diagram for T8100:
Inheritance graph
[legend]
Collaboration diagram for T8100:
Collaboration graph
[legend]

The documentation for this class was generated from the following files: