https://github.com/uniquid/tank-c
tank simulator - reference C implementation of a Uniquid machine node
https://github.com/uniquid/tank-c
Last synced: 11 months ago
JSON representation
tank simulator - reference C implementation of a Uniquid machine node
- Host: GitHub
- URL: https://github.com/uniquid/tank-c
- Owner: uniquid
- License: mit
- Created: 2017-10-20T16:04:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T12:34:52.000Z (over 6 years ago)
- Last Synced: 2025-05-04T23:38:23.102Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 83 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tank-c - tank simulator
## C implementation of a Uniquid node
tank-c is an application that demonstarte the Uniquid Identity and Access Management sdk using the uidcore-c library.
It builds on generic Linux
It requires:
* libcurl
* libpthread
* uidcore-c
* libpaho-mqtt
These packages should be enaugh to compile on a fresh installed Ubuntu 17.10
build-essential
cmake
libcurl4-openssl-dev
## download
clone with --recurse-submodules:
git clone --recurse-submodules git@github.com:uniquid/tank-c.git
cd tank-c
## build the project:
make
## run
cd bin
./tank-c
## how to use
**provider**
**tank-c** implements a Uniquid node with provider and user capabilities.
This is a simplified version of the tank-c used for the stress test of the infrastructure.
As user it can send rpc requests to another Uniquid node.
The provider, in addition to the systems reserved, implements the following RPC functions:
**RPC 33** - echo
parameters:
- "string to be echoed" -
**RPC 34** - returns status information
parameters:
- "" - none
**RPC 35** - input faucet
parameters:
- "open" - open the input faucet
- "close" - closes the input faucet
**RPC 36** - output faucet
parameters:
- "open" - open the output faucet
- "close" - closes the output faucet
**RPC 37** - returns the tank status
parameters:
- "" - none
**user**
The user functionality is accessed from the console command line.
Type:
"ProviderName" "Method" "parameter"
to request the node "ProviderName" to execute method "Method" passing "parameter" to the method.
Es.
UID984fee057c6d 33 {\"hello\":\"world\"}