Beispiel #1
0
def make_zcl_header(command_id: int, global_command: bool = True) -> zcl_f.ZCLHeader:
    """Cluster.handle_message() ZCL Header helper."""
    if global_command:
        frc = zcl_f.FrameControl(zcl_f.FrameType.GLOBAL_COMMAND)
    else:
        frc = zcl_f.FrameControl(zcl_f.FrameType.CLUSTER_COMMAND)
    return zcl_f.ZCLHeader(frc, tsn=1, command_id=command_id)
Beispiel #2
0
 def __init__(self, tsn, command_id, is_reply):
     frc = foundation.FrameControl()
     frc.is_reply = is_reply
     frc.frame_type = foundation.FrameType.CLUSTER_COMMAND
     super().__init__(frame_control=frc,
                      tsn=tsn,
                      command_id=command_id)