webcface.client_data module

class webcface.client_data.ClientData(name: str, logger_internal: Logger, auto_reconnect: bool)[source]

Bases: object

auto_reconnect: bool
canvas2d_store: SyncDataStore2[Canvas2DData, None]
canvas3d_store: SyncDataStore2[Canvas3DData, None]
clear_msg() None[source]
connected: bool
func_listener_handlers: Dict[str, List[CallHandle]]
func_result_store: FuncResultStore
func_store: SyncDataStore2[FuncInfo, None]
get_member_id_from_name(name: str) int[source]
get_member_name_from_id(m_id: int) str[source]
has_msg() bool[source]
image_store: SyncDataStore2[ImageFrame, ImageReq]
is_self(member: str) bool[source]
log_store: SyncDataStore2[LogData, None]
logger_internal: Logger
member_ids: Dict[str, int]
member_lib_name: Dict[int, str]
member_lib_ver: Dict[int, str]
member_remote_addr: Dict[int, str]
on_canvas2d_change: Dict[str, Dict[str, Callable]]
on_canvas2d_entry: Dict[str, Callable]
on_canvas3d_change: Dict[str, Dict[str, Callable]]
on_canvas3d_entry: Dict[str, Callable]
on_func_entry: Dict[str, Callable]
on_image_change: Dict[str, Dict[str, Callable]]
on_image_entry: Dict[str, Callable]
on_log_change: Dict[str, Callable]
on_log_entry: Dict[str, Callable]
on_member_entry: Callable | None
on_ping: Dict[str, Callable]
on_sync: Dict[str, Callable]
on_text_change: Dict[str, Dict[str, Callable]]
on_text_entry: Dict[str, Callable]
on_value_change: Dict[str, Dict[str, Callable]]
on_value_entry: Dict[str, Callable]
on_view_change: Dict[str, Dict[str, Callable]]
on_view_entry: Dict[str, Callable]
ping_status: Dict[int, int]
ping_status_req: bool
pop_msg() List[MessageBase] | None[source]
queue_first() None[source]
queue_msg_always(msgs: List[MessageBase]) None[source]

メッセージをキューに入れる

queue_msg_online(msgs: List[MessageBase]) bool[source]

接続できていればキューに入れtrueを返す

queue_msg_req(msgs: List[MessageBase]) bool[source]

msg_firstが空でなければキューに入れtrueを返す

recv_cv: Condition
recv_queue: List[bytes]
self_member_id: int | None
self_member_name: str
svr_hostname: str
svr_name: str
svr_version: str
sync_init_end: bool
sync_time_store: SyncDataStore1[datetime]
text_store: SyncDataStore2[float | bool | str, None]
value_store: SyncDataStore2[List[float], None]
view_store: SyncDataStore2[ViewData, None]
wait_empty(timeout: float | None = None) None[source]
wait_msg(timeout: float | None = None) None[source]
class webcface.client_data.FuncResultStore[source]

Bases: object

add_result(caller: str, base: Field) Promise[source]
del_result(caller_id: int) None[source]
get_result(caller_id: int) PromiseData[source]
lock: allocate_lock
results: List[PromiseData | None]
class webcface.client_data.SyncDataStore1(name: str)[source]

Bases: Generic[T]

add_req(member: str) bool[source]
clear_entry(member: str) None[source]
clear_req(member: str) bool[source]
data_recv: Dict[str, T]
entry: List[str]
get_entry(member: str) bool[source]
get_recv(member: str) T | None[source]
is_self(member: str) bool[source]
lock: RLock
req: Dict[str, bool]
self_member_name: str
set_entry(member: str) None[source]
set_recv(member: str, data: T) None[source]
transfer_req() Dict[str, bool][source]
class webcface.client_data.SyncDataStore2(name: str, should_send: Callable | None = None)[source]

Bases: Generic[T, R]

add_req(member: str, field: str, req_data: R | None = None) int[source]
data_recv: Dict[str, Dict[str, T]]
data_send: Dict[str, T]
data_send_prev: Dict[str, T]
entry: Dict[str, List[str]]
get_entry(member: str) List[str][source]
get_members() List[str][source]
get_recv(member: str, field: str) T | None[source]
get_req(i: int, sub_field: str) Tuple[str, str][source]
get_req_info(member: str, field: str) R | None[source]
get_send_prev(is_first: bool) Dict[str, T][source]
init_member(member: str) None[source]
is_self(member: str) bool[source]
lock: RLock
req: Dict[str, Dict[str, int]]
req_info: Dict[str, Dict[str, R]]
self_member_name: str
set_entry(member: str, field: str) None[source]
set_recv(member: str, field: str, data: T) None[source]
set_send(field: str, data: T) None[source]
static should_not_send_twice(prev, current) bool[source]
should_send: Callable
static should_send_always(prev, current) bool[source]
static should_send_on_change(prev, current) bool[source]
transfer_req() Dict[str, Dict[str, int]][source]
transfer_send(is_first: bool) Dict[str, T][source]
unset_recv(member: str, field: str) bool[source]