Downloads

The specification of all our IoT devices, the product briefs, and the operating instructions you can download here for your IoT applications. To make your process more flexible and efficient.

Dusun Gateway Z-wave API

Summary

 

This document lists the API used for Zwave development.

The SDK related to it can be download from DUSUN website. For detailed information, please refer to the example in the SDK sample code.

1. SDK init function

SDK init function

 

Function declaration

BOOL SerialAPI_Init(const char* serial_port, const struct SerialAPI_Callbacks* _callbacks )

Parameter

Parameter

Necessity

Type

Input type

Introduction

serial_port

Yes

Yes

char *

Callback function

SerialAPI_Callbacks

input

input

Seen in example

Serial setting etc, /dev/ttyUSB1

Sample

const struct SerialAPI_Callbacks serial_api_callbacks = {

        ApplicationCommandHandler,

        ApplicationNodeInformation,

        ApplicationControllerUpdate,

        0,

        0,

        0,

        0,

};

if (!SerialAPI_Init("/dev/ttyUSB1", &serial_api_callbacks))

{

    fprintf(stderr, "SerialAPI not initilized\n");

    return 1;

}

2. ZW_Version

 

SDK version query

Function Declaration

BYTE ZW_Version(BYTE *pBuf)

Parameter

None

Sample

char buf[64];

ZW_Version(buf);

printf("Vesion: %s \n", buf );