Package com.nabalive.server.web

Source Code of com.nabalive.server.web.ChorTest

package com.nabalive.server.web;

import org.apache.commons.codec.binary.Hex;
import org.jboss.netty.buffer.ChannelBuffer;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* Created by IntelliJ IDEA.
* User: Julien Cheype
* Date: 12/12/11
*/
public class ChorTest {

    @Test
    public void testGenChor() throws Exception {
        ChorBuilder chorBuilder = new ChorBuilder("10,0,motor,1,20,0,0,0,led,2,0,238,0,2,led,1,250,0,0,3,led,2,0,0,0", 5);
        ChannelBuffer buffer = chorBuilder.build();
        System.out.println("length: " + buffer.readableBytes());
        System.out.println(Hex.encodeHexString(buffer.array()));
    }
}
TOP

Related Classes of com.nabalive.server.web.ChorTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.