constants.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Display Modes (p89)
  2. modes = {
  3. "rotate": "a",
  4. "hold": "b",
  5. "flash": "c",
  6. "roll_up": "e",
  7. "roll_down": "f",
  8. "roll_left": "g",
  9. "roll_right": "h",
  10. "wipe_up": "i",
  11. "wipe_down": "j",
  12. "wipe_left": "k",
  13. "wipe_right": "l",
  14. "scroll": "m",
  15. "automode": "o",
  16. "roll_in": "p",
  17. "roll_out": "q",
  18. "wipe_in": "r",
  19. "wipe_out": "s",
  20. "compressed_rotate": "t", # only available on certain sign models
  21. "explode": "u", # alpha 3.0 protocol
  22. "clock": "v", # alpha 3.0 protocol
  23. # Special Modes
  24. "twinkle": "n0",
  25. "sparkle": "n1",
  26. "snow": "n2",
  27. "interlock": "n3",
  28. "switch": "n4",
  29. "slide": "n5", # only Betabrite 1036 (same as CYCLE_COLORS?)
  30. "spray": "n6",
  31. "starburst": "n7",
  32. "welcome": "n8",
  33. "slot_machine": "n9",
  34. "news_flash": "nA", # only Betabrite 1036
  35. "trumpet_animation": "nb", # only betabrite 1036
  36. "cycle_colors": "nC", # only AlphaEclipse 3600
  37. # Special Graphics (these display before the message)
  38. "thank_you": "nS",
  39. "no_smoking": "nU",
  40. "dont_drive_drive": "nV",
  41. "running_animal": "nW",
  42. "fish_animation": "nW",
  43. "fireworks": "nX",
  44. "turbo_car": "nY",
  45. "balloon_animation": "nY",
  46. "cherry_bomb": "nZ",
  47. }
  48. # Display Positions
  49. positions = {
  50. "middle_line": "\x20",
  51. "top_line": "\x22",
  52. "bottom_line": "\x26",
  53. "fill": "\x30",
  54. "left": "\x31",
  55. "right": "\x32",
  56. }
  57. # Counters
  58. # We have 5 of them.
  59. counters = {
  60. 1: "z",
  61. 2: "{",
  62. 3: "|",
  63. 4: "}",
  64. 5: "-",
  65. }
  66. # Command Codes
  67. WRITE_TEXT = "A" # Write TEXT file (p18)
  68. READ_TEXT = "B" # Read TEXT file (p19)
  69. WRITE_SPECIAL = "E" # Write SPECIAL FUNCTION commands (p21)
  70. READ_SPECIAL = "F" # Read SPECIAL FUNCTION commands (p29)
  71. WRITE_STRING = "G" # Write STRING (p37)
  72. READ_STRING = "H" # Read STRING (p38)
  73. WRITE_SMALL_DOTS = "I" # Write SMALL DOTS PICTURE file (p39)
  74. READ_SMALL_DOTS = "J" # Read SMALL DOTS PICTURE file (p41)
  75. WRITE_RGB_DOTS = "K" # Write RGB DOTS PICTURE file (p44)
  76. READ_RGB_DOTS = "L" # Read RGB DOTS PICTURE file (p46)
  77. WRITE_LARGE_DOTS = "M" # Write LARGE DOTS PICTURE file (p42)
  78. READ_LARGE_DOTS = "N" # Read LARGE DOTS PICTURE file (p43)
  79. WRITE_ALPHAVISION = "O" # Write ALPHAVISION BULLETIN (p48)
  80. SET_TIMEOUT = "T" # Set Timeout Message (p118) (Alpha 2.0/3.0)
  81. # Constants used in transmission packets
  82. NUL = "\x00" # NULL
  83. SOH = "\x01" # Start of Header
  84. STX = "\x02" # Start of TeXt (precedes a command code)
  85. ETX = "\x03" # End of TeXt
  86. EOT = "\x04" # End Of Transmission
  87. #ENQ = "\x05" # Enquiry
  88. #ACK = "\x06" # Acknowledge
  89. BEL = "\x07" # Bell
  90. BS = "\x08" # Backspace
  91. HT = "\x09" # Horizontal tab
  92. LF = "\x0A" # Line Feed
  93. NL = "\x0A" # New Line
  94. VT = "\x0B" # Vertical Tab
  95. #FF = "\x0C" # Form Feed
  96. #NP = "\x0C" # New Page
  97. CR = "\x0D" # Carriage Return
  98. CAN = "\x18" # Cancel
  99. SUB = "\x1A" # Substitute (select charset)
  100. ESC = "\x1B" # Escape character