Exemplo n.º 1
0
    def Set_SineWave_Frequencies(self, request, context):
        global errorStr
        errorStr = "OK"
        logger.info("Setting frequencies to sine wave pattern")
        response = messagesNFD.ServiceResponse()

        response.Success = self._doSine()
        response.Reason = errorStr

        return response
Exemplo n.º 2
0
    def Set_Random_Frequencies(self, request, context):
        global errorStr
        errorStr = "OK"
        logger.info("Setting frequencies to random pattern")
        response = messagesNFD.ServiceResponse()

        response.Success = self._doRandom()
        response.Reason = errorStr

        return response
Exemplo n.º 3
0
    def Set_All_Core_Percent_Frequency(self, request, context):
        global errorStr
        logger.info("Processing Set_All_Core_Percent_Frequency request")
        response = messagesNFD.ServiceResponse()
        errorStr = "OK"

        responseCode = self._setAllCoreFrequencyPercent(request.Frequency)
        response.Success = responseCode
        response.Reason = errorStr

        return response
Exemplo n.º 4
0
    def Set_Core_Govenor(self, request, context):
        global errorStr
        logger.info("Processing Set_Core_Govenor request")
        response = messagesNFD.ServiceResponse()
        errorStr = "OK"

        coreList = range_expand(request.Core_List)
        responseCode = set_governor(request.Core_Govenor, coreList)
        response.Success = responseCode
        response.Reason = errorStr

        return response
Exemplo n.º 5
0
    def Set_Core_Min_Frequency(self, request, context):
        global errorStr
        logger.info("Processing Set_Core_Min_Frequency request")
        response = messagesNFD.ServiceResponse()
        errorStr = "OK"

        coreList = range_expand(request.Core_List)

        responseCode = set_min_cpu_freq(request.Frequency, coreList)
        response.Success = responseCode
        response.Reason = errorStr

        return response
Exemplo n.º 6
0
    def Set_Core_Percent_Frequency(self, request, context):
        global errorStr

        logger.info("Processing Set_Core_Percent_Frequency request")
        response = messagesNFD.ServiceResponse()
        errorStr = "OK"

        coreList = range_expand(request.Core_List)
        for core in coreList:
            responseCode = self._setCoreFrequencyPercent(
                core, request.Frequency)
            response.Success = responseCode
            response.Reason = errorStr

        return response