Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C37.118 synchrophasor protocol node #652

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

C37.118 synchrophasor protocol node #652

wants to merge 2 commits into from

Conversation

PJungkamp
Copy link
Contributor

@PJungkamp PJungkamp commented Jun 14, 2023

resolves #254

ToDo

  • Integration test (if possible)
  • Example config
  • clang-format
  • Update file headers
  • Fix comment styles
  • Add documentation to the docs repo

* @author Philipp Jungkamp <[email protected]>
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
* @license Apache 2.0
*********************************************************************************/
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check the new file headers. I think still style is not up-to-date anymore.

int stop() override;
};

} /* namespace c37_118 */
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we now use C++ style comments.

Suggested change
} /* namespace c37_118 */
} // namespace c37_118

@@ -0,0 +1,180 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

File header style (as above)

Status status(Result);
bool is_ok(Result);

// context used to assemble and disassemble data frames with the information contained in config structs
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make comments a sentence: start with capital letter and end with period.

Suggested change
// context used to assemble and disassemble data frames with the information contained in config structs
// Context used to assemble and disassemble data frames with the information contained in config structs.

size_t pmu_index;
};

// placeholder type allowing deferred assignment to a field during serialization
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment style

@@ -0,0 +1,145 @@
#include <array>
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing file header


uint16_t calculate_crc(unsigned char *frame, uint16_t size);

} /* namespace parser */
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment style

namespace c37_118 {
namespace types {

// cartesian phasor representation
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment style

Format imaginary;
};

// polar phasor representation
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment style

};

template <typename Format>
struct Polar<Format, false>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this code isnt clang-format'ed yet..

@stv0g
Copy link
Contributor

stv0g commented Jul 30, 2024

Hey @PJungkamp,

I am wondering: are you still actively working on this? I did some initial review. But it really appears to be still in a draft state..

In order to merge it we are still missing:

  • Integration test (if possible)
  • Example config
  • clang-format
  • Update file headers
  • Fix comment styles
  • Add documentation to the docs repo

(I will add those point to the PR description as well)

PJungkamp and others added 2 commits October 15, 2024 23:00
This includes a simple self-contained parser for IEEE Std C37.118.2 and
a corresponding unit test. The C37.118 node type is a dead stub.

Signed-off-by: Philipp Jungkamp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Add C37.118 node-type
2 participants