Customized Formats provides a sophisticated and versatile way to develop an encoding structure for a data block. The 16 bytes can be broken down into Elements, and each element can be filled with fixed or database data in a variety of ways.
When the Data Type is set to Custom and the Customize button is pressed a dialog like this will appear:
The elements are formed from left to right, and the above dialog shows how the elements are formatted. If we look at element 2 for example, it is interpreted this way:
Position is Group 2
Name is Card Number
Occupies
bytes 2 & 3
Is two bytes long
Expects data in decimal format
Is
byte oriented
Output of words Least Significant Byte (LSB) first is not
relevant
Data is right justified
Data is filled from the right
Padding
value is 0
Data comes from the BadgeNumber field in the database
Sample
data is 3858
The other elements can be interpreted similarly. The lettered columns are as follows:
DF: Data
Format – D = Decimal H = Hexadecimal C= Character
W: Data Element Width - B =
Byte W = Word
L: Output Words
LSB first – N = No Y = Yes - = Not Applicable
J: Justify Data – L = Left R=
Right
F: Fill Group - L
= From the Left R = From the Right
Values enclosed in <> are hexadecimal values. Text enclosed in «» is the name of the database field the data will be drawn from. Text enclosed in || indicates the field from the User Data that the data will be drawn from. The Padding column shows the value that will be used for all bytes in the group that are not filled with data.
The Value column shows either the fixed value to be used, or the source of the data. The Sample column shows the data that will be used to develop the Sample encoding lower in the dialog.
The Sample In Hexadecimal box shows how the sample will be encoded, representing in each byte as its hexadecimal number.
The Sample In Characters box shows how the same data would like in character format. Any values which do not have a character representation are shown as ї. The vertical bar | is used to separate each group and is not part of the data in either box.
To add a new element click the Add button. This button will not be available if all 16 bytes are defined. To edit an existing group, click the element in the table then click the Edit button. You can also double click the element in the table to edit it. To delete an element, highlight it and click the Delete button.
To reposition an element in the table highlight it and use the up and down arrow buttons to move it as desired.
When you click Add or Edit, a dialog like this will appear:
Here you can define all the parameters for the element as follows:
Element Name: a convenience to note the purpose of the element
Element Size:
Length: In bytes or words
Element Type: Byte or Word
Least Significant Byte First – only
applicable for Word element types, outputs each byte of the word least
significant first when checked
Right
Justify Data In Element – when checked, the data is positioned at the
right end of the element
Fill From Right
To Left – when checked. Data fills the element from right to left
Element Data:
Data Format – Decimal, Hexadecimal or
Character
Data
Source – Fixed or
from the database or User Data
Fixed Data
– Only available when the Data Format is “Use Fixed Data”
Sample Data – Only available when not “Use
Fixed Data”. When Fixed, the fixed data will be used in the Sample
boxes.
Padding Data – The byte
to use to fill out the Element