Permalink
Browse files

Renamed Ruby-plc to Machines

  • Loading branch information...
1 parent e154668 commit c25906b4e98b0dc36b8e666cf4bea4cdbcf80dd2 @tallakt committed Mar 13, 2009
Showing with 101 additions and 75 deletions.
  1. +32 −6 README.rdoc
  2. +1 −1 lib/{ruby-plc.rb → machines.rb}
  3. 0 lib/{ruby-plc → machines}/etc/notify.rb
  4. +1 −1 lib/{ruby-plc → machines}/io/io_access.rb
  5. +1 −1 lib/{ruby-plc → machines}/physical/interlocks.rb
  6. +1 −1 lib/{ruby-plc → machines}/physical/motor.rb
  7. +1 −1 lib/{ruby-plc → machines}/physical/valve.rb
  8. +1 −1 lib/{ruby-plc → machines}/sequences/choose_one.rb
  9. +1 −1 lib/{ruby-plc → machines}/sequences/in_parallel.rb
  10. +5 −5 lib/{ruby-plc → machines}/sequences/sequence.rb
  11. +2 −2 lib/{ruby-plc → machines}/sequences/stack_sequence.rb
  12. +2 −2 lib/{ruby-plc → machines}/sequences/step.rb
  13. +3 −3 lib/{ruby-plc → machines}/sequences/step_base.rb
  14. +1 −1 lib/{ruby-plc → machines}/sequences/wait_step.rb
  15. +3 −3 lib/{ruby-plc → machines}/timedomain/analog.rb
  16. +1 −1 lib/{ruby-plc → machines}/timedomain/analog_attr.rb
  17. +2 −2 lib/{ruby-plc → machines}/timedomain/analog_constant.rb
  18. +4 −4 lib/{ruby-plc → machines}/timedomain/analog_value.rb
  19. +2 −2 lib/{ruby-plc → machines}/timedomain/binary_op_discrete.rb
  20. +2 −2 lib/{ruby-plc → machines}/timedomain/discrete.rb
  21. +5 −5 lib/{ruby-plc → machines}/timedomain/discrete_base.rb
  22. +2 −2 lib/{ruby-plc → machines}/timedomain/discrete_sink.rb
  23. +2 −2 lib/{ruby-plc → machines}/timedomain/negated_discrete.rb
  24. +3 −3 lib/{ruby-plc → machines}/timedomain/pid.rb
  25. +3 −3 lib/{ruby-plc → machines}/timedomain/sampler.rb
  26. +1 −1 lib/{ruby-plc → machines}/timedomain/scheduler.rb
  27. +3 −3 lib/{ruby-plc → machines}/timedomain/timer.rb
  28. +2 −2 spec/analog_spec.rb
  29. +3 −3 spec/discrete_spec.rb
  30. +1 −1 spec/notify_spec.rb
  31. +2 −2 spec/scheduler_nowait_spec.rb
  32. +1 −1 spec/scheduler_spec.rb
  33. +1 −1 spec/spec_helper.rb
  34. +4 −4 spec/step_base_spec.rb
  35. +2 −2 spec/timer_spec.rb
