Class: MovingsignApi::WriteTextCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/movingsign_api/commands/write_text_command.rb

Overview

Writes text to a sign

Instance Attribute Summary collapse

Attributes inherited from Command

#receiver, #sender

Instance Method Summary collapse

Methods inherited from Command

#to_bytes

Instance Attribute Details

#align_modeObject

Align mode to use. See AlignMode

Parameters:

  • value (Symbol)

    One of :left :right :center (default :left)



39
40
41
# File 'lib/movingsign_api/commands/write_text_command.rb', line 39

def align_mode
  @align_mode
end

#dayofweek_maskObject

Day of week mask. See specification for an explaination of this parameter

Parameters:

  • value (String)

    default: ‘7F’



34
35
36
# File 'lib/movingsign_api/commands/write_text_command.rb', line 34

def dayofweek_mask
  @dayofweek_mask
end

#display_modeObject

Display mode to use. See DisplayMode

Parameters:

  • value (Sybol)

    (default: :hold)



19
20
21
# File 'lib/movingsign_api/commands/write_text_command.rb', line 19

def display_mode
  @display_mode
end

#display_pauseObject

Display pause between screens of information. See DisplayPause

Parameters:

  • value (Integer)

    default: 2



29
30
31
# File 'lib/movingsign_api/commands/write_text_command.rb', line 29

def display_pause
  @display_pause
end

#display_speedObject

Display speed of effects. See DisplaySpeed

Parameters:

  • value (Symbol)

    default: :normal



24
25
26
# File 'lib/movingsign_api/commands/write_text_command.rb', line 24

def display_speed
  @display_speed
end

#end_timeObject

Note:

work in progress

Display end time

Parameters:

  • value (String)

    default: ‘2359’



51
52
53
# File 'lib/movingsign_api/commands/write_text_command.rb', line 51

def end_time
  @end_time
end

#file_handleObject

Index of the file to write to. 0 - 35 (363 total). See FileHandle

Parameters:

  • value (Integer)

    0 - 35 (default: 0)



14
15
16
# File 'lib/movingsign_api/commands/write_text_command.rb', line 14

def file_handle
  @file_handle
end

#start_timeObject

Note:

work in progress

Display start time

Parameters:

  • value (String)

    default: ‘0000’



45
46
47
# File 'lib/movingsign_api/commands/write_text_command.rb', line 45

def start_time
  @start_time
end

#textObject

Text to display

Parameters:

  • value (String)

    the message to display



56
57
58
# File 'lib/movingsign_api/commands/write_text_command.rb', line 56

def text
  @text
end

Instance Method Details

#command_codeString

Returns the command identifier string. See specification for list of valid command codes.

‘A’ for the “Write Text” command

Returns:

  • (String)


80
81
82
# File 'lib/movingsign_api/commands/write_text_command.rb', line 80

def command_code
  'A'
end