-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66e9a20
commit ab2f3c9
Showing
10 changed files
with
386 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) The ThingSet Project Contributors | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef THINGSET_WEBSOCKET_H_ | ||
#define THINGSET_WEBSOCKET_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
int thingset_websocket_send_report(const char *path); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* THINGSET_WEBSOCKET_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) The ThingSet Project Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_HEAP_MEM_POOL_SIZE=1500 | ||
|
||
# Networking config | ||
CONFIG_NETWORKING=y | ||
CONFIG_NET_IPV4=y | ||
CONFIG_NET_IPV6=y | ||
CONFIG_NET_TCP=y | ||
CONFIG_NET_SHELL=y | ||
CONFIG_NET_STATISTICS=y | ||
|
||
# Sockets | ||
CONFIG_NET_SOCKETS=y | ||
CONFIG_NET_SOCKETS_POLL_MAX=4 | ||
|
||
# Network address config | ||
CONFIG_NET_CONFIG_SETTINGS=y | ||
CONFIG_NET_CONFIG_NEED_IPV4=y | ||
CONFIG_NET_CONFIG_NEED_IPV6=y | ||
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1" | ||
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" | ||
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2" | ||
# Address of HTTP server | ||
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2" | ||
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::2" | ||
|
||
# HTTP & Websocket | ||
CONFIG_HTTP_CLIENT=y | ||
CONFIG_WEBSOCKET_CLIENT=y | ||
|
||
CONFIG_THINGSET_WEBSOCKET=y | ||
CONFIG_THINGSET_WEBSOCKET_SERVER_IPV4="192.0.2.2" | ||
CONFIG_THINGSET_WEBSOCKET_SERVER_PORT=8000 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright (c) The ThingSet Project Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config THINGSET_WEBSOCKET | ||
depends on WEBSOCKET_CLIENT | ||
bool "WebSocket interface" | ||
|
||
if THINGSET_WEBSOCKET | ||
|
||
config THINGSET_WEBSOCKET_SERVER_IPV4 | ||
string "Default WebSocket server IPv4 address" | ||
help | ||
This default IP address can be changed via ThingSet. | ||
|
||
config THINGSET_WEBSOCKET_SERVER_PORT | ||
int "Default WebSocket server port" | ||
default 80 | ||
help | ||
This default port can be changed via ThingSet. | ||
|
||
config THINGSET_WEBSOCKET_RX_BUF_SIZE | ||
int "ThingSet WebSocket RX buffer size" | ||
range 512 4096 | ||
default 1024 | ||
|
||
config THINGSET_WEBSOCKET_THREAD_STACK_SIZE | ||
int "ThingSet WebSocket thread stack size" | ||
default 4096 | ||
help | ||
Stack size of thread for processing ThingSet messages transmitted | ||
via WebSocket. | ||
|
||
config THINGSET_WEBSOCKET_THREAD_PRIORITY | ||
int "ThingSet WebSocket thread priority" | ||
default 2 | ||
help | ||
Priority of thread for processing ThingSet messages transmitted | ||
via WebSocket. | ||
|
||
endif # THINGSET_WEBSOCKET |
Oops, something went wrong.