Commit c2d87a30 authored by Jan Kotanski's avatar Jan Kotanski
Browse files

New upstream version 20.09.1

parent 00cf881e
Metadata-Version: 1.0
Name: asapo_consumer
Version: 20.09.0
Version: 20.09.1
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
......
This diff is collapsed.
......@@ -11,14 +11,21 @@
namespace asapo {
class JsonStringParser;
uint64_t NanosecsEpochFromTimePoint(std::chrono::system_clock::time_point);
uint64_t EpochNanosecsFromNow();
std::chrono::system_clock::time_point TimePointfromNanosec(uint64_t nanoseconds_from_epoch);
std::string IsoDateFromEpochNanosecs(uint64_t time_from_epoch_nanosec);
uint64_t NanosecsEpochFromISODate(std::string date_time);
uint64_t EpochNanosecsFromNow();
bool TimeFromJson(const JsonStringParser& parser, const std::string& name, std::chrono::system_clock::time_point* val);
class FileInfo {
public:
std::string name;
std::chrono::system_clock::time_point modify_date;
std::chrono::system_clock::time_point timestamp;
uint64_t size{0};
uint64_t id{0};
std::string source;
......@@ -29,16 +36,22 @@ class FileInfo {
std::string FullName(const std::string& base_path) const;
};
struct StreamInfo {
uint64_t last_id{0};
std::string Json() const;
bool SetFromJson(const std::string& json_string);
std::string name;
std::chrono::system_clock::time_point timestamp_created;
std::chrono::system_clock::time_point timestamp_lastentry;
std::string Json(bool add_last) const;
bool SetFromJson(const std::string& json_string,bool read_last);
};
using StreamInfos = std::vector<StreamInfo>;
inline bool operator==(const FileInfo& lhs, const FileInfo& rhs) {
return (lhs.name == rhs.name &&
lhs.id == rhs.id &&
lhs.modify_date == rhs.modify_date &&
lhs.timestamp == rhs.timestamp &&
lhs.size == rhs.size);
}
......@@ -53,7 +66,6 @@ struct DataSet {
uint64_t id;
FileInfos content;
bool SetFromJson(const std::string& json_string);
};
using SubDirList = std::vector<std::string>;
......
......@@ -23,6 +23,7 @@ enum Opcode : uint8_t {
kOpcodeTransferData,
kOpcodeTransferSubsetData,
kOpcodeStreamInfo,
kOpcodeLastStream,
kOpcodeGetBufferData,
kOpcodeAuthorize,
kOpcodeTransferMetaData,
......
......@@ -6,7 +6,7 @@
namespace asapo {
const char kVersion[] = "20.09.0";
const char kVersion[] = "20.09.1";
inline void ExitAfterPrintVersionIfNeeded(std::string prefix,int argc, char* argv[]) {
if (argc == 2 && strcmp(argv[1], "-v") == 0) {
......
......@@ -4,6 +4,7 @@
#include <memory>
#include <string>
#include <vector>
#include <chrono>
#include "common/data_structs.h"
#include "common/error.h"
......@@ -73,8 +74,8 @@ class DataBroker {
*/
virtual NetworkConnectionType CurrentConnectionType() const = 0;
//! Set list of substreams
virtual std::vector<std::string> GetSubstreamList(Error* err) = 0;
//! Get list of substreams, set from to "" to get all substreams
virtual StreamInfos GetSubstreamList(std::string from, Error* err) = 0;
//! Get current number of datasets
/*!
......
No preview for this file type
No preview for this file type
......@@ -15,7 +15,7 @@ ext_modules = [
setup(
name ="asapo_consumer",
ext_modules = ext_modules,
version = "20.09.0",
setup_requires=["numpy"],
install_requires=["numpy"]
version = "20.09.1",
setup_requires=["numpy>=", "cython>=0.28"],
install_requires=["numpy>="]
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment