public void parse(byte[] buffer, int packetLen, Endpoints endpoint) {
    int bufLen = buffer.length;
    final String roadCode = endpoint.getRoadCode();
    final int unit = endpoint.getUnit();
    try {
        for ( int i = 0; i < bufLen; i++ ) {
            if ( buffer[i] == 61 && i >= packetLen - 1 ) {
                int begin = i - packetLen + 1;
                byte[] val = new byte[packetLen];
                System.arraycopy(buffer, begin, val, 0, packetLen - 1);
                toParse(roadCode, unit, val,1);
            }else if( buffer[i] == 61 && i == 0 ){
                //处理“=”是开始为的数据
                int begin = i+1;
                byte[] val = new byte[packetLen];

                System.arraycopy(buffer, begin, val, 0, packetLen - 1);
                toParse(roadCode, unit, val,1);
            }
        }
    }catch ( Exception e ){
        exceptionTemplate.dealException(e, ProgramErrType.SERIALPORT_DECODING_EXCEPTION,"[Mina] 串口设备-解码异常",endpoint.toString(),LOG);
    }
}