LIFX device application library
mkdir build cd build cmake .. make
LIFX device application library
License: Apache License 2.0
1582595558.856188 INFO -- Thread-9882: header:42 write_buffer:1076
==9882== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==9882== at 0x5174DFA: sendto (sendto.c:27)
==9882== by 0x4E4D763: lifxSession_SendToInternal (lifx_session.c:456)
==9882== by 0x4E4E03C: lifxSession_BeginSendRequest (lifx_session.c:666)
==9882== by 0x108D26: main (async.c:67)
==9882== Address 0x586b386 is 38 bytes inside a block of size 1,076 alloc'd
==9882== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9882== by 0x4E423BD: lifxBuffer_Init (lifx_buffer.c:35)
==9882== by 0x4E4C962: lifxSession_Open (lifx_session.c:160)
==9882== by 0x108C87: main (async.c:50)
==9882==
// {'name': 'Label', 'type': '[32]byte', 'size_bytes': 32}
uint8_t Label[32];
it looks like all places where [n]byte is used is a string. should just make that
char Label[32];
otherwise you have to cast when passing into strcpy() and friends.
// {'name': 'Palette', 'type': '[16]', 'size_bytes': 128}
that didn't parse properly. it generated
lifxLightHsbk_t Palette;
should be
lifxLightHsbk_t Palette[16];
==9882==
==9882== HEAP SUMMARY:
==9882== in use at exit: 5,288 bytes in 6 blocks
==9882== total heap usage: 12 allocs, 6 frees, 12,032 bytes allocated
==9882==
==9882== 272 bytes in 1 blocks are possibly lost in loss record 2 of 5
==9882== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9882== by 0x40134A6: allocate_dtv (dl-tls.c:286)
==9882== by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)
==9882== by 0x544B227: allocate_stack (allocatestack.c:627)
==9882== by 0x544B227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)
==9882== by 0x4E42348: lifxThread_Create (lifx.c:260)
==9882== by 0x4E4CAF8: lifxSession_Open (lifx_session.c:196)
==9882== by 0x108C87: main (async.c:50)
==9882==
==9882== LEAK SUMMARY:
==9882== definitely lost: 0 bytes in 0 blocks
==9882== indirectly lost: 0 bytes in 0 blocks
==9882== possibly lost: 272 bytes in 1 blocks
==9882== still reachable: 5,016 bytes in 5 blocks
==9882== suppressed: 0 bytes in 0 blocks
==9882== Reachable blocks (those to which a pointer was found) are not shown.
==9882== To see them, rerun with: --leak-check=full --show-leak-kinds=all
The lifxProtocolHeader_t doesn't align on windows. An encoder/decoder needs to be written to properly handle this and not reply on the compiler to align stuff properly.
#define LIFX_EXPORT attribute ((visibility ("default")))
#define LIFX_IMPORT attribute ((visibility ("hidden")))
Need to replace this with something compatible with windows declspec import/export.
The code generator should just create a single lifx_protocol.h and lifx_protocol.c. There's no reason to have a bunch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.