public PollNxtMessage(POLLTYPE type) : base(COMMAND_TYPE.SYSTEM_REPLY_REQUIRED, SYSTEM_COMMAND.POLL, cbPayload: 2) { this.Payload[0] = (byte)type; // // Set the maximum number of payload bytes to return // switch (type) { case POLLTYPE.PollBuffer: // If we're communicating over USB, the NXT has a 64 byte internal buffer (USBBUF). Five // of these bytes in the reply are overhead (see ProcessReply below), leaving 59 for data. // // Note that the NXT Bluetooth buffer is larger, so this should work for both USB and Bluetooth. // this.Payload[1] = 59; // 59 works; 60 verified to give an error break; default: this.Payload[1] = 59; // not yet tested break; } }
public PollLengthNxtMessage(POLLTYPE type) : base(COMMAND_TYPE.SYSTEM_REPLY_REQUIRED, SYSTEM_COMMAND.POLL_LENGTH, cbPayload: 1) { this.Payload[0] = (byte)type; }