Skip to content

entities

StatusUpdate dataclass

Represents a status update event in the system.

Attributes:

Name Type Description
timestamp datetime

The timestamp when the status update was created.

severity UpdateSeverity

The severity level of the update.

event_type str

A string representing the type of the event.

payload dict

A dictionary containing data relevant to the update.

context str

A string providing additional context about the update.

Source code in inference/core/interfaces/camera/entities.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@dataclass(frozen=True)
class StatusUpdate:
    """Represents a status update event in the system.

    Attributes:
        timestamp (datetime): The timestamp when the status update was created.
        severity (UpdateSeverity): The severity level of the update.
        event_type (str): A string representing the type of the event.
        payload (dict): A dictionary containing data relevant to the update.
        context (str): A string providing additional context about the update.
    """

    timestamp: datetime
    severity: UpdateSeverity
    event_type: str
    payload: dict
    context: str

UpdateSeverity

Bases: Enum

Enumeration for defining different levels of update severity.

Attributes:

Name Type Description
DEBUG int

A debugging severity level.

INFO int

An informational severity level.

WARNING int

A warning severity level.

ERROR int

An error severity level.

Source code in inference/core/interfaces/camera/entities.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class UpdateSeverity(Enum):
    """Enumeration for defining different levels of update severity.

    Attributes:
        DEBUG (int): A debugging severity level.
        INFO (int): An informational severity level.
        WARNING (int): A warning severity level.
        ERROR (int): An error severity level.
    """

    DEBUG = logging.DEBUG
    INFO = logging.INFO
    WARNING = logging.WARNING
    ERROR = logging.ERROR

VideoFrame dataclass

Represents a single frame of video data.

Attributes:

Name Type Description
image ndarray

The image data of the frame as a NumPy array.

frame_id FrameID

A unique identifier for the frame.

frame_timestamp FrameTimestamp

The timestamp when the frame was captured.

source_id int

The index of the video_reference element which was passed to InferencePipeline for this frame (useful when multiple streams are passed to InferencePipeline).

Source code in inference/core/interfaces/camera/entities.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@dataclass(frozen=True)
class VideoFrame:
    """Represents a single frame of video data.

    Attributes:
        image (np.ndarray): The image data of the frame as a NumPy array.
        frame_id (FrameID): A unique identifier for the frame.
        frame_timestamp (FrameTimestamp): The timestamp when the frame was captured.
        source_id (int): The index of the video_reference element which was passed to InferencePipeline for this frame (useful when multiple streams are passed to InferencePipeline).
    """

    image: np.ndarray
    frame_id: FrameID
    frame_timestamp: FrameTimestamp
    source_id: Optional[int] = None