constants.py 1.9 KB

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