libmxidaf_py Reference¶
Value Types¶
-
class
libmxidaf_py.
Tag
¶ Tag object. Modeled on a reading value.
-
__init__
((Value)value, (Time)at, (str)unit) → object¶ Constructor.
-
at
() → Time¶ Gets the tag timestamp.
-
unit
() → str¶ Gets the unit value.
-
value
() → Value¶ Gets the tag value.
-
-
class
libmxidaf_py.
Value
¶ Represents a reading value. Can be an integer, unsigned integer, float, or string. Use the is_*() functions to determine the value type. Use the as_*() functions to retrieve the actual value.
-
__init__
((object)value) → object¶ Constructor.
-
__str__
() → str¶
-
as_bytearray
() → object¶
-
as_float
() → float¶
-
as_int
() → int¶
-
as_string
() → str¶
-
as_uint
() → int¶
-
is_bytearray
() → bool¶
-
is_float
() → bool¶
-
is_int
() → bool¶
-
is_string
() → bool¶
-
is_uint
() → bool¶
-
-
class
libmxidaf_py.
Time
¶ Represents a time point in Coordinated Universal Time (UTC) with millisecond-level accuracy.
-
__init__
((int)year, (int)month, (int)day, (int)hour, (int)minute, (int)second, (int)millisec) → object¶ Constructor.
-
__str__
() → str¶
-
day
() → int¶
-
hour
() → int¶
-
millisec
() → int¶
-
minute
() → int¶
-
month
() → int¶
-
static
now
() → Time [STATIC]¶
-
second
() → int¶
-
year
() → int¶
-
TagV2¶
-
class
libmxidaf_py.
TagV2
¶ Tag Library V2.
-
__init__
()¶ Raises an exception This class cannot be instantiated from Python
-
static
instance
() → TagV2 [STATIC]¶ Get a TagV2 instance.
-
publish
((str)equipment_name, (str)tag_name, (Tag)tag) → None¶ Publish the tag associated with the given equipment_name/tag_name.
-
subscribe
((str)equipment_name, (str)tag_name) → None¶ Subscribe to a tag.
-
subscribe_callback
((object)on_tag_callback) → None¶ Register a callback function for a new Tag.
-
unsubscribe
((str)equipment_name, (str)tag_name) → None¶ Unsubscribe from a tag.
-
enable_publish_in_dst
((bool)enable) → None¶ Enable/Disable day light saving effect to the publishing UTC timestamp.
-
Modbus¶
-
class
libmxidaf_py.
Modbus
¶ Provides access to the Modbus object instance.
-
__init__
()¶ Raises an exception This class cannot be instantiated from Python
-
static
instance
() → Modbus [STATIC]¶ Gets the Modbus object instance.
-
read
((str)equipment_name, (str)tag_name[, (int)timeout_ms]) → Tag¶ Provides read access to the Modbus object instance.
-
write
((str)equipment_name, (str)tag_name, (Tag)tag[, (int)timeout_ms]) → None¶ Provides write access to the Modbus object instance.
-