Skip to content

0.2.0

Compare
Choose a tag to compare
@VincentFoulon80 VincentFoulon80 released this 11 Jun 19:14
· 26 commits to master since this release

Additions

  • Adding save and load functions to Board.
    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 factory
    • save_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 in save_data , you must restore the state of your chip.

    Note that save_data and load_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's uuid 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