DBBC3Multicast
Module¶
This module is part of the DBBC3 package and implements the muticast functionality.
- class DBBC3MulticastAbstract¶
Abstract base class for all derived Multicast classes
- class DBBC3MulticastBase(group, port, timeout)¶
Base class that contains the multicast functionality common to all modes and software versions.
All classes that contain multicast content specific to a particaular mode and software version should be derived from this class.
- Note:
All derived sub-classes must follow the naming convention DBBC3Mutlicast_*modei*_*version*
- Args:
group (str, optional): the multicast group to use (default: 224.0.0.255) port (int, optional): the multicast port to use (default: 25000) timeout (int, optional): the socket timeout in seconds (default: 10)
- property lastMessage¶
dict: Returns the last received multicast message dictionary
- poll()¶
Poll and parse the next multicast message
- Returns
None
- class DBBC3MulticastFactory¶
Factory class to create an instance of a Multicast sub-class matching the current DBBC3 mode and software version
- create(group='224.0.0.255', port=25000, timeout=10)¶
Return an instance of the Multicast sub-class that matches the currently running mode and software version
- Parameters
group (str, optional) – the multicast group to use (default: 224.0.0.255)
port (int, optional) – the multicast port to use (default: 25000)
timeout (int, optional) – the socket timeout in seconds (default: 10)
- Returns
the instance of the multicast class matching the current mode and software version
- class DBBC3Multicast_DDC_U_125(group, port, timeout)¶
Class for parsing multicast broadcasts specific to the the DDC_U 125 mode/version.
- property lastMessage¶
dict: Returns the last received multicast message dictionary
- poll()¶
Parses the multicast message
The multicast message from the DBBC3 is parsed and the contents are returned in a multidimensional dictionary with the following structure:
"majorVersion" (int): the major version of the running DBBC3 control software "minorVersion" (int): the minor version of the running DBBC3 control software "minorVersionString" (str): a human readable string of the minor version of the running DBBC3 control software "mode" (str): the mode of the the running DBBC3 control software "if_{1..8}" (dict): dictionaries holding the parameters of IF 1-8
- Returns
None
- class DBBC3Multicast_OCT_D_120(group, port, timeout)¶
Class for parsing multicast broadcasts specific to the the DDC_U 125 mode/version.
- property lastMessage¶
dict: Returns the last received multicast message dictionary
- poll()¶
Parses the multicast message
The multicast message from the DBBC3 is parsed and the contents are returned in a multidimensional dictionary with the following structure:
"majorVersion" (int): the major version of the running DBBC3 control software "minorVersion" (int): the minor version of the running DBBC3 control software "minorVersionString" (str): a human readable string of the minor version of the running DBBC3 control software "mode" (str): the mode of the the running DBBC3 control software "if_{1..8}" (dict): dictionaries holding the parameters of IF 1-8
- Returns
None
DBBC3MulticastFactory
class¶
This module is part of the DBBC3 package and implements the muticast functionality.
- class DBBC3MulticastFactory¶
Bases:
object
Factory class to create an instance of a Multicast sub-class matching the current DBBC3 mode and software version
- create(group='224.0.0.255', port=25000, timeout=10)¶
Return an instance of the Multicast sub-class that matches the currently running mode and software version
- Parameters
group (str, optional) – the multicast group to use (default: 224.0.0.255)
port (int, optional) – the multicast port to use (default: 25000)
timeout (int, optional) – the socket timeout in seconds (default: 10)
- Returns
the instance of the multicast class matching the current mode and software version