Class: OpenC3::ObjectWriteConversion
- Inherits:
-
ObjectReadConversion
- Object
- Conversion
- ObjectReadConversion
- OpenC3::ObjectWriteConversion
- Defined in:
- lib/openc3/conversions/object_write_conversion.rb
Instance Attribute Summary
Attributes inherited from Conversion
#converted_array_size, #converted_bit_size, #converted_type
Instance Method Summary collapse
-
#call(value, _packet, buffer) ⇒ Object
Perform the conversion on the value.
Methods inherited from ObjectReadConversion
#as_json, #initialize, #lookup_packet, #to_config, #to_s
Methods inherited from Conversion
#as_json, #initialize, #to_config, #to_s
Constructor Details
This class inherits a constructor from OpenC3::ObjectReadConversion
Instance Method Details
#call(value, _packet, buffer) ⇒ Object
Perform the conversion on the value.
29 30 31 32 33 34 35 36 |
# File 'lib/openc3/conversions/object_write_conversion.rb', line 29 def call(value, _packet, buffer) fill_packet = lookup_packet() fill_packet.restore_defaults() value.each do |key, write_value| fill_packet.write(key, write_value) end return fill_packet.buffer end |