Create Android Demo with TCP/IP Protocol.

Related tags

App TCP-IP-Android
Overview

DEMO说明文档

本demo为Java 编写的给Android手机或平板使用TCP方式控制Dobot协作机器人CR(以下简称CR)的DEMO

DEMO系统要求

Android 4.3版本以上即可

工程文件说明

工程文件需要使用Android Studio打开,请使用4.0版本的Android Studio
工程文件目录下分为四个模块分别为app、socket-client、socket-common-interface、socket-core。其中app为demo的主要模块,用于对CR的TCP通讯协议的封装以及实现部分简单的功能交互,如上使能、清除报警、急停、点动、MovJ和修改IO等功能。剩下的模块为实现TCP通讯功能的Socket客户端的底层实现。
在app包内主要分为Client、Message和RobotState模块,分别对应了TCP客户端的实现,TCP通讯协议的封装和机器人状态的实时封装。

  • Client中实现了三个Client对应了CR三个端口和三种形式的消息协议。APIClient对应了29999端口,实现了一个一发一收的应答客户端。MoveClient对应了30003端口,只进行发送工作对应了CR的运动指令。StateClient对应了30004端口只进行接受机器人的状态协议。
  • Message则为CR的各种发送的消息封装,分为基础的BaseMessage和CRMessage.
  • RobotState则是对30004端口返回的数据进行了封装,用于生成各种CR的参数。

DEMO documentation

This demo is a DEMO written in Java for Android phones or tablets to use TCP to control Dobot collaborative robot CR (hereinafter referred to as CR)

DEMO OS requirements

Android version 4.3 or higher

Project file description

The project file needs to be opened by Android Studio, please use Android Studio version 4.0 or higher. The project file directory is divided into four modules: app, socket-client, socket-common-interface, and socket-core. The app is the main module of the demo, which is used to encapsulate the TCP communication protocol of CR and realize some simple functional interactions, such as enable, clear alarm, emergency stop, jog, MovJ and modify IO functions. The remaining modules are the underlying implementation of the Socket client that implements the TCP communication function. The app package is mainly divided into Client, Message and RobotState modules, which correspond to the realization of the TCP client, the encapsulation of the TCP communication protocol and the real-time encapsulation of the robot state.

  • Three Clients are implemented in Client, corresponding to three ports of CR and three types of message protocols. APIClient corresponds to port 29999, which implements a response client with one sending and one receiving. MoveClient corresponds to port 30003, and only sends the movement instructions corresponding to CR. StateClient corresponds to port 30004 and only accepts the robot's state protocol.
  • Message is the package of various messages sent by CR, which is divided into basic BaseMessage and CRMessage.
  • RobotState encapsulates the data returned from port 30004 and is used to generate various CR parameters.
You might also like...
A demo for Android font typeface support in React Native!
A demo for Android font typeface support in React Native!

A Step-by-step Guide to a Consistent Multi-Platform Font Typeface Experience in React Native Goal Be able to use font typeface modifiers such as fontW

☀️ Wheater is a small demo application based on modern Android tech-stacks and MVVM architecture. ⛅
☀️ Wheater is a small demo application based on modern Android tech-stacks and MVVM architecture. ⛅

Wheater is a small demo application based on modern Android tech-stacks and MVVM architecture. Tech stack & Open-source libraries Minimum SDK level 19

Lightning Dev Kit Android Demo Wallet

uMlando-wallet Lightning Dev Kit Android Demo Wallet This project uses a .aar package for the Android platforms that provide language bindings for the

Non-decompiling Android vulnerability scanner (DC25 demo lab, CB17)

README trueseeing is a fast, accurate and resillient vulnerabilities scanner for Android apps. It operates on Android Packaging File (APK) and outputs

:octocat: A demo project based on MVVM architecture and material design & animations.
:octocat: A demo project based on MVVM architecture and material design & animations.

GithubFollows A simple demo project based on MVVM clean architecture and material design & animations. Architecture Specs & Open-source libraries Mini

🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.
🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.

TheMovies A simple project for The Movie DB based on Kotlin MVVM clean architecture and material design & animations. How to build on your environment

A demo of the power menu with Reveal and other animations
A demo of the power menu with Reveal and other animations

MaterialPowerMenu A demo of the power menu with Reveal and other animations Some days ago, I saw a gif on Google+ demonstating a concept of Android Po

Book Parking is a demo application based on MVVM architecture. The app allows users to booking parking slots, the app uses firebase for the backend.
Book Parking is a demo application based on MVVM architecture. The app allows users to booking parking slots, the app uses firebase for the backend.

Book Parking is a demo application based on MVVM architecture. The app allows users to booking parking slots, the app uses firebase for the backend.

🎬 A demo project using The Movie DB based on Kotlin MVVM architecture and material design & animations.
🎬 A demo project using The Movie DB based on Kotlin MVVM architecture and material design & animations.

TheMovies2 A simple project using The Movie DB based on Kotlin MVVM architecture and material designs & animations. How to build on your environment A

Owner
Dobot
Dobot Opensource
Dobot
Script Android from TCP socket

What is this? This is an Android application that will execute commands received over TCP port 9988, which includes automatic introspection to call an

Pierre-Hugues HUSSON 9 Jun 3, 2022
This is a open source library on kotlin for Solana protocol.

Solana + RxSolana This is a open source library on kotlin for Solana protocol. The objective is to create a cross platform, fully functional, highly t

Arturo Jamaica 48 Jan 9, 2023
Android-splash-screen-demo - Sample application to demo the various features provided in android-splash-screen

Android Splash screen API demo This is a sample application used to demonstrate the various features provided in android-splash-screen. More details c

Sridhar 1 Jan 3, 2022
OpenWeatherMap-API-Demo - Demo Android Application for OpenWeatherMap API

WeatherForecast Demo Android Application for OpenWeatherMap API Table of Content

Rashid Hussain 0 Jul 10, 2022
Demo app demonstrating how to create and manage notifications locally using a combination of Jetpacks Worker Manager and Broadcast Receiver.

Worker Notification Demo app demonstrating how to create and manage notifications locally using a combination of Jetpacks Worker Manager and Broadcast

Ayia 1 Sep 19, 2022
Abel Suviri 6 Dec 16, 2022
Demo of Downloading Songs/Images through Android Download Manager using RxJava2

Downloader Demo using RxJava Overview This project is for downloading items(songs, images etc) in Android using RxJava2. There are, however 2 conditio

Anshul Jain 168 Nov 25, 2022
Android common lib demo, include ImageCache, HttpCache, DropDownListView, DownloadManager, install apk silent and so on, you can find description

android-demo 关于我,欢迎关注 微博:Trinea 主页:trinea.cn 邮箱:trinea.cn#gmail.com 微信:codek2 依赖:trinea-android-common android-auto-scroll-view-pager viewpager-indica

Trinea 1.1k Dec 30, 2022
A simple chat demo for socket.io and Android

socket.io-android-chat This is a simple chat demo for socket.io and Android. You can connect to https://socket-io-chat.now.sh using this app. Installa

Naoyuki Kanezawa 1.9k Dec 30, 2022
Android Demo App for League of legends's Champions based on MVVM design pattern

?? LOL-Champs If this project is useful, please give it a star ⭐ A Android Sample App with champion information of the League of Legends(LOL) using An

JunBi Kim 69 Dec 19, 2022