Code Monkey home page Code Monkey logo

chirpstack-client's Introduction

ChirpStack Client

Building

How to build

As for many C++ projects, ChirpStack Client can be built using the CMake build system. The minimum required version of CMake is 3.15. To build ChirpStack Client, use the following commands:

$ mkdir bin
$ cd bin
$ cmake ..
$ cmake --build . -- -j 8

The shared libraries will be located at bin/libchirpstack_client.so and bin/libchirpstack_grpc_proto.so.

Note

  • gRPC should be installed in advance. See also: grpc-cpp.
  • You might also need to copy the grpc/third_party/googleapis/google/ and grpc/third_party/protobuf/src/google/ directories to the /usr/local/include/ directory beforehand.

Testing

How to build

To build ChirpStack Client with tests, use the following commands:

$ mkdir bin
$ cd bin
$ cmake -DChirpStackClient_TESTING=ON ..
$ cmake --build . -- -j 8

The test binary files will be located at bin/tests/.

How to configure

Before testing, you have to modify the TOML configuration file located at bin/tests/test_config.toml. Since most of the fields already have a default value, you only need to fill in 3 fields:

  • test.jwt_token
    • Using in the application, device, device_profile, gateway, internal and multicast_group tests.
    • Can be acquired in the Token field after creating a new API key using ChirpStack Application Server web-interface.
  • test.service_profile_id
    • Using in the application, device, device_profile, gateway, internal and multicast_group tests.
    • Can be acquired in the URL after creating a new service-profile using ChirpStack Application Server web-interface.
  • test.global_jwt_token
    • Using in the gateway_profile, network_server, organization, service_profile and user tests.
    • Can be acquired in the Token field after creating a new API key using ChirpStack Application Server web-interface.

Detail

Test Tested functions Configuration parameters
application_test - create_application
- get_application
- update_application
- delete_application
- list_application
- general.application_server
- test.jwt_token
- test.service_profile_id
- test.application.name
device_test - create_device
- get_device
- update_device
- delete_device
- list_device
- create_device_keys
- get_device_keys
- update_device_keys
- delete_device_keys
- activate_device
- deactivate_device
- get_device_activation
- get_random_dev_addr
- enqueue_device_queue_item
- flush_device_queue
- list_device_queue_items
- general.application_server
- test.jwt_token
- test.service_profile_id
- test.application.name
- test.device_profile.name
- test.device.eui
- test.device.nwk_key
- test.device.app_key
- test.device.address
- test.device.app_s_key
- test.device.nwk_s_enc_key
- test.device.s_nwk_int_key
- test.device.f_nwk_int_key
- test.device.f_port
- test.device.payload
device_profile_test - create_device_profile
- get_device_profile
- update_device_profile
- delete_device_profile
- list_device_profile
- general.application_server
- test.jwt_token
- test.service_profile_id
- test.device_profile.name
gateway_test - create_gateway
- get_gateway
- update_gateway
- delete_gateway
- list_gateway
- get_gateway_stats
- get_last_ping
- generate_gateway_client_certificate
- general.application_server
- test.jwt_token
- test.service_profile_id
- test.gateway.id
gateway_profile_test - create_gateway_profile
- get_gateway_profile
- update_gateway_profile
- delete_gateway_profile
- list_gateway_profile
- general.application_server
- test.global_jwt_token
- test.service_profile_id
- test.gateway_profile.name
- test.gateway_profile.bandwidth
- test.gateway_profile.frequency
- test.gateway_profile.spreading_factors
internal_test - login
- profile
- global_search
- create_api_key
- delete_api_key
- list_api_keys
- settings
- open_id_connect_login
- get_devices_summary
- get_gateways_summary
- general.application_server
- test.jwt_token
- test.service_profile_id
- test.internal.admin_username
- test.internal.admin_password
- test.internal.api_key_name
multicast_group_test - create_multicast_group
- get_multicast_group
- update_multicast_group
- delete_multicast_group
- list_multicast_group
- add_device_to_multicast_group
- remove_device_from_multicast_group
- enqueue_multicast_queue_item
- flush_multicast_group_queue_items
- list_multicast_group_queue_items
- general.application_server
- test.jwt_token
- test.service_profile_id
- test.application.name
- test.device_profile.name
- test.device.eui
- test.device.address
- test.device.app_s_key
- test.device.nwk_s_enc_key
- test.device.s_nwk_int_key
- test.device.f_nwk_int_key
- test.device.f_port
- test.device.payload
- test.multicast_group.name
- test.multicast_group.address
- test.multicast_group.app_s_key
- test.multicast_group.nwk_s_key
network_server_test - create_network_server
- get_network_server
- update_network_server
- delete_network_server
- list_network_server
- get_adr_algorithms
- general.application_server
- test.global_jwt_token
- test.network_server.name
- test.network_server.server
organization_test - create_organization
- get_organization
- update_organization
- delete_organization
- list_organization
- add_organization_user
- get_organization_user
- update_organization_user
- delete_organization_user
- list_organization_users
- general.application_server
- test.global_jwt_token
- test.organization.name
- test.organization.display_name
- test.user.username
- test.user.password
service_profile_test - create_server_profile
- get_server_profile
- update_server_profile
- delete_server_profile
- list_server_profile
- general.application_server
- test.global_jwt_token
- test.network_server.name
- test.network_server.server
- test.organization.name
- test.organization.display_name
- test.service_profile.name
user_test - create_user
- get_user
- update_user
- delete_user
- list_user
- update_user_password
- general.application_server
- test.global_jwt_token
- test.user.username
- test.user.password

Note

  • The network-server and service-profile tests require manually running a new instance of ChirpStack Network Server to reduce the effects on other existing instances. To do that, they will generate 2 bash files start-sample-network-server.sh and stop-sample-network-server.sh to the bin/tests/ directory. You should follow the instruction of the tests to be able to run them correctly.

License

This project is licensed under the terms of the MIT license.

chirpstack-client's People

Contributors

chungphb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.