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 <iostream> | |
#include <thread> | |
#include <mutex> | |
class Comm | |
{ | |
private: | |
Comm() {} |
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
#!/bin/bash | |
g++ -std=c++14 main.cpp publisher.cpp -o app -lavahi-core -lavahi-common -lavahi-client |
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 <iostream> | |
#include <memory> | |
#include <mutex> | |
#include <unordered_map> | |
using namespace std; | |
class Stock | |
{ | |
public: |
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
1. digital last | |
1.1 switch-off/max-off/min-off | |
{signal: | |
[ | |
{name: 'Switch Off Req', wave: '010.....'}, | |
{name: 'ELA', wave: '01....0.'}, | |
{name: 'Active', wave: '1.0....1'}, | |
{name: 'Max Off Timer', wave: '0.1...0.'}, | |
{name: 'Min Off Timer', wave: '0.1.0...'}, | |
{name: 'Switch On Block', wave: '0.1.0...'}, |
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 <cstdint> | |
// normal device class e.g., i2c, spi | |
class Device { | |
public: | |
Device() {} | |
bool write8(uint8_t page, uint8_t addr, uint8_t v) | |
{ | |
return true; | |
} |
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 <iostream> | |
#include <string> | |
#include <array> | |
#include <functional> | |
using namespace std; | |
class NodeManager { | |
private: |
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
cmake_minimum_required(VERSION 3.1) | |
include(CMakeParseArguments) | |
macro(open_eebus_project) | |
#message(DEBUG "---- processing open_eebus_project") | |
set(options DEBUG) | |
set(oneValueArgs |
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
#!/bin/bash | |
openocd -f interface/stlink-v2-1.cfg -f board/stm32f7discovery.cfg \ | |
-c "init" \ | |
-c "reset init" \ | |
-c "flash probe 0" \ | |
-c "flash info 0" \ | |
-c "flash write_image erase $UBOOT_PATH/spl/u-boot-spl.bin 0x08000000" \ | |
-c "flash write_image erase $UBOOT_PATH/u-boot.bin 0x08008000" \ | |
-c "reset run" \ |
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
// | |
// Created by lx on 27.07.20. | |
// | |
#ifndef LEDDRIVER_DEVICE_H | |
#define LEDDRIVER_DEVICE_H | |
#include <iostream> | |
using namespace std; |
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
template<typename ... Values> class tuple; | |
template<> class tuple<> {}; | |
template<typename Head, typename ... Tail> | |
class tuple<Head, Tail...> : private tuple<Tail...> | |
{ | |
private: | |
typedef tuple<Tail...> inherited; | |
public: | |
tuple() {} |