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

Add example to documentation of "payload" field #115

Open
stefan-brus-frequenz opened this issue Nov 17, 2023 · 0 comments
Open

Add example to documentation of "payload" field #115

stefan-brus-frequenz opened this issue Nov 17, 2023 · 0 comments
Labels
part:docs Affects the documentation priority:low This should be addressed only if there is nothing else on the table type:enhancement New feature or enhancement visitble to users
Milestone

Comments

@stefan-brus-frequenz
Copy link
Contributor

What's needed?

The "payload" field could use some clarification as to what it's for.

Proposed solution

Proposed documentation example:

// Message representing one dispatch.
//
// Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC
// to its local timezone.
message Dispatch {
  // ... [other fields] ...

  // The dispatch payload
  // This field is used to carry additional, user-defined data relevant to the dispatch.
  //
  // The payload typically contains a JSON object with settings that dictate how the dispatch should be processed.
  // This provides the flexibility to include a variety of dispatch parameters without altering the API structure.
  //
  // The payload is expected to follow a specific format that the downstream applications consuming the dispatch API
  // are responsible for understanding and processing.
  //
  // Example JSON payload:
  // {
  //   "settings": {
  //     "power_max": 10,   // Maximum power level for the dispatch (in kW)
  //     "soc_min": 20,     // Minimum state of charge for battery storage (in %)
  //     "soc_max": 80      // Maximum state of charge for battery storage (in %)
  //   }
  // }
  //
  // In this example, a microgrid could use this payload to set operational parameters such as the maximum power output
  // of a solar PV array or the charge/discharge limits of a battery storage system. This flexibility allows the microgrid
  // to dynamically adjust its behavior based on the current needs or conditions, such as optimizing battery usage or
  // limiting PV output during low demand periods.
  google.protobuf.Struct payload = 11;

  // ... [other fields] ...
}

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

@stefan-brus-frequenz stefan-brus-frequenz added part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed type:enhancement New feature or enhancement visitble to users part:docs Affects the documentation priority:low This should be addressed only if there is nothing else on the table and removed part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed labels Nov 17, 2023
@Marenz Marenz added this to the v1.0.0 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:docs Affects the documentation priority:low This should be addressed only if there is nothing else on the table type:enhancement New feature or enhancement visitble to users
Projects
None yet
Development

No branches or pull requests

2 participants