TAILIEUCHUNG - programming LEGO MINDSTORMS phần 3

Điều này là khá hữu ích, nhưng cung cấp cho bạn hầu như không có sự linh hoạt trong cách thức hoạt động của vòng lặp. Mặc dù bạn có thể thay đổi giá trị thặng dư, hoặc thậm chí làm tăng tiêu cực, bằng cách sử dụng cơ sở Bước, vòng lặp luôn luôn hoạt động bằng cách đếm, và các kiểm tra cho dù thoát khỏi | 72 Chapter 2 The Java Communications API public CommPort getCommPort String portName int portType Win32USBPort port new Win32USBPort try if portName 0 port null catch ioexception port null return port In initialize above one can populate the port list IDs. Its counterpart Win32Driver added the lists for both serial and parallel ports to CommPortldentifier. Here I added the possibility of having two towers. It s a meager attempt because we don t have access to a native method that will enumerate all the towers present. Again this is not a full-fledged USB driver we re wrapping some access to the LEGO Company s native USB specific port names listed above were as provided by LEGO s SDK documentation. In theory we have all the parts in place and we add an entry to the properties file Windows Serial Driver Driver Windows USB Driver for Lego Mindstorms Driver This should work but it doesn t. In fact Win32USBPort won t It s because CommPort s initializer is package private all of its subclasses must reside inside the is a serious limitation because we can t just drop in a new type of port without breaking package can t deliver . classes outside of the because the extension would then cease to be standard. What did do to get around this limitation Technically the way around it was to have an additional abstraction between it and The Java Communications API Chapter 2 73 CommPort. In that case it was able to extend without a s because Java Comm supports serial and parallel ports out of the would still run into the problem of having to create a we weren t intending to introduce generic USB port support we just want to add our customized USB port into the mix. Adding generic USB support would require changing the core .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.