Class: Dtn::Lookups::Historical::TickDatapoint

Inherits:
Tick show all
Defined in:
lib/dtn/lookups/historical/tick_datapoint.rb

Overview

Tick datapoint requests

Constant Summary collapse

TEMPLATE =
"HTX,%<symbol>s,%<max_datapoints>d,%<data_direction>d,%<id>d,%<datapoints_per_send>d"

Constants inherited from Base

Base::DEFAULT_BEGIN_FILTER_TIME, Base::DEFAULT_DATAPOINTS_PER_SEND, Base::DEFAULT_DATA_DIRECTION, Base::DEFAULT_END_FILTER_TIME, Base::DEFAULT_MAX_DATAPOINTS

Constants included from Concerns::Validation

Concerns::Validation::DATE_FORMAT, Concerns::Validation::DATE_TIME_FORMAT, Concerns::Validation::DEFAULT_INTERVAL_TYPE, Concerns::Validation::MAX_INT16

Constants inherited from Request

Request::END_OF_MESSAGE_CHARACTERS, Request::NO_DATA_CHARACTERS, Request::PORT, Request::SYNTAX_ERROR_CHARACTERS

Instance Attribute Summary

Attributes inherited from Request

#combined_options

Instance Method Summary collapse

Methods inherited from Tick

#expected_messages_class

Methods inherited from Request

call

Methods included from Concerns::Id

#id

Instance Method Details

#call(symbol:, **options) ⇒ Object

Retrieves up to [MaxDatapoints] number of ticks for the specified [Symbol].

Example message

HTX,[Symbol],[MaxDatapoints],[DataDirection],[RequestID],[DatapointsPerSend]<CR><LF>


16
17
18
19
20
# File 'lib/dtn/lookups/historical/tick_datapoint.rb', line 16

def call(symbol:, **options)
  self.combined_options = defaults(**options).merge(symbol: validate_symbol(symbol))

  super
end