repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
amelvill-umich/libbat
bat/pbat_file.h
#pragma once #include <string> #include "aggregation_tree.h" /* The PBATree file format is inspired by GLB, and consists of a header * followed by arrays containing the tree nodes, points, and their attributes. * The file prefix is the prefix for the bat files containing the data * for the leaves of the aggregatio...
amelvill-umich/libbat
bat/kd_node.h
<filename>bat/kd_node.h #pragma once #include <cstdint> #include <cstddef> #include "box.h" #pragma pack(push, 1) struct KdNode { union { // Interior node, splitting position along the axis float split_pos; // Leaf node, offset in 'primitive_indices' to its contained prims uint32_t...
amelvill-umich/libbat
util/plane.h
#pragma once #include <glm/glm.hpp> /* A plane is defined by its origin, and the half vectors * spanning the plane */ struct Plane { glm::vec3 origin; glm::vec3 half_vectors; Plane() = default; Plane(const glm::vec3 &origin, const glm::vec3 &half_vectors); };
amelvill-umich/libbat
bat/bat_file.h
#pragma once #include <string> #include "ba_tree.h" /* The BATree file format is inspired by GLB, and consists of a header * followed by arrays containing the tree nodes, points, and their attributes. * * Header: * json_header_size: uint64_t * json_header: [char...] * * The JSON header contains the following i...
amelvill-umich/libbat
parallel_io/bat_write.h
<filename>parallel_io/bat_write.h #pragma once #include <stdint.h> #include "bat_data_type.h" #ifdef __cplusplus extern "C" { #endif typedef void *BATParticleState; BATParticleState bat_io_allocate(void); void bat_io_free(BATParticleState state); void bat_io_set_positions(BATParticleState state, ...
amelvill-umich/libbat
util/borrowed_array.h
#pragma once #include <stdexcept> #include <vector> #include "abstract_array.h" template <typename T> class BorrowedArray : public AbstractArray<T> { T *array = nullptr; size_t sz = 0; public: BorrowedArray() = default; BorrowedArray(std::vector<T> &v) : array(v.data()), sz(v.size()) {} Borrowe...
amelvill-umich/libbat
bat/ba_tree.h
<reponame>amelvill-umich/libbat #pragma once #include <memory> #include <mutex> #include <ostream> #include <unordered_map> #include <vector> #include <parallel_hashmap/phmap.h> #include "abstract_array.h" #include "attribute.h" #include "ba_treelet.h" #include "box.h" #include "owned_array.h" #include "plane.h" #incl...
amelvill-umich/libbat
util/abstract_array.h
#pragma once #include <memory> template <typename T> class AbstractArray { public: virtual ~AbstractArray() = default; virtual const T &at(const size_t i) const { return *(data() + i); } virtual const T &operator[](const size_t i) const = 0; virtual const T *data() const = 0; v...
amelvill-umich/libbat
parallel_io/aggregator_assignment.h
#pragma once #include <vector> #include "aggregation_tree.h" #include "particle_data.h" struct AggregatorInfo { int aggregator_rank = -1; std::vector<int> clients; std::vector<int> client_particle_counts; // NOTE: this will only have data on rank 0, later we may want it also // on the aggregators ...
amelvill-umich/libbat
bat/attribute.h
<filename>bat/attribute.h<gh_stars>1-10 #pragma once #include <memory> #include <string> #include <glm/glm.hpp> #include <parallel_hashmap/phmap.h> #include "abstract_array.h" #include "data_type.h" #include "owned_array.h" struct AttributeDescription { std::string name; DTYPE data_type = UNKNOWN; glm::ve...
amelvill-umich/libbat
util/owned_array.h
#pragma once #include <array> #include <cstring> #include <stdexcept> #include <type_traits> #include <vector> #include "abstract_array.h" template <typename T> class OwnedArray : public AbstractArray<T> { public: std::vector<T> array; OwnedArray() = default; OwnedArray(const std::vector<T> &array) : ar...
amelvill-umich/libbat
bat/query_stats.h
<gh_stars>1-10 #pragma once #include <atomic> #include <ostream> struct QueryStats { std::atomic_size_t n_total_tested; std::atomic_size_t n_range_filtered; std::atomic_size_t n_map_filtered; std::atomic_size_t n_particles_tested; std::atomic_size_t n_particles_returned; std::atomic<uint32_t> ...
amelvill-umich/libbat
viewer/app_util.h
<reponame>amelvill-umich/libbat #pragma once #include <string> std::string get_base_path();
amelvill-umich/libbat
bat/aggregation_tree.h
#pragma once #include <iostream> #include <limits> #include <memory> #include <mutex> #include <vector> #include <parallel_hashmap/phmap.h> #include "abstract_array.h" #include "aggregation_kd_node.h" #include "attribute.h" #include "ba_tree.h" #include "box.h" #include "owned_array.h" struct WriteOptions { bool ...
amelvill-umich/libbat
util/byte_cursor.h
<gh_stars>1-10 #pragma once #include <cstddef> #include <cstdint> #include <cstring> struct ByteCursor { uint8_t *ptr = nullptr; size_t offset = 0; ByteCursor(uint8_t *ptr); ByteCursor() = default; uint8_t *position(); template <typename T> void write(const T *t, const size_t count); ...
amelvill-umich/libbat
viewer/gl_core_4_5.c
#include "gl_core_4_5.h" #include <stddef.h> #include <stdlib.h> #include <string.h> #if defined(__APPLE__) #include <dlfcn.h> static void *AppleGLGetProcAddress(const char *name) { static void *image = NULL; if (image == NULL) image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Curre...
amelvill-umich/libbat
viewer/imgui_impl_opengl3.h
<reponame>amelvill-umich/libbat // dear imgui: Renderer for OpenGL3 / OpenGL ES2 / OpenGL ES3 (modern OpenGL with shaders / // programmatic pipeline) This needs to be used along with a Platform Binding (e.g. GLFW, SDL, // Win32, custom..) (Note: We are using GL3W as a helper library to access OpenGL functions since // ...
amelvill-umich/libbat
util/box.h
<reponame>amelvill-umich/libbat<gh_stars>1-10 #pragma once #include <ostream> #include <glm/glm.hpp> enum AXIS { X = 0, Y = 1, Z = 2 }; #pragma pack(push, 1) struct Box { glm::vec3 lower, upper; Box(); Box(const glm::vec3 &lower, const glm::vec3 &upper); // vals should be [lo_x, lo_y, lo_z, hi_x, h...
amelvill-umich/libbat
util/file_mapping.h
#pragma once #include <memory> #include <string> #include <vector> #include "abstract_array.h" #ifdef _WIN32 #include <windows.h> #endif class FileData { public: virtual ~FileData() {} virtual const uint8_t *data() const = 0; virtual uint8_t *data() = 0; virtual size_t nbytes() const = 0; }; clas...
amelvill-umich/libbat
viewer/debug.h
<filename>viewer/debug.h #pragma once #include "gl_core_4_5.h" /* * Register the debug callback using the context capabilities to select between 4.3+ core debug * and ARB debug */ void register_debug_callback(); /* * Callbacks for core debug output and debug_output_arb to be selected * depending on the context ...
amelvill-umich/libbat
util/profiling.h
<gh_stars>1-10 #pragma once #include <chrono> #ifdef __linux__ #include <sys/resource.h> #include <sys/time.h> #include <sys/times.h> #include <sys/types.h> #include <unistd.h> #endif struct ProfilingPoint { #ifdef __linux__ rusage usage; #endif std::chrono::steady_clock::time_point time; ProfilingPoint(...
amelvill-umich/libbat
bat/binary_particle_file.h
#pragma once #include <memory> #include <string> #include <vector> #include <glm/glm.hpp> #include "abstract_array.h" #include "attribute.h" struct BinaryParticleDump { std::shared_ptr<AbstractArray<glm::vec3>> points = nullptr; std::vector<Attribute> attribs; }; size_t write_binary_particle_file(const std::...
amelvill-umich/libbat
util/fixed_array.h
<reponame>amelvill-umich/libbat<gh_stars>1-10 #pragma once #include <stdexcept> #include "abstract_array.h" template <typename T> class FixedArray : public AbstractArray<T> { std::shared_ptr<T> array = nullptr; size_t sz = 0; public: FixedArray() = default; FixedArray(size_t sz) : array(std:...
amelvill-umich/libbat
adaptive_io_test/generate_data.h
#pragma once #include <random> #include <string> #include <vector> #include <glm/ext.hpp> #include <glm/glm.hpp> #include "util.h" // Allow setting the global seed so we can run consistent // benchmarks on the same generated data sets void set_global_seed(int seed); struct Generator { Box world_bounds; Box r...
amelvill-umich/libbat
util/frustum.h
#pragma once #include <array> #include <glm/glm.hpp> #include "box.h" struct Frustum { /* Planes are the frustum planes stored in order: * -x, +x, -y, +y, -z, +z */ std::array<glm::vec4, 6> planes; /* Points are the frustum's corner points, in order: * (x_l, y_l, z_l), (x_h, y_l, z_l), (x_...
amelvill-umich/libbat
parallel_io/particle_data.h
#pragma once #include <parallel_hashmap/phmap.h> #include "abstract_array.h" #include "aggregation_tree.h" #include "attribute.h" struct WritePerformance { // Uniform info across all ranks int mpi_size = -1; uint64_t total_bytes_written = 0; uint32_t node_core_count = 0; // On all ranks, some bas...
amelvill-umich/libbat
util/data_type.h
#pragma once #include <string> enum DTYPE { UNKNOWN, INT_8, UINT_8, INT_16, UINT_16, INT_32, UINT_32, INT_64, UINT_64, FLOAT_32, FLOAT_64, VEC2_I8, VEC2_U8, VEC2_I16, VEC2_U16, VEC2_I32, VEC2_U32, VEC2_FLOAT, VEC2_DOUBLE, VEC3_I8, VEC...
amelvill-umich/libbat
bat/bat_handle.h
#pragma once #include <memory> #include "aggregation_tree.h" #include "ba_tree.h" class BATHandle { std::shared_ptr<BATree> ba_tree; std::shared_ptr<AggregationTree> pba_tree; public: std::vector<AttributeDescription> attributes; BATHandle(const std::string &fname); BATHandle() = default; ...
amelvill-umich/libbat
bat/radix_tree_node.h
#pragma once #include <iostream> #include "box.h" class RadixTreeNode { // low 2 bits store if the left/right child is a leaf (bits 0 and 1 respectively) uint64_t node_info = 0; public: float split_position = 0; AXIS split_axis = X; inline uint64_t gamma() const { return node_info >>...
amelvill-umich/libbat
parallel_io/bat_data_type.h
<filename>parallel_io/bat_data_type.h #pragma once enum BATDataType { BTD_UNKNOWN, BTD_INT_8, BTD_UINT_8, BTD_INT_16, BTD_UINT_16, BTD_INT_32, BTD_UINT_32, BTD_INT_64, BTD_UINT_64, BTD_FLOAT_32, BTD_FLOAT_64, BTD_VEC2_I8, BTD_VEC2_U8, BTD_VEC2_I16, BTD_VEC2_U...
amelvill-umich/libbat
util/scan.h
#pragma once #include <vector> #include <tbb/parallel_for.h> #include <tbb/tbb.h> template <typename T, typename Op> T inclusive_scan(const std::vector<T> &in, const T &id, std::vector<T> &out, Op op) { out.resize(in.size(), id); using range_type = tbb::blocked_range<size_t>; T sum = tbb::parallel_scan( ...
amelvill-umich/libbat
parallel_io/bat_io.h
#pragma once #include <stdint.h> #include "bat_data_type.h" #include "bat_read.h" #include "bat_write.h"
gumlet/gumlet-insights-sdk-avplayer
GumletInsightsSDKAVPlayer/GumletInsightsSDK.h
// // GumletVideoAnalyticsSDK.h // GumletVideoAnalyticsSDK // // #import <Foundation/Foundation.h> //! Project version number for GumletSDKVidAnalytics. FOUNDATION_EXPORT double GumletVideoAnalyticsSDKVersionNumber; //! Project version string for GumletSDKVidAnalytics. FOUNDATION_EXPORT const unsigned char Gumlet...
YSYouJack/KidPhotoViewerQt
KidPhotoViewer.h
#pragma once #include <QtWidgets/QMainWindow> #include <QFileInfo> #include <QList> // Forward declaration class QLabel; class QScrollArea; class QPushButton; class QDateEdit; class KidPhotoViewer : public QMainWindow { Q_OBJECT public: KidPhotoViewer(QWidget *parent = Q_NULLPTR); protected: void resizeEvent(QR...
coolabhays/nvim
templates/incandmain.c
<gh_stars>1-10 /** Name -> <NAME> Date -> <++> Description -> <++> Email -> <EMAIL> Github -> https://github.com/CoolAbhayS Last Edit -> <++> */ #include<stdio.h> <++> // main function <++> int main(int argc, char *argv[]){ <++> return 0; } // >>> <++>
FoxDenHome/desk-control
include/util.h
<filename>include/util.h #pragma once #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) #define RTOS_STACK_SIZE 4096 #define ARDUINO_CORE 1 #define IO_CORE 0 #define CREATE_TASK_CORE(FUNC, NAME, PRIO, HANDLE, CORE) xTaskCreatePinnedToCore(FUNC, NAME, RTOS_STACK_SIZE, NULL, PRIO, HANDLE, CORE) #define CREAT...
FoxDenHome/desk-control
include/ranging.h
<reponame>FoxDenHome/desk-control #pragma once #include <Arduino.h> #define RANGING_BIT_DESK_MOVE 1 #define RANGING_BIT_DESK_STATUS 2 #define RANGING_BIT_DESK_ADJUST 4 #define RANGING_BIT_MQTT 8 #define RANGING_BIT_SERIAL 16 #define RANGING_BIT_INIT 32 typedef struct ranging_result_t { uint16_t value; unsign...
FoxDenHome/desk-control
include/serial.h
#pragma once void serialSetup();
FoxDenHome/desk-control
include/mqtt.h
<reponame>FoxDenHome/desk-control #pragma once #include <Arduino.h> void mqttSetup(); void mqttSend(const char *data, const size_t len); bool mqttIsConnected(); void mqttSetLastError(String lastError); void mqttSetDebug(String debugMsg); void mqttDoHeightUpdate(); void mqttSetStopReason(String stopReason);
FoxDenHome/desk-control
include/config.h
#pragma once #include "config_private.h" #define PIN_SDA SDA #define PIN_SCL SCL #define PIN_RELAY_UP 17 #define PIN_RELAY_DOWN 18 #define SERIAL_PORT Serial // In mm #define DESK_HEIGHT_TOLERANCE 2 #define DESK_RANGING_TIMEOUT 1000 #define DESK_CALCULATE_SPEED_TIME 3000 #define DESK_SPEED_MIN 1 #define DESK_SPE...
FoxDenHome/desk-control
include/desk.h
<filename>include/desk.h #pragma once #include <Arduino.h> void deskSetup(); void deskAdjustHeight(int16_t _target); int8_t deskGetMovingDirection(); void deskStop(); int16_t deskGetTarget();
textmagus/textmagus-3rdparty-cdk
examples/mentry_ex.c
/* $Id: mentry_ex.c,v 1.10 2012/03/21 23:32:57 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "mentry_ex"; #endif int main (int argc, char **argv) { /* *INDENT-EQLS* */ CDKSCREEN *cdkscreen = 0; CDKMENTRY *widget = 0; WINDOW *cursesWin = 0; char *info ...
textmagus/textmagus-3rdparty-cdk
menu.c
<gh_stars>0 #include <cdk_int.h> /* * $Author: tom $ * $Date: 2013/06/16 15:05:27 $ * $Revision: 1.104 $ */ #define TITLELINES 1 /* * Declare file local prototypes. */ static void cleanUpMenu (CDKMENU *menu); DeclareCDKObjects (MENU, Menu, setCdk, Int); /* * This creates a new menu widget. */ CDKMENU *newC...
textmagus/textmagus-3rdparty-cdk
examples/template_ex.c
<reponame>textmagus/textmagus-3rdparty-cdk<filename>examples/template_ex.c /* $Id: template_ex.c,v 1.12 2012/03/21 23:35:07 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "template_ex"; #endif /* * This program demonstrates the Cdk template widget. */ int main (int argc, char **a...
textmagus/textmagus-3rdparty-cdk
include/cdk.h
/* * $Id: cdk.h,v 1.37 2012/03/20 22:01:57 tom Exp $ */ #ifndef CDK_H #define CDK_H #ifdef __cplusplus extern "C" { #endif /* * Changes 2000-2009,2012 copyright <NAME> * * Copyright 1999, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are...
textmagus/textmagus-3rdparty-cdk
buttonbox.c
<filename>buttonbox.c #include <cdk_int.h> /* * $Author: tom $ * $Date: 2013/06/16 15:00:10 $ * $Revision: 1.67 $ */ DeclareCDKObjects (BUTTONBOX, Buttonbox, setCdk, Int); /* * This returns a CDK buttonbox widget pointer. */ CDKBUTTONBOX *newCDKButtonbox (CDKSCREEN *cdkscreen, int xPos, int...
textmagus/textmagus-3rdparty-cdk
calendar.c
<filename>calendar.c #include <cdk_int.h> /* * $Author: tom $ * $Date: 2012/03/23 13:54:44 $ * $Revision: 1.98 $ */ #define YEAR2INDEX(year) (((year) >= 1900) ? ((year) - 1900) : (year)) /* * Declare file local variables. */ static const char *monthsOfTheYear[] = { "NULL", "January", "February", "M...
textmagus/textmagus-3rdparty-cdk
cdk_objs.c
#include <cdk_int.h> /* * Default method-functions for CDK objects. * * $Author: tom $ * $Date: 2012/03/22 00:43:33 $ * $Revision: 1.16 $ */ /* * Set the object's upper-left-corner line-drawing character. */ void setCdkULchar (CDKOBJS *obj, chtype ch) { obj->ULChar = ch; } /* * Set the object's upper-rig...
textmagus/textmagus-3rdparty-cdk
demos/vinstall.c
<reponame>textmagus/textmagus-3rdparty-cdk /* $Id: vinstall.c,v 1.18 2012/03/22 09:44:58 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "vinstall"; #endif /* * Written by: <NAME> * Purpose: * This is a fairly basic install interface. */ /* Declare global types and prototypes....
textmagus/textmagus-3rdparty-cdk
histogram.c
#include <cdk_int.h> /* * $Author: tom $ * $Date: 2013/06/16 15:05:27 $ * $Revision: 1.91 $ */ DeclareCDKObjects (HISTOGRAM, Histogram, setCdk, Unknown); /* * Create a histogram widget. */ CDKHISTOGRAM *newCDKHistogram (CDKSCREEN *cdkscreen, int xplace, int yplace, int height, ...
textmagus/textmagus-3rdparty-cdk
examples/marquee_ex.c
/* $Id: marquee_ex.c,v 1.11 2012/03/22 00:07:35 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "marquee_ex"; #endif static char startAttr[100]; static char endAttr[100]; /* * This spits out help about this demo program. */ static void help (char *programName) { const char *US...
textmagus/textmagus-3rdparty-cdk
swindow.c
<gh_stars>0 #include <cdk_int.h> /* * $Author: tom $ * $Date: 2014/01/02 01:03:04 $ * $Revision: 1.125 $ */ /* * Declare file local prototypes. */ static int createList (CDKSWINDOW *swindow, int listSize); static void drawCDKSwindowList (CDKSWINDOW *swindow, boolean Box); DeclareCDKObjects (SWINDOW, Swindow, s...
textmagus/textmagus-3rdparty-cdk
demos/fileview.c
<reponame>textmagus/textmagus-3rdparty-cdk /* $Id: fileview.c,v 1.11 2012/03/21 22:59:31 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "codeViewer"; #endif /* * This program demonstrates the file selector and the viewer widget. */ int main (int argc, char **argv) { /* *INDENT...
textmagus/textmagus-3rdparty-cdk
alphalist.c
#include <cdk_int.h> /* * $Author: tom $ * $Date: 2014/01/19 01:58:00 $ * $Revision: 1.110 $ */ /* * Declare file local prototypes. */ static BINDFN_PROTO (adjustAlphalistCB); static BINDFN_PROTO (completeWordCB); static int preProcessEntryField (EObjectType, void *, void *, chtype); static int createList (CDKA...
textmagus/textmagus-3rdparty-cdk
examples/calendar_ex.c
<reponame>textmagus/textmagus-3rdparty-cdk /* $Id: calendar_ex.c,v 1.16 2012/03/23 13:54:44 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "calendar_ex"; #endif static BINDFN_PROTO (createCalendarMarkCB); static BINDFN_PROTO (removeCalendarMarkCB); /* * This program demonstrates ...
textmagus/textmagus-3rdparty-cdk
itemlist.c
<reponame>textmagus/textmagus-3rdparty-cdk<filename>itemlist.c #include <cdk_int.h> /* * $Author: tom $ * $Date: 2013/06/16 13:16:15 $ * $Revision: 1.85 $ */ static int createList (CDKITEMLIST *itemlist, CDK_CSTRING2 item, int count); static int createFieldWin (CDKITEMLIST *itemlist, int ypos, int xpos); static i...
textmagus/textmagus-3rdparty-cdk
demos/stopSign.c
/* $Id: stopSign.c,v 1.12 2012/03/22 09:10:45 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "sillyness_ex"; #endif int main (void) { /* *INDENT-EQLS* */ CDKSCREEN *cdkscreen = 0; CDKLABEL *stopSign = 0; CDKLABEL *title = 0; WINDOW *cursesWin = 0; const ...
textmagus/textmagus-3rdparty-cdk
examples/lowerCDKObject_ex.c
/* $Id: lowerCDKObject_ex.c,v 1.9 2012/03/21 23:11:37 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "lowerCDKObject_ex"; #endif int main (int argc, char **argv) { char ch; const char *mesg[1]; const char *mesg1[10]; const char *mesg2[10]; WINDOW *cursesWin; CDK...
textmagus/textmagus-3rdparty-cdk
examples/hello_ex.c
/* $Id: hello_ex.c,v 1.11 2014/11/05 10:08:32 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "hello_ex"; #endif int main (int argc, char **argv) { CDKSCREEN *cdkscreen; CDKLABEL *demo; WINDOW *cursesWin; const char *mesg[4]; CDK_PARAMS params; CDKparseParams (ar...
textmagus/textmagus-3rdparty-cdk
examples/label_ex.c
<reponame>textmagus/textmagus-3rdparty-cdk /* $Id: label_ex.c,v 1.10 2012/03/21 23:29:07 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "label_ex"; #endif int main (int argc, char **argv) { CDKSCREEN *cdkscreen; CDKLABEL *demo; WINDOW *cursesWin; const char *mesg[10]; ...
textmagus/textmagus-3rdparty-cdk
include/cdk_config.h
/* include/cdk_config.h. Generated automatically by configure. */ /* * $Id: config.hin,v 1.2 2000/01/17 14:48:19 tom Exp $ */ #ifndef CDK_CONFIG_H #define CDK_CONFIG_H 1 #define CC_HAS_PROTOS 1 #define CDK_CONST /*nothing*/ #define CDK_CSTRING CDK_CONST char * #define CDK_CSTRING2 CDK_CONST char * CDK_CONST * #d...
textmagus/textmagus-3rdparty-cdk
examples/dialog_ex.c
<filename>examples/dialog_ex.c<gh_stars>0 /* $Id: dialog_ex.c,v 1.13 2012/03/21 23:28:29 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "dialog_ex"; #endif /* * This program demonstrates the Cdk dialog widget. */ int main (int argc, char **argv) { /* *INDENT-EQLS* */ CDKSCR...
textmagus/textmagus-3rdparty-cdk
cli/cdkviewer.c
/* $Id: cdkviewer.c,v 1.14 2014/11/05 10:37:52 tom Exp $ */ #include <cdk_test.h> #ifdef XCURSES char *XCursesProgramName = "cdkviewer"; #endif /* * Declare file local prototypes. */ static void saveInformation (CDKVIEWER *widget); static int dumpViewer (CDKVIEWER *widget, char *filename); static int widgetCB (EOb...
textmagus/textmagus-3rdparty-cdk
examples/matrix_ex.c
/* $Id: matrix_ex.c,v 1.17 2012/03/21 23:55:33 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "matrix_ex"; #endif #define MY_COLS 10 /* * This program demonstrates the Cdk matrix widget. */ int main (int argc, char **argv) { /* *INDENT-EQLS* */ CDKSCREEN *cdkscreen = 0; ...
textmagus/textmagus-3rdparty-cdk
marquee.c
#define NCURSES_NOMACROS #include <cdk_int.h> /* * $Author: tom $ * $Date: 2012/03/21 00:04:52 $ * $Revision: 1.80 $ */ DeclareCDKObjects (MARQUEE, Marquee, setCdk, Unknown); static void discardWin (WINDOW **winp) { if (*winp != 0) { werase (*winp); wrefresh (*winp); delwin (*winp); ...
textmagus/textmagus-3rdparty-cdk
examples/alphalist_ex.c
<gh_stars>0 /* $Id: alphalist_ex.c,v 1.29 2014/11/06 01:34:20 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "alphalist_ex"; #endif /* * This program demonstrates the Cdk alphalist widget. * * Options (in addition to normal CLI parameters): * -c create the data after the widget...
textmagus/textmagus-3rdparty-cdk
examples/graph_ex.c
<reponame>textmagus/textmagus-3rdparty-cdk /* $Id: graph_ex.c,v 1.14 2012/03/22 09:32:24 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "graph_ex"; #endif int main (int argc, char **argv) { /* *INDENT-EQLS* */ CDKSCREEN *cdkscreen = 0; CDKGRAPH *graph ...
textmagus/textmagus-3rdparty-cdk
examples/swindow_ex.c
/* $Id: swindow_ex.c,v 1.13 2012/03/21 23:52:34 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "swindow_ex"; #endif #if !defined (HAVE_SLEEP) && defined (_WIN32) /* Mingw */ #define sleep(x) _sleep(x*1000) #endif /* * Demonstrate a scrolling-window. */ int main (int argc, char *...
textmagus/textmagus-3rdparty-cdk
examples/bind_ex.c
/* $Id: bind_ex.c,v 1.19 2012/03/21 23:54:26 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "bind_ex"; #endif static int dialogHelpCB (EObjectType cdktype GCC_UNUSED, void *object, void *clientData GCC_UNUSED, chtype key GCC_UNUSED) { CDKDIALOG *dialog = (CDKDIALOG *...
textmagus/textmagus-3rdparty-cdk
examples/traverse_ex.c
<filename>examples/traverse_ex.c /* $Id: traverse_ex.c,v 1.24 2014/01/19 02:06:35 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "entry_ex"; #endif #define NumElements(a) ((sizeof a)/(sizeof a[0])) #define MY_MAX 3 static CDKOBJS *all_objects[MY_MAX]; static const char *yes_no[]...
textmagus/textmagus-3rdparty-cdk
examples/subwindow_ex.c
<reponame>textmagus/textmagus-3rdparty-cdk<filename>examples/subwindow_ex.c /* $Id: subwindow_ex.c,v 1.12 2012/03/22 09:10:45 tom Exp $ */ #include <cdk_test.h> #ifdef HAVE_XCURSES char *XCursesProgramName = "subwindow_ex"; #endif /* * This demo displays the ability to put widgets within a curses subwindow. */ int...
textmagus/textmagus-3rdparty-cdk
include/cdk_version.h
/* * $Id: cdk_version.hin,v 1.2 2012/03/20 22:10:36 tom Exp $ */ #ifndef CDK_VERSION_H #define CDK_VERSION_H #ifdef __cplusplus extern "C" { #endif /* * Copyright 2002,2012 <NAME> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following co...
textmagus/textmagus-3rdparty-cdk
demos/rolodex.c
/* $Id: rolodex.c,v 1.27 2014/11/06 01:31:02 tom Exp $ */ #include "rolodex.h" #ifdef HAVE_XCURSES char *XCursesProgramName = "rolodex"; #endif #define MYSIZE 256 static void fmt1s (char *target, const char *format, const char *source) { int limit = MYSIZE - (int)(strlen (format) + strlen (source)); if (limit >...
particle-iot/ble-gateway-library
src/characteristics/heart_rate.h
<reponame>particle-iot/ble-gateway-library #pragma once #include "Particle.h" #define BLE_SIG_HEART_RATE_MEASUREMENT_CHAR 0x2A37 #define BLE_SIG_BODY_SENSOR_LOCATION_CHAR 0x2A38 #define BLE_SIG_HEART_RATE_CONTROL_POINT_CHAR 0x2A39 class HeartRateMeasurement { private: enum HeartRateMeasurementFlags: uint8_t { ...
particle-iot/ble-gateway-library
src/peripherals/blood-pressure-monitor.h
#include "ble_device.h" #include "services/blood_pressure_service.h" #include "services/device_information_service.h" #include "services/battery_service.h" class BloodPressureMonitor; /** * The callback function format * * monitor: instance of BloodPressureMonitor * uuid: the UUID of the characteristic that sent...
particle-iot/ble-gateway-library
src/characteristics/current_time.h
#include "Particle.h" class CurrentTime: public BleCharacteristic { private: static const BleUuid _uuid(0x2A2B); public: BleUuid getUuid() {return _uuid;}; };
particle-iot/ble-gateway-library
src/peripherals/pulse-oximeter.h
<filename>src/peripherals/pulse-oximeter.h #pragma once #include "ble_device.h" #define JUMPER_PULSEOX_SERVICE "cdeacb80-5235-4c07-8846-93a37ee6b86d" class PulseOxAlert; class PulseOx; enum class PulseOxAlertType { SPO_LOW, HR_LOW_HIGH, NONE }; typedef void (*PulseOxAlertCallback)(PulseOx& device, Puls...
particle-iot/ble-gateway-library
src/services/gap_generic_service.h
#pragma once #include "Particle.h" #include "characteristics/gap_generic.h" class GapGenericService { private: std::unique_ptr<DeviceNameCharacteristic> _deviceName; std::unique_ptr<Appearance> _appearance; std::unique_ptr<PeripheralPreferredConnectionParams> _peripheralConnParams; BlePeerDevice _pee...
particle-iot/ble-gateway-library
src/peripherals/ble_device.h
#pragma once #include "Particle.h" #include "services/gap_generic_service.h" class BleDevice { protected: std::unique_ptr<GapGenericService> _gapService; public: BleAddress address; BlePeerDevice peer; /** * Get Device Name from the GAP Generic Service * * When called, it will start ...
particle-iot/ble-gateway-library
src/peripherals/glucose-meter.h
#include "ble_device.h" #include "services/glucose_service.h" #include "services/device_information_service.h" #include "services/battery_service.h" class GlucoseMeter; /** * The callback function format * * meter: instance of GlucoseMeter * uuid: the UUID of the characteristic that sent a NOTIFY/INDICATE * con...
particle-iot/ble-gateway-library
src/services/battery_service.h
<filename>src/services/battery_service.h #pragma once #include "Particle.h" #define BLE_SIG_BATTERY_LEVEL_CHAR 0x2A19 #define BLE_SIG_BATTERY_LEVEL_STATE_CHAR 0x2A1B #define BLE_SIG_BATTERY_POWER_STATE_CHAR 0x2A1A class BatteryService { private: BleCharacteristic _batteryLevel; BlePeerDevice _peer; uint...
particle-iot/ble-gateway-library
src/peripherals/cycling-sensor.h
<filename>src/peripherals/cycling-sensor.h #include "ble_device.h" #include "services/cycling_speed_and_cadence.h" #include "services/device_information_service.h" #include "services/battery_service.h" class CyclingSpeedAndCadence; /** * The callback function format * * monitor: instance of HeartRateMonitor * u...
particle-iot/ble-gateway-library
src/services/glucose_service.h
<reponame>particle-iot/ble-gateway-library #pragma once #include "Particle.h" #include "characteristics/glucose.h" class GlucoseService { private: std::unique_ptr<GlucoseMeasurement> _gMeasurement; std::unique_ptr<GlucoseMeasurementContext> _gContext; std::unique_ptr<GlucoseFeatureChar> _gFeature; st...
particle-iot/ble-gateway-library
src/peripherals/masterbuilt-smoker.h
<reponame>particle-iot/ble-gateway-library<gh_stars>1-10 #pragma once #include "ble_device.h" #include "services/device_information_service.h" #include "services/battery_service.h" #define MASTERBUILT_SMOKER_SERVICE "426f7567-6854-6563-2d57-65694c69fff0" class MasterbuiltSmoker; typedef void (*NewSmokerValue)(Maste...
particle-iot/ble-gateway-library
src/services/heart_rate_service.h
<gh_stars>1-10 #include "Particle.h" #include "characteristics/heart_rate.h" class HeartRateService { private: std::unique_ptr<HeartRateMeasurement> _hrMeasurement; std::unique_ptr<BodySensorLocation> _sensorLocation; std::unique_ptr<HeartRateControlPoint> _controlPoint; BlePeerDevice _peer; public: ...
particle-iot/ble-gateway-library
src/characteristics/blood_pressure_measurement.h
<gh_stars>1-10 #pragma once #include "Particle.h" #include "ieee11073_20601a.h" #define BLE_SIG_BLOOD_PRESSURE_MEASUREMENT_CHAR 0x2A35 #define BLE_SIG_INTERMEDIATE_CUFF_PRESSURE_CHAR 0x2A36 #define BLE_SIG_BLOOD_PRESSURE_FEATURE_CHAR 0x2A49 class BloodPressureMeasurement { protected: enum BloodPressureMeasuremen...
particle-iot/ble-gateway-library
src/characteristics/gap_generic.h
<reponame>particle-iot/ble-gateway-library #pragma once #include "Particle.h" #define BLE_SIG_DEVICE_NAME_CHAR 0x2A00 #define BLE_SIG_APPEARANCE_CHAR 0x2A01 #define BLE_SIG_PERIPHERAL_PREFERRED_CONNECTION_PARAMS_CHAR 0x2A04 class DeviceNameCharacteristic { private: BleCharacteristic _characteristic; public: ...
particle-iot/ble-gateway-library
src/services/blood_pressure_service.h
#pragma once #include "Particle.h" #include "characteristics/blood_pressure_measurement.h" class BloodPressureService { private: std::unique_ptr<BloodPressureMeasurement> _bpMeasurement; std::unique_ptr<IntermediateCuffPressureChar> _intermediateCuff; std::unique_ptr<BloodPressureFeatureChar> _bpFeature;...
particle-iot/ble-gateway-library
src/characteristics/glucose.h
<reponame>particle-iot/ble-gateway-library #pragma once #include "Particle.h" #include "date_time.h" #define BLE_SIG_GLUCOSE_MEASUREMENT_CHAR 0x2A18 #define BLE_SIG_GLUCOSE_MEASUREMENT_CONTEXT_CHAR 0x2A34 #define BLE_SIG_RECORD_ACCESS_CONTROL_CHAR 0x2A52 #define BLE_SIG_GLUCOSE_FEATURE_CHAR 0x2A51 class GlucoseMeasu...
particle-iot/ble-gateway-library
src/peripherals/heart-rate-monitor.h
#include "ble_device.h" #include "services/heart_rate_service.h" #include "services/device_information_service.h" #include "services/battery_service.h" class HeartRateMonitor; /** * The callback function format * * monitor: instance of HeartRateMonitor * uuid: the UUID of the characteristic that sent a NOTIFY ...
particle-iot/ble-gateway-library
src/ble-gateway.h
<reponame>particle-iot/ble-gateway-library #pragma once #include "Particle.h" #include "peripherals/ble_device.h" class BleDeviceGateway; typedef void (*BleDeviceGatewayConnection)(BleDevice& device); typedef void (*BlePasskeyDisplay)(BleDevice& device, const uint8_t* passkey, size_t passkeyLen); typedef void (*Ble...
particle-iot/ble-gateway-library
src/characteristics/cycling_speed_and_cadence.h
<reponame>particle-iot/ble-gateway-library #define BLE_SIG_CSC_MEASUREMENT_CHAR 0x2A5B #define BLE_SIG_CSC_FEATURE_CHAR 0x2A5C #define BLE_SIG_SC_CONTROL_POINT 0x2A55 enum CyclingSpeedAndCadenceFlags: uint8_t { WHEEL_REVOLUTION_DATA_PRESENT = 0x01, CRANK_REVOLUTION_DATA_PRESENT = 0x02 }; class Cy...
particle-iot/ble-gateway-library
src/characteristics/date_time.h
<gh_stars>1-10 #pragma once #include "Particle.h" #define BLE_SIG_DATE_TIME_CHAR 0x2A08 class DateTimeChar { protected: BleCharacteristic _characteristic; public: struct DateTime { uint16_t year; uint8_t month; uint8_t day; uint8_t hour; uint8_t minute; uint8_...
particle-iot/ble-gateway-library
src/services/device_information_service.h
#pragma once #include "Particle.h" #define BLE_SIG_MANUFACTURER_NAME_STRING_CHAR 0x2A29 #define BLE_SIG_MODEL_NUMBER_STRING_CHAR 0x2A24 #define BLE_SIG_SERIAL_NUMBER_STRING_CHAR 0x2A25 #define BLE_SIG_HARDWARE_REVISION_STRING_CHAR 0x2A27 #define BLE_SIG_FIRMWARE_REVISION_STRING_CHAR 0x2A26 #define BLE_SIG_SOFTWARE_RE...
particle-iot/ble-gateway-library
src/characteristics/ieee11073_20601a.h
#pragma once #include "cmath" static int ieee11073_20601a_sfloat(uint16_t value, float& data) { if (value >= 0x07FE && value <= 0x0802) { data = (float)value; return -2; } uint16_t mantissa = value & 0x0FFF; uint8_t exponent = value >> 12; float magnitude = std::pow(10.0, (exponent ...
particle-iot/ble-gateway-library
src/services/cycling_speed_and_cadence.h
<filename>src/services/cycling_speed_and_cadence.h #include "Particle.h" #include "characteristics/cycling_speed_and_cadence.h" class CyclingSpeedAndCadenceService { private: std::unique_ptr<CyclingSpeedAndCadenceChar> _cscMeasurement; std::unique_ptr<CSCFeatureChar> _cscFeature; std::unique_ptr<SensorLoc...
particle-iot/ble-gateway-library
src/peripherals/veepeak-obdcheck.h
<gh_stars>1-10 #pragma once #include "ble_device.h" #include "services/device_information_service.h" #define VEEPEAK_SERVICE "49535343-fe7d-4ae5-8fa9-9fafd205e455" #define VEEPEAK_OUTPUT_BUFFER_SIZE 128 #define VEEPEAK_INPUT_BUFFER_SIZE 1024 class VeepeakObd; class VeepeakObd: public BleDevice, public Stream { priv...
jl2922/hci
src/vector_stats.h
<reponame>jl2922/hci<gh_stars>1-10 #ifndef VECTOR_STATS_H_ #define VECTOR_STATS_H_ #include <vector> template <class T> double get_avg(const std::vector<T>& vec) { double sum_elems = 0.0; const size_t n_elems = vec.size(); for (size_t i = 0; i < n_elems; i++) sum_elems += vec[i]; return sum_elems / n_elems; }...
jl2922/hci
src/solver/spin_det_util.h
#ifndef SPIN_DET_UTIL_H_ #define SPIN_DET_UTIL_H_ #include <vector> #include "../data.pb.h" class SpinDetUtil { public: static std::vector<int> get_occupied_orbitals( const data::SpinDeterminant& spin_det); static bool is_occupied(const data::SpinDeterminant& spin_det, const int orb); static int get_n_...
jl2922/hci
src/solver/connections.h
<gh_stars>1-10 #ifndef CONNECTIONS_H_ #define CONNECTIONS_H_ #include <vector> #include "../abstract_system.h" #include "../session.h" class Connections { public: Connections(Session* const session, AbstractSystem* const abstract_system) : session(session), abstract_system(abstract_system) {} virtual ~Con...