Skip to content

Commit

Permalink
v1.4 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricB31 committed Nov 9, 2023
1 parent 3c938b7 commit 20889c2
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 100 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.4](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.4) - 09 Nov 2023

### Removed

* Remove `doc` folder since images are now hosted on the GitHub wiki.

### Changed

* Change `tests_mode` directory name in to `test_modes_rfp`

### Known limitations

* **Test mode G** not supported.
* **Test mode H** not supported.
* **Test mode I** not supported.

## [v1.3](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.3) - 10 Aug 2023

### Changed
Expand Down
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ endif()

set(ADDON_RFP_SOURCES
src/sigfox_ep_addon_rfp_api.c
src/tests_mode/sigfox_rfp_test_mode_a.c
src/tests_mode/sigfox_rfp_test_mode_b.c
src/tests_mode/sigfox_rfp_test_mode_c.c
src/tests_mode/sigfox_rfp_test_mode_d.c
src/tests_mode/sigfox_rfp_test_mode_e.c
src/tests_mode/sigfox_rfp_test_mode_f.c
src/tests_mode/sigfox_rfp_test_mode_g.c
src/tests_mode/sigfox_rfp_test_mode_j.c
src/tests_mode/sigfox_rfp_test_mode_k.c
src/tests_mode/sigfox_rfp_test_mode_l.c
src/test_modes_rfp/sigfox_rfp_test_mode_a.c
src/test_modes_rfp/sigfox_rfp_test_mode_b.c
src/test_modes_rfp/sigfox_rfp_test_mode_c.c
src/test_modes_rfp/sigfox_rfp_test_mode_d.c
src/test_modes_rfp/sigfox_rfp_test_mode_e.c
src/test_modes_rfp/sigfox_rfp_test_mode_f.c
src/test_modes_rfp/sigfox_rfp_test_mode_g.c
src/test_modes_rfp/sigfox_rfp_test_mode_j.c
src/test_modes_rfp/sigfox_rfp_test_mode_k.c
src/test_modes_rfp/sigfox_rfp_test_mode_l.c
)

set(ADDON_RFP_HEADERS
inc/sigfox_ep_addon_rfp_api.h
inc/sigfox_ep_addon_rfp_version.h
inc/tests_mode/sigfox_rfp_test_mode_types.h
inc/test_modes_rfp/sigfox_rfp_test_mode_types.h
)

