constants.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Counters
  2. # We have 5 of them.
  3. counters = {
  4. 1: "z",
  5. 2: "{",
  6. 3: "|",
  7. 4: "}",
  8. 5: "-",
  9. }
  10. # Command Codes
  11. WRITE_TEXT = "A" # Write TEXT file (p18)
  12. READ_TEXT = "B" # Read TEXT file (p19)
  13. WRITE_SPECIAL = "E" # Write SPECIAL FUNCTION commands (p21)
  14. READ_SPECIAL = "F" # Read SPECIAL FUNCTION commands (p29)
  15. WRITE_STRING = "G" # Write STRING (p37)
  16. READ_STRING = "H" # Read STRING (p38)
  17. WRITE_SMALL_DOTS = "I" # Write SMALL DOTS PICTURE file (p39)
  18. READ_SMALL_DOTS = "J" # Read SMALL DOTS PICTURE file (p41)
  19. WRITE_RGB_DOTS = "K" # Write RGB DOTS PICTURE file (p44)
  20. READ_RGB_DOTS = "L" # Read RGB DOTS PICTURE file (p46)
  21. WRITE_LARGE_DOTS = "M" # Write LARGE DOTS PICTURE file (p42)
  22. READ_LARGE_DOTS = "N" # Read LARGE DOTS PICTURE file (p43)
  23. WRITE_ALPHAVISION = "O" # Write ALPHAVISION BULLETIN (p48)
  24. SET_TIMEOUT = "T" # Set Timeout Message (p118) (Alpha 2.0/3.0)
  25. UNLOCKED = "U"
  26. LOCKED = "L"
  27. # Constants used in transmission packets
  28. NUL = "\x00" # NULL
  29. SOH = "\x01" # Start of Header
  30. STX = "\x02" # Start of TeXt (precedes a command code)
  31. ETX = "\x03" # End of TeXt
  32. EOT = "\x04" # End Of Transmission
  33. #ENQ = "\x05" # Enquiry
  34. #ACK = "\x06" # Acknowledge
  35. BEL = "\x07" # Bell
  36. BS = "\x08" # Backspace
  37. HT = "\x09" # Horizontal tab
  38. LF = "\x0A" # Line Feed
  39. NL = "\x0A" # New Line
  40. VT = "\x0B" # Vertical Tab
  41. #FF = "\x0C" # Form Feed
  42. #NP = "\x0C" # New Page
  43. CR = "\x0D" # Carriage Return
  44. CAN = "\x18" # Cancel
  45. SUB = "\x1A" # Substitute (select charset)
  46. ESC = "\x1B" # Escape character