Class: SGS::Config
Instance Attribute Summary collapse
-
#comm_device ⇒ Object
Returns the value of attribute comm_device.
-
#comm_speed ⇒ Object
Returns the value of attribute comm_speed.
-
#gps_device ⇒ Object
Returns the value of attribute gps_device.
-
#gps_speed ⇒ Object
Returns the value of attribute gps_speed.
-
#mission_file ⇒ Object
Returns the value of attribute mission_file.
-
#otto_device ⇒ Object
Returns the value of attribute otto_device.
-
#otto_speed ⇒ Object
Returns the value of attribute otto_speed.
Class Method Summary collapse
-
.configure_all ⇒ Object
Set up the Redis configuration with some basic data.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Methods inherited from RedisBase
#count, #count_name, #load, load, #make_redis_name, #publish, redis, redis_handle, #redis_read_var, #save, #save_and_publish, setup, subscribe, to_redis, var_init
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
41 42 43 44 45 46 47 48 |
# File 'lib/sgs/config.rb', line 41 def initialize @mission_file = "/etc/mission.yaml" @otto_device = "/dev/ttyu0" @gps_device = "/dev/ttyu1" @comm_device = "/dev/ttyu2" @otto_speed = @gps_speed = @comm_speed = 9600 super() end |
Instance Attribute Details
#comm_device ⇒ Object
Returns the value of attribute comm_device.
37 38 39 |
# File 'lib/sgs/config.rb', line 37 def comm_device @comm_device end |
#comm_speed ⇒ Object
Returns the value of attribute comm_speed.
38 39 40 |
# File 'lib/sgs/config.rb', line 38 def comm_speed @comm_speed end |
#gps_device ⇒ Object
Returns the value of attribute gps_device.
37 38 39 |
# File 'lib/sgs/config.rb', line 37 def gps_device @gps_device end |
#gps_speed ⇒ Object
Returns the value of attribute gps_speed.
38 39 40 |
# File 'lib/sgs/config.rb', line 38 def gps_speed @gps_speed end |
#mission_file ⇒ Object
Returns the value of attribute mission_file.
39 40 41 |
# File 'lib/sgs/config.rb', line 39 def mission_file @mission_file end |
#otto_device ⇒ Object
Returns the value of attribute otto_device.
37 38 39 |
# File 'lib/sgs/config.rb', line 37 def otto_device @otto_device end |
#otto_speed ⇒ Object
Returns the value of attribute otto_speed.
38 39 40 |
# File 'lib/sgs/config.rb', line 38 def otto_speed @otto_speed end |