Step 5: Define Your Data -- Visual Data Designer
A key part of the project is your data. When you start out, you may not yet have a clear idea of all the data items you’ll need. That’s what the Visual Data Designer is for. Just click the button marked Define Data.
Using the Visual Data Designer
Visual Data Designer works somewhat like a smart sketch pad. You use it to graphically sketch the data items you will use, which we will refer to as HIDmaker's USB variables. Visual Data Designer can also set and show groupings of the data items (the groupings are called “Collections” in USB-speak).
If you’ve ever used a visual programming language like Visual Basic, Delphi, or C++ Builder, you’ll feel right at home. To add a new data item, you first click on a button on the Data Palette shown on the left, then you click on the drawing area on the right to create a data item of that type to your project. Items created directly on the drawing area are part of the project’s main group of data, which the USB Human Interface Device Class Specification calls the “Application Collection.”
Sometimes you’ll want to group data items together, perhaps because they correspond to some physical part of your device (like a group of buttons on a game pad), or perhaps because the data items belong together for some other logical reason. To do that, you first click either the Physical Collection or the Logical Collection button on the Data Palette, and click on the drawing area to add a panel that represents that collection. Go ahead and move it around or resize it if you want. Then, click one of the regular data items on the Data Palette, and then click on the collection panel you added to the drawing area. This will create a data item inside the collection.
You can continue this process as long as you like. You can add new data items on the main level, or inside a collection. Each one of these data items you have created becomes one of HIDmaker's USB variables, which gets transported over the USB cable.
You can add more collections, either onto the main level, or you can even create collections inside of collections if you want. As you go, you’ll want to move things around on the drawing area to give yourself room.
Describing Your Data
To define the characteristics of each data item, just double-click on the item in the drawing area, and make your choices in the dialog box. For your convenience, HIDmaker will make some preliminary guesses for you, but you can always change them as you see fit.
We can’t go into a full explanation here of what all the settings mean, but you can find out what you need by just clicking the Help or the Advice button. (In fact, we've set things up so that most of the time, the default values are just fine.) Most importantly, you’ll find that the controls will interact in such a way as to prevent you from entering choices that don’t make sense. For example, some choices in the screen shot are invalid for “array” items, so if you click “Array,” the corresponding controls disable themselves. HIDmaker’s visual environment always checks your work and will not let you make errors.
When you’re satisfied with the data items you’ve defined (i.e., the set of HIDmaker's USB Variables that you have created and named), and you are ready to go on, you can exit from the Visual Data Designer. You can save the data (USB variable) definitions to a file if you want. (This is a really good idea, because you can then easily re-use that set of USB variables in another project, just by opening that file in the Visual Data Designer for that new project.)
Exiting the Visual Data Designer will take you back to HIDmaker FS’s Configuration and Interfaces page. Labels will appear under the Define Data button that indicate what sort of USB Endpoints are needed, so check the boxes to dedicate the necessary Endpoints for this Interface, and you’re ready to go on.
Clicking the Next button will cause HIDmaker FS to check everything you’ve entered so far, and if all is OK, to convert the information you’ve entered into standard USB Descriptors, including Device, Configuration, Interface, Endpoint, and Report descriptors.
You’re just about done.
Next: Step 6: Generate and View the Code >>