-
Notifications
You must be signed in to change notification settings - Fork 4
UFID Library Documentation
To allow for quick and easy implementation of the UFID standard we have compiled library. For compatiblity the UFID library is compliled in javascript. This document discusses the implementation and proper use of the UFID library
Currently the library is hosed on UFID server, you can access it by adding the following two lines to your page.
<script src="http://ufids.org/ufid_library.js">
</script>
For more flexibility, the UFID library has been coded in sudo class object. All of the functions for encoding and decoding these tags are implemented in the class. The class variable can be displayed as below.
var UFID_test= new UFID();
Because JavaScript doesn't nicely support classes and private variables, two variable naming conventions were used and _ before a variable indicated that it should not be changed, and doing so could change functionality of the standard. all other varibles can be changed written as part of either generateing a new code, or decoding a code.
You can access these variables by replacing the * with the object name.
*.version
*.flags
*.diameter
*.tolerance
*.glass_transition_temp
*.print_temp
*.minimum_extrusion_temp
*.do_not_exceed_temp
*.chamber_temp
*.bed_temp
*.color
*.opacity
*.material_properties
*.mixture_id
*.volume
*.material_properties
*.gtin
*.hex
*.human_readable_string
*.base_url
These variables can be read, but should not be written.
*._version_bit_length
*._flags_bit_length
*._nominal_diameter_bit_length
*._tolerance_bit_length
*._glass_transition_temp_bit_length
*._print_temp_bit_length
*._minimum_extrusion_temp_bit_length
*._do_not_exceed_temp_bit_length
*._chamber_temp_bit_length
*._bed_temp_bit_length
*._color_bit_length
*._opacity_bit_length
*._material_properties_bit_length
*._mixture_id_bit_length
*._volume_bit_length
*._gtin_bit_length
*._full_bit_length
*.interpretBinary()
*.check_values()
*.compile_hex()
*.interpret_hash()
*.make_url()
*.download_slicer_ini()
*.download_cura_ini()
*.download_kiss_ini()
Explained examples are at the following locations: Simple Example