Skip to content

JSON input/output support #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
seimit opened this issue Apr 28, 2021 · 2 comments
Open

JSON input/output support #23

seimit opened this issue Apr 28, 2021 · 2 comments
Assignees

Comments

@seimit
Copy link
Collaborator

seimit commented Apr 28, 2021

Requested by Tom : STDF should be able to save and load STDF records in JSON file format.
The format should be specified in this issue and approved before implementation.

@seimit seimit self-assigned this Apr 28, 2021
@seimit
Copy link
Collaborator Author

seimit commented Apr 30, 2021

Here is the proposal for the JSON file format:

  1. Every STDF record will be represented as JSON object:
    {
    "RECORD_NAME" { STDF_DATA }
    }
  2. STDF_DATA is a sequence of STDF field name as in the STDF standard and value formatted according ATDF specification. This will be represent in the JSON file as a list of JSON members:
    STDF_DATA is "RECORD_FIELD_NAME_1":"VALUE", . . . . "RECORD_FIELD_NAME_X":"VALUE"
    Example:
    {
    "FAR":{
    "CPU_TYPE":"2",
    "STDF_VER":"4"
    },
    "MIR":{
    "LOT_ID":"NAS_2314",
    "PART_TYP":"KLS_21098",
    "JOB_NAM":"1",
    "NODE_NAM":"ST_121",
    "TSTR_TYP":"TMN_333",
    "SETUP_T":"1:1:1 1-JAN-2021",
    "START_T":"1:2:41 1-JAN-2021",
    "OPER_NAM":"312",
    "MODE_COD":"PROD",
    "STAT_NUM":"333",
    "SBLOT_ID":"2314_11",
    "TEST_COD":"PROB",
    "RTST_COD":"PROB",
    "JOB_REV":"4"
    }
    }
  3. The fields REC_LEN, REC_TYP and REC_SUB will be not used, because they are related to the binary STDF records information and record identification.
  4. Empty fields (those which are not set) will not be exported into the JSON file.
  5. STDF records which occurred multiple times in the STDF file will be encoded as JSON arrays:
    "RECORD_FIELD_NAME" : [ { "FIELD_1":"DATA_1" "FIELD_X":"DATA_X" } , . . . . , {"FIELD_1":"DATA_1" "FIELD_X":"DATA_X"}]
    Example:
    {
    "FAR":{
    "CPU_TYPE":"2",
    "STDF_VER":"4"
    },
    "MPR":[
    {
    "TEST_NUM":"1",
    "HEAD_NUM":"1",
    "SITE_NUM":"1",
    "TEST_FLG":"1",
    "PARM_FLG":"1"
    },
    {
    "TEST_NUM":"2",
    "HEAD_NUM":"1",
    "SITE_NUM":"1",
    "TEST_FLG":"1",
    "PARM_FLG":"1"
    }
    ]

}
6. String data (CxLENGTH, Cn, Cf) will be represented as ASCII data. Unicode data is not allowed.
7. Integer data (I1, I2, I4, U1, U2, U4) will be represent as numbers.
8. Floating point data (R4, R8) will be represented in decimal notation (for example, 93.2)
or floating point notation (for example, 3.2E-7) (taken from ATDF standard, page 8, 1-7).
9. Time and Data fields will be represent as ASCII text according the ATDF standard (page 8, 1-7).
10. Fixed length bit-encoded data (BLENGTH) will be encoded as ASCII string of "0" or "1" values for each bit, starting from the most significant bit. For example : binary value 10111 (decimal 23) will be encoded as "10111".
11. Variable length bit-encoded (B
n and Dn) data will be encoded as hexadecimal data starting with "0x" prefix. For example:
3 bytes binary value 10111111 01010101 00001111 will be encoded as 0xBF550F.
12. Variable data type (V
n) will be represented as an JSON object with the key taken from STDF standard page 62. For example:
"GEN_DATA":{"7":"1.234E-8"}
13. Nibble data (N*1) will be encoded as hexadecimal data starting with "0x" prefix. Each nibble (4 bits) will be written with single
hexadecimal value.
14. Array of data of the type specified (kxTYPE) will be represented as an JSON array.
Example for array of nibbles: "RTN_STAT":["0xA", "0xB", "0xC"]
Example for array of floats : "RTN_RSLT":["4.21321","0.01E-3","1.12E6"]

@nerohmot
Copy link
Contributor

nerohmot commented May 19, 2021

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants