Giter Site home page Giter Site logo

compositor's Introduction

Compositor - multi-process light mixing for Holiday by MooresCloud

The compositor is an always-running background process that opens four named pipes (/run/pipelights.0.fifo through /run/pipelights.3.fifo) and scans them continuously looking for data to render to the Holiday's bulbs.

By convention the pipes are allocated to the following processes

Pipe 0 - System processes (warnings, exceptions, failures) Pipe 1 - IoTAS Pipe 2 - Python processes Pipe 3 - Native processes

At this time there's no pooling mechanism, so it is possible for two processes to be writing to the same FIFO. That could produce - ahem - interesting results.

The data is in the format of 52 lines, each 9 bytes in length (8 characters plus newline)

Flags - 24 bits of ASCII hex in format 0xHHHHHH

NEW_DATA_FLAG 0b0000000000000001 // True if this data is freshly received from pipe REPLACE_FLAG 0b0000000000000010 // if set replace buffer, otherwise mix MASK_FLAG 0b0000000000000100 // if set non-zero bytes are masked in HAS_DATA_FLAG 0b0000000000001000 // Set if there is data to render BRIGHTNESS_FLAG 0b1000000000000000 // Set the brightness in the following 7 bits BRIGHTNESS_MASK 0b0111111100000000 // These are the bits used to determine brightness

App Name - 8 characters of descriptive information: 'IoTASRVC', 'RAINBOWC', etc Bulb RGB value - 24 bits of ASCII hex in format 0xRRGGBB, repeated 50 times

compositor's People

Contributors

mpesce avatar

Watchers

@3Easy avatar  avatar James Cloos avatar Iain Chalmers avatar Kean Maizels avatar Justin Warren avatar

Forkers

froosh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.