@Override
    public void encode(final ByteBuffer buf, final StringBuilder log)
    {
    	encoder.encode(buf, log);
    	
    	final byte tick_time = (byte) 10;
    	final byte ticks = (byte) 240;
        buf.put(tick_time);
        buf.put(ticks);
        final short body_size = (short) body.getRequestSize();
        buf.putShort(body_size);
        
        final boolean pad = needPad();

        if (log != null)
        {
        	log.append("CM_Unconnected_Send\n");
        	log.append("USINT tick_time         : ").append(tick_time).append("\n");
        	log.append("USINT ticks             : ").append(ticks).append("\n");
        	log.append("UINT message size       : ").append(body.getRequestSize()).append("\n");
        	log.append("  \\/\\/\\/ embedded message \\/\\/\\/ (").append(body_size).append(" bytes)\n");
        }
        
        body.encode(buf, log);
        if (pad)
            buf.put((byte) 0);
        
        buf.put((byte) 1); // Path size
        buf.put((byte) 0); // reserved
        buf.put((byte) 1); // Port 1 = backplane
        buf.put((byte) slot);
        if (log != null)
        {
        	log.append("  /\\/\\/\\ embedded message /\\/\\/\\\n");
            if (pad)
                log.append("USINT pad               : 0 (odd length message)\n");
        	log.append("USINT path size         : ").append(1).append(" words\n");
        	log.append("USINT reserved          : 0\n");
        	log.append("USINT port 1, slot ").append(slot).append("\n");
        }
    }