コード例 #1
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return '{}{}{}{}{}'.format(to_ascii_hex(self._index, 2),
                                to_ascii_hex(self._group_number, 2),
                                to_ascii_hex(self._unit_number, 2),
                                to_ascii_hex(int(self._enable_status), 4),
                                to_ascii_hex(int(self._switches), 4))
コード例 #2
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return '{}{}{}'.format(
         ChangeSpecialDeviceCommand.args,
         to_ascii_hex(
             encode_value_using_ma(self._message_attribute,
                                   self._control_high_limit), 2),
         to_ascii_hex(
             encode_value_using_ma(self._message_attribute,
                                   self._control_low_limit), 2))
コード例 #3
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return to_ascii_hex(self._index, 3)
コード例 #4
0
 def name(self) -> str:
     """Provides the command name."""
     return CMD_SWITCH_PREFIX + to_ascii_hex(self._switch_number.value, 1)
コード例 #5
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return to_ascii_hex(self._switch_state, 1)
コード例 #6
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return to_ascii_hex(self._entry_delay, 2)
コード例 #7
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return '{}{}{}{}{}{}{}{}{}{}{}'.format(
         to_ascii_hex(self._index, 2), to_ascii_hex(self._group_number, 2),
         to_ascii_hex(self._unit_number, 2),
         to_ascii_hex(int(self._enable_status), 4),
         to_ascii_hex(int(self._switches), 4),
         to_ascii_hex(self._current_status, 2),
         to_ascii_hex(self._down_count, 2),
         to_ascii_hex(
             encode_value_using_ma(self._message_attribute,
                                   self._current_reading), 2),
         to_ascii_hex(
             encode_value_using_ma(self._message_attribute,
                                   self._high_limit), 2),
         to_ascii_hex(
             encode_value_using_ma(self._message_attribute,
                                   self._low_limit), 2),
         to_ascii_hex(int(self._special_status), 2))
コード例 #8
0
 def args(self) -> str:
     """Provides arguments for the command."""
     return '{}{}'.format(to_ascii_hex(self._group_number, 2),
                          to_ascii_hex(self._unit_number, 2))