void read_value_req(void) // process received read_value_request telegram { unsigned char objno, objflags; objno=find_first_objno(telegramm[3],telegramm[4]); objflags=read_objflags(objno); // read object flags if((objflags&0x0C)==0x0C) // Answer only when READ and COM flags are set { g_objno = objno; g_state = 0x01; } }
void read_value_req(void) { unsigned char objno, objflags; objno=find_first_objno(telegramm[3],telegramm[4]); // erste Objektnummer zu empfangener GA finden if(objno!=0xFF) { // wenn Gruppenadresse gefunden objflags=read_objflags(objno); // Objekt Flags lesen // Objekt lesen, nur wenn read enable gesetzt (Bit3) und Kommunikation zulaessig (Bit2) if((objflags&0x0C)==0x0C) { if (objno==0) send_obj_value(0x40); if (objno==1) send_obj_value(0x41); } } }
void write_value_req(void) { unsigned char objno; objno=find_first_objno(telegramm[3],telegramm[4]); if (objno==2) { // nur Zeit/Datum senden Objekt if (telegramm[7]==0x81) { //send_dt(1,0); //send_dt(1,1); send_obj_value(0); send_obj_value(1); } } }