| | |
| | | |
| | | |
| | | |
| | | import static com.example.agvcontroller.utils.DateUtils.formatDate; |
| | | |
| | | import io.netty.buffer.ByteBuf; |
| | | import io.netty.buffer.ByteBufUtil; |
| | | import io.netty.buffer.Unpooled; |
| | |
| | | import android.os.Message; |
| | | import android.util.Log; |
| | | |
| | | import com.example.agvcontroller.AGVApplication; |
| | | import com.example.agvcontroller.AGVCar; |
| | | import com.example.agvcontroller.MainActivity; |
| | | import com.example.agvcontroller.action.AGV_11_UP; |
| | |
| | | import com.example.agvcontroller.protocol.AgvAction; |
| | | import com.example.agvcontroller.protocol.AgvPackage; |
| | | import com.example.agvcontroller.protocol.ProtocolType; |
| | | import com.example.agvcontroller.utils.DateUtils; |
| | | |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | import java.net.InetSocketAddress; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | |
| | | if (null != ackType) { |
| | | AgvPackage ackPac = AckMsgBuilder.ofSuccess(pac, ackType); |
| | | AGV_F0_DOWN agv_f0_down = (AGV_F0_DOWN) ackPac.getBody().getMessageBody(); |
| | | Log.d("updown", "上行: " + ip + "[登录包]>>>" + pac.getSourceHexStr()); |
| | | String log = formatDate(new Date(), "yyyy-MM-dd HH:mm:ss") + " 上行: " + ip + "[登录包]>>>" + pac.getSourceHexStr(); |
| | | Log.d("updown", log); |
| | | AGVApplication.addLog(log); |
| | | |
| | | // EventBus.getDefault().post(log); |
| | | |
| | | ctx.writeAndFlush(ackPac); |
| | | } |
| | | final int battery = agv_f0_up.getBattery(); |