This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOST_PYTHON_MODULE(ScryUnlimitedCommunicator) | |
{ | |
Py_Initialize(); | |
class_<SeralizedPythonSharedMemoryConsumer, boost::noncopyable>("SeralizedSharedMemoryConsumer",init<std::string>()) | |
.def("set_callable", &SeralizedPythonSharedMemoryConsumer::set_callable) | |
.def("start",&SeralizedPythonSharedMemoryConsumer::start) | |
.def("wait",&SeralizedPythonSharedMemoryConsumer::wait); | |
class_<ImagePythonSharedMemoryConsumer, boost::noncopyable>("ImageSharedMemoryConsumer",init<std::string>()) | |
.def("set_callable", &ImagePythonSharedMemoryConsumer::set_callable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"routes": { | |
"cameraToObjectDetection": "FROM /messages/modules/camera/outputs/imageOutput INTO BrokeredEndpoint(\"/modules/objectDetection/inputs/incomingImages\")", | |
"cameraToImageStorage": "FROM /messages/modules/camera/outputs/imageOutput INTO BrokeredEndpoint(\"/modules/imageStorage/inputs/incomingImages\")", | |
"objectDetectionToMotionDetection": "FROM /messages/modules/objectDetection/outputs/objectDetectionOutput INTO BrokeredEndpoint(\"/modules/motionDetection/inputs/incomingObjectDetection\")", | |
"motionDetectionToDeleteImage": "FROM /messages/modules/motionDetection/outputs/motionDetectionOutput INTO BrokeredEndpoint(\"/modules/imageStorage/inputs/deleteImages\")" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial AS base | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends software-properties-common gdb && \ | |
add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && \ | |
apt-get update && \ | |
apt-get install -y azure-iot-sdk-c-dev && \ | |
rm -rf /var/lib/apt/lists/* | |
FROM base AS build-env | |
RUN apt-get update && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct MemoryStruct { | |
char *memory; | |
size_t size; | |
}; | |
static size_t | |
WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) | |
{ | |
size_t realsize = size * nmemb; | |
struct MemoryStruct *mem = (struct MemoryStruct *)userp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "iothub_module_client_ll.h" | |
#include "iothub_client_options.h" | |
#include "iothub_message.h" | |
#include "azure_c_shared_utility/threadapi.h" | |
#include "azure_c_shared_utility/crt_abstractions.h" | |
#include "azure_c_shared_utility/platform.h" | |
#include "azure_c_shared_utility/shared_util_options.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial AS base | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends software-properties-common gdb && \ | |
add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && \ | |
apt-get update && \ | |
apt-get install -y azure-iot-sdk-c-dev && \ | |
rm -rf /var/lib/apt/lists/* | |
FROM base AS build-env | |
RUN apt-get update && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64") | |
set(lib_arch x64) | |
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x64") | |
set(lib_arch x64) | |
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86") | |
set(lib_arch x86) | |
else() | |
message(FATAL_ERROR "System architecture is not supported") | |
endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChildViewModel | |
{ | |
//some properties | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file(GLOB PROTOBUF_DEFINITION_FILES "*.proto") | |
set(PROTOBUF_INPUT_DIRECTORY "${PROJECT_SOURCE_DIR}") | |
set(PROTOBUF_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/Models/Proto/") | |
foreach(file ${PROTOBUF_DEFINITION_FILES}) | |
set(PROTOBUF_ARGUMENTS "protoc --proto_path=\"${PROTOBUF_INPUT_DIRECTORY}\" --cpp_out=\"${PROTOBUF_OUTPUT_DIRECTORY}\" \"${file}\"") | |
execute_process(COMMAND ${PROTOBUF_OUTPUT_DIRECTORY} | |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} | |
RESULT_VARIABLE PROTOBUF_RESULT | |
OUTPUT_VARIABLE PROTOBUF_OUTPUT_VARIABLE) | |
endforeach() |