Class: SML::TupelEntry
- Inherits:
-
Object
- Object
- SML::TupelEntry
- Defined in:
- lib/ruby-sml/sml-tupelentry.rb
Instance Attribute Summary collapse
-
#scaler_ma ⇒ Object
Returns the value of attribute scaler_ma.
-
#scaler_pa ⇒ Object
Returns the value of attribute scaler_pa.
-
#scaler_r1 ⇒ Object
Returns the value of attribute scaler_r1.
-
#scaler_r2 ⇒ Object
Returns the value of attribute scaler_r2.
-
#scaler_r3 ⇒ Object
Returns the value of attribute scaler_r3.
-
#scaler_r4 ⇒ Object
Returns the value of attribute scaler_r4.
-
#seconds_index ⇒ Object
Returns the value of attribute seconds_index.
-
#server_id ⇒ Object
Returns the value of attribute server_id.
-
#signature_ma_r2_r3 ⇒ Object
Returns the value of attribute signature_ma_r2_r3.
-
#signature_pa_r1_r4 ⇒ Object
Returns the value of attribute signature_pa_r1_r4.
-
#status ⇒ Object
Returns the value of attribute status.
-
#unit_ma ⇒ Object
Returns the value of attribute unit_ma.
-
#unit_pa ⇒ Object
Returns the value of attribute unit_pa.
-
#unit_r1 ⇒ Object
Returns the value of attribute unit_r1.
-
#unit_r2 ⇒ Object
Returns the value of attribute unit_r2.
-
#unit_r3 ⇒ Object
Returns the value of attribute unit_r3.
-
#unit_r4 ⇒ Object
Returns the value of attribute unit_r4.
-
#value_ma ⇒ Object
Returns the value of attribute value_ma.
-
#value_pa ⇒ Object
Returns the value of attribute value_pa.
-
#value_r1 ⇒ Object
Returns the value of attribute value_r1.
-
#value_r2 ⇒ Object
Returns the value of attribute value_r2.
-
#value_r3 ⇒ Object
Returns the value of attribute value_r3.
-
#value_r4 ⇒ Object
Returns the value of attribute value_r4.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(server_id, seconds_index, status, unit_pa, scaler_pa, value_pa, unit_r1, scaler_r1, value_r1, unit_r4, scaler_r4, value_r4, signature_pa_r1_r4, unit_ma, scaler_ma, value_ma, unit_r2, scaler_r2, value_r2, unit_r3, scaler_r3, value_r3, signature_ma_r2_r3) ⇒ TupelEntry
constructor
A new instance of TupelEntry.
- #to_a ⇒ Object
Constructor Details
#initialize(server_id, seconds_index, status, unit_pa, scaler_pa, value_pa, unit_r1, scaler_r1, value_r1, unit_r4, scaler_r4, value_r4, signature_pa_r1_r4, unit_ma, scaler_ma, value_ma, unit_r2, scaler_r2, value_r2, unit_r3, scaler_r3, value_r3, signature_ma_r2_r3) ⇒ TupelEntry
Returns a new instance of TupelEntry.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 9 def initialize(server_id, seconds_index, status, unit_pa, scaler_pa, value_pa, unit_r1, scaler_r1, value_r1, unit_r4, scaler_r4, value_r4, signature_pa_r1_r4, unit_ma, scaler_ma, value_ma, unit_r2, scaler_r2, value_r2, unit_r3, scaler_r3, value_r3, signature_ma_r2_r3) @server_id = server_id @seconds_index = seconds_index @status = status @unit_pa = unit_pa @scaler_pa = scaler_pa @value_pa = value_pa @unit_r1 = unit_r1 @scaler_r1 = scaler_r1 @value_r1 = value_r1 @unit_r4 = unit_r4 @scaler_r4 = scaler_r4 @value_r4 = value_r4 @signature_pa_r1_r4 = signature_pa_r1_r4 @unit_ma = unit_ma @scaler_ma = scaler_ma @value_ma = value_ma @unit_r2 = unit_r2 @scaler_r2 = scaler_r2 @value_r2 = value_r2 @unit_r3 = unit_r3 @scaler_r3 = scaler_r3 @value_r3 = value_r3 @signature_ma_r2_r3 = signature_ma_r2_r3 end |
Instance Attribute Details
#scaler_ma ⇒ Object
Returns the value of attribute scaler_ma.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def scaler_ma @scaler_ma end |
#scaler_pa ⇒ Object
Returns the value of attribute scaler_pa.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def scaler_pa @scaler_pa end |
#scaler_r1 ⇒ Object
Returns the value of attribute scaler_r1.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def scaler_r1 @scaler_r1 end |
#scaler_r2 ⇒ Object
Returns the value of attribute scaler_r2.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def scaler_r2 @scaler_r2 end |
#scaler_r3 ⇒ Object
Returns the value of attribute scaler_r3.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def scaler_r3 @scaler_r3 end |
#scaler_r4 ⇒ Object
Returns the value of attribute scaler_r4.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def scaler_r4 @scaler_r4 end |
#seconds_index ⇒ Object
Returns the value of attribute seconds_index.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def seconds_index @seconds_index end |
#server_id ⇒ Object
Returns the value of attribute server_id.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def server_id @server_id end |
#signature_ma_r2_r3 ⇒ Object
Returns the value of attribute signature_ma_r2_r3.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def signature_ma_r2_r3 @signature_ma_r2_r3 end |
#signature_pa_r1_r4 ⇒ Object
Returns the value of attribute signature_pa_r1_r4.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def signature_pa_r1_r4 @signature_pa_r1_r4 end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def status @status end |
#unit_ma ⇒ Object
Returns the value of attribute unit_ma.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def unit_ma @unit_ma end |
#unit_pa ⇒ Object
Returns the value of attribute unit_pa.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def unit_pa @unit_pa end |
#unit_r1 ⇒ Object
Returns the value of attribute unit_r1.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def unit_r1 @unit_r1 end |
#unit_r2 ⇒ Object
Returns the value of attribute unit_r2.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def unit_r2 @unit_r2 end |
#unit_r3 ⇒ Object
Returns the value of attribute unit_r3.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def unit_r3 @unit_r3 end |
#unit_r4 ⇒ Object
Returns the value of attribute unit_r4.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def unit_r4 @unit_r4 end |
#value_ma ⇒ Object
Returns the value of attribute value_ma.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def value_ma @value_ma end |
#value_pa ⇒ Object
Returns the value of attribute value_pa.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def value_pa @value_pa end |
#value_r1 ⇒ Object
Returns the value of attribute value_r1.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def value_r1 @value_r1 end |
#value_r2 ⇒ Object
Returns the value of attribute value_r2.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def value_r2 @value_r2 end |
#value_r3 ⇒ Object
Returns the value of attribute value_r3.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def value_r3 @value_r3 end |
#value_r4 ⇒ Object
Returns the value of attribute value_r4.
7 8 9 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 7 def value_r4 @value_r4 end |
Class Method Details
.construct(array_rep) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 43 def self.construct(array_rep) return nil if array_rep.nil? server_id = array_rep.shift seconds_index = SML::Time.construct(array_rep.shift) status = array_rep.shift array_rep.shift unit_pa = array_rep.shift array_rep.shift scaler_pa = array_rep.shift array_rep.shift value_pa = array_rep.shift array_rep.shift unit_r1 = array_rep.shift array_rep.shift scaler_r1 = array_rep.shift array_rep.shift value_r1 = array_rep.shift array_rep.shift unit_r4 = array_rep.shift array_rep.shift scaler_r4 = array_rep.shift array_rep.shift value_r4 = array_rep.shift array_rep.shift signature_pa_r1_r4 = array_rep.shift unit_ma = array_rep.shift array_rep.shift scaler_ma = array_rep.shift array_rep.shift value_ma = array_rep.shift array_rep.shift unit_r2 = array_rep.shift array_rep.shift scaler_r2 = array_rep.shift array_rep.shift value_r2 = array_rep.shift array_rep.shift unit_r3 = array_rep.shift array_rep.shift scaler_r3 = array_rep.shift array_rep.shift value_r3 = array_rep.shift array_rep.shift signature_ma_r2_r3 = array_rep.shift return nil if seconds_index.nil? return SML::TupelEntry.new(server_id, seconds_index, status, unit_pa, scaler_pa, value_pa, unit_r1, scaler_r1, value_r1, unit_r4, scaler_r4, value_r4, signature_pa_r1_r4, unit_ma, scaler_ma, value_ma, unit_r2, scaler_r2, value_r2, unit_r3, scaler_r3, value_r3, signature_ma_r2_r3) end |
Instance Method Details
#to_a ⇒ Object
99 100 101 |
# File 'lib/ruby-sml/sml-tupelentry.rb', line 99 def to_a return [] << server_id << seconds_index.to_a << status << :uint64 << unit_pa << :uint8 << scaler_pa << :int8 << value_pa << :int64 << unit_r1 << :uint8 << scaler_r1 << :int8 << value_r1 << :int64 << unit_r4 << :uint8 << scaler_r4 << :int8 << value_r4 << :int64 << signature_pa_r1_r4 << unit_ma << :uint8 << scaler_ma << :int8 << value_ma << :int64 << unit_r2 << :uint8 << scaler_r2 << :int8 << value_r2 << :int64 << unit_r3 << :uint8 << scaler_r3 << :int8 << value_r3 << :int64 << signature_ma_r2_r3 end |