0.2.0
Additions
-
Adding
save
andload
functions toBoard
.
In consequence,Chip
trait now needs four new methods:get_uuid() -> u128
: Give a unique id to maintain continuity when saving. This uuid must not maintain any information other that identity. When saving, this value will be used to link the traced pins to their respective chip.get_type() -> &str
: Give a unique name for the chip struct, it must be the same for every chips of the same struct. This value will be used to rebuild the correct Struct based on this name with the help of the chip factorysave_data() -> Vec<String>
: Create a Vec of String that must contain every information you need to restore your chip to a certain state. This will be saved in the resulting file.load_data(&[String])
: Using the array of String you provided insave_data
, you must restore the state of your chip.
Note that
save_data
andload_data
are optional, but if you do not implement them their state won't be saved at all. Useful for "I'm doing it later" or "my chip don't need to save data". -
Pin::new()
now require that you provide your chip'suuid
as a first parameter to keep track of which chip a Pin comes from. -
Board can now provide you its sockets and traces, and also give you a specific socket based on the uuid of the plugged chip. This will be useful for frontend usage