def setWeekendHolidaySchedules(self, new_wknd, new_hldy, password="00000000"):
        """ Serial call to set weekend and holiday :class:`~ekmmeters.Schedules`.

        Args:
            new_wknd (int): :class:`~ekmmeters.Schedules` value to assign.
            new_hldy (int): :class:`~ekmmeters.Schedules` value to assign.
            password (str): Optional password..

        Returns:
            bool: True on completion and ACK.
        """
        result = False
        self.setContext("setWeekendHolidaySchedules")
        try:
            if not self.request(False):
                self.writeCmdMsg("Bad read CRC on setting")
            else:
                if not self.serialCmdPwdAuth(password):
                    self.writeCmdMsg("Password failure")
                else:
                    req_wkd = binascii.hexlify(str(new_wknd).zfill(2))
                    req_hldy = binascii.hexlify(str(new_hldy).zfill(2))
                    req_str = "015731023030433028" + req_wkd + req_hldy + "2903"
                    req_str += self.calc_crc16(req_str[2:].decode("hex"))
                    self.m_serial_port.write(req_str.decode("hex"))
                    if self.m_serial_port.getResponse(self.getContext()).encode("hex") == "06":
                        self.writeCmdMsg("Success(setWeekendHolidaySchedules): 06 returned.")
                        result = True
            self.serialPostEnd()
        except:
            ekm_log(traceback.format_exc(sys.exc_info()))

        self.setContext("")
        return result
def setWeekendHolidaySchedules(self, new_wknd, new_hldy, password="00000000"):
        """ Serial call to set weekend and holiday :class:`~ekmmeters.Schedules`.

        Args:
            new_wknd (int): :class:`~ekmmeters.Schedules` value to assign.
            new_hldy (int): :class:`~ekmmeters.Schedules` value to assign.
            password (str): Optional password..

        Returns:
            bool: True on completion and ACK.
        """
        result = False
        self.setContext("setWeekendHolidaySchedules")
        try:
            if not self.request(False):
                self.writeCmdMsg("Bad read CRC on setting")
            else:
                if not self.serialCmdPwdAuth(password):
                    self.writeCmdMsg("Password failure")
                else:
                    req_wkd = binascii.hexlify(str(new_wknd).zfill(2))
                    req_hldy = binascii.hexlify(str(new_hldy).zfill(2))
                    req_str = "015731023030433028" + req_wkd + req_hldy + "2903"
                    req_str += self.calc_crc16(req_str[2:].decode("hex"))
                    self.m_serial_port.write(req_str.decode("hex"))
                    if self.m_serial_port.getResponse(self.getContext()).encode("hex") == "06":
                        self.writeCmdMsg("Success(setWeekendHolidaySchedules): 06 returned.")
                        result = True
            self.serialPostEnd()
        except:
            ekm_log(traceback.format_exc(sys.exc_info()))

        self.setContext("")
        return result
def setWeekendHolidaySchedules ( self , new_wknd , new_hldy , password = "00000000" ) : result = False self . setContext ( "setWeekendHolidaySchedules" ) try : if not self . request ( False ) : self . writeCmdMsg ( "Bad read CRC on setting" ) else : if not self . serialCmdPwdAuth ( password ) : self . writeCmdMsg ( "Password failure" ) else : req_wkd = binascii . hexlify ( str ( new_wknd ) . zfill ( 2 ) ) req_hldy = binascii . hexlify ( str ( new_hldy ) . zfill ( 2 ) ) req_str = "015731023030433028" + req_wkd + req_hldy + "2903" req_str += self . calc_crc16 ( req_str [ 2 : ] . decode ( "hex" ) ) self . m_serial_port . write ( req_str . decode ( "hex" ) ) if self . m_serial_port . getResponse ( self . getContext ( ) ) . encode ( "hex" ) == "06" : self . writeCmdMsg ( "Success(setWeekendHolidaySchedules): 06 returned." ) result = True self . serialPostEnd ( ) except : ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) self . setContext ( "" ) return result
Serial call to set weekend and holiday :class:`~ekmmeters.Schedules`.

        Args:
            new_wknd (int): :class:`~ekmmeters.Schedules` value to assign.
            new_hldy (int): :class:`~ekmmeters.Schedules` value to assign.
            password (str): Optional password..

        Returns:
            bool: True on completion and ACK.
Serial call to set weekend and holiday : class : ~ekmmeters . Schedules .