00001 /***************************************************************************
00002 X10Interface.h - description
00003 -------------------
00004 begin : Tue Sep 4 2001
00005 copyright : (C) 2001 by
00006 email :
00007 ***************************************************************************/
00008
00009 /***************************************************************************
00010 X10Interface.cpp - description
00011 -------------------
00012 begin : Tue Sep 4 2001
00013 copyright : (C) 2001 by
00014 email :
00015 ***************************************************************************/
00016
00017 namespace rwil {
00018 #define CARRIAGE 0x0d
00019
00020 namespace X10 {
00022 void send_init();
00023
00025 void send_X10(char realhouse, char realnumber, char command);
00026
00027
00028
00029 /*inputLength is in bits */
00031 int createCompAndAddSig(char* input, char *output, int inputlength);
00032
00034 void send_Dim_X10(char realhouse, char realnumber, int percent);
00035
00037 int stripSigAndCompress(char * input, char* output, int inputlength);
00038
00040 void send_arbitrary(char data[10], int sizebits);
00041
00043 int get_status_X10(char realhouse, char realnumber);
00044
00045 //Read data from the X10 interface until either a Carriage return is found or the buffer is full
00046 //The function will demangle and strip the incoming data
00047 //bufsize is measured in bytes
00048 //the max buffer size supported is 100 bytes
00049 //Return value is the number of bits gathered
00051 int readFromX10(char *buffer, int bufSize);
00052 }
00053 }
1.2.12 written by Dimitri van Heesch,
© 1997-2001