View
@@ -1,22 +1,48 @@
-= ruby-plc
+= machines
-* FIX (url)
+* http://github.com/tallakt/machines
== DESCRIPTION:
-FIX (describe your package)
+A library for creating machine controllers (typically controlled by a PLC)
+in Ruby.
+
+The aim is not to replicate the ways you would work with a PLC, but to
+provide tools to implement these tasks using Ruby in a Ruby way.
+
+The Plan is to support the following aspects
+
+* Continuous signals discrete and analog with callback updates
+* Common timers
+* Possibility to run tests i accelelrated time
+* Machine state persistence in ActiveRecord - update code while running or have hot standbys
+* Rails like scripts to create machine skeletons and install them on their servers
+* State machines
+* Modbus communication with PLCs and remote IO stations, modbus server options
+
+Future functionality
+
+* OPC UA SOAP and binary conenctivity
== FEATURES/PROBLEMS:
-* FIX (list of features or problems)
+This is still a proof of concept stage library. Although I make an effort to
+test code automatically as I go along, there are currently no systems in use
+based on this library.
+
+Much functionality is still missing. The library structure will change
+frequently in future releases. Code is not commented - this will be
+performed if this turns out to be a viable concept.
== SYNOPSIS:
FIX (code sample of usage)
== REQUIREMENTS:
-* FIX (list of requirements)
+* rbtree
+
+...probably some more
== INSTALL:
@@ -45,4 +71,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,6 @@
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
-module RubyPlc
+module Machines
VERSION = '0.0.1'
end
File renamed without changes.
@@ -1,4 +1,4 @@
-module RubyPlc
+module Machines
module IO
module IOAccess
io_buffer = {}
@@ -1,4 +1,4 @@
-module RubyPlc
+module Machines
module Physical
class Interlock
def initialize
@@ -1,4 +1,4 @@
-module RubyPlc
+module Machines
module Physical
class Motor
attr_reader :name, :description, :interlocks
@@ -1,4 +1,4 @@
-module RubyPlc
+module Machines
module Physical
class Valve
attr_reader :name, :description, :interlocks
@@ -1,6 +1,6 @@
include 'ruby_plc/sequences/step_base'
-module RubyPlc
+module Machines
module Sequences
class ChooseOne
include StepBase
@@ -1,6 +1,6 @@
include 'ruby_plc/sequences/step_base'
-module RubyPlc
+module Machines
module Sequences
class InParallel
include StepBase
@@ -1,9 +1,9 @@
-include 'ruby-plc/sequences/step_base'
-include 'ruby-plc/timedomain/wait_step'
-include 'ruby-plc/timedomain/timer'
-include 'ruby-plc/timedomain/sequencer'
+include 'machines/sequences/step_base'
+include 'machines/timedomain/wait_step'
+include 'machines/timedomain/timer'
+include 'machines/timedomain/sequencer'
-mmodule RubyPlc
+mmodule Machines
module Sequences
class Sequence
include StepBase
@@ -1,7 +1,7 @@
include 'ruby_plc/sequences/step_base'
-include 'ruby-plc/sequences/sequence'
+include 'machines/sequences/sequence'
-module RubyPlc
+module Machines
module Sequences
class StackSequence
include StepBase
@@ -1,6 +1,6 @@
-require 'ruby-plc/sequences/step_base'
+require 'machines/sequences/step_base'
-module RubyPlc
+module Machines
module Sequences
class Step < StepBase
attr_reader :name
@@ -1,7 +1,7 @@
-require 'ruby-plc/etc/notify.rb'
-require 'ruby-plc/timedomain/discrete'
+require 'machines/etc/notify.rb'
+require 'machines/timedomain/discrete'
-module RubyPlc
+module Machines
module Sequences
class StepBase
extend Notify
@@ -1,4 +1,4 @@
-module RubyPlc
+module Machines
module Sequences
class WaitStep < Step
attr_accessor :timeout
@@ -1,7 +1,7 @@
-require 'ruby-plc/timedomain/timer'
-require 'ruby-plc/etc/notify'
+require 'machines/timedomain/timer'
+require 'machines/etc/notify'
-module RubyPlc
+module Machines
module TimeDomain
class Analog
extend Notify
@@ -1,4 +1,4 @@
-require 'ruby-plc/timedomain/analog.rb'
+require 'machines/timedomain/analog.rb'
class Object
def analog_attr(name)
@@ -1,6 +1,6 @@
-include 'ruby-plc/timedomain/analog'
+include 'machines/timedomain/analog'
-module RubyPlc
+module Machines
module Physical
class AnalogConstant < Analog
attr_reader :v
@@ -1,8 +1,8 @@
-include 'ruby-plc/timedomain/analog'
-include 'ruby-plc/timedomain/timer'
-include 'ruby-plc/etc/notify'
+include 'machines/timedomain/analog'
+include 'machines/timedomain/timer'
+include 'machines/etc/notify'
-module RubyPlc
+module Machines
module Physical
module AnalogValue < Analog
extend Notify
@@ -1,6 +1,6 @@
-require 'ruby-plc/timedomain/discrete_base'
+require 'machines/timedomain/discrete_base'
-module RubyPlc
+module Machines
module TimeDomain
class DiscreteBase #:nodoc:
# forward Declaration
@@ -1,6 +1,6 @@
-require 'ruby-plc/timedomain/discrete_base'
+require 'machines/timedomain/discrete_base'
-module RubyPlc
+module Machines
module TimeDomain
class Discrete < DiscreteBase
def initialize(vv = false)
@@ -1,9 +1,9 @@
-require 'ruby-plc/timedomain/timer'
-require 'ruby-plc/timedomain/binary_op_discrete'
-require 'ruby-plc/timedomain/negated_discrete'
-require 'ruby-plc/etc/notify'
+require 'machines/timedomain/timer'
+require 'machines/timedomain/binary_op_discrete'
+require 'machines/timedomain/negated_discrete'
+require 'machines/etc/notify'
-module RubyPlc
+module Machines
module TimeDomain
class DiscreteBase
extend Notify
@@ -1,6 +1,6 @@
-require 'ruby-plc/timedomain/discrete_base'
+require 'machines/timedomain/discrete_base'
-module RubyPlc
+module Machines
module TimeDomain
class DiscreteSink < DiscreteBase
attr_reader :source
@@ -1,6 +1,6 @@
-require 'ruby-plc/timedomain/discrete_base'
+require 'machines/timedomain/discrete_base'
-module RubyPlc
+module Machines
module TimeDomain
class DiscreteBase #:nodoc:
# forward Declaration
@@ -1,7 +1,7 @@
-require 'ruby-plc/timedomain/sampler.rb'
-require 'ruby-plc/timedomain/analog_attr.rb'
+require 'machines/timedomain/sampler.rb'
+require 'machines/timedomain/analog_attr.rb'
-module RubyPlc
+module Machines
module Physical
class PID
analog_attr :p, :i, :d, :sample_time, :out_max, :out_min, :setpoint, :input
@@ -1,7 +1,7 @@
-include 'ruby-plc/etc/notify'
-include 'ruby-plc/timedomain/sequencer'
+include 'machines/etc/notify'
+include 'machines/timedomain/sequencer'
-module RubyPlc
+module Machines
module TimeDomain
# The Sample class will notify all listeners to the #on_sample function
@@ -1,7 +1,7 @@
require 'rbtree'
require 'monitor'
-module RubyPlc
+module Machines
module TimeDomain
class Scheduler
class Entry
@@ -1,7 +1,7 @@
-require 'ruby-plc/timedomain/scheduler'
-require 'ruby-plc/etc/notify'
+require 'machines/timedomain/scheduler'
+require 'machines/etc/notify'
-module RubyPlc
+module Machines
module TimeDomain
class Timer
extend Notify
View
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/timedomain/analog'
+require 'machines/timedomain/analog'
-include RubyPlc::TimeDomain
+include Machines::TimeDomain
describe 'Analog signals' do
View
@@ -1,8 +1,8 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/timedomain/discrete'
-require 'ruby-plc/timedomain/discrete_sink'
+require 'machines/timedomain/discrete'
+require 'machines/timedomain/discrete_sink'
-include RubyPlc::TimeDomain
+include Machines::TimeDomain
describe 'Discrete signals' do
View
@@ -1,5 +1,5 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/etc/notify.rb'
+require 'machines/etc/notify.rb'
class NotifyTestEmpty
extend Notify
@@ -1,9 +1,9 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/timedomain/scheduler.rb'
+require 'machines/timedomain/scheduler.rb'
require 'benchmark'
require 'timeout'
-include RubyPlc::TimeDomain
+include Machines::TimeDomain
describe Scheduler do
before(:each) do
View
@@ -1,5 +1,5 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/timedomain/scheduler.rb'
+require 'machines/timedomain/scheduler.rb'
require 'benchmark'
require 'timeout'
View
@@ -7,4 +7,4 @@
end
$:.unshift(File.dirname(__FILE__) + '/../lib')
-require 'ruby-plc'
+require 'machines'
View
@@ -1,9 +1,9 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/sequences/step_base'
-require 'ruby-plc/sequences/step'
+require 'machines/sequences/step_base'
+require 'machines/sequences/step'
-include RubyPlc::Sequences
-include RubyPlc::TimeDomain
+include Machines::Sequences
+include Machines::TimeDomain
describe StepBase do
before(:each) do
View
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
-require 'ruby-plc/timedomain/timer'
+require 'machines/timedomain/timer'
-include RubyPlc::TimeDomain
+include Machines::TimeDomain
describe Timer do
before(:each) do

0 comments on commit c25906b

Please sign in to comment.