-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release: 3.4.5
- Loading branch information
Showing
106 changed files
with
7,269 additions
and
156 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Control | ||
|
||
Control commands can be used to configure/instruct the client to perform certain actions. The main reason for this system is to simplify the handling of cell IDs. This will allow the client to be more less specific and not require multiple modems. To use with `example-lpp` you need to specify a interface that control commands will be sent over, e.g., `--ctrl-tcp=localhost --ctrl-tcp-port=5432`. All commands are sent as a string with a leading `/` and ending with `\r\n`. See the example `ctrl-switch` which demonstrates how to send control commands to the client in C/C++. | ||
|
||
## Commands | ||
|
||
Here are the available commands: | ||
* [CID](#cid) | ||
|
||
### CID | ||
|
||
Notify the client that the cell ID has changed. The client will then request (update) the assistance data for the new cell ID. | ||
|
||
Usage: `/CID,L,MNC,MCC,TAC,CID` | ||
|
||
Example: `/CID,L,240,01,0,3` |
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,31 @@ | ||
|
||
add_executable(example_client | ||
"main.cpp" | ||
"assistance_data.cpp" | ||
) | ||
add_executable(examples::client ALIAS example_client) | ||
|
||
target_include_directories(example_client PRIVATE "./") | ||
target_link_libraries(example_client PRIVATE utility modem lpplib Threads::Threads) | ||
target_link_libraries(example_client PRIVATE args) | ||
target_link_libraries(example_client PRIVATE generator::rtcm) | ||
target_link_libraries(example_client PRIVATE generator::spartn) | ||
target_link_libraries(example_client PRIVATE generator::spartn2) | ||
target_link_libraries(example_client PRIVATE dependency::interface) | ||
target_link_libraries(example_client PRIVATE receiver::ublox) | ||
target_link_libraries(example_client PRIVATE receiver::nmea) | ||
target_link_libraries(example_client PRIVATE asn1::generated asn1::helper) | ||
target_link_libraries(example_client PRIVATE scheduler supl lpp loglet) | ||
|
||
set_target_properties(example_client PROPERTIES OUTPUT_NAME "example-client") | ||
set_target_properties(example_client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") | ||
|
||
if (USE_OPENSSL) | ||
target_link_libraries(example_client PRIVATE OpenSSL::SSL) | ||
target_compile_definitions(example_client PRIVATE "USE_OPENSSL=1") | ||
endif (USE_OPENSSL) | ||
|
||
if (USE_ASAN) | ||
target_compile_options(example_client PRIVATE -fsanitize=address,undefined,leak) | ||
target_link_libraries(example_client PRIVATE -fsanitize=address,undefined,leak) | ||
endif (USE_ASAN) |
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,4 @@ | ||
# Example - Client | ||
|
||
WORK IN PROGRESS - This example is not yet complete. | ||
|
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,42 @@ | ||
#include "client.hpp" | ||
|
||
#include <loglet/loglet.hpp> | ||
|
||
#define LOGLET_CURRENT_MODULE "client" | ||
|
||
static void process_rtcm(const Config& config, lpp::Message message) { | ||
INFOF("processing RTCM message"); | ||
} | ||
|
||
static void process_spartn_old(const Config& config, lpp::Message message) { | ||
INFOF("processing SPARTN_OLD message"); | ||
} | ||
|
||
static void process_spartn(const Config& config, lpp::Message message) { | ||
INFOF("processing SPARTN message"); | ||
} | ||
|
||
static void process_xer(const Config& config, lpp::Message message) { | ||
INFOF("processing XER message"); | ||
} | ||
|
||
static void process_uper(const Config& config, lpp::Message message) { | ||
INFOF("processing UPER message"); | ||
} | ||
|
||
static void process_lpp_rtcm(const Config& config, lpp::Message message) { | ||
INFOF("processing LPP_RTCM message"); | ||
} | ||
|
||
void process_assistance_data(const Config& config, lpp::Message message) { | ||
INFOF("received assistance data"); | ||
|
||
switch (config.output_format) { | ||
case OutputFormat::RTCM: process_rtcm(config, std::move(message)); break; | ||
case OutputFormat::SPARTN_OLD: process_spartn_old(config, std::move(message)); break; | ||
case OutputFormat::SPARTN: process_spartn(config, std::move(message)); break; | ||
case OutputFormat::XER: process_xer(config, std::move(message)); break; | ||
case OutputFormat::UPER: process_uper(config, std::move(message)); break; | ||
case OutputFormat::LPP_RTCM: process_lpp_rtcm(config, std::move(message)); break; | ||
} | ||
} |
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,6 @@ | ||
#pragma once | ||
#include "config.hpp" | ||
|
||
#include <lpp/message.hpp> | ||
|
||
void process_assistance_data(const Config& config, lpp::Message message); |
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,18 @@ | ||
#pragma once | ||
#include <lpp/assistance_data.hpp> | ||
#include <supl/cell.hpp> | ||
|
||
enum class OutputFormat { | ||
RTCM, | ||
SPARTN_OLD, | ||
SPARTN, | ||
XER, | ||
UPER, | ||
LPP_RTCM, | ||
}; | ||
|
||
struct Config { | ||
lpp::RequestAssistanceData::Type assistance_data_type; | ||
supl::Cell cell; | ||
OutputFormat output_format; | ||
}; |
Oops, something went wrong.