2023-08-22 17:11:20 -07:00
|
|
|
# basic environment class
|
|
|
|
|
# we have some built-in environment: Calender(include timer),Home(connect to IoT device in your home), ,KnwoledgeBase,FileSystem,
|
|
|
|
|
|
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
from typing import Callable
|
|
|
|
|
|
2023-08-23 11:19:16 -07:00
|
|
|
class EnvironmentEvent(ABC):
|
2023-08-20 22:53:35 -07:00
|
|
|
@abstractmethod
|
|
|
|
|
def display(self) -> str:
|
|
|
|
|
pass
|
|
|
|
|
|
2023-08-23 11:19:16 -07:00
|
|
|
class Environment:
|
2023-08-20 22:53:35 -07:00
|
|
|
def __init__(self) -> None:
|
|
|
|
|
pass
|
|
|
|
|
|
2023-08-22 17:11:20 -07:00
|
|
|
def get_id(self) -> str:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
def attach_event_handler(self,event_id:str,handler:Callable) -> None:
|
|
|
|
|
pass
|
|
|
|
|
|