Code Monkey home page Code Monkey logo

mqtt-sn-parser's Introduction

MQTT-SN parser

MQTT-SN parser is a library designed for encoding and decoding of MQTT-SN 1.2 packets. It is written in Java. MQTT-SN parser is developed by Mobius Software.

Getting Started

First you should clone MQTT-SN parser. Then you should add the following lines within the <project> element of pom.xml file of your project:

<dependency>
	<groupId>com.mobius-software.mqttsn</groupId>
	<artifactId>mqtt-sn-parser</artifactId>
	<version>0.0.1-SNAPSHOT</version>
</dependency>

Now you are able to start using MQTT-SN parser.

Example

Create message, encode, decode

		try
		{
			// Create message
			boolean cleanSession = true;
			int duration = 10;
			String clientID = "example_client";
			boolean willPresent = false;
			Connect message = new Connect(cleanSession, duration, clientID, willPresent);

			// Encode
			ByteBuf buf = Parser.encode(message);

			// Decode
			SNMessage decoded = Parser.decode(buf);

			Assertion.assertMessage(message, decoded);
		}
		catch (Exception e)
		{
			e.printStackTrace();
			fail();
		}

mqtt-sn-parser's People

Contributors

anatolysatanovskiy-mobius avatar annakanunnikova avatar juliachernobrivets-mobius avatar yulianoifa-mobius avatar

Stargazers

 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.