Skip to content

Commit

Permalink
another
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamillar committed Dec 22, 2024
1 parent 2bf65ef commit 8214a02
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions gw_spaceheat/actors/scada.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import asyncio
import enum
from enum import auto
import uuid
import threading
import time
from typing import Any, List, Optional, cast

import dotenv
from transitions import Machine
from gw.enums import GwStrEnum
from gwproto.message import Header
from gwproactor.external_watchdog import SystemDWatchdogCommandBuilder
from gwproactor.links import LinkManagerTransition
Expand Down Expand Up @@ -56,6 +58,29 @@
FsmEvent, GoDormant, LayoutLite, PicoMissing, ScadaParams,
SendLayout, WakeUp)


class DispatchContractState(GwStrEnum):
ContractSuspended = auto()
ScadaNotReady = auto()
ScadaReady = auto()
DispatchLive = auto()

@classmethod
def enum_name(cls) -> str:
return "dispatch.contract.state"


class DispatchContractEvent(GwStrEnum):
SlaViolated = auto()
Reauthorized = auto()
WeatherAndTempsAvail = auto()
AtnWantsControl = auto()

@classmethod
def enum_name(cls) -> str:
return "dispatch.contract.event"


ScadaMessageDecoder = create_message_model(
"ScadaMessageDecoder",
[
Expand Down

0 comments on commit 8214a02

Please sign in to comment.