Skip to content

README: fix example snippets to match current types#4

Open
gctucker wants to merge 1 commit intoOpenEnergyTools:mainfrom
gctucker:readme-fixup
Open

README: fix example snippets to match current types#4
gctucker wants to merge 1 commit intoOpenEnergyTools:mainfrom
gctucker:readme-fixup

Conversation

@gctucker
Copy link

Fix the README example snippets to encode and decode GOOSE and SMV to match the latest changes in the data structure types.

Copy link
Contributor

@JakobVogelsang JakobVogelsang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. I would set it to tci: Some([0x80, 0x00]) which is the common default of VLAN_ID = 0 and VLAN_Priority = 4.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch again. I would only propose to set a data set string which is commonly something like:

AA1E1Q01BCLD1/LLN0.dataSetName

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated too. Thanks for the review. I'm not familiar with this kind of data, are there publicly available examples or documentation anywhere?

@gctucker
Copy link
Author

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>
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

Successfully merging this pull request may close these issues.

2 participants