Method: Cosmos::WatermarkProcessor#call
- Defined in:
- lib/cosmos/processors/watermark_processor.rb
#call(packet, buffer) ⇒ Object
Run watermarks on the item
See Processor#call
35 36 37 38 39 40 41 |
# File 'lib/cosmos/processors/watermark_processor.rb', line 35 def call(packet, buffer) value = packet.read(@item_name, @value_type, buffer) high_water = @results[:HIGH_WATER] @results[:HIGH_WATER] = value if !high_water or value > high_water low_water = @results[:LOW_WATER] @results[:LOW_WATER] = value if !low_water or value < low_water end |