README: fix example snippets to match current types#4
README: fix example snippets to match current types#4gctucker wants to merge 1 commit intoOpenEnergyTools:mainfrom
Conversation
JakobVogelsang
left a comment
There was a problem hiding this comment.
Thank you for the catch. Obviously forgot to check with the README after changing the types. I would only fix two minor comments and it then can get be merged.
README.md
Outdated
| src_addr: [0x00, 0x11, 0x22, 0x33, 0x44, 0x55], | ||
| tci: Some([0x81, 0x00, 0xa0, 0x00]), // VLAN tag (optional) | ||
| tpid: Some([0x81, 0x00]), // VLAN tag (optional) | ||
| tci: Some([0xa0, 0x00]), |
There was a problem hiding this comment.
Nice catch. I would set it to tci: Some([0x80, 0x00]) which is the common default of VLAN_ID = 0 and VLAN_Priority = 4.
There was a problem hiding this comment.
Sure, I've updated it. It would probably be a good idea to replace the plain [u8; 2] type with something that describes the possible values and document it in the code.
| let asdu = SavAsdu { | ||
| sv_id: "IED1_SMV1".to_string(), | ||
| msv_id: "IED1_SMV1".to_string(), | ||
| dat_set: None, |
There was a problem hiding this comment.
Nice catch again. I would only propose to set a data set string which is commonly something like:
AA1E1Q01BCLD1/LLN0.dataSetName
There was a problem hiding this comment.
Updated too. Thanks for the review. I'm not familiar with this kind of data, are there publicly available examples or documentation anywhere?
6679279 to
c93e353
Compare
|
FYI - This was tested with my experimental project: https://github.com/gctucker/iec61850lib-hack |
Fix the README example snippets to encode and decode GOOSE and SMV to match the latest changes in the data structure types. Tweak some of the values used as suggested by Jakob. Signed-off-by: Guillaume Tucker <gtucker@gtucker.io>
c93e353 to
7b98657
Compare
Fix the README example snippets to encode and decode GOOSE and SMV to match the latest changes in the data structure types.