aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2017-07-15 17:57:18 +0200
committerMarc Schink <swo-dev@marcschink.de>2017-07-19 17:26:28 +0200
commitd6165930d7371d523a44c1d86042f1b1ac4ab092 (patch)
treedaa3a8f9b419ddfbe05c880314114412e1e976d7
parent70eb1f47cec96a768bf5645d6672b4dc9edb84e6 (diff)
bindings: Expose #defines
-rw-r--r--bindings/cxx/libswocxx.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/bindings/cxx/libswocxx.h b/bindings/cxx/libswocxx.h
index 0fa4974..408452a 100644
--- a/bindings/cxx/libswocxx.h
+++ b/bindings/cxx/libswocxx.h
@@ -83,6 +83,9 @@ enum class DecoderFlags {
EOS = LIBSWO_DF_EOS
};
+const char LOG_DOMAIN_DEFAULT[] = LIBSWO_LOG_DOMAIN_DEFAULT;
+const unsigned int LOG_DOMAIN_MAX_LENGTH = LIBSWO_LOG_DOMAIN_MAX_LENGTH;
+
class LIBSWO_API Error : public exception
{
public:
@@ -111,6 +114,8 @@ public:
virtual ~PayloadPacket(void) = 0;
const vector<uint8_t> get_data(void) const;
+
+ static const unsigned int MAX_SIZE = LIBSWO_MAX_PAYLOAD_SIZE;
};
typedef int (*DecoderCallback)(const Packet &packet, void *user_data);
@@ -202,6 +207,8 @@ public:
uint32_t get_value(void) const;
virtual const string to_string(void) const = 0;
+
+ static const unsigned int MAX_ADDRESS = LIBSWO_MAX_SOURCE_ADDRESS;
};
class LIBSWO_API Instrumentation : public SourcePacket
@@ -331,6 +338,8 @@ public:
void feed(const uint8_t *data, size_t length);
void decode(DecoderFlags flags = DecoderFlags::NONE);
+
+ static const size_t DEFAULT_BUFFER_SIZE = LIBSWO_DEFAULT_BUFFER_SIZE;
private:
struct libswo_context *_context;
DecoderCallbackHelper _decoder_callback;