if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support vendor data requests."); throw createNotSupportedByBootloaderNode("MSG_VENDOR_GET");
/** * Set the provided vendor data on the node. * * @param name * the vendor specific name * @param value * the value to set * @return the current vendor data values received from the node * @throws ProtocolException */ public VendorData vendorSet(String name, String value) throws ProtocolException { if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support vendor data requests."); throw createNotSupportedByBootloaderNode("MSG_VENDOR_SET"); } BidibMessage result = send(new VendorSetMessage(name, value), null, true, VendorResponse.TYPE); if (result instanceof VendorResponse) { return ((VendorResponse) result).getVendorData(); } LOGGER.warn("No result received for name: {}, value: {}", name, value); return null; }
/** * Get the vendor data with the provided name from the node. * * @param name * the vendor specific name * @return the current vendor data values received from the node * @throws ProtocolException */ public VendorData vendorGet(String name) throws ProtocolException { LOGGER.info("Get vendor message, name: {}", name); if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support vendor data requests."); throw createNotSupportedByBootloaderNode("MSG_VENDOR_GET"); } BidibCommand bidibCommand = requestFactory.createVendorGet(name); BidibMessage result = send(bidibCommand, null, true, VendorResponse.TYPE); if (result instanceof VendorResponse) { return ((VendorResponse) result).getVendorData(); } return null; }
/** * Request the number of features of the node. This call will reset the internal counter for the next * <code>getNextFeature()</code> request. * * @return number of features on the node * @throws IOException * @throws ProtocolException * @throws InterruptedException */ public Integer getFeatureCount() throws ProtocolException { if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support feature requests."); throw createNotSupportedByBootloaderNode("MSG_FEATURE_GETALL"); } BidibMessage response = send(requestFactory.createFeatureGetAll(), null, true, FeatureCountResponse.TYPE); if (response instanceof FeatureCountResponse) { Integer result = ((FeatureCountResponse) response).getCount(); return result; } if (ignoreWaitTimeout) { LOGGER.warn("No response received but ignoreWaitTimeout ist set! Current node: {}", this); return Integer.valueOf(0); } throw createNoResponseAvailable("get feature count"); }
if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support feature requests."); throw createNotSupportedByBootloaderNode("MSG_FEATURE_GETNEXT");
if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support feature requests."); throw createNotSupportedByBootloaderNode("MSG_FEATURE_GETNEXT");
if (isBootloaderNode()) { LOGGER.warn("The current node is a bootloader node and does not support feature requests."); throw createNotSupportedByBootloaderNode("MSG_FEATURE_GET");