herald  2.0.0
fixed_payload_data_supplier.h
1 // Copyright 2020-2021 Herald Project Contributors
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #ifndef HERALD_FIXED_PAYLOAD_DATA_SUPPLIER_H
6 #define HERALD_FIXED_PAYLOAD_DATA_SUPPLIER_H
7 
8 #include "../payload_data_supplier.h"
9 #include "../../datatype/payload_timestamp.h"
10 
11 #include <optional>
12 #include <cstdint>
13 
14 namespace herald {
15 namespace payload {
16 namespace fixed {
17 
18 using namespace herald::datatype;
19 
20 using MYUINT32 = unsigned long;
21 
23 public:
24  FixedPayloadDataSupplier() = default;
25  virtual ~FixedPayloadDataSupplier() = default;
26 };
27 
29 public:
30  ConcreteFixedPayloadDataSupplierV1(std::uint16_t countryCode, std::uint16_t stateCode,
31  std::uint64_t clientId);
33 
34  PayloadData legacyPayload(const PayloadTimestamp timestamp, const Device& device);
35  PayloadData payload(const PayloadTimestamp timestamp, const Device& device);
36  PayloadData payload(const PayloadTimestamp timestamp);
37  PayloadData payload(const Data& data);
38 
39 private:
40  uint16_t country;
41  uint16_t state;
42  uint64_t clientIdentifier;
43 
44  PayloadData mPayload;
45 };
46 
47 }
48 }
49 }
50 
51 #endif
Generic abstraction of a particular local proximate device type.
Definition: device.h:27
The main data workhorse class of the Herald API.
Definition: data.h:33
Definition: payload_data.h:13
Definition: fixed_payload_data_supplier.h:28
Definition: fixed_payload_data_supplier.h:22
Contains all low-level Herald datatype implementations.
Definition: base64_string.h:14
Acts as a non-global memory arena for arbitrary classes.
Definition: aggregates.h:15
Definition: payload_timestamp.h:13