refactored ECTimeSeriesSegment to generic TimeSeriesSegment
implemented data retrieval from database and TCP sending