set(ADDON_RFP_PUBLIC_HEADERS
Expand All @@ -45,13 +45,13 @@ else()
message(FATAL_ERROR "CERTIFICATION Flag must be activated for this addon")
endif()
if((${RC3C} STREQUAL OFF) AND (${RC5} STREQUAL OFF))
list(REMOVE_ITEM ADDON_RFP_SOURCES "src/tests_mode/sigfox_rfp_test_mode_g.c")
list(REMOVE_ITEM ADDON_RFP_SOURCES "src/test_modes_rfp/sigfox_rfp_test_mode_g.c")
endif()
if((${PUBLIC_KEY_CAPABLE} STREQUAL OFF) )
list(REMOVE_ITEM ADDON_RFP_SOURCES "src/tests_mode/sigfox_rfp_test_mode_k.c")
list(REMOVE_ITEM ADDON_RFP_SOURCES "src/test_modes_rfp/sigfox_rfp_test_mode_k.c")
endif()
if(${BIDIRECTIONAL} STREQUAL OFF)
list(REMOVE_ITEM ADDON_RFP_SOURCES "src/tests_mode/sigfox_rfp_test_mode_f.c")
list(REMOVE_ITEM ADDON_RFP_SOURCES "src/test_modes_rfp/sigfox_rfp_test_mode_f.c")
endif()
endif()

Expand Down
227 changes: 154 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,121 +2,202 @@

## Description

This **Sigfox End-Point RF & Protocol addon** show an exemple of the [RF & Protocol test](https://support.sigfox.com/docs/rf-protocol-test-specification) implementation. This addon is an application of the [EP LIB](https://github.com/sigfox-tech-radio/sigfox-ep-lib) to offers a new API provided in the "sigfox_ep_addon_rfp_api.h" to execute different tests mode.
The table below shows the compatibility between EP_ADDON_RFP and EP_LIB version.
The **Sigfox End-Point RF & Protocol addon** shows an example of the [RF & Protocol test](https://support.sigfox.com/docs/rf-protocol-test-specification) implementation. This addon is an application of the [Sigfox End-Point library](https://github.com/sigfox-tech-radio/sigfox-ep-lib) which offers a new API (provided in the `sigfox_ep_addon_rfp_api.h` file) to execute Sigfox test modes.

| **EP_ADDON_RFP** | **EP_LIB** |
|:----------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------:|
| [v1.0](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.0) | [v3.0](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.0) |
| [v1.1](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.1) | [v3.1](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.1) |
| [v1.2](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.2) | [>= v3.2](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.2) |
| [v1.3](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.3) | [>= v3.2](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.2) |
The table below shows the versions compatibility between this addon and the Sigfox End-Point library.

| **EP_ADDON_RFP** | **EP_LIB** |
|:---:|:---:|
| [v1.4](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.4) | >= [v3.2](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.2) |
| [v1.3](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.3) | >= [v3.2](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.2) |
| [v1.2](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.2) | >= [v3.2](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.2) |
| [v1.1](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.1) | [v3.1](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.1) |
| [v1.0](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases/tag/v1.0) | [v3.0](https://github.com/sigfox-tech-radio/sigfox-ep-lib/releases/tag/v3.0) |

## Stack architecture

<p align="center">
<img src="docs/images/sigfox_ep_addon_rfp_architecture.png" width="600"/>
<img src="https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/wiki/images/sigfox_ep_addon_rfp_architecture.drawio.png" width="600"/>
</p>

## Code optimization
## Compilation flags for optimization

The **EP_ADDON_RFP** shared the same compilation flgas as the **EP-LIB**. For more details of these flags see **EP-LIB** repository.
This addon inherits all the [Sigfox End-Point library flags](https://github.com/sigfox-tech-radio/sigfox-ep-lib/wiki/compilation-flags-for-optimization) and can be optimized accordingly.

## Getting Started
The `CERTIFICATION` flag must be enabled to use this addon.

## How to add Sigfox RF & Protocol addon to your project

### Dependencies

The only dependency of this addon is the [Sigfox End-Point library](https://github.com/sigfox-tech-radio/sigfox-ep-lib) source code.

### Submodule

The best way to embed the Sigfox End-Point RF & Protocol addon into your project is to use a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), in a similar way to the library. The addon will be seen as a sub-repository with independant history. It will be much easier to **upgrade the addon** or to **switch between versions** when necessary, by using the common `git pull` and `git checkout` commands within the `sigfox-ep-addon-rfp` folder.

To add the Sigfox RF & Protocol addon submodule, go to your project location and run the following commands:

### Cloning the repository
```bash
$ git clone https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp.git
mkdir lib
cd lib/
git submodule add https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp.git
```

### Usage
This will clone the Sigfox End-Point RF & Protocol addon repository. At project level, you can commit the submodule creation with the following commands:

Like the **EP-LIB** this **EP_ADDON_RFP** can be used in many ways:
* The [original source code](#original-source-code) to used the raw sources files
* The [precompiled source code](#precompiled-source-code) to remove all unused source code and have more readability.
* The [library](#library) to used a compiled library.
```bash
git commit --message "Add Sigfox End Point RF and Protocol addon submodule."
git push
```

### Original source code
With the submodule, you can easily:

#### Dependency
* Update the addon to the **latest version**:

The only dependence is the [EP-LIB](https://github.com/sigfox-tech-radio/sigfox-ep-lib) source code.
```bash
cd lib/sigfox-ep-addon-rfp/
git pull
git checkout master
```

#### Building Process
* Use a **specific release**:

Sources files are available in `inc` and `src` folders and must be copied directly in the embedded project. The configuration flags must be the same than the EP-LIB.
```bash
cd lib/sigfox-ep-addon-rfp/
git pull
git checkout <tag>
```

### Precompiled source code
### Raw source code

You can [download](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases) or clone any release of the Sigfox End-Point RF & Protocol addon and copy all files into your project.

```bash
git clone https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp.git
```

#### Dependency
### Precompiled source code

Before building process install **unifdef**, **cmake** tools and clone or download the [EP_LIB](https://github.com/sigfox-tech-radio/sigfox-ep-lib) from github repository.
The unifdef tool is used to remove dead code and cmake to build.
All precompiles option are the same as EP-LIB (see [README.md](https://github.com/sigfox-tech-radio/sigfox-ep-lib/blob/master/README.md)).
You can [download](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases) or clone any release of the Sigfox End-Point RF & Protocol addon and copy all files into your project. If you do not plan to change your compilation flags in the future, you can perform a **precompilation step** before copying the file in your project. The precompilation will **remove all preprocessor directives** according to your flags selection, in order to produce a more **readable code**. Then you can copy the new files into your project.

#### Building Process
```bash
git clone https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp.git
```

If you want to **precompile** the sources files for a given flags selection, you need to use the **cmake** commands:
Create a build folder:
To perform the precompilation, you have to install `cmake` and `unifdef` tools, and run the following commands:

```bash
$ cd sigfox-ep-addon-rfp
$ mkdir build
$ cd build
cd sigfox-ep-addon-rfp/
mkdir build
cd build/
```

* Precompiling by reading the `inc/sigfox_ep_flags.h` file:
* Precompiling by reading the `sigfox_ep_flags.h` file:

```bash
$ cmake -DUSE_SIGFOX_EP_FLAGS_H=ON \
-DSIGFOX_EP_LIB_DIR=<replace by EP LIB path> ..
$ make precompil_sigfox_ep_addon_rfp
cmake -DSIGFOX_EP_LIB_DIR=<sigfox-ep-lib path> \
-DUSE_SIGFOX_EP_FLAGS_H=ON ..
make precompil_sigfox_ep_addon_rfp
```

* Precompiling by entering the flags selection on command line:

```bash
$ cmake -DUSE_SIGFOX_EP_FLAGS_H=OFF \
-DRC1=ON \
-DRC2=ON \
-DRC3C=ON \
-DRC3D=ON \
-DRC4=ON \
-DRC5=ON \
-DRC6=ON \
-DRC7=ON \
-DAPPLICATION_MESSAGES=ON \
-DCONTROL_KEEP_ALIVE_MESSAGE=ON \
-DBIDIRECTIONAL=ON \
-DASYNCHRONOUS=ON \
-DLOW_LEVEL_OPEN_CLOSE=ON \
-DREGULATORY=ON \
-DSINGLE_FRAME=ON \
-DPARAMETERS_CHECK=ON \
-DCERTIFICATION=ON \
-DPUBLIC_KEY_CAPABLE=ON \
-DVERBOSE=ON \
-DCRC_HW=OFF \
-DERROR_CODES=ON \
-DUL_BIT_RATE_BPS=OFF \
-DT_IFU_MS=OFF \
-DT_CONF_MS=OFF \
-DUL_PAYLOAD_SIZE=OFF \
-DMESSAGE_COUNTER_ROLLOVER=OFF \
-DERROR_STACK=12 \
-DSIGFOX_EP_LIB_DIR=<replace by EP LIB path> ..
$ make precompil_sigfox_ep_addon_rfp
cmake -DSIGFOX_EP_LIB_DIR=<sigfox-ep-lib path> \
-DUSE_SIGFOX_EP_FLAGS_H=OFF \
-DRC1=ON \
-DRC2=ON \
-DRC3C=ON \
-DRC3D=ON \
-DRC4=ON \
-DRC5=ON \
-DRC6=ON \
-DRC7=ON \
-DAPPLICATION_MESSAGES=ON \
-DCONTROL_KEEP_ALIVE_MESSAGE=ON \
-DBIDIRECTIONAL=ON \
-DASYNCHRONOUS=ON \
-DLOW_LEVEL_OPEN_CLOSE=ON \
-DREGULATORY=ON \
-DLATENCY_COMPENSATION=ON \
-DSINGLE_FRAME=ON \
-DUL_BIT_RATE_BPS=OFF \
-DTX_POWER_DBM_EIRP=OFF \
-DT_IFU_MS=OFF \
-DT_CONF_MS=OFF \
-DUL_PAYLOAD_SIZE=OFF \
-DCRC_HW=OFF \
-DMESSAGE_COUNTER_ROLLOVER=OFF \
-DPARAMETERS_CHECK=ON \
-DCERTIFICATION=ON \
-DPUBLIC_KEY_CAPABLE=ON \
-DVERBOSE=ON \
-DERROR_CODES=ON \
-DERROR_STACK=12 ..
make precompil_sigfox_ep_addon_rfp
```

The precompiled files will be generated in the `build/precompil` folder.
The new files will be generated in the `build/precompil` folder.

### Static library

You can also [download](https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp/releases) or clone any release of the Sigfox End-Point RF & Protocol addon and build a **static library**.

```bash
git clone https://github.com/sigfox-tech-radio/sigfox-ep-addon-rfp.git
```

### Library
To build a static library, you have to install `cmake` tool and run the following commands:

```bash
cd sigfox-ep-addon-rfp/
mkdir build
cd build/
```

* Building by reading the `sigfox_ep_flags.h` file:

```bash
cmake -DSIGFOX_EP_LIB_DIR=<sigfox-ep-lib path> \
-DUSE_SIGFOX_EP_FLAGS_H=ON ..
make sigfox_ep_addon_rfp
```

If you want to build a **static library**, you need to run this additionnal **cmake** command:
* Building by entering the flags selection on command line:

```bash
$ make sigfox_ep_addon_rfp
cmake -DSIGFOX_EP_LIB_DIR=<sigfox-ep-lib path> \
-DUSE_SIGFOX_EP_FLAGS_H=OFF \
-DRC1=ON \
-DRC2=ON \
-DRC3C=ON \
-DRC3D=ON \
-DRC4=ON \
-DRC5=ON \
-DRC6=ON \
-DRC7=ON \
-DAPPLICATION_MESSAGES=ON \
-DCONTROL_KEEP_ALIVE_MESSAGE=ON \
-DBIDIRECTIONAL=ON \
-DASYNCHRONOUS=ON \
-DLOW_LEVEL_OPEN_CLOSE=ON \
-DREGULATORY=ON \
-DLATENCY_COMPENSATION=ON \
-DSINGLE_FRAME=ON \
-DPARAMETERS_CHECK=ON \
-DCERTIFICATION=ON \
-DPUBLIC_KEY_CAPABLE=ON \
-DVERBOSE=ON \
-DCRC_HW=OFF \
-DERROR_CODES=ON \
-DUL_BIT_RATE_BPS=OFF \
-DT_IFU_MS=OFF \
-DT_CONF_MS=OFF \
-DUL_PAYLOAD_SIZE=OFF \
-DMESSAGE_COUNTER_ROLLOVER=OFF \
-DERROR_STACK=12 ..
make sigfox_ep_addon_rfp
```

The archive will be generated in the `build/lib` folder.
2 changes: 1 addition & 1 deletion cmake/precompile_addon_rfp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ add_custom_command(
DEPENDS ${CMAKE_BINARY_DIR}/undefs_file
DEPENDS ${CMAKE_BINARY_DIR}/defs_file
DEPENDS ${X}
COMMAND ${CMAKE_COMMAND} -E make_directory ${PRECOMPIL_DIR}/src/tests_mode ${PRECOMPIL_DIR}/inc/tests_mode
COMMAND ${CMAKE_COMMAND} -E make_directory ${PRECOMPIL_DIR}/src/test_modes_rfp ${PRECOMPIL_DIR}/inc/test_modes_rfp
COMMAND unifdef -B -k -x 2 -f ${CMAKE_BINARY_DIR}/undefs_file -f ${CMAKE_BINARY_DIR}/defs_file ${PROJECT_SOURCE_DIR}/${X} > "${PRECOMPIL_DIR}/${X}"
VERBATIM
)
Expand Down
Binary file removed docs/images/sigfox_ep_addon_rfp_architecture.png
Binary file not shown.
2 changes: 1 addition & 1 deletion inc/sigfox_ep_addon_rfp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@

/*** Main version ***/

#define SIGFOX_EP_ADDON_RFP_VERSION "1.3"
#define SIGFOX_EP_ADDON_RFP_VERSION "1.4"

#endif /* __SIGFOX_EP_ADDON_RFP_VERSION_H__ */
File renamed without changes.
2 changes: 1 addition & 1 deletion src/sigfox_ep_addon_rfp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "sigfox_ep_addon_rfp_api.h"
#include "sigfox_ep_addon_rfp_version.h"
#include "sigfox_ep_api.h"
#include "tests_mode/sigfox_rfp_test_mode_types.h"
#include "test_modes_rfp/sigfox_rfp_test_mode_types.h"
#ifdef CERTIFICATION

typedef enum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
*******************************************************************/

#include "tests_mode/sigfox_rfp_test_mode_types.h"
#include "test_modes_rfp/sigfox_rfp_test_mode_types.h"
#include "manuf/mcu_api.h"
#include "sigfox_error.h"
#include "sigfox_ep_api_test.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
*******************************************************************/

#include "tests_mode/sigfox_rfp_test_mode_types.h"
#include "test_modes_rfp/sigfox_rfp_test_mode_types.h"
#include "manuf/mcu_api.h"
#include "sigfox_error.h"
#include "sigfox_ep_api_test.h"
Expand Down
Loading

0 comments on commit 20889c2

Please sign in to comment.