About websocket layer in BACnet/SC implementation #1091
Unanswered
maimomohali
asked this question in
Q&A
Replies: 1 comment
-
The websocket.h interface in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When reviewing src/bacnet/datalink/bsc/bsc-conf.h, I see the following:
#if !defined(BACDL_BSC)
#define BSC_CONF_TX_PRE 0
#else
#ifndef bsd
#define bsd 1
#endif
#ifndef linux
#define linux 2
#endif
#ifndef win32
#define win32 3
#endif
#if BACNET_PORT == bsd || BACNET_PORT == linux || BACNET_PORT == win32
#include <libwebsockets.h>
#define BSC_CONF_TX_PRE LWS_PRE
#else
#define BSC_CONF_TX_PRE 0
#endif
#endif
My target platform is a small embedded device running FreeRTOS + lwIP (on an MCU).
Although lwIP is “BSD-like,” the device does not really fit into bsd, linux, or win32.
That raises a few questions:
In this case, BSC_CONF_TX_PRE will remain 0 and libwebsockets is not used.
Does this mean that BACnet/SC node devices are expected to implement their own WebSocket layer (for direct connection mode, both server + client), instead of relying on libwebsockets?
Is the intention that, in embedded environments, developers should implement WebSocket (RFC 6455 framing and handshake) locally — probably just a few source files — to fit the platform constraints?
In other words, is the websocket.h interface in src/bacnet/datalink/ meant as a guide or abstraction layer, so that each integrator can provide their own WebSocket implementation that matches their platform?
OR Just, Do I need to select bsd ? and port libwebsocket ?
I’d like clarification on whether this interpretation is correct.
Beta Was this translation helpful? Give feedback.
All reactions