Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

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:

  1. 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?

  2. 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?

  3. 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.

You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.