Snapshot of implementation of limited functionality

This commit is contained in:
2015-06-11 22:44:09 +01:00
parent ecc4ea198f
commit 0178f0ec8d
23 changed files with 703 additions and 185 deletions

View File

@@ -0,0 +1,30 @@
package com.github.boukefalos.tm1638.server;
import base.server.channel.TcpServerClient;
import base.server.channel.TcpServer;
import com.github.boukefalos.tm1638.TM1638;
import com.github.boukefalos.tm1638.helper.ServerHelper;
public class TM1638TcpServer extends TcpServer implements TM1638Server {
protected TM1638 tm1638;
public TM1638TcpServer(TM1638 tm1638, int port) {
this(tm1638, port, BUFFER_SIZE);
}
public TM1638TcpServer(TM1638 tm1638, int port, int bufferSize) {
super(port, TM1638TcpClient.class, bufferSize);
this.tm1638 = tm1638;
//addReceiver(this); make sure client messages get passed on to arduino
}
protected void initClient(TcpServerClient serverClient) {
}
protected void receive(byte[] buffer) {
// write directly to arduino instead of decoding?
ServerHelper.receive(tm1638, buffer);
}
}