Loading Makefile +5 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ LIB_DEPS = \ $(LIB_DIR)/kinetic_message.h \ $(LIB_DIR)/kinetic_logger.h \ $(LIB_DIR)/kinetic_hmac.h \ $(LIB_DIR)/kinetic_controller.h \ $(LIB_DIR)/kinetic_connection.h \ $(LIB_DIR)/kinetic_types_internal.h \ $(PUB_INC)/kinetic_types.h \ Loading @@ -65,6 +66,7 @@ LIB_OBJS = \ $(OUT_DIR)/kinetic_message.o \ $(OUT_DIR)/kinetic_logger.o \ $(OUT_DIR)/kinetic_hmac.o \ $(OUT_DIR)/kinetic_controller.o \ $(OUT_DIR)/kinetic_connection.o \ $(OUT_DIR)/kinetic_types_internal.o \ $(OUT_DIR)/kinetic_types.o \ Loading @@ -78,7 +80,7 @@ all: clean test default run clean: bundle exec rake clobber rm -rf $(BIN_DIR)/* $(OUT_DIR)/*.o *.core rm -rf $(BIN_DIR)/* $(OUT_DIR)/*.o *.core *.log git submodule update --init .PHONY: clean Loading Loading @@ -107,6 +109,8 @@ $(OUT_DIR)/kinetic_logger.o: $(LIB_DIR)/kinetic_logger.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_hmac.o: $(LIB_DIR)/kinetic_hmac.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_controller.o: $(LIB_DIR)/kinetic_controller.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_connection.o: $(LIB_DIR)/kinetic_connection.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_types_internal.o: $(LIB_DIR)/kinetic_types_internal.c $(LIB_DEPS) Loading config/Doxyfile_libdev 0 → 100644 +2310 −0 File added.Preview size limit exceeded, changes collapsed. Show changes config/project.yml +1 −1 Original line number Diff line number Diff line --- :project: :use_exceptions: true :use_exceptions: false :use_test_preprocessor: true :use_deep_dependencies: true :build_root: build Loading include/kinetic_client.h +21 −0 Original line number Diff line number Diff line Loading @@ -140,4 +140,25 @@ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, KineticKeyRange* range, ByteBufferArray* keys, KineticCompletionClosure* closure); /** * @brief Executes a GETLOG command to retrive a set of keys in the range * specified range from the Kinetic Device * * @param handle KineticSessionHandle for a connected session * @param type KineticLogDataType specifying data type to retrieve. * @param info KineticDeviceInfo pointer, which will be assigned to * a dynamically allocated structure populated with * the requested data, if successful. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * * @return Returns 0 upon succes, -1 or the Kinetic status code * upon failure */ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, KineticDeviceInfo_Type type, KineticDeviceInfo** info, KineticCompletionClosure* closure); #endif // _KINETIC_CLIENT_H include/kinetic_types.h +101 −0 Original line number Diff line number Diff line Loading @@ -203,4 +203,105 @@ typedef struct _KineticKeyRange { bool reverse; } KineticKeyRange; // Kinetic GetLog data types typedef enum { KINETIC_DEVICE_INFO_TYPE_UTILIZATIONS = 0, KINETIC_DEVICE_INFO_TYPE_TEMPERATURES, KINETIC_DEVICE_INFO_TYPE_CAPACITIES, KINETIC_DEVICE_INFO_TYPE_CONFIGURATION, KINETIC_DEVICE_INFO_TYPE_STATISTICS, KINETIC_DEVICE_INFO_TYPE_MESSAGES, KINETIC_DEVICE_INFO_TYPE_LIMITS, KINETIC_DEVICE_INFO_TYPE_DEVICE, } KineticDeviceInfo_Type; typedef struct { char* name; float value; } KineticDeviceInfo_Utilization; typedef struct { char* name; float current; float minimum; float maximum; float target; } KineticDeviceInfo_Temperature; typedef struct { uint64_t nominalCapacityInBytes; float portionFull; } KineticDeviceInfo_Capacity; typedef struct { char* name; ByteArray MAC; ByteArray ipv4Address; ByteArray ipv6Address; } KineticDeviceInfo_Interface; typedef struct { char* vendor; char* model; ByteArray serialNumber; ByteArray worldWideName; char* version; char* compilationDate; char* sourceHash; char* protocolVersion; char* protocolCompilationDate; char* protocolSourceHash; KineticDeviceInfo_Interface** interfaces; size_t numInterfaces; int32_t port; int32_t tlsPort; } KineticDeviceInfo_Configuration; typedef enum { KINETIC_MESSAGE_TYPE_GET = 0, KINETIC_MESSAGE_TYPE_PUT, KINETIC_MESSAGE_TYPE_DELETE, KINETIC_MESSAGE_TYPE_GETNEXT, KINETIC_MESSAGE_TYPE_GETPREVIOUS, KINETIC_MESSAGE_TYPE_GETKEYRANGE, KINETIC_MESSAGE_TYPE_GETVERSION, KINETIC_MESSAGE_TYPE_SETUP, KINETIC_MESSAGE_TYPE_GETLOG, KINETIC_MESSAGE_TYPE_SECURITY, KINETIC_MESSAGE_TYPE_PEER2PEERPUSH, KINETIC_MESSAGE_TYPE_NOOP, KINETIC_MESSAGE_TYPE_FLUSHALLDATA, KINETIC_MESSAGE_TYPE_PINOP, KINETIC_MESSAGE_TYPE_MEDIASCAN, KINETIC_MESSAGE_TYPE_MEDIAOPTIMIZE, } KineticMessageType; typedef struct { KineticMessageType messageType; uint64_t count; uint64_t bytes; } KineticDeviceInfo_Statistics; typedef struct { uint32_t maxKeySize; uint32_t maxValueSize; uint32_t maxVersionSize; uint32_t maxTagSize; uint32_t maxConnections; uint32_t maxOutstandingReadRequests; uint32_t maxOutstandingWriteRequests; uint32_t maxMessageSize; uint32_t maxKeyRangeCount; uint32_t maxIdentityCount; uint32_t maxPinSize; } KineticDeviceInfo_Limits; typedef struct { ByteArray name; } KineticDeviceInfo_Device; typedef struct { KineticDeviceInfo_Utilization** utilizations; size_t numUtilizations; KineticDeviceInfo_Temperature** temperatures; size_t numTemperatures; KineticDeviceInfo_Capacity* capacity; KineticDeviceInfo_Configuration* configuration; KineticDeviceInfo_Statistics** statistics; size_t numStatistics; ByteArray messages; KineticDeviceInfo_Limits* limits; KineticDeviceInfo_Device* device; } KineticDeviceInfo; #endif // _KINETIC_TYPES_H Loading
Makefile +5 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ LIB_DEPS = \ $(LIB_DIR)/kinetic_message.h \ $(LIB_DIR)/kinetic_logger.h \ $(LIB_DIR)/kinetic_hmac.h \ $(LIB_DIR)/kinetic_controller.h \ $(LIB_DIR)/kinetic_connection.h \ $(LIB_DIR)/kinetic_types_internal.h \ $(PUB_INC)/kinetic_types.h \ Loading @@ -65,6 +66,7 @@ LIB_OBJS = \ $(OUT_DIR)/kinetic_message.o \ $(OUT_DIR)/kinetic_logger.o \ $(OUT_DIR)/kinetic_hmac.o \ $(OUT_DIR)/kinetic_controller.o \ $(OUT_DIR)/kinetic_connection.o \ $(OUT_DIR)/kinetic_types_internal.o \ $(OUT_DIR)/kinetic_types.o \ Loading @@ -78,7 +80,7 @@ all: clean test default run clean: bundle exec rake clobber rm -rf $(BIN_DIR)/* $(OUT_DIR)/*.o *.core rm -rf $(BIN_DIR)/* $(OUT_DIR)/*.o *.core *.log git submodule update --init .PHONY: clean Loading Loading @@ -107,6 +109,8 @@ $(OUT_DIR)/kinetic_logger.o: $(LIB_DIR)/kinetic_logger.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_hmac.o: $(LIB_DIR)/kinetic_hmac.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_controller.o: $(LIB_DIR)/kinetic_controller.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_connection.o: $(LIB_DIR)/kinetic_connection.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) $(OUT_DIR)/kinetic_types_internal.o: $(LIB_DIR)/kinetic_types_internal.c $(LIB_DEPS) Loading
config/Doxyfile_libdev 0 → 100644 +2310 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
config/project.yml +1 −1 Original line number Diff line number Diff line --- :project: :use_exceptions: true :use_exceptions: false :use_test_preprocessor: true :use_deep_dependencies: true :build_root: build Loading
include/kinetic_client.h +21 −0 Original line number Diff line number Diff line Loading @@ -140,4 +140,25 @@ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, KineticKeyRange* range, ByteBufferArray* keys, KineticCompletionClosure* closure); /** * @brief Executes a GETLOG command to retrive a set of keys in the range * specified range from the Kinetic Device * * @param handle KineticSessionHandle for a connected session * @param type KineticLogDataType specifying data type to retrieve. * @param info KineticDeviceInfo pointer, which will be assigned to * a dynamically allocated structure populated with * the requested data, if successful. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * * @return Returns 0 upon succes, -1 or the Kinetic status code * upon failure */ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, KineticDeviceInfo_Type type, KineticDeviceInfo** info, KineticCompletionClosure* closure); #endif // _KINETIC_CLIENT_H
include/kinetic_types.h +101 −0 Original line number Diff line number Diff line Loading @@ -203,4 +203,105 @@ typedef struct _KineticKeyRange { bool reverse; } KineticKeyRange; // Kinetic GetLog data types typedef enum { KINETIC_DEVICE_INFO_TYPE_UTILIZATIONS = 0, KINETIC_DEVICE_INFO_TYPE_TEMPERATURES, KINETIC_DEVICE_INFO_TYPE_CAPACITIES, KINETIC_DEVICE_INFO_TYPE_CONFIGURATION, KINETIC_DEVICE_INFO_TYPE_STATISTICS, KINETIC_DEVICE_INFO_TYPE_MESSAGES, KINETIC_DEVICE_INFO_TYPE_LIMITS, KINETIC_DEVICE_INFO_TYPE_DEVICE, } KineticDeviceInfo_Type; typedef struct { char* name; float value; } KineticDeviceInfo_Utilization; typedef struct { char* name; float current; float minimum; float maximum; float target; } KineticDeviceInfo_Temperature; typedef struct { uint64_t nominalCapacityInBytes; float portionFull; } KineticDeviceInfo_Capacity; typedef struct { char* name; ByteArray MAC; ByteArray ipv4Address; ByteArray ipv6Address; } KineticDeviceInfo_Interface; typedef struct { char* vendor; char* model; ByteArray serialNumber; ByteArray worldWideName; char* version; char* compilationDate; char* sourceHash; char* protocolVersion; char* protocolCompilationDate; char* protocolSourceHash; KineticDeviceInfo_Interface** interfaces; size_t numInterfaces; int32_t port; int32_t tlsPort; } KineticDeviceInfo_Configuration; typedef enum { KINETIC_MESSAGE_TYPE_GET = 0, KINETIC_MESSAGE_TYPE_PUT, KINETIC_MESSAGE_TYPE_DELETE, KINETIC_MESSAGE_TYPE_GETNEXT, KINETIC_MESSAGE_TYPE_GETPREVIOUS, KINETIC_MESSAGE_TYPE_GETKEYRANGE, KINETIC_MESSAGE_TYPE_GETVERSION, KINETIC_MESSAGE_TYPE_SETUP, KINETIC_MESSAGE_TYPE_GETLOG, KINETIC_MESSAGE_TYPE_SECURITY, KINETIC_MESSAGE_TYPE_PEER2PEERPUSH, KINETIC_MESSAGE_TYPE_NOOP, KINETIC_MESSAGE_TYPE_FLUSHALLDATA, KINETIC_MESSAGE_TYPE_PINOP, KINETIC_MESSAGE_TYPE_MEDIASCAN, KINETIC_MESSAGE_TYPE_MEDIAOPTIMIZE, } KineticMessageType; typedef struct { KineticMessageType messageType; uint64_t count; uint64_t bytes; } KineticDeviceInfo_Statistics; typedef struct { uint32_t maxKeySize; uint32_t maxValueSize; uint32_t maxVersionSize; uint32_t maxTagSize; uint32_t maxConnections; uint32_t maxOutstandingReadRequests; uint32_t maxOutstandingWriteRequests; uint32_t maxMessageSize; uint32_t maxKeyRangeCount; uint32_t maxIdentityCount; uint32_t maxPinSize; } KineticDeviceInfo_Limits; typedef struct { ByteArray name; } KineticDeviceInfo_Device; typedef struct { KineticDeviceInfo_Utilization** utilizations; size_t numUtilizations; KineticDeviceInfo_Temperature** temperatures; size_t numTemperatures; KineticDeviceInfo_Capacity* capacity; KineticDeviceInfo_Configuration* configuration; KineticDeviceInfo_Statistics** statistics; size_t numStatistics; ByteArray messages; KineticDeviceInfo_Limits* limits; KineticDeviceInfo_Device* device; } KineticDeviceInfo; #endif // _KINETIC_TYPES_H