Linksys WVC80N User Guide - Page 44

chr1 = char0

Page 44 highlights

Appendix D //Heres the decode part. There's really only one way to do it. chr1 = (enc1 > 4); chr2 = ((enc2 & 15) > 2); chr3 = ((enc3 & 3)

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66

Appendix D
CGI Commands
43
Wireless-N Internet Home Monitoring Camera
//Heres the decode part. There’s really only one way to do it.
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
o_buf[j++] = (char)chr1;
if (enc3 != 64) {
o_buf[j++] = (char)chr2;
}
if (enc4 != 64) {
o_buf[j++] = (char)chr3;
}
//now clean out the variables used
chr1 = (char)0;
chr2 = (char)0;
chr3 = (char)0;
enc1 = 0;
enc2 = 0;
enc3 = 0;
enc4 = 0;
} while (i < strlen(i_buf)); //finish off the loop
//Now return the decoded values.
return j;
}