Nyx Node
Loading...
Searching...
No Matches
indi_message.py
1# -*- coding: utf-8 -*-
2########################################################################################################################
3# NyxNode
4# Author: Jérôme ODIER <jerome.odier@lpsc.in2p3.fr>
5# SPDX-License-Identifier: GPL-3.0+
6########################################################################################################################
7
8from .. import bind
9from .. import json
10
11from . import utils
12
13########################################################################################################################
14
15@utils.nyx_property(
16 'device',
17 '@device',
18)
19@utils.nyx_property(
20 'message',
21 '@message',
22)
24 """!
25 @brief INDI / Nyx human-oriented message object.
26 """
27
28 ####################################################################################################################
29
30 def __init__(self, device: str, message: str | None = None):
31 """!
32 @brief Allocates a new INDI / Nyx human-oriented message object.
33
34 @param device Device name.
35 @param message Human-oriented message.
36
37 @note Prefer using `NyxNode.send_message()`.
38 """
39
40 super().__init__(bind.lib.nyx_message_new(
41 bind.as_bytes(device, allow_none = False),
42 bind.as_bytes(message, allow_none = True)
43 ))
44
45########################################################################################################################
46
47__all__ = [name for name in globals() if name.lower().startswith('nyx')]
48
49########################################################################################################################
INDI / Nyx human-oriented message object.
__init__(self, str device, str|None message=None)
Allocates a new INDI / Nyx human-oriented message object.
JSON dict object.
Definition json_dict.py:22