Skip to content

Instantly share code, notes, and snippets.

View LukasBombach's full-sized avatar
👨‍👩‍👧‍👦
Proud father

Lukas Bombach LukasBombach

👨‍👩‍👧‍👦
Proud father
View GitHub Profile

Characteristics

Current assessment and implementation status

- [x]   A001   [R]    [Versions]          `parse_binary_version_desc`     confirmed         although there are a bunch of zeros as FW versions
- [x]   A002   [RW]   [RequestedState]    `parse_state_change`            confirmed         lets read read and set states but not substates, also cannot be subscribed to. maybe for setting states only while A00E is for reading and notifications?
- [x]   A003   [RW]   [SetTime]           _not used on tcl source code_   deprecated maybe  reading this gives you a bunch of zeros
- [x]   A004   [R]    [ShotDirectory]     _not used on tcl source code_   deprecated maybe  reading this gives you a bunch of zeros
- [x]   A005   [RW]   [ReadFromMMR]       _not used on tcl source code_   deprecated maybe  reading this gives you a bunch of zeros
import typescript from "typescript";
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import typescriptPlugin from "rollup-plugin-typescript2";
import autoExternal from "rollup-plugin-auto-external";
import copy from "rollup-plugin-copy";
import { terser } from "rollup-plugin-terser";
import pkg from "./package.json";
export default {
export default class BinaryParser<T> {
private buffer: DataView;
private offset: number;
private varsInternal: Partial<T>;
constructor(buffer: DataView) {
this.buffer = buffer;
this.offset = 0;
this.varsInternal = {};
}
import { render, createElement } from "preact";
import Teaser from "../../app/components/teaser";
const markers = [
...document.querySelectorAll('script[type="application/hydration-marker"]')
];
const data = JSON.parse(
document.querySelector('script[type="application/hydration-data"]').innerHTML
);
const hid = HydrationData.storeProps(Component, props);
return (
<>
<script type="application/hydration-marker" data-hid={hid} />
<Component {...props} />
</>
);
{ "name": "TwitterFeed", "props": { "user": "luke_schmuke" } }
<div>Some other code rendered by the server for other components</div>
<script type="application/hydration-marker" data-hid={hid} />
<div class="twitter-feed">
<!-- more nested ssr code here -->
</div>
<div>Some other code rendered by the server for other components</div>
import { h } from "preact";
import HydrationData from "./hydrationData";
export default (Component) => (props) => {
const hid = HydrationData.storeProps(Component, props);
return (
<>
<script type="application/hydration-marker" data-hid={hid} />
<Component {...props} />
</>
import React from 'react'
import ReactDOM from 'react-dom'
import App from '@components/app'
ReactDOM.hydrate(
<App />,
document.getElementById('app')
)
import { withHydration, HydrationData } from "pool-attendant-preact";
import Header from "@components/header";
import Content from "@components/content";
import TwitterFeed from "@components/twitterFeed";
import Poll from "@components/poll";
import SmallBox from "@components/smallBox";
import LargeBox from "@components/smallBox";
const HydratedTwitterFeed = withHydration(TwitterFeed);