You are on page 1of 3

variables

{
message 0x779 senda;
message 0x778 sendc;

on message 0x779
{
write("message received");

sendc.dlc=8;
if ( this.byte(0) == 0x02)
{
sendc.byte(0)=0x02;
sendc.byte(1)=0x50;
if ( this.byte(2) == 0x01)
sendc.byte(2)=0x01;
else if ( this.byte(2) == 0x02)
sendc.byte(2)=0x02;
else
if ( this.byte(2) == 0x03)
sendc.byte(2)=0x03;

sendc.byte(3)=0x00;
sendc.byte(4)=0x00;
sendc.byte(5)=0x00;
sendc.byte(6)=0x00;
sendc.byte(7)=0x00;
output(sendc);

write ( " message sent postive respone)");

}
else {
sendc.byte(0)=0x03;
sendc.byte(1)=0x7f;
sendc.byte(2)=0x10;
sendc.byte(3)=0x13;
sendc.byte(4)=0x00;
sendc.byte(5)=0x00;
sendc.byte(6)=0x00;
sendc.byte(7)=0x00;
output(sendc);
}
}

on start
{
write(" Press a for start start diagnootic default session");
write("Press b for start start diagnootic programming session");
write("Press c for start start diagnootic extended session");
write("hi");
write("hi");
write("hi");

write("hi my first message");


}

on key 'a'
{
write (" this is key Start Diagnotic ");
senda.dlc=8;
senda.byte(0)=0x02;
senda.byte(1)=0x10;
senda.byte(2)=0x01;
senda.byte(3)=0x00;
senda.byte(4)=0x00;
senda.byte(5)=0x00;
senda.byte(6)=0x00;
senda.byte(7)=0x00;
output(senda);
write ( " message sent)");

on key 'b'
{
write (" this is key Start Diagnotic ");
senda.dlc=8;
senda.byte(0)=0x02;
senda.byte(1)=0x10;
senda.byte(2)=0x02;
senda.byte(3)=0x00;
senda.byte(4)=0x00;
senda.byte(5)=0x00;
senda.byte(6)=0x00;
senda.byte(7)=0x00;
output(senda);
write ( " message sent)");

}
on key 'c'
{
write (" this is key Start Diagnotic ");
senda.dlc=8;
senda.byte(0)=0x02;
senda.byte(1)=0x10;
senda.byte(2)=0x03;
senda.byte(3)=0x00;
senda.byte(4)=0x00;
senda.byte(5)=0x00;
senda.byte(6)=0x00;
senda.byte(7)=0x00;
output(senda);
write ( " message sent)");

on key 'z'
{
write (" this is key c");
senda.dlc=8;
senda.byte(0)=0xcc;
senda.byte(1)=0x11;
senda.byte(2)=0x22;
senda.byte(3)=0x33;
senda.byte(4)=0x44;
senda.byte(5)=0x55;
senda.byte(6)=0x66;
senda.byte(7)=0x77;
output(senda);
write ( " message sent)");

You might also like