Progress is slow, but I'm used to that. Currently working on an application object, one with the promise of burgeoning into a set of useful, numerous, and fairly large objects. This class, CSI-Table perhaps, is to represent a structured data file containing records at a regular interval. As such, the object/class will inherit, not contain, the TimeSeries-Interval class. It's a fairly simple class, as each of the data files represented is fixed in format; i.e., non-some-cs-term-that-I-can't-think-of-able. Methods will handle 1) initializing the object and 2) adding data to the object, in 3) addition to the retrieval methods provided by the super class.
I'm still working in Perl (not yet bold/knowledgable enough to jump to Ruby...), so using my ThinObject.pm module. I need to figure out how to pass off data to the store() method of the object. One thought was to do this using a pipe connecting to a forked 'store' process, but that's likely not really called for. Instead, I can probably just accumulate the data-to-be-stored, then when the source method (e.g., data-from-stream) is done it just execs the store method with the same data. Either way, I need to have a streamable input to the store method.
Currently (I think), the store method is set up to read data records/lines on stdin but to assume current time for the timestamp. In this case, which will be a pretty common one, the data itself is timestamped, so I need to have store read the timestamp on each record.
The actual source data lines include a timestamp, but that's in an application-specific (though common enough) format which I can transform into the "native" YEAR-SECONDS form that the TimeSeries objects deal in. I could therefore transform the orginal data from:
app_timestamp,data...
to:
year,seconds,data...
This should work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Progress is slow, but I'm used to that. Currently working on an application object, one with the promise of burgeoning into a set of useful, numerous, and fairly large objects. This class, CSI-Table perhaps, is to represent a structured data file containing records at a regular interval. As such, the object/class will inherit, not contain, the TimeSeries-Interval class. It's a fairly simple class, as each of the data files represented is fixed in format; i.e., non-some-cs-term-that-I-can't-think-of-able. Methods will handle 1) initializing the object and 2) adding data to the object, in 3) addition to the retrieval methods provided by the super class.
I'm still working in Perl (not yet bold/knowledgable enough to jump to Ruby...), so using my ThinObject.pm module. I need to figure out how to pass off data to the store() method of the object. One thought was to do this using a pipe connecting to a forked 'store' process, but that's likely not really called for. Instead, I can probably just accumulate the data-to-be-stored, then when the source method (e.g., data-from-stream) is done it just execs the store method with the same data. Either way, I need to have a streamable input to the store method.
Currently (I think), the store method is set up to read data records/lines on stdin but to assume current time for the timestamp. In this case, which will be a pretty common one, the data itself is timestamped, so I need to have store read the timestamp on each record.
The actual source data lines include a timestamp, but that's in an application-specific (though common enough) format which I can transform into the "native" YEAR-SECONDS form that the TimeSeries objects deal in. I could therefore transform the orginal data from:
app_timestamp,data...
to:
year,seconds,data...
This should work.