PIR Library  2
 All Classes Files Functions Variables Typedefs Macros Pages
Public Member Functions | List of all members
IPIR Class Referenceabstract

The PIR interface class. More...

#include <ipir.h>

Inherited by PIR.

Public Member Functions

virtual std::string serial () const =0
 Returns the serial number. More...
 
virtual unsigned int version () const =0
 Returns the firmware version number. More...
 
virtual bool sendCCF (const std::string ccf, unsigned char bitmask, unsigned char repeats)=0
 sends CCF code. More...
 
virtual bool blink (unsigned char count)=0
 blinks the LED on the PIR-1 More...
 
virtual Type type () const =0
 returns the Type of the PIR More...
 
virtual bool learn ()=0
 starts learn mode on a PIR-1 More...
 
virtual bool cancelLearn ()=0
 ends learn mode on a PIR-1 More...
 

Detailed Description

The PIR interface class.

Member Function Documentation

virtual bool IPIR::blink ( unsigned char  count)
pure virtual

blinks the LED on the PIR-1

Parameters
countnumber of times to blink.
virtual bool IPIR::cancelLearn ( )
pure virtual

ends learn mode on a PIR-1

Returns
true on success false on error.
virtual bool IPIR::learn ( )
pure virtual

starts learn mode on a PIR-1

Returns
true on success false on error.
virtual bool IPIR::sendCCF ( const std::string  ccf,
unsigned char  bitmask,
unsigned char  repeats 
)
pure virtual

sends CCF code.

CCF codes are the IR codes formatted according to the Pronto CCF format. This library only supports CCF-RAW codes.

Multiple code can be sent in quick succesion without waiting for fIrSentCB callback. Internally the library will queue the CCF codes.

Parameters
ccfPronto CCF string.
bitmaskcombination of bits 1 = back of PIR, 2 = front panel for pir-1
bitmask= 1, 2, 4 or 8 respectively for ports 1,2,3 or 4 on PIR-4
repeats= number of times to repeat the ir signal.
Returns
0 = success
< 0 = error
virtual std::string IPIR::serial ( ) const
pure virtual

Returns the serial number.

PIR serial numbers are hexadecimal strings of 16 characters.

Returns
serial number
virtual Type IPIR::type ( ) const
pure virtual

returns the Type of the PIR

Returns
Type ( either PIR-1 or PIR-4 )
virtual unsigned int IPIR::version ( ) const
pure virtual

Returns the firmware version number.

New firmware revisions can be uploaded to the PIR's.

Returns
version number of firmware.

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