Skip to content

vscp_client_tcp

Åke Hedman edited this page Jun 3, 2021 · 5 revisions

vscp_client_tcp

C++ Client classes

VSCP over tcp/ip (VSCP link protocol).

Files

Sample code

You can find a simple sample here.

Configuration

You configure the client by sending a JSON object to it with the

bool initFromJson(const std::string& config)

call. You can also fetch current configuration data with

std::string getConfigAsJson(void)

The configuration has the following format

{
    "host": "remote host name on form tcp://127.0.0.1:9598 or stcp://127.0.0.1:9598 (secure)",
    "user": "Username to use to login to the remote server",
    "password": "Password to use to login to the remote host",
    "bpoll": "Set to true to use manual polling",
    "connection-timeout": 10,
    "response-timeout": 2000,
    "selected-interface": "FF:EE:DD:CC:BB:AA:99:88:77:66:55:44:33:22:11:00",
    "tls" : {
        "btls": false,
        "bverifypeer": flase,
        "cafile": "CA file",
        "capath": "Path to CA",
        "certfile": "cert file",
        "kefile": "key file",
        "pwleyfile": "Password key file"
    },
    "filter": {
        "priority-filter": 0,
        "priority-mask": 0,
        "class-filter": 0,
        "class-mask": 0,
        "type-filter": 0,
        "type-mask": 0,
        "guid-filter": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00",
        "guid-mask": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
    }
}
Clone this wiki locally