Skip to content

status πŸ”—

Interface to the struct vaccel_tf_status C object.

Status πŸ”—

Status(error_code: int = 0, message: str = '')

Bases: CType

Wrapper for the struct vaccel_tf_status C object.

Manages the creation and initialization of a C struct vaccel_tf_status and provides access to it through Python properties.

Inherits

CType: Abstract base class for defining C data types.

Parameters:

Name Type Description Default

error_code πŸ”—

int

The error code to be passed to the C struct. Defaults to 0.

0

message πŸ”—

str

The message to be passed to the C struct. Defaults to "".

''
Source code in vaccel/ops/tf/status.py
def __init__(self, error_code: int = 0, message: str = ""):
    """Initializes a new `Status` object.

    Args:
        error_code: The error code to be passed to the C struct. Defaults
            to 0.
        message: The message to be passed to the C struct. Defaults to "".
    """
    self._error_code = error_code
    self._message = message
    self._c_obj_ptr = ffi.NULL
    super().__init__()

c_size property πŸ”—

c_size: int

Returns the size of the object in bytes.

code property πŸ”—

code: int

The status error code.

Returns:

Type Description
int

The code of the status.

message property πŸ”—

message: str

The status message.

Returns:

Type Description
str

The message of the status.

value property πŸ”—

value: CData

Returns the value of the underlying C struct.

Returns:

Type Description
CData

The dereferenced 'struct vaccel_tf_status`