frequenz.api.dispatch.v1.dispatch_pb2 ¤
Generated protocol buffer code.
Classes¤
frequenz.api.dispatch.v1.dispatch_pb2.ComponentIDs ¤
frequenz.api.dispatch.v1.dispatch_pb2.ComponentSelector ¤
Bases: Message
Parameter for controlling which components a dispatch applies to Either a set of component IDs, or all components belonging to a category
frequenz.api.dispatch.v1.dispatch_pb2.Dispatch ¤
Bases: Message
Message representing one dispatch.
Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC to its local timezone.
Source code in frequenz/api/dispatch/v1/dispatch_pb2.py
Attributes¤
create_time
property
¤
The creation time in UTC This is set when a dispatch is created via the create request message
is_active
instance-attribute
¤
The "active" status An active dispatch is eligible for processing, either immediately or at a scheduled time in the future, including recurring dispatches. If a dispatch is set to inactive, it won't be processed even if it matches all other conditions, allowing for temporary disabling of dispatches without deletion.
is_dry_run
instance-attribute
¤
The "dry run" status A dry run dispatch is executed for logging and monitoring purposes without affecting the microgrid components. This is useful, for example, in scenarios where a user may want to test dispatch behavior without actually affecting any component states. Notably, a dispatch can be both "dry run" and "active," allowing for the system to generate logs and observe behavior without making actual changes.
type
instance-attribute
¤
The dispatch type. Contains user-defined information about what "type" of dispatch this is. Downstream applications that consume the dispatch API are responsible for understanding and processing this field.
update_time
property
¤
The update time in UTC This is set when a dispatch is modified via the update request message
frequenz.api.dispatch.v1.dispatch_pb2.DispatchCreateRequest ¤
frequenz.api.dispatch.v1.dispatch_pb2.DispatchDeleteRequest ¤
frequenz.api.dispatch.v1.dispatch_pb2.DispatchFilter ¤
Bases: Message
Parameters for filtering the dispatch list
Attributes¤
is_active
instance-attribute
¤
Filter by active status If this field is not set, dispatches of any active status will be included.
is_dry_run
instance-attribute
¤
Filter by dry run status If this field is not set, dispatches of any dry run status will be included.
selectors
property
¤
Filter by component ID or category
time_interval
property
¤
Filter by time interval If no interval is provided, all dispatches starting from the current timestamp will be included.
frequenz.api.dispatch.v1.dispatch_pb2.DispatchGetRequest ¤
frequenz.api.dispatch.v1.dispatch_pb2.DispatchList ¤
frequenz.api.dispatch.v1.dispatch_pb2.DispatchListRequest ¤
frequenz.api.dispatch.v1.dispatch_pb2.DispatchUpdateRequest ¤
Bases: Message
Message to update the dispatch with the given ID, with the given attributes
Attributes¤
Classes¤
DispatchUpdate ¤
Bases: Message
Message containing the updated dispatch attributes
property
¤The start time When updating a dispatch, ensure that the starting timestamp is set to the current time or any future time. Timestamps earlier than the current time are not allowed.
Bases: Message
Message containing the updated recurrence rule attributes
property
¤On which hour(s) of the day does the event occur
property
¤On which minute(s) of the hour does the event occur
property
¤On which day(s) of the month does the event occur
property
¤On which month(s) of the year does the event occur
property
¤On which day(s) of the week does the event occur
instance-attribute
¤How often this dispatch should recur, based on the frequency
frequenz.api.dispatch.v1.dispatch_pb2.RecurrenceRule ¤
Bases: Message
Ruleset governing when and how a dispatch should re-occur.
Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC to its local timezone.
This definition tries to adhere closely to the iCalendar specification (RFC5545), particularly for recurrence rules. For advanced use-cases or further clarifications, refer to RFC5545.
Examples¤
Every 6 months¤
Weekends only¤
message RecurrenceRule {
Frequency freq = FREQUENCY_WEEKLY;
repeated Weekday byweekdays = [WEEKDAY_SATURDAY, WEEKDAY_SUNDAY];
}
At midnight¤
Every day at midnight.
Nightly¤
Assuming "night" means from 8 PM to 6 AM.
message RecurrenceRule {
Frequency freq = FREQUENCY_DAILY;
repeated uint32 byhours = [20, 21, 22, 23, 0, 1, 2, 3, 4, 5];
}
Attributes¤
byhours
property
¤
On which hour(s) of the day does the event occur
byminutes
property
¤
On which minute(s) of the hour does the event occur
bymonthdays
property
¤
On which day(s) of the month does the event occur
bymonths
property
¤
On which month(s) of the year does the event occur
byweekdays
property
¤
On which day(s) of the week does the event occur
end_criteria
property
¤
When this dispatch should end. A dispatch can either recur a fixed number of times, or until a given timestamp. If this field is not set, the dispatch will recur indefinitely.bool
interval
instance-attribute
¤
How often this dispatch should recur, based on the frequency Example: - Every 2 hours: freq = FREQUENCY_HOURLY interval = 2
Classes¤
EndCriteria ¤
Bases: Message
Controls when a recurring dispatch should end
Frequency ¤
Bases: _Frequency
Enum representing the frequency of the recurrence
Weekday ¤
Bases: _Weekday
Enum representing the day of the week