AnsweredAssumed Answered

Cannot change ACE context schedule period to less than 0.6 seconds with code

Question asked by VarbanVarbanov on Nov 11, 2015
Latest reply on Nov 11, 2015 by asorokina

Hi, we use the following code to change ACE context schedule period:

...

// stop module

  var contextRegistrationPath = String.Format("{0}\\{1}\\{2}\\{3}",_defaultServerName, executableName, moduleName, fullContextModulePath);
  var isOk = PIACEMDBFunctions.AddPIACEContextSchedule(contextRegistrationPath, CreateContextScheduleInfo(offset, period));
// start module

private NamedValues CreateContextScheduleInfo(double offset, double periodInSeconds)
        {
            var values = new NamedValuesClass();
            values.Add("Type", 0);
            values.Add("Offset", offset);
            values.Add("Period", periodInSeconds);
            values.Add("Priority", 3);
            return values;
        }

 

The code works with any period values higher than 0.5 seconds (I haven't investigated the exact border value), but does not work with 0.5 seconds and below (the PIACEMDBFunctions.AddPIACEContextSchedule just returns false and the period is not changed). It seems that this is not a formatting issue because it works with 0.6 but not with 0.5 and it also does not work if the value, passed to the method is a scientific notation string.


We are aware that the functions in PIACEMDBFunctions class are for internal use and OSI Soft does not guarantee that they work, however despite that any help will be highly appreciated.

 

Thanks in advance!

Outcomes