Search in sources :

Example 1 with BitmaskVariable

use of net.sourceforge.usbdm.deviceEditor.information.BitmaskVariable in project usbdm-eclipse-plugins by podonoghue.

the class ParseMenuXML method parseBitmaskOption.

/**
 * Parse &lt;bitmaskOption&gt; element<br>
 *
 * @param varElement
 * @throws Exception
 */
private void parseBitmaskOption(BaseModel parent, Element varElement) throws Exception {
    BitmaskVariable variable = (BitmaskVariable) parseCommonAttributes(parent, varElement, BitmaskVariable.class).getVariable();
    try {
        variable.setPermittedBits(getLongAttribute(varElement, "bitmask"));
        variable.setBitList(varElement.getAttribute("bitList"));
    } catch (NumberFormatException e) {
        throw new Exception("Illegal permittedBits value in " + variable.getName(), e);
    }
}
Also used : UsbdmException(net.sourceforge.usbdm.jni.UsbdmException) FileNotFoundException(java.io.FileNotFoundException) BitmaskVariable(net.sourceforge.usbdm.deviceEditor.information.BitmaskVariable)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 BitmaskVariable (net.sourceforge.usbdm.deviceEditor.information.BitmaskVariable)1 UsbdmException (net.sourceforge.usbdm.jni.UsbdmException